It feels as though this problem should be well-known, so I'm happy to simply be provided a reference if this is the case.
Consider a modified random walk in $\mathbb Z^2$ that proceeds as follows:
- The random walk starts at the origin.
- At each point $(x,y)$, we consider the set $S$ given by the points $\{ (x+1, y), (x-1, y), (x, y+1), (x, y-1) \}$ that have not yet been visited, and choose one at random to walk to. If at any point, this set $S$ is empty, the walk terminates.
In this way, the walk visits each point at most once, and terminates if at some point each of the four adjacent points have already been visited. For instance, here is such a walk I simulated which starts at the origin in blue and terminates at the point in red.
Questions:
- It seems as though the walk always terminates. Is it possible to prove that this occurs with probability 1?
- Is anything known about the distribution of the number of steps taken before termination?