在单词中,有人可以发布在简单图中找到“最大”独立集的方向吗?
我从ETH网站上读到了一些内容,表示只需选择一个随机顶点v就可以在O(n)中找到这样的东西,而不是扫描其余部分并试图找出从v到其余部分的边缘。
由于
答案 0 :(得分:5)
是的,根据定义,最大独立集是一个独立的集合,在不违反“独立性”条件的情况下不能再添加顶点。
所以只选择顶点直到你不能再选择会给你一个最大的独立集合,可以在线性时间内完成(即线性在| V | + | E |中)。
注意,这与最大独立集不同,后者是最大可能大小的独立集合,并且发现是NP-Hard。
答案 1 :(得分:0)
在网上找到这个,可能来自“伴随文本`并行计算简介'',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.