(15 points) We consider the following problems of undirected graphs.(原題附 Figure 1:三張無向圖 (a)(b)(c),(a) 五點 A–E 的圖、(b) 同圖加邊權、(c) 同圖用粗線標出一棵 spanning tree。)
Hamiltonian cycle problem is to determine whether a graph has a Hamiltonian cycle. A Hamiltonian cycle of a graph is a cycle that goes through every node of the graph exactly once. For example, A-B-D-E-C-A is a Hamiltonian cycle in Figure 1 (a).
Hamiltonian path problem is to determine whether a graph has a Hamiltonian path. A Hamiltonian path from a node \(a\) to a node \(b\) is a path from \(a\) to \(b\) that goes through all the other nodes of the graph exactly once. For example, E-D-C-A-B is a Hamiltonian path from E to B in Figure 1 (a). We will consider two flavors of the Hamiltonian path problem. For the given endpoint Hamiltonian path problem we will be given two nodes \(a\) and \(b\) and determine if there is a Hamiltonian path between them. For the any endpoint Hamiltonian path problem we will determine if there is a Hamiltonian path between any two nodes in the graph.
Traveling salesman problem is to determine whether a traveling salesman can go through every city exactly once and return to the starting city, and the total traveling distance is within a given bound, when given the positive integer distance between every two cities. For example, A-B-D-E-C-A is a solution for the graph in Figure 1 (b) with a total distance 12.
Bounded degree spanning tree problem is to determine if a graph has a bounded degree spanning tree of a given degree \(D\). A spanning tree of degree \(D\) is a spanning tree in which the degrees of all tree nodes are bounded by \(D\). A spanning tree is a tree that spans all nodes, i.e., all nodes are in the tree. For example, the thick edges in Figure 1 (c) is a spanning tree of bounded degree 3 because it covers all nodes and the maximum degree among all tree nodes is 3.
Please prove the following three statements. Your proof must be concise and address the key ideas only. Each proof can only use at most 100 Chinese characters or 100 English words. Over-sized proofs will be ignored.
(a) (5 points) If the given endpoint Hamiltonian path problem is NP-complete, then the Hamiltonian cycle problem is also NP-complete.
(b) (5 points) If the Hamiltonian cycle problem is NP-complete, then the traveling salesman problem is also NP-complete.
(c) (5 points) If the any endpoint Hamiltonian path problem is NP-complete, then the bounded degree spanning tree problem is also NP-complete.
三個問題都在 NP:給一個 cycle/tour/spanning tree,多項式時間可驗證。所以只要從已知 NP-complete 的問題 reduce 過來
(a) given endpoint HP \((G,a,b)\) ≤ HC:\(G'=G\) 加新點 \(c\)、邊 \(ca,cb\)
\(a\)→\(b\) 的 Hamiltonian path + \(b\!-\!c\!-\!a\) = \(G'\) 的 Hamiltonian cycle;反過來 \(c\) 的 degree 只有 2,cycle 一定走 \(ca,cb\),拿掉 \(c\) 得 \(a\)→\(b\) 的 Hamiltonian path
\(G\) 有 \(a\)→\(b\) 的 Hamiltonian path \(\iff G'\) 有 Hamiltonian cycle
(b) HC \(G=(V,E)\) ≤ TSP:建完全圖,\(uv\in E\) 距離 1,否則 2;bound \(=|V|\)
tour 剛好 \(|V|\) 條邊,總長 \(\le|V|\) ⟺ 每條邊都是 1 ⟺ 每條都在 \(E\) 裡 ⟺ \(G\) 有 Hamiltonian cycle
\(G\) 有 Hamiltonian cycle \(\iff\) TSP 有長度 \(\le|V|\) 的 tour
(c) any endpoint HP \(G\) ≤ bounded degree spanning tree:圖不變,\(D=2\)
degree \(\le2\) 的 spanning tree 是連通、無 cycle、每點 degree \(\le2\) → 一條走過所有點的 path;反過來 Hamiltonian path 本身就是這種 tree
\(G\) 有 Hamiltonian path \(\iff G\) 有 degree \(\le2\) 的 spanning tree