Enigmatic Code

Programming Enigma Puzzles

Enigma 372: Letter by letter

From New Scientist #1521, 14th August 1986 [link]

In this division sum, each letter stands for a different digit.


Rewrite the sum with letters replaced by digits.



8 responses to “Enigma 372: Letter by letter

  1. Jim Randell 25 November 2016 at 8:13 am

    We can solve this puzzle using the SubstitutedDivision() solver in the enigma.py library. Here’s the run file:

    #!/usr/bin/env python -m enigma -r
    # solver to use
    # the division sum
    "bjjhd / fef = aeg"
    # the intermediate subtraction sums
    "bjj - fef = abh"
    "abhh - afhc = cjb"
    "cjbd - cjbd = 0"

    Or we can use the SubstitutedExpression solver (also in the enigma.by library). Here’s the run file for that:

    #!/usr/bin/env python -m enigma -r
    # solver to use
    # the division sum
    "fef * aeg = bjjhd"
    # the multiples
    "a * fef = fef"
    "e * fef = afhc"
    "g * fef = cjbd"
    # the intermediate subtraction sums
    "bjj - fef = abh"
    "abhh - afhc = cjb"

    Either way we get the same answer in about the same time (96ms for SubstitutedDivision, 92ms for SubstitutedExpression).

    Solution: The sum with numbers substituted for letters is 50078 ÷ 343 = 146:


  2. Hugh Casement 25 November 2016 at 8:31 am

    Once again I’m moved to say how little imagination is shown by those who set such puzzles with a random jumble of letters.  My favourite in this case is MUM × GIN = BOOZY.  Anyone who finds that sexist or otherwise offensive is welcome to suggest an alternative.

    • Brian Gladman 1 December 2016 at 7:54 pm

      My complaint about this, Hugh, is not that it is sexist but that it’s not alphametic (good try though!).

      • Hugh Casement 2 December 2016 at 7:52 am

        Oh, I wonder what went wrong there!  Perhaps my division was faulty.

        • Hugh Casement 2 December 2016 at 8:05 am

          Does this work?  Last two lines TOBY, top line JUG ?

          • Brian Gladman 2 December 2016 at 8:36 am

            I am not sure of the change you want to make here, Hugh. I just noticed that mapping MUM x GIN = BOOZY onto 343 x 146 = 50078 makes both U and I equal to 4, which means it is not a (normal) alphametic. I haven’t looked for meaningful words that make this sum correct.

            • Hugh Casement 3 December 2016 at 8:22 am

              I’m evidently not very good at expressing myself.  Divide MUM into BOOZY to get the quotient JUG.  G × MUM = TOBY, subtracted in the last step to give no remainder.
              For equality, no doubt something could be found to fit DAD as divisor.

              I now see where the GIN came from.  My pen sputtered when I copied down the puzzle, so that aeg came out as acg.  My word-matching program then did its best, and I didn’t check the arithmetic.  Sorry sorry.

        • Jim Randell 2 December 2016 at 8:05 am

          The middle letters of MUM and GIN would have to be the same, so “MUM × GUN = BOOZY” which isn’t as satisfying. Maybe “PIP × GIN = BOOZY”.

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: