Olympiad Maths Prep

Track / Stage 5 / 150 of 400 #750 of 2000

Problem 750

AIME late
Combinatorics Difficulty 5.4 Find the answer

Example 7 A snail crawls along the grid lines on a sufficiently large square grid paper with a side length of 1, starting from a certain intersection. Each time it randomly chooses one of the four directions: up, down, left, or right, and crawls a unit length at a uniform speed. Find the probability that the snail returns to the starting point exactly after 2016 crawls.

Official solution

【Analysis】Let the random variables x1,x2,x3,x4x_{1}, x_{2}, x_{3}, x_{4} represent the values of the snail moving up, down, left, and right, respectively. It is clear that the random vector ξ=(x1,x2,x3,x4)\xi=\left(x_{1}, x_{2}, x_{3}, x_{4}\right) follows a multinomial distribution, with the generating function given by
φ(x1,x2,x3,x4)=(14x1+14x2+14x3+14x4)2016. \begin{array}{l} \varphi\left(x_{1}, x_{2}, x_{3}, x_{4}\right) \\ =\left(\frac{1}{4} x_{1}+\frac{1}{4} x_{2}+\frac{1}{4} x_{3}+\frac{1}{4} x_{4}\right)^{2016} . \end{array}

In the expansion of the above expression, the factors x1n1,x2n2,x3n3,x4n4x_{1}^{n_{1}}, x_{2}^{n_{2}}, x_{3}^{n_{3}}, x_{4}^{n_{4}} represent the snail moving up, down, left, and right by n1,n2,n3,n4n_{1}, n_{2}, n_{3}, n_{4} units, respectively. For the snail to return to the starting point after 2016 moves, it must be that n1=n2,n3=n4n_{1}=n_{2}, n_{3}=n_{4}.
In the generating function, let
x1=x,x2=1x,x3=y,x4=1y x_{1}=x, x_{2}=\frac{1}{x}, x_{3}=y, x_{4}=\frac{1}{y} \text {. }

Then x1n1x2n2x3n3x4n4=xn1n2yn3n4=1x_{1}^{n_{1}} x_{2}^{n_{2}} x_{3}^{n_{3}} x_{4}^{n_{4}}=x^{n_{1}-n_{2}} y^{n_{3}-n_{4}}=1.
Thus, the generating function becomes
142016(x+1x+y+1y)2016=142016(xy+1x+xy+1y)2016=142016×(xy+1)2016(x+y)2016x2016y2016. \begin{array}{l} \frac{1}{4^{2016}}\left(x+\frac{1}{x}+y+\frac{1}{y}\right)^{2016} \\ \quad=\frac{1}{4^{2016}}\left(\frac{x y+1}{x}+\frac{x y+1}{y}\right)^{2016} \\ \quad=\frac{1}{4^{2016}} \times \frac{(x y+1)^{2016}(x+y)^{2016}}{x^{2016} y^{2016}} . \end{array}

To find the probability that the snail returns to the starting point after 2016 moves, we need to find the coefficient of x2016y2016x^{2016} y^{2016} in the numerator (xy+1)2016(x+y)2016(x y+1)^{2016}(x+y)^{2016}.
Notice that,
(xy+1)2016(x+y)2016=(k=02016C2016kx2016ky2016k)(t=02016C2016tx2016tyt), \begin{array}{l} (x y+1)^{2016}(x+y)^{2016} \\ =\left(\sum_{k=0}^{2016} \mathrm{C}_{2016}^{k} x^{2016-k} y^{2016-k}\right) \cdot \\ \left(\sum_{t=0}^{2016} \mathrm{C}_{2016}^{t} x^{2016-t} y^{t}\right), \end{array}

In the first bracket of the above expansion, the exponents of xx and yy are equal in each term. Therefore, in the second bracket, we must also find terms where the exponents of xx and yy are equal, which can only be when 2016t=t2016-t=t, i.e., t=1008t=1008, corresponding to the term C20161008x1008y1008\mathrm{C}_{2016}^{1008} x^{1008} y^{1008}. At this point, in the first bracket, we can only take k=1008k=1008, corresponding to the term C20161008x1008y1008\mathrm{C}_{2016}^{1008} x^{1008} y^{1008}, and their product is (C20161008)2x2016y2016\left(\mathrm{C}_{2016}^{1008}\right)^{2} x^{2016} y^{2016}.
Thus, the required probability is p=(C20161008)242016p=\frac{\left(\mathrm{C}_{2016}^{1008}\right)^{2}}{4^{2016}}.

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.