$P = NP$, what am I missing?
It is not clear what is your question, but I will guess that it is &quot;what is my mistake in my proof of $P = NP$?&quot;
In addition to the fact that the algorithm does not guarantee to find the minimal path (because the algorithm cant deterministicaly choose the endMem nodes), the number of possible $\log n$-walks given $\log n$ nodes is not polynomial: $(\log n)! \sim \left(\frac{\log n}{e}\right)^{\log n}\sqrt{2\pi\log n}\sim \frac{\sqrt{2\pi\log n}}{n}e^{\log n \log \log n}\sim \sqrt{2\pi\log n}\times n^{\log\log n - 1}$.
As for the space complexity, to check there are no overlap between two $\log n$-walks, you need to keep track of the whole path (and not only two consecutive $\log n$-walks). That needs $\Omega(n\log n)$ space ($n$ nodes with a binary encoding of size $\log n$). So the corresponding Turing Machine use polynomial space, not logarithmic space.