algorithm - 最小化二分图中的交叉数

标签 algorithm graph bipartite planar-graph

在为不相关的事物绘制图形时,我遇到了以下算法问题:

enter image description here

我们有一个二分图的平面图,如图所示,不相交的集合按列排列。我们如何重新排列每列中的节点,以使边缘交叉的数量最小化?我知道这个问题对于一般图 ( link ) 是 NP-hard 问题,但是考虑到该图是二分图,是否有一些技巧?

作为后续,如果有第三列 w,它只有 v 的边怎么办?还是更远?

最佳答案

论文On the one-sided crossing minimization in a bipartite graph with large degrees by Hiroshi Nagamochi 提到 Garey 和 约翰逊还证明,最小化边交叉的数量 对于二分图是 NP 难的。其实还是NP难的 即使您被告知一列的最佳顺序:

Given a bipartite graph, a 2-layered drawing consists of placing nodes in the first node set V on a straight line L1 and placing nodes in the second node set W on a parallel line L2. The problem of minimizing the number of crossings between arcs in a 2-layered drawing was first introduced by Harary and Schwenk. The one-sided crossing minimization problem asks to find an ordering of nodes in V to be placed on L1 so that the number of arc crossings is minimized (while the ordering of the nodes in W on L2 is given and fixed). Applications of the problem can be found in VLSI layouts and hierarchical drawings.

However, the two-sided and one-sided problems are shown to be NP-hard by Garey and Johnson and by Eades and Wormald , respectively.

关于algorithm - 最小化二分图中的交叉数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20107645/

相关文章:

algorithm - 降低光线转换算法的 O(n²) 时间复杂度

c# - 用递归求解有向图

algorithm - 完全二部图中的最大乘积完美匹配

optimization - 覆盖一个分区的加权二分匹配

algorithm - Prim 算法和 Dijkstra 算法之间的区别?

algorithm - 二部图的优化

algorithm - 为以下问题提出线性时间解决方案

algorithm - 如何优化大列表聚合

algorithm - 如何将一组值分成两组固定大小,使得它们的总和接近特定值

javascript - 总结Cytoscape.js中的很多节点