Algorithm to find 'maximal' independent set in a simple graph

非 Y 不嫁゛ 提交于 2019-12-31 03:00:52

问题


in words, can someone post directions towards finding the 'maximal' independent set in a simple graph?

I read up something from ETH site which said one can find such in O(n) by simply picking a random vertex v and than scanning the rest and attempting to find if there's an edge from v to the rest.

Thanks


回答1:


Yes, by definition, a maximal indpendent set is an independent set to which no more vertices can be added without violating the 'independence' condition.

So just picking vertices till you can pick no more would give you a maximal independent set, can be done in linear time (i.e. linear in |V| + |E|).

Note, this is different from maximum independent set, which is an independent set of the largest possible size and finding that is NP-Hard.




回答2:


Found this on the web, probably from a class" To accompany the text ``Introduction to Parallel Computing'', Addison Wesley, 2003

Finding a Maximal Independent Set (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.


来源:https://stackoverflow.com/questions/2962722/algorithm-to-find-maximal-independent-set-in-a-simple-graph

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!