We study the crossing minimization problem in a layered graph drawing of rooted trees whose leaves have a given fixed order on the first layer. The task is to permute the vertices on the other layers to minimize the number of crossings. While this problem is known to be NP-hard for multiple trees even on just two layers, we give a polynomial-time algorithm for the restricted case of two trees. On the other hand, when restricting the number of layers to three, we describe an XP-algorithm in the number of trees.
翻译:我们研究在有根树的分层图绘制中的交叉最小化问题,其中各棵树的叶子在第一层上具有给定的固定顺序。任务是在其他各层上对顶点进行排列,以最小化交叉数量。尽管已知即使在仅有两层的情况下,该问题对于多棵树也是NP难的,但我们针对两棵树这一受限情形给出了一种多项式时间算法。另一方面,当将层数限制为三层时,我们描述了一种关于树数量的XP算法。