HMMT-Feb 2012 comb, Problem 3

In the figure below, how many ways are there to select 5 bricks, one in each row, such that any two bricks in adjacent rows are adjacent?

Solution: The number of valid selections is equal to the number of paths which start at a top brick and end at a bottom brick. We compute these by writing 1 in each of the top bricks and letting lower bricks be the sum of the one or two bricks above them. Thus, the number inside each brick is the number of paths from that brick to the top. The bottom row is $6,14,16,15,10$, which sums to 61 . \begin{center} \begin{tabular}{|c|c|c|c|c|c|c|} \hline 1 & 1 & 1 & 1 & 1 & 1 &  \\ \hline  & 2 & 2 & $\frac{1}{2}$ & 2 &  & 1 \\ \hline 2 & 4 & 4 & 4 & 4 & 3 &  \\ \hline  & 6 & 8 & 8 & 7 &  & 3 \\ \hline 6 & 14 & 16 & 15 &  & 10 &  \\ \hline \end{tabular} \end{center} $\fbox{61}$.

Answer: 61