Number of ways an ant can move from the origin to $(16,16)$ in an odd number of direction changes

combinatorics

An ant is standing at the origin. It makes its way from $(0,0)$ moving one unit in the positive $x$ or $y$ direction at a time, so the ant changes directions an odd number of times. How many ways can this be done?

So far I've tried to map out a few ways, and see if I can make some formulas based on relating the number of $x$ movements and $y$ movements, but it isn't doing the best job of addressing all the ways this can be done.

Any ideas? Any and all help is appreciated.

Best Answer

Denoting a right step by $R$ and an upward step by $U$, odd number of direction changes means, if the very first step is $R$, the very last step is $U$ and vice-versa.

If we ignore the very first and very last steps, our desired paths fall in two categories :

  • All paths beginning at $(1,0)$ (after taking first step $R$) and ending at $(16,15)$, to finish with an $U$ step on $(16,16)$. Number of such paths is $\dbinom{30}{15}$
  • All paths starting at $(0,1)$ and ending at $(15,16)$. By symmetry or direct counting, again this is $\dbinom{30}{15}$

Hence answer is $\; 2\times \dbinom{30}{15}$

Related Question