相关疑难解决方法(0)

为什么贪婪算法没有找到二分图的最大独立集?

我试图使用贪婪方法解决二分图上的最大独立集问题.所以遇到了这篇文章,这正是我试图做的事情.但我只关注二分图.答案中的反案例不是二分图.是否有任何二分图表这个不适用?

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
Run Code Online (Sandbox Code Playgroud)

为什么贪心算法没有找到最大的独立图集?

algorithm graph-theory graph

6
推荐指数
1
解决办法
1537
查看次数

标签 统计

algorithm ×1

graph ×1

graph-theory ×1