Which of the following are correct about Hamiltonian problems? A. The Hamiltonian cycle problem is NP-complete. B. If G is an undirected bipartite graph with an odd number of vertices, then G is Hamiltonian. C. The Hamiltonian path problem cannot be solved in polynomial time on a directed acyclic graph. D. If G is a connected undirected graph with at least three vertices, then G³ (obtained by connecting all pairs of vertices joined by a path of length at most 3 in G) is Hamiltonian. E. If any NP-complete problem is polynomial-time solvable, then P = NP.
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: C. A, D, E only
Explanation
A, D and E are true (D is a known result about the cube of a connected graph). A bipartite graph with an odd number of vertices can never be Hamiltonian, since a cycle alternates sides (B false). On a DAG, a Hamiltonian path is found in linear time with a topological sort (C false).
More Data Structures and Algorithms questions
- For matrix multiplication with a simple divide-and-conquer algorithm: A. the running time is T(n) = Θ(n³) B. the running time is T(n) = Θ(n…
- Match List I with List II
- Match List I with List II
- What is the maximum value of items you can carry if maximum weight allowed is 25 with a fractional knapsack?
- If new item is added to the list, total items is 8 and capacity is 25 , then the best-case time of fractional knapsack for this case is ___…
- Which of the following statements is correct for a knapsack?