【算法期末作业】课本8.19 kite问题的NP完全问题证明

来源:互联网 发布:数据挖掘实战 pdf 编辑:程序博客网 时间:2024/05/16 12:00

一、题目描述:

8.19 Akite is a graph on an even number of vertices, say 2n, in which n of the vertices form a clique and the remaining n vertices are connected in a “tail” that consists of a path joined to one of the vertices of the clique. Given a graph and a goal g, the KITE problem asks for a subgraph which is a kite and which contains 2g nodes. Prove that KITE is NP-complete.


------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


二、解题思路:

在这道题中,一个称为风筝(kite)的图是一个具有偶数个顶点的图,这些顶点中有一半的顶点形成一个团,另一半的顶点由一个称为“尾巴”的路径连接,尾巴的某个端点与团中的一个顶点相连。题目给定了一个图和一个目标g,要求一个含有2g个顶点且是kite图的子图。

这道题让人可以很容易联想到最大团问题,因此考虑将最大团问题规约到kite问题。


------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


三、解题过程:

在图G=(V, E)中增加|V|个顶点,并将新增的每个顶点都分别与原先G中的不同顶点相连,因此形成|V|条新的边,记新形成的图为图G'。如果G'中存在2g个顶点且是kite图的子图,则G'中一定含有g个顶点形成的团,即G中一定含有g个顶点形成的团。如果G中存在含有g个顶点形成的团,则它与新加入的|V|条边形成了G'中顶点个数为2g的kite图。因此,G'中存在大小为2g的kite图当且仅当G中存在大小为g的团,最大团问题可规约至kite问题,故kite问题为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 exist. 找出一个无向图中顶点个数为k的独立集和团 这个问题其实挺像的,都可以将最大团问题规约到这个问题。思路都是在原图G中增加指定个数个顶点,构造一个新的图G',使G'存在满足要求的集合并不影响原图G中的集合。


原创粉丝点击