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.

Enigma 401

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]

Advertisements

One response 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.

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: