# Difference between revisions of "2010 AMC 12A Problems/Problem 18"

## Problem

A 16-step path is to go from $(-4,-4)$ to $(4,4)$ with each step increasing either the $x$-coordinate or the $y$-coordinate by 1. How many such paths stay outside or on the boundary of the square $-2 \le x \le 2$, $-2 \le y \le 2$ at each step?

$\textbf{(A)}\ 92 \qquad \textbf{(B)}\ 144 \qquad \textbf{(C)}\ 1568 \qquad \textbf{(D)}\ 1698 \qquad \textbf{(E)}\ 12,800$

## Solution

### Brute Force Solution

The number of ways to reach any point $(x,y)$ on the grid is equal to the number of ways to reach $(x-1,y)$ plus the number of ways to reach $(x,y-1)$. Using this recursion, we can draw the diagram and label each point with the number of ways to reach it and go up until we reach the end. Luckily, the figure is not so big that this is too time-consuming or difficult to do.

For example:

\begin{align*}&(-4,-4) \Rightarrow 1\\ &(-3,-4) \Rightarrow 1\\ &(-2,-4) \Rightarrow 1\\ &(-4,-3) \Rightarrow 1\\ &(-4,-2) \Rightarrow 1\\ &(-3,-3) \Rightarrow 2\\ &(-2,-3) \Rightarrow 3\\ &(-3,-2) \Rightarrow 3\\ &(-2,-2) \Rightarrow 6\end{align*}

etc.

We soon reach $(4,4) \Rightarrow 1698\ \boxed{\textbf{(D)}}$

### Combinatorial Solution 1

By symmetry we only need to count the paths that go through the second quadrant ($x<0$, $y>0$).

For each of these paths, let $(a,2)$ be the first point when it reaches $y=2$. Clearly $a\in\{-4,-3,-2\}$ and the previous point on such path has to be $(a,1)$.

Fix the value of $a$. There are ${a+9 \choose 5}$ ways how the path can go from $(-4,-4)$ to $(a,1)$, and then there are ${6-a \choose 2}$ ways how the path can go from $(a,2)$ to $(4,4)$.

Hence for $a=-4$ we get ${5 \choose 5}{10 \choose 2}=45$ paths, for $a=-3$ we get ${6 \choose 5}{9 \choose 2}=6\cdot 36=216$ paths, and for $a=-2$ we get ${7 \choose 5}{8 \choose 2}=21\cdot 28=588$ paths. This gives us $45+216+588 = 849$ paths through the second quadrant, hence the total number of paths is $2\cdot 849 = 1698$.

### Combinatorial Solution 2

Each path that goes through the second quadrant must pass through exactly one of the points $(-4,4)$, $(-3,3)$, and $(-2,2)$.

There is exactly $1$ path of the first kind, ${8\choose 1}^2=64$ paths of the second kind, and ${8\choose 2}^2=28^2=784$ paths of the third type. The conclusion remains the same.