2019 Mock AMC 10B Problems/Problem 21

Solution 1: Author:(Shiva Kannan)

There are $4! = 24$ ways to place one of each $1, 2, 3,$ and $4$ in the top row. For the second row, we must count all the possible arrangements other than the arrangements in which the value in the first row and a particular column and the value in the second row and that same column, never are the same. The total number of ways regardless of the condition is $24$. We can use PIE. Number of arrangements in which there is a $1$ under the $1$ in the first row is $3! = 6$, as the remaining three numbers of the row can be arranged in $6$ ways. By symmetry, this is the same for all $4$ numbers, so the total number of cases in which one value is below itself is $24$. But we have to correct for overcounting. Number of arrangements in which both $1$ and $2$ are below themselves is $2! = 2$, as there are $2$ ways to place the remaining two elements. Like this, we can take any pair of numbers from the four given numbers, so the total number of cases in which $2$ values are below themselves is $2* {4 \choose 2} = 12$. For $3$ numbers being under themselves, we can place the remaining number in $1$ way, and there are three possible sets of $3$ numbers from the four to pick, so the number of cases in which $3$ numbers are below themselves is $4$. For all four numbers being under themselves, there is only $1$ case. $24 - 24 + 12 - 4 + 1 = 9$, which yields $9$ ways to construct the second row. You will see at this point, that the first two elements of the third row determine the full arrangement. There are four possible ways to construct those two elements(Check different possibilities to arrive at the conclusion). Hence, the total number of ways is $24*9*4 = \boxed{\text{(C)} 864}$.

Solution 2 (Latin Squares)

I believe that the solution above is erroneous, as some cases are double counted. We simply realize this question asks for the number of latin squares of order 4. Therefore, we realize that the answer is simply 576 which is B.