题目
The k-SPANNING TREE problem is the following.
Input: An undirected graph G = (V,E)
Output: Aspanningtreeof G in which each node has degree≤ k, if such a tree exists.
Show that fo rany k ≥2:
(a) k-SPANNING TREE is a search problem.
(b) k-SPANNING TREE is NP-complete. (Hint: Start with k = 2 and consider the relation between this problem and RUDRATA PATH.)
问题解答
(a)
确定生成树是否存在的问题,其实就是在看这个树中是否能包含这个图G的所有顶点,以及这个树中的所有顶点的度是否小于等于k,通过对G或者生成树实施搜索算法可以在多项式时间内解决上述问题,所以是搜索问题,也是NP问题。
(b)
2-SPANNING TREE是一个Rudrata-PATH问题,Rudrata-PATH问题规约到2-SPANNING TREE上,如果G有2-SPANNING TREE,那么它存在Rudrata-PATH,故K-SPANNING TREE问题可以被Rudrata-PATH问题规约,又因为Rudrata-PATH是NPC问题,所以K-SPANNING TREE问题也是NPC问题。