【问题标题】:Algorithm to find 'maximal' independent set in a simple graph在简单图中找到“最大”独立集的算法
【发布时间】:2010-06-03 01:04:27
【问题描述】:

换句话说,有人可以发布在简单图中找到“最大”独立集的方向吗?

我从 ETH 网站上读到了一些东西,它说人们可以在 O(n) 中找到这样的东西,只需选择一个随机顶点 v,然后扫描其余顶点并尝试查找从 v 到其余顶点是否存在边。

谢谢

【问题讨论】:

    标签: algorithm graph-theory


    【解决方案1】:

    是的,根据定义,最大独立集是一个独立集,在不违反“独立”条件的情况下,不能再向其添加顶点。

    因此,仅选择顶点直到您无法再选择为止会给您一个最大的独立集,可以在线性时间内完成(即线性 |V| + |E|)。

    注意,这与 最大 独立集不同,后者是最大可能大小的独立集,并且发现是 NP-Hard。

    【讨论】:

    • 但这是 O(m^2),其中 m 是您找到的独立集的大小。对于边缘很少的图,这接近 O(n^2)。
    • 边数是线性的。在图问题中,表示很重要,线性通常意味着 |V| + |E|。从技术上讲,输入的大小可能大于 |V| + |E|。抱歉,如果不清楚。我将编辑答案。
    • NP-Hard,这是否意味着也没有伪 P 解?
    • @Thomas。不,即使是子集和问题也是具有伪 P 解的 NP-Hard。 NP-Hard = 至少与 NP 中的任何问题一样难。它与伪 P 解决方案无关。如果这个问题也在 NP 中,那么它就变成了 NP-Complete。我不确定这是否在 NP 中,所以没有提及。
    【解决方案2】:

    在网上找到了这个,可能来自一个课程”伴随着文本“并行计算简介”,Addison Wesley,2003 年

    寻找最大独立集 (MIS)

    parallel MIS algorithms use randimization to gain
    concurrency (Luby's algorithm for graph coloring).
    
    Initially, each node is in the candidate set C. Each
    node generates a (unique) random number and
    communicates it to its neighbors.
    
    If a nodes number exceeds that of all its neighbors, it
    joins set I. All of its neighbors are removed from C.
    
    This process continues until C is empty.
    
    On average, this algorithm converges after O(log|V|)
    such steps.
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-01-25
      • 2012-12-04
      • 1970-01-01
      • 2013-01-23
      • 2013-05-22
      • 2017-06-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多