# Enigmatic Code

Programming Enigma Puzzles

## Enigma 401: Uncle bungles the answer

From New Scientist #1551, 12th March 1987 [link]

It is true, of course, that there are rather a lot of letters in this puzzle, but despite that I though that for once Uncle Bungle was going to write it out correctly. In fact there was no mistake until the answer but in that, I’m afraid, one of the letters was incorrect.

This is another addition sum with letters substituted for digits. Each letter stands for the same digit whenever it appears, and different letters stand for different digits. Or at least they should, and they do, but for the mistake in the last line across.

Which letter is wrong?

Write out the correct addition sum.

As it stands the puzzle has no solution. New Scientist published the following correction with Enigma 404:

Correction to Enigma 401, “Uncle bungles the answer”. Unfortunately, as a result of a printer’s error, New Scientist managed to bungle the question. We will publish the correct question, in full, in our issue of 9 April, as Enigma 405. In the meantime, our apologies to those who were thwarted by the mistake.

[enigma401]

### 2 responses to “Enigma 401: Uncle bungles the answer”

1. Jim Randell 14 July 2017 at 8:51 am

This Python program uses the [[ `SubstitutedSum()` ]] solver from the enigma.py library, and demonstrates that the problem does not have a solution as stated. It runs in 431ms.

```from enigma import SubstitutedSum, join, printf

# the incorrect alphametic sum: X + Y = Z
(X, Y, Z) = ("YTBBEDMKD", "YHDBTYYDD", "EDYERTPTY")

# the symbols used (maybe plus an extra one)
symbols = join(sorted(set(X + Y + Z)))
if len(symbols) < 10: symbols += '?'

# one of the letters in Z is wrong
for (i, z) in enumerate(Z):
# choose a replacement symbol
for r in symbols:
if r == z: continue
# create a solver for the modified sum
p = SubstitutedSum([X, Y], Z[:i] + r + Z[i + 1:])
# and solve it
for s in p.solve():
printf("pos {i}, {z}->{r} / {p.text} / {t}", t=p.substitute(s, p.text))
```

Solution: The puzzle has no solution.

• Jim Randell 2 January 2020 at 6:41 pm

The puzzle has no solution in base 10, but adding a [[ `base=11` ]] parameter in line 16 shows that there is a solution in base 11.

If we change the final digit in the result from Y to H then there is a solution, as we can see:

```% python -m enigma SubstitutedSum --base=11 "YTBBEDMKD + YHDBTYYDD = EDYERTPTH"
(YTBBEDMKD + YHDBTYYDD = EDYERTPTH)
(167734A24 + 184761144 = 341396068) / B=7 D=4 E=3 H=8 K=2 M=10 P=0 R=9 T=6 Y=1
```

This site uses Akismet to reduce spam. Learn how your comment data is processed.