算法设计期末作业03-8.10

本文通过将一些已知的NP-完全问题进行泛化,证明了一系列新的问题也属于NP-完全类别,包括子图同构、最长路径、最大满意、稠密子图、稀疏子图、集合覆盖和可靠网络等问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

题目

Proving NP-completeness by generalization. For each of the problems below, prove that it is NP-complete by showing that it is a generalization of some NP-complete problem we have seen in this chapter.

  (a) SUBGRAPH ISOMORPHISM: Given as input two undirected graphs G and H, determine whether G is a subgraph of H (that is, whether by deleting certain vertices and edges of H we obtain a graph that is, up to renaming of vertices, identical to G), and if so, return the corresponding mapping of V (G) into V (H).

  (b) LONGEST PATH: Given a graph G and an integer g, find in G a simple path of length g.

  (c) MAX SAT: Given a CNF formula and an integer g, find a truth assignment that satisfies at least g clauses.

  (d) DENSE SUBGRAPH: Given a graph and two integers a and b, find a set of a vertices of G such that there are at least b edges between them.

  (e) SPARSE SUBGRAPH: Given a graph and two integers a and b, find a set of a vertices of G such that there are atmost b edges between them.

(f) SET COVER. (This problem generalizes two known NP-complete problems.)

  (g) RELIABLE NETWORK: We are given two n×n matrices,a distance matrix dij and a connectivity requirement matrix rij, as well as a budget b; we must find a graph G = ({1,2,…,n},E) such that (1) the total cost of all edges is b or less and (2)between any two distinct vertices i and j there are rij vertex-disjoint paths. (Hint: Suppose that all dij’s are 1 or 2, b = n,and all rij’s are 2. Which well known NP-complete problem is this ?)

问题解答

(a)
这道题我们只需要把CLIQUE问题规约到子图同构问题即可。不失一般性,我们给定G和一个完全图K,下面只需要证明(K,G)的实例的解是正确的当且仅当G有一个g个顶点的团,即去证明K是不是G的子图的问题。若K是G的子图,即给出(K,G)的一个肯定解,G有一个g个顶点的团。故必要性得证。若G 有一个g个顶点的团,g个顶点的完全图也是G的子图,故综上所述,得证。

(b)
其实就相当于找一条顶点数为g+1的哈密顿路,二者是对应的关系。

(c)
g表示句子的总数,显然MAX SAT和这个SAT是对应的关系

(d)
这道题其实是把CLIQUE规约成稠密子图的问题。令b=a(a-1)/2,由(a)显然(K,a,b)是稠密子图的一个实例解,当且仅当G中有一个g个顶点构成的团,且这个g个顶点是一个完全图,边数为a(a-1)/2。

(e)
这道题其实是把独立集规约成稀疏子图的问题。对于独立集问题(G,k),可以令a=k, b=0,于是任意两个顶点之间没有边,规约成功。

(f)
这道题其实是从点覆盖规约成集合覆盖。不失一般性,对于点覆盖问题(V, E),令集合覆盖问题中的K(最多可选的集合数),为点覆盖问题中最多可选边数,令所有集合元素的并集是点覆盖问题中的边集,令S(v)为和顶点v相邻的边的集合,故找点覆盖可以规约到找S(v)集合的集合覆盖。

(g)
这道题其实是TSP问题规约到可靠网络问题。即它是TSP问题的推广,可知它也是NPC的。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值