Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Hamiltonian path problem
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Polynomial time verifier == [[File:Hamiltonian Path Problem.jpg|thumb|221x221px|The proposed solution {s,w,v,u,t} forms a valid Hamiltonian Path in the graph G.]] The Hamiltonian path problem is [[NP-completeness|NP-Complete]] meaning a proposed solution can be verified in [[Polynomial-time|polynomial time]].<ref name=":12"/> A verifier [[algorithm]] for Hamiltonian path will take as input a graph G, starting vertex s, and ending vertex t. Additionally, verifiers require a potential solution known as a [[Certificate (complexity)|certificate]], c. For the Hamiltonian Path problem, c would consist of a [[String (computer science)|string]] of vertices where the first vertex is the start of the proposed path and the last is the end.<ref name=":0">{{Cite web |last=Bun |first=Mark |date=November 2022 |title=Boston University Theory of Computation |url=https://cs-people.bu.edu/mbun/courses/332_F22/slides/CS332-Lec22.pdf}}</ref> The algorithm will determine if c is a valid [[Hamiltonian path|Hamiltonian Path]] in G and if so, accept. To decide this, the algorithm first verifies that all of the vertices in G appear exactly once in c. If this check passes, next, the algorithm will ensure that the first vertex in c is equal to s and the last vertex is equal to t. Lastly, to verify that c is a valid path, the algorithm must check that every edge between vertices in c is indeed an edge in G. If any of these checks fail, the algorithm will reject. Otherwise, it will accept.<ref name=":0" /><ref>{{Cite web |last=Bretscher |first=A |date=February 5, 2021 |title=University of Toronto CSCC63 Week 7 Lecture Notes |url=http://www.utsc.utoronto.ca/~bretscher/c63/lectures/w7.pdf}}</ref> The algorithm can check in polynomial time if the vertices in G appear once in c. Additionally, it takes polynomial time to check the start and end vertices, as well as the edges between vertices. Therefore, the algorithm is a polynomial time verifier for the Hamiltonian path problem.<ref name=":0" />
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Hamiltonian path problem
(section)
Add topic