← RGPV CS-501-CBGS Theory of Computation December 2020 Solved Paper
Question
Write a short note on Hamiltonian path problem.
Asked in: CS-501 | December 2020 | 8(iii)
Answer
A Hamiltonian path visits every vertex of a graph exactly once. The decision problem asks whether a given graph contains such a path. A certificate is an ordering of all vertices; verify that every vertex appears once and consecutive vertices are adjacent. This takes polynomial time, so the problem belongs to NP. The general directed and undirected Hamiltonian path problems are NP-complete. For example, in a graph with edges AB, BC and CD, A,B,C,D is a Hamiltonian path. Unlike an Euler path, which visits every edge exactly once, a Hamiltonian path concerns vertices. A Hamiltonian cycle additionally returns to its starting vertex.
← RGPV CS-501-CBGS Theory of Computation December 2020 Solved Paper
Discussion
Ask a question, share your thoughts or report an error.
Sign in to participate in the discussion.
Join the discussion