algorithm - 图中的独立集

标签 algorithm math graph independent-set

如您所知,寻找最大独立集是 NP。是否有一种算法可以找出给定的图是否具有至少 k 个顶点的独立集?请注意,我们不想找到它。我们只是想知道是否存在这样的东西。

最佳答案

引用 Wikipedia :

In the independent set decision problem, the input is an undirected graph and a number k, and the output is a Boolean value: true if the graph contains an independent set of size k, and false otherwise.

这个问题是 NP 完全的。您的问题问的是同一个问题,只是措辞不同,因为图具有至少 k 个顶点的独立集当且仅当它具有恰好 k 个顶点的独立集.

这意味着您的问题也是 NP 完全问题。

关于algorithm - 图中的独立集,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3540877/

相关文章:

algorithm - 我怎样才能解决三角形内切的任意梯形的点?

arrays - 分区求和算法

math - 基于离散高度函数对网格内点的高度进行插值

java - 如何在 Marklogic 中同时查询不同类型文档的图表?

php - 从给定的多组集合中找出最佳组合

图像变形 - 凸起效应算法

java - 嵌套循环到数学模型中以计算操作次数

javascript - 如何获取圆弧和直线的交点?

python - matplotlib 怪异,它没有绘制我的图表

algorithm - 可供使用的图表数据来源