证明HITTING SET 是NP完全

In the HITTING SET problem, we are given a family of sets {S1, S2, … , Sn} and a budget b, and we wish to find a set H of size <= b which intersects every Si, if such an H exists.In other words, we want H∩Si ≠ Ø for all i.

show that HITTING SET is NP-complete.

我们很容易就能把顶点覆盖规约到HITTING SET

证明:veriex cover -> hitting set
要找图G的一个顶点覆盖,我们可以找这样一个hitting set:
其中 S = {S1, S2, … , Sn} 为每条边的集合,Si = {Vi1, Vi2} 表示从节点Vi1到 Vi2的边。另b= G的顶点数N。
如果找到这样的一个Hitting set : H, 就代表着我们找到了一个,大小<=N, 且覆盖了每一条边的集合,那么它就是一个顶点覆盖。

因为veriex cover是NP完全的,veriex cover -> hitting set, 所以HITTING SET 是NP完全的

猜你喜欢

转载自blog.csdn.net/ulricalin/article/details/78975498
set
今日推荐