相关疑难解决方法(0)

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

给定图G,为什么跟随贪心算法不能保证找到最大的独立 G :

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

7
推荐指数
1
解决办法
6896
查看次数

标签 统计

algorithm ×1

graph-theory ×1