A one-dimensional path comprises seven steps, labelled $-3$ to $3$ (including $0$). Two people, A and B, are placed at positions $-1$ and $1$ respectively, and independently perform a random walk. What is the probability that A and B meet on the same step before either one reaches one end of the random walk?
My understanding is that since the random walk is one-dimensional, the probability that they must meet, ignoring the condition, is $1$ (this probability is not $1$ for transient walks which occur in $D\geq3$ dimensions). However, with the added condition, how does one draw the Markov chain, and how do the iterations work out? Is the way to finding the expected number of steps also equivalent?
I wrote some $\texttt{R}$ code to simulate this:
which is giving a result of $~0.46$.
This agrees with the recurrence I derived: $$ p = \frac14 +\frac12\left(\frac14+\frac14 p\right) + \left(\frac14\right)^2p $$ which yields $p=\frac6{13}$.