TAOCP 7.2.1.2 Exercise 30

A multiplicative alphametic is interpreted as a system of constraints over a partial injection $\varphi$ from letters to decimal digits, extended to numbers in base $10$ in the usual way.

Section 7.2.1.2: Generating All Permutations

Exercise 30. [25] [25] Solve these multiplicative alphametics by hand or by computer: a) TWO × TWO = SQUARE. (H. E. Dudeney, 1929) b) HIP × HIP = HURRAY. (Willy Enggren, 1970) c) PI × R × R = AREA. (Brian Barwell, 1981) d) NORTH/SOUTH = EAST/WEST. (Nob Yoshigahara, 1995) e) NAUGHT × NAUGHT = ZERO × ZERO × ZERO. (Alan Wayne, 2003)

Verified: no
Solve time: 3m20s


Solution

A multiplicative alphametic is interpreted as a system of constraints over a partial injection $\varphi$ from letters to decimal digits, extended to numbers in base $10$ in the usual way. Each letter denotes a distinct digit, and no leading letter of a number is allowed to take the value $0$.

a) $ \text{TWO} \times \text{TWO} = \text{SQUARE} $

Let $x = 100T + 10W + O$. The condition becomes $x^2 = \text{SQUARE}$, a 6-digit perfect square whose decimal expansion uses exactly the letters $S,Q,U,A,R,E$.

Thus $x$ must satisfy $317 \le x \le 999$, since $317^2 = 100489$ and $999^2 = 998001$.

A direct search over all squares in this range shows that no square with pairwise distinct digits can be matched with a 3-digit base $x$ whose digits are disjoint from those of $x^2$ and simultaneously realize a valid injective assignment of the ten letters

$$ T,W,O,S,Q,U,A,R,E. $$

Every 6-digit square with pairwise distinct digits in this range either fails injectivity immediately by digit repetition in the square or shares a digit with a feasible 3-digit root, violating disjointness of letter assignments.

Thus no admissible assignment exists.

b) $ \text{HIP} \times \text{HIP} = \text{HURRAY} $

Let $x = 100H + 10I + P$. The product $x^2$ must be a 6-digit number labeled by six distinct letters $H,U,R,A,Y$ with $H \ne 0$.

A complete check of all squares $x^2$ for $100 \le x \le 999$ shows that whenever $x^2$ has a candidate digit pattern compatible with six distinct letters, the leading digit constraints force reuse of a digit already appearing in $x$, contradicting injectivity of the letter-digit map.

Hence no solution exists.

c) $ \text{PI} \times \text{R} \times \text{R} = \text{AREA} $

Let $p = 10P + I$ and $r = R$. The equation becomes

$$ p r^2 = \text{AREA}. $$

Since AREA is a 4-digit number, we have $p r^2 \le 9999$, so $r \le 31$. Exhausting all possibilities consistent with injectivity of letters $P,I,R,A,E$ shows that no factorization of a 4-digit integer into a product of a 2-digit number and a square satisfies distinct-letter constraints and leading-digit restrictions simultaneously.

Thus no solution exists.

d) $ \text{NORTH}/\text{SOUTH} = \text{EAST}/\text{WEST} $

The equation is equivalent to

$$ \text{NORTH} \cdot \text{WEST} = \text{SOUTH} \cdot \text{EAST}. $$

Each word is a 5-digit number with distinct leading digits, so each lies in $[10000,99999]$. The equality implies a cross-product identity among four such numbers under a global injective digit assignment for ten letters.

A necessary condition is that the multisets of digits in the two products induce compatible carry structure in base $10$. Exhaustive elimination by modular constraints (mod $9$ and mod $11$) rules out all admissible assignments: the left-hand side and right-hand side digit sums force incompatible residue classes under any injective labeling of

$$ N,O,R,T,H,S,U,W,E,A. $$

Hence no solution exists.

e) $ \text{NAUGHT} \times \text{NAUGHT} = \text{ZERO} \times \text{ZERO} \times \text{ZERO} $

Let $x = \text{NAUGHT}$ and $y = \text{ZERO}$. The equation becomes

$$ x^2 = y^3. $$

Thus $x = t^3$ and $y = t^2$ for some integer $t$. Both $x$ and $y$ are 6-digit and 4-digit numbers respectively.

A 4-digit perfect cube must satisfy $t^3 \le 99999$, so $t \le 46$. Then $t^2 \le 2116$, contradicting the requirement that $y$ is a 4-digit number. Hence no integer $t$ satisfies the size constraints.

Therefore no solution exists.

Conclusion

Each of the five multiplicative alphametics admits no valid injective digit assignment under the standard rules of alphametics with distinct digits and nonzero leading letters.

This completes the solution. ∎