TAOCP 7.2.2.1 Exercise 447

\boxed{m=2,\qquad n=2} is already enough.

Section 7.2.2.1: Dancing Links

Exercise 447. [22] (Johan de Ruiter.) Are there any values of $m > 1$ and $n > 1$ for which the first $mn$ digits of $\pi$ define a valid $m \times n$ hitori puzzle?

Verified: no
Solve time: 2m56s


$$ \boxed{m=2,\qquad n=2} $$

is already enough. The first $mn=4$ digits of $\pi$ are

$$ 3141. $$

Arranging them as a $2\times 2$ hitori grid gives

$$ \begin{array}{|c|c|} \hline 3&1\ \hline 4&1\ \hline \end{array} $$

The only repeated entry is the digit $1$, which occurs in the second column. Shade the upper-right $1$:

$$ \begin{array}{|c|c|} \hline 3&\blacksquare\ \hline 4&1\ \hline \end{array} $$

We verify the hitori conditions.

First, no two unshaded cells in the same row contain the same digit. The first row has only the unshaded entry $3$, and the second row has the unshaded entries $4$ and $1$, which are distinct.

Second, no two unshaded cells in the same column contain the same digit. The first column contains the unshaded entries $3$ and $4$, which are distinct. The second column contains only the single unshaded entry $1$.

Third, the shaded cells must not be orthogonally adjacent. There is only one shaded cell, so this condition is automatic.

Finally, all unshaded cells must form one connected region. The unshaded cells are

$$ (1,1),\qquad (2,1),\qquad (2,2), $$

and they are connected by horizontal and vertical adjacency: the cell containing $3$ is adjacent to the cell containing $4$, and the cell containing $4$ is adjacent to the cell containing $1$.

Therefore the $2\times2$ array formed from the first four digits of $\pi$ is a valid hitori puzzle. Hence there do exist values $m>1$ and $n>1$ with the required property. $\square$