我試圖用貪婪的方法解決二分圖上的最大獨立集問題。所以遇到這個職位,這正是我想要做的。但我只專注於二部圖。答案中的反案例不是雙方圖。有沒有任何二分圖,這一個不會工作?最大獨立集合的二分圖
Greedy(G):
S = {}
While G is not empty:
Let v be a node with minimum degree in G
S = union(S, {v})
remove v and its neighbors from G
return S
Why is greedy algorithm not finding maximum independent set of a graph?
請在這裏引用算法。有趣的問題,雖然。 – 2013-04-08 07:17:05
編輯!謝謝 – vinothkr 2013-04-08 07:20:10