求具有最小顶点数的图 g 的顶点覆盖.
FindVertexCover[{vw,…}]
使用规则 vw 指定图 g.
FindVertexCover
求具有最小顶点数的图 g 的顶点覆盖.
FindVertexCover[{vw,…}]
使用规则 vw 指定图 g.
更多信息
- FindVertexCover 返回顶点列表.
- 如果没有找到顶点覆盖则 FindVertexCover 将返回一个空列表.
- 顶点覆盖是与每条边相关联的顶点集合.
- FindVertexCover 作用于无向图、有向图、加权图、多重图和混合图.
背景
- FindVertexCover 求出图的单顶点覆盖,其中顶点覆盖是满足各边附带顶点条件的顶点的子集.
- FindVertexCover[g] 求图 g 的最小顶点覆盖(即最小尺寸的顶点覆盖),其中 FindVertexCover[g,k] 求大小为 k 的一个顶点覆盖. 图 g 的最小顶点覆盖尺寸被称作顶点覆盖数. 求一个普通图的最小顶点覆盖中(因此也是顶点覆盖数)的问题是一个非完全多项式,这就意味着计算可能是指数式的缓慢. 然而,对于双边图而言,一个最小顶点覆盖可以在多项式时间中求出.
- 顶点覆盖与独立定点集(即顶点集合,其中不存在属于同一条边的两个顶点)紧密相关. 特别地,当且仅当顶点集的补集构成一个独立顶点集时该顶点集是一个顶点覆盖. 因此一个图中的顶点覆盖数和独立顶点集的数目是相同的. 此外,无向图的独立数总和(即最大独立顶点大小)和顶点覆盖数(即最小顶点覆盖大小)等于顶点数.
- 一个图的顶点覆盖可以通过从最大独立边集中的各边中取端点形成.(其中,独立边集是一个边的集合,其中不存在共用一个顶点的边. 最大独立边集是一个给定图可能存在的最大独立边集合.)因此,最小顶点覆盖的大小总是不大于二倍的最大独立边集大小. König–Egerváry 定理指出二分图的最大独立边集大小(即匹配数)等于其顶点覆盖数.
- VertexCoverQ 可用于测试一个给定的顶点集是否能构成指定图的顶点覆盖. 因此应用 VertexCoverQ 于图顶点的任意想要求出的子集就是求多个顶点覆盖的一种显而易见的方法. 类似地, FindIndependentVertexSet 可用于在图中求出一个或多个最大独立顶点集,而其补集即为顶点覆盖. FindEdgeCover 执行的是与 FindVertexCover 对图的边覆盖相类似的测试.
范例
打开所有单元 关闭所有单元基本范例 (1)
范围 (7)
FindVertexCover 适用于无向图:
FindVertexCover[[image]]FindVertexCover[[image]]FindVertexCover[[image]]FindVertexCover[[image]]FindVertexCover[[image]]FindVertexCover[{1 -> 3, 2 -> 1, 3 -> 6, 4 -> 6, 1 -> 5, 5 -> 4, 6 -> 1}]FindVertexCover 可用于大规模图:
g = GridGraph[{10, 10, 10, 10}];FindVertexCover[g]//Length//Timing属性和关系 (6)
FindVertexCover 的结果可以用 VertexCoverQ 检验:
PetersenGraph[5, 2]VertexCoverQ[%, FindVertexCover[%]]g = GridGraph[{2, 3}]vc = FindVertexCover[g]IndependentVertexSetQ[g, Complement[VertexList[g], vc]]g = WheelGraph[8]Length[FindVertexCover[g]] + Length[First[FindIndependentVertexSet[g]]] == VertexCount[g]GraphComplement 中的顶点覆盖的补集是原图中的一个团:
g = GridGraph[{2, 3}]h = GraphComplement[g, VertexCoordinates -> GraphEmbedding[g]]FindVertexCover[h]Complement[VertexList[g], FindVertexCover[h]]Subgraph[g, %]CompleteGraphQ[%]CompleteGraph[{2, 4}]Length[FindVertexCover[%]] == Min[2, 4]g = CycleGraph[6]BipartiteGraphQ[g]Length[FindVertexCover[g]] == Length[FindIndependentEdgeSet[g]]文本
Wolfram Research (2010),FindVertexCover,Wolfram 语言函数,https://reference.wolfram.com/language/ref/FindVertexCover.html (更新于 2015 年).
CMS
Wolfram 语言. 2010. "FindVertexCover." Wolfram 语言与系统参考资料中心. Wolfram Research. 最新版本 2015. https://reference.wolfram.com/language/ref/FindVertexCover.html.
APA
Wolfram 语言. (2010). FindVertexCover. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/FindVertexCover.html 年
BibTeX
@misc{reference.wolfram_2026_findvertexcover, author="Wolfram Research", title="{FindVertexCover}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/FindVertexCover.html}", note=[Accessed: 06-November-2026]}
BibLaTeX
@online{reference.wolfram_2026_findvertexcover, organization={Wolfram Research}, title={FindVertexCover}, year={2015}, url={https://reference.wolfram.com/language/ref/FindVertexCover.html}, note=[Accessed: 06-November-2026]}