24. A $4 \times 4$ Sudoku grid is filled with digits so that each column, each row, and each of the four $2 \times 2$ sub-grids that composes the grid contains all of the digits from 1 to 4 . For example,
\begin{tabular}{|l|l|l|l|}
\hline 4 & 3 & 1 & 2 \\
\hline 2 & 1 & 3 & 4 \\
\hline 1 & 2 & 4 & 3 \\
\hline 3 & 4 & 2 & 1 \\
\hline
\end{tabular}

Find the total number of possible $4 \times 4$ Sudoku grids.
24. Answer: 288.
Consider the grid below. Suppose the left-top $2 \times 2$ sub-grid is filled in with $1,2,3,4$.
If $x, y, z, w$ are all distinct, then there are no other numbers to place in $a$; if $\{x, y\}=\{z, w\}$, then $x^{\prime}, y^{\prime}, z, w$ are all distinct, and there are no other numbers for $a^{\prime}$.
Note that $\left\{x, x^{\prime}\right\}=\{1,2\},\left\{y, y^{\prime}\right\}=\{3,4\},\left\{z, z^{\prime}\right\}=\{2,4\}$ and $\left\{w, w^{\prime}\right\}=\{1,3\}$. Among these $2^{4}=16$ choices, 4 of them are impossible $-\{x, y\}=\{z, w\}=\{1,4\}$ or $\{2,3\}$, $\{x, y\}=\{1,4\}$ and $\{z, w\}=\{2,3\},\{x, y\}=\{2,3\}$ and $\{z, w\}=\{1,4\}$.
For each of the remaining 12 cases, $x^{\prime}, y^{\prime}, z^{\prime}, w^{\prime}$ are uniquely determined, so is the right-bottom sub-grid:
$$
\begin{array}{l}
\{a\}=\{1,2,3,4\}-\{x, y\} \cup\{z, w\}, \\
\{b\}=\{1,2,3,4\}-\{x, y\} \cup\left\{z^{\prime}, w^{\prime}\right\}, \\
\left\{a^{\prime}\right\}=\{1,2,3,4\}-\left\{x^{\prime}, y^{\prime}\right\} \cup\{z, w\}, \\
\left\{b^{\prime}\right\}=\{1,2,3,4\}-\left\{x^{\prime}, y^{\prime}\right\} \cup\left\{z^{\prime}, w^{\prime}\right\} .
\end{array}
$$

Recall that that there are $4!=24$ permutations in the left-top grid. Hence, there are $24 \times 12=288$ solutions.
\begin{tabular}{|c|c|c|c|}
\hline 1 & 2 & $x$ & $x^{\prime}$ \\
\hline 3 & 4 & $y$ & $y^{\prime}$ \\
\hline$z$ & $w$ & $a$ & $a^{\prime}$ \\
\hline$z^{\prime}$ & $w^{\prime}$ & $b$ & $b^{\prime}$ \\
\hline
\end{tabular}