linguistic:translation
Polynomial time verifier

The Hamiltonian path problem is NP-Complete meaning a proposed solution can be verified in polynomial time.

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, c. For the Hamiltonian Path problem, c would consist of a string of vertices where the first vertex is the start of the proposed path and the last is the end. The algorithm will determine if c is a valid 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.

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.