In this game, there will be $n$ turns. For the sake of clarity, let us say $n = 4$.
We have three options in this game: we can either stay in place ($O$), we can step to the left ($L$), or we can step to the right ($R$). However, the ability to step left only occurs on the the odd numbered turns, and the ability to step right only occurs on the even numbered turns. You may always choose to stay in place.
The goal of the game is to end up where you started. For example, this will work: $OOOO$, which represents always staying in place for each of the $n =4$ turns.
This will also work $LRLR$, as you will end up where you started with. Other examples are $ORLO$.
Note that $RLRL$ does not work, since you cannot step right on the odd numbered turns and you cannot step left on the even numbered turns.
Is there a way to find out (a) how many ways there are to do this?, (b) what is the distribution of these ways, labelled by the number of $L$ steps in total?
Observations:
- There must be the same number of $L$'s and $R$'s in your sequence.
- For $n$ odd, there must be an odd number of $O$'s.
- For $n$ even, there must be an even number of $O$'s.
Does anyone have any ideas? Is this a game anyone has played anywhere else before?
I am assuming $n$ is even in the below.
You need the same number of $L$ moves as $R$ moves. There are $\frac n2$ odd turns where you might move left. If you move left $k$ times, there are ${n/2 \choose k}$ ways to choose the moves for left and similarly for the ways to choose the moves for right, so the total number of ways to wind up at the beginning is to sum over $k$ and get $$\sum_{k=0}^{n/2}{n/2 \choose k}^2$$ Alpha tells me this is $$n \choose n/2$$ and there is a neat combinatorial proof. Choose $n/2$ of the $n$ moves. For all the chosen moves make an $L$ for odd moves and an $O$ for even moves. For the non-chosen moves make an $O$ for odd moves and an $R$ for even moves. We have a bijection between the selections of $n/2$ and the strings that return you to the origin because the number of selected odd moves matches the number of non-selected even moves.