What is hamiltonian problem? explain with an example using backtracking?
Answers
Answered by
0
Hamiltonian Path in an undirected graph is a path that visits each vertex exactly once. A Hamiltonian cycle (or Hamiltonian circuit) is a Hamiltonian Path such that there is an edge (in graph) from the last vertex to the first vertex of the Hamiltonian Path. Determine whether a given graph contains Hamiltonian Cycle or not. If it contains, then print the path. Following are the input and output of the required function.
Similar questions
History,
7 months ago
Math,
7 months ago
Computer Science,
7 months ago
Social Sciences,
1 year ago
India Languages,
1 year ago
Social Sciences,
1 year ago
Science,
1 year ago