Is Hamiltonian path solvable in nondeterministic log space?

33 Views Asked by At

Is Hamiltonian path solvable in nondeterministic log space?

Vertices are notated in base 2

Keep two counters

First counter is current vertex

Second counter implies max vertex encountered in sequence. 0 means 1 is not encountered. 1 means 1 is encountered. 2 means 2 and 1 is encountered. etc.

Random walk starting at vertex 0

Hamiltonian path if and only if second counter equals max vertex.

Clearly log space.

Is this correct?

—-

1

There are 1 best solutions below

2
On

No, this algorithm is not correct.

It decides the existence of a walk from vertices 0 to n-1 of length n.