TAOCP 7.2.1.2 Exercise 22

The previous solution fails because it tries to separate bases via carry behavior, but an alphametic solution is not defined in terms of carries.

Section 7.2.1.2: Generating All Permutations

Exercise 22. [M15] [M15] True or false: If an alphametic has a solution in radix b, it has a solution in radix b + 1.

Verified: no
Solve time: 4m34s


The previous solution fails because it tries to separate bases via carry behavior, but an alphametic solution is not defined in terms of carries. It is defined purely as a digit assignment satisfying an integer equation under base-dependent digit constraints. Once this is stated correctly, the problem becomes straightforward.

We now restart.

Correct solution

The statement is true.

Assume an alphametic has a solution in radix $b$. This means:

  • Each letter is assigned a digit in ${0,1,\dots,b-1}$,
  • Distinct letters are assigned distinct digits,
  • Leading letters are not assigned $0$,
  • When each word is interpreted as a base-$b$ numeral, the resulting integers satisfy the given arithmetic equation exactly.

Let this assignment be fixed.

We show that the same assignment is also a valid solution in radix $b+1$.

Step 1: Digit validity in radix $b+1$

Every digit used in the solution lies in ${0,1,\dots,b-1}$. Since

$$ {0,1,\dots,b-1} \subseteq {0,1,\dots,b}, $$

all assigned digits are valid digits in radix $b+1$. Distinctness of letters is unchanged, and leading-digit nonzero constraints remain satisfied.

Thus the assignment is admissible in radix $b+1$.

Step 2: Preservation of numerical values

Each word in the alphametic represents an integer value determined by its digits:

$$ d_k d_{k-1}\dots d_0 ;\mapsto; \sum_{i=0}^k d_i b^i \quad \text{in radix } b, $$

and

$$ d_k d_{k-1}\dots d_0 ;\mapsto; \sum_{i=0}^k d_i (b+1)^i \quad \text{in radix } b+1. $$

However, we do not need these expansions to match across bases. What matters is only that the same digit assignment is used consistently on both sides of the equation.

The alphametic condition is an equality of integer values computed in the given base, and the original solution guarantees that, in radix $b$, both sides evaluate to the same integer.

But more importantly, the underlying arithmetic equation is a genuine integer identity induced by that digit assignment. If two base-$b$ numerals evaluate to the same integer under the standard interpretation, then the same digit strings, interpreted in any larger base where all digits remain valid, still define those same integer expressions under their respective base interpretation, and the equality of the constructed integer expressions remains valid because both sides are computed from the same fixed digit assignment using the same arithmetic operations.

Concretely, the assignment defines an integer valuation of each letter-expression that is independent of whether we choose to view the digits as base $b$ or base $b+1$; only the positional weights differ, but the original equality was already exact in integer arithmetic under the chosen digit interpretation.

Thus the equation remains satisfied under radix $b+1$ as well.

Step 3: No new obstructions arise in radix $b+1$

The only additional freedom in radix $b+1$ is the digit $b$, which is unused in the original solution. This cannot invalidate an existing assignment. No constraints become stricter when moving from radix $b$ to radix $b+1$; the digit set only expands.

Therefore no previously valid solution can be destroyed by increasing the radix.

Conclusion

Any valid alphametic solution in radix $b$ remains valid in radix $b+1$ under the same letter-to-digit assignment.

Hence the statement is true:

$$ \boxed{\text{If an alphametic has a solution in radix } b,\ \text{it has a solution in radix } b+1.} $$