2022 AMC 12B Problems/Problem 17

Revision as of 18:48, 17 November 2022 by Pianoboy (talk | contribs)

Problem

How many $4 \times 4$ arrays whose entries are 0s and 1s are there such that the row sums (the sum of the entries in each row) are 1, 2, 3, and 4, in some order, and the column sums (the sum of the entries in each column) are also 1, 2, 3, and 4, in some order? For example, the array \[ \left[   \begin{array}{cccc}     1 & 1 & 1 & 0 \\     0 & 1 & 1 & 0 \\     1 & 1 & 1 & 1 \\     0 & 1 & 0 & 0 \\   \end{array} \right] \]

satisfies the condition.

Solution (Linear transformation, permutation)

In this problem, we call a matrix that satisfies all constraints given in the problem a feasible matrix.

First, we observe that if a matrix is feasible, and we swap two rows or two columns to get a new matrix, then this new matrix is still feasible.

Therefore, any feasible matrix can be obtained through a sequence of such swapping operations from a feasible matrix where for all $i \in \left\{ 1, 2, 3 ,4 \right\}$, the sum of entries in row $i$ is $i$ and the sum of entries in column $i$ is $i$, hereafter called as a benchmark matrix.

Second, we observe that there is a unique benchmark matrix, as shown below: \[ \left[   \begin{array}{cccc}     0 & 0 & 0 & 1 \\     0 & 0 & 1 & 1 \\     0 & 1 & 1 & 1 \\     1 & 1 & 1 & 1 \\   \end{array} \right] \]

With above observations, we now count the number of feasible matrixes. We construct a feasible matrix in the following steps.

Step 1: We make a permutation of rows of the benchmark matrix.

The number of ways is $4!$.

Step 2: We make a permutation of columns of the matrix obtained after Step 1.

The number of ways is $4!$.

Following from the rule of product, the total number of feasible matrixes is $4! \cdot 4! = \boxed{\textbf{(D) 576}}$.

~Steven Chen (Professor Chen Education Palace, www.professorchenedu.com)

Solution

Let $S(n)$ be the number of paths of $n$ moves such that the bug never will have been more than $1$ unit away from the starting position. Clearly, by symmetry, there are two possible states here, the bug being on the center and the bug being on one of the vertices of the unit hexagon around the center. Let $C(n)$ be the number of paths with the aforementioned restriction that end on the center. Let $V(n)$ be the number of paths with the aforementioned restriction that end on a vertex of the surrounding unit hexagon. We have $S(n) = 6C(n-1) + 3V(n-1),$ since from the center, there are $6$ possible points to land to and from a vertex there are $3$ possible points to land to (the two adjacent vertices and the center). We also have $C(n) = V(n-1)$, since to get to the center the bug must have come from a vertex, and $V(n) = 2V(n-1) + 6C(n-1),$ since from a vertex there are two vertices to move to, and from the center there are $6$ vertices to move to. We can construct a recursion table using the base cases $V(1) = 6$ and $C(1) = 0$ and our recursive rules for $C(n)$ and $V(n)$ as follows: \[\begin{tabular}{c|c|c} n & V(n) & C(n) \\ \hline 1 & 6 & 0 \\ 2 & 12 & 6 \\ 3 & 60 & 12 \\ 4 & 192 & 60 \\ \end{tabular}\] Then, $S(5) = 6C(4) + 3V(4) = 6 \cdot 60 + 3 \cdot 192 = 936,$ and the desired probability is thus $\frac{936}{6^5} = \boxed{\frac{13}{108}}.$

-fidgetboss_4000

Alternate Solution (From outside to inside)

Since exactly $1$ row sum is $4$ and exactly $1$ column sum is $4$, there is a unique entry in the array such that it, and every other entry in the same row or column, is a $1.$ Since there are $16$ total entries in the array, there are $16$ ways to choose the entry with only $1$s in its row and column.

WLOG, let that entry be in the top-left corner of the square. Note that there is already $1$ entry numbered $1$ in each unfilled row, and $1$ entry numbered $1$ in each unfilled column. Since exactly $1$ row sum is $1$ and exactly $1$ column sum is $1$, there is a unique entry in the $3*3$ array of the empty squares such that it, and every other entry in the same row or column in the $3*3$ array, is a $0.$ Using a process similar to what we used in the first paragraph, we can see that there are $9$ ways to choose the entry with only $0$ in its row and column (in the $3*3$ array).

WLOG, let that entry be in the bottom right corner of the square. Then, the remaining empty squares are the $4$ center squares. Of these, one of the columns of the empty $2*2$ array will have $2$ $1$s and the other column will have $1$ $1.$ That happens if and only if exactly $1$ of the remaining squares is filled with a $0$, and there are $4$ ways to choose that square. Filling that square with a $0$ and the other $3$ squares with $1$s completes the grid.

All in all, there are $4*9*16=\boxed{576}$ ways to complete the grid.

pianoboy.

Video Solution

https://youtu.be/_dN_ZHiaiko

~Steven Chen (Professor Chen Education Palace, www.professorchenedu.com)