问题描述:
8.15.
证明:show that the following problem is NP-Complete.
MAXIMUM COMMON SUBGRAPH
Input:two graph G1 = (V1, E1) and G2= (V2, E2)
output:two set of nodes of G1 and G2, represented by G1' and G2'
Output:two set of nodes V1' E V1 and V2' E V2 whose deletion leaves at least b nodes in each graph , and makes the two graph identical。
1、这个问题可以在O(V1 + E1)时间内验证,所以是一个NP问题。
2、为了证明问题是NP完全, 我们可以将最大独立集问题归约到这个问题。假设这个问题不是一个NP完全问题,我们构造G1 = (V,1 E1), G2=(V1,NULL)。
那么我们可以通过假设在更短时间复杂度内寻找到最大独立集的答案,这与我们的已知构成了矛盾,因此题设是一个NP完全问题。
8.14 prove that the following problem is NP-complete:given an undirected graph G = <V, E> and an integer k, return a clique of size k as well as an independent set of
size k, provided both existed.
1.这两个问题可以在多项式时间内验证,所以是NP问题。
2.为了证明问题是NP完全, 我们可以将最大独立集问题归约到这个问题。假设在原图中新添k个独立的点v1...vk。那么这个图同时满足存在着大小为k的独立集,且保持原来的最大团不变。这个问题可以由题设解得,因此与最大团问题是NP完全问题矛盾。因此题设是NP完全问题。