【问题标题】:Finding minimum cut edges in a graph在图中找到最小切割边
【发布时间】:2011-04-27 21:16:31
【问题描述】:

给定一个随机的无向图,我必须找到“瓶颈边”(编辑:最小切割边)才能从一个顶点到另一个顶点。

我称之为“瓶颈边缘”(编辑:最小切割边缘)—— 假设我有以下无向图:

    A
  / | \
 B--C--D
 |     |
 E--F--G
  \ | /
    H

要从 A 到 H 独立于选择的路径边 BE 和 DG 必须始终被遍历,因此形成“瓶颈”(编辑:最小切割)。

有这方面的多项式时间算法吗?

【问题讨论】:

  • HE HF 和 HG 是否也被视为瓶颈?你有不同的定义吗?
  • 这听起来很像Travelling salesman problem,只是用计算时间代替了距离。与您的问题特别相关的是Bottleneck traveling salesman problem
  • 你的意思是边BE DG必须总是被遍历?
  • sawa:是的,说 BE 或 DG 可能更正确

标签: algorithm graph complexity-theory


【解决方案1】:

听起来您需要最小切割,即去除最小边集,这会将您的图形分成两部分。

http://en.wikipedia.org/wiki/Minimum_cut

【讨论】:

  • 这很可能是它。并使用 Max flow = min-cut :-)
  • 谢谢,是的,这是最低限度的! :)
【解决方案2】:

您正在寻找的是cut。给定一个图,割是一组边,将顶点划分为两个不相交的子集。

假设您试图获得尽可能小的切割,这就是经典的最小切割问题。这是Ford-fulkerson 算法的伪代码版本,针对您的情况进行了重新设计(无向、未加权图)。我很确定它应该可以工作,但我不确定我是这里最有效/最惯用的。

reorganize your graph into a directed graph,
  with two directed edges (u->v, v->u) for each original edge (u-v)

while there is a path P from A to H:
  (hint: use breadth first search to find paths - long story here)
  //augment the path P:
  for each edge (u->v) in P:
    remove (u->v) from the graph and add (v->u) to it
    (if v->u isn't there already)

Label all vertices as reacheable or not reacheable from A.

The bottleneck edges is the set of edges
  that connect a reacheable and a unreacheable vertex

例如,在您的情况下,BFS 会给我们路径 A-B-E-H。去掉这些边后,我们仍然可以找到路径 A-D-G-H。删除这些边后,图被划分为可达顶点 {A,B,C,D} 和不可达顶点 {E,F,G,H}。具有来自每个(B-E 和 D-G)集合的顶点的边是瓶颈边。

【讨论】:

  • 我忘记了使用 BFS 是否允许我们直接移除边缘(在这个未加权、无向的情况下),而不是做所有有向边缘的事情。有人记得这个吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-03-04
  • 1970-01-01
  • 2018-06-29
  • 2011-05-08
  • 1970-01-01
  • 2011-05-27
相关资源
最近更新 更多