I came across this following problem:
One ant crawls along the grid of a large enough grid paper. The length of the small squares of the grid is $1$. If the ant crawls for a total length of $6$, what is the probability it will come back to where it starts assuming the ant moves randomly.
The answer is given as:
total number of ways ant can walk : $6 \cdot 6 \cdot 6 \cdot 6$
the number of favorable ways : $\binom{2 \cdot 3}{2} \cdot \binom{2 \cdot 3}{2} = 225$
Probability $ = \dfrac{225}{6 \cdot 6 \cdot 6 \cdot 6}$
I do not understand this results. Can someone please help with some intuition if the answer makes sense or not. Thanks in advance.
The solution is $400/4096$, which simplifies to $25/256$. This is just under a $10\%$ chance.
The ant makes $6$ moves. Each move, $L, R, U, D$ are equally likely (Left, Right, Up, Down). So if there were $1$ move, there would be $4$ equally likely possibilities. With $2$, there would be $4$ for the first move, then $4$ for the second. So there would be $4\times4 = 16$ total possibilities for the path it could take (though many would end up at the same location). Note that each path is equally likely. Similarly, there are $4^6 =4096$ path possibilities, all equally likely, for the ant with $6$ moves.
Now, note that there must be an even number of both horizontal & vertical moves (otherwise, the ant cannot return to the starting point. So either $0$ moves are vertical, $2$ are, $4$ are, or $6$ are. If $0$ moves are vertical, then there must be some permutation of the elements $LLLRRR$ for the ant's move. This results in ${6 \choose 3} = \frac{6!}{3!3!} = 20$ paths that return to start. If $2$ moves are vertical, then there are $\frac{6!}{2!2!} = 180$ paths that return to start, because we must have some permutation of $LLRRUD$. Note that if $6$ moves are vertical, there are the same number of returning paths as if $0$ moves were vertical (just replace left with down, and right with up). Similarly, the number of paths with $4$ vertical moves is the same as the number of paths with $2$ vertical moves.
So the total number of returning paths is $20+180+180+20 = 400$. The total number of paths, all equally likely, is $4096$. The probability of returning is then $400/4096$.