Cryptarithmetic Puzzle
Cryptarithmetic Puzzle
Solution
We have the following constraints:
N +S = R + 10C1 (1)
R + U + C1 = E + 10C2 (2)
U + N + C2 = T + 10C3 (3)
T + A + C3 = I + 10C4 (4)
A + R + C4 = P + 10C5 (5)
S + U + C5 = U + 10C6 (6)
C6 = J (7)
S 6= 0 (8)
U 6= 0 (9)
J 6= 0 (10)
Constraints (8), (9) and (10) represent the fact that the first letter of a word cannot be
0.
1
We conclude that C2 6= 0, thus C2 = 1 . Replace N = R + 1 in constraints (2) and (3):
U +N = E + 10 (200 )
U + N + 1 = T + 10C3 (300 )
Assume A = 0:
Assume C4 = 0. (5) =⇒ R = P + 10. Impossible thus C4 = 1.
(5) =⇒ R + 1 = P + 10 =⇒ R = P + 9. Impossible so A 6= 0. And we backtrack
without recording the value of C4 .
Assume P = 0:
Assume C4 = 0:
T + A + 1 = I (40 )
A+R = 10 (50 )
Since R ≤ 7, we have (50 ) =⇒ A ≥ 3.
We have I ≤ 8, thus (40 ) =⇒ T + A + 1 ≤ 8 =⇒ T + A ≤ 7.
We have T ≥ 3 and A ≥ 3. But T 6= A =⇒ T + A ≥ 3 + 4 =⇒ T + A + 1 ≥ 8. Thus
we have 8 ≤ I ≤ 8, thus I = 8.
Thus T + A = 7. Assume T = 3, then A = 4, E = 2, R = 6, N = 7 and U = 5.
Thus we have found the solution to the puzzle as follows:
P = 0, J = 1, E = 2, T = 3, A = 4, U = 5, R = 6, N = 7, I = 8, S = 9.
with C1 = C2 = C3 = C5 = C6 = 1 and C4 = 0.
We can verify that: 943567 + 564759 = 1508326.