Enigmatic Code

Programming Enigma Puzzles

Enigma 380: Answer what?

From New Scientist #1529, 9th October 1986 [link]

In the following division sum each letter stands for a different digit:

enigma-380

Write the sum out with the letters replaced by digits.

[enigma380]

Advertisements

One response to “Enigma 380: Answer what?

  1. Jim Randell 20 January 2017 at 7:28 am

    We can see that there are 4 intermediate subtraction sums, so the result of the division is a 4-digit number, and the multiples of the divisor all have either 2 or 3 digits, so the divisor is a 2-digit number.

    So we can use the SubstitutedDivision() solver from the enigma.py library to solve this puzzle. It takes 113ms.

    #!/usr/bin/env python -m enigma -r
    
    # solver to use
    SubstitutedDivision
    
    # the division sum
    "kxxky / ?? = ????"
    
    # the intermediate subtraction sums
    "kx - ph = bd"
    "bdx - gpx = rm"
    "rmk - ypk = ym"
    "ymy - ymg = g"
    

    Solution: The correct division sum is given below:

    enigma-380-solution

    Or, we can use the SubstitutedExpression() solver from the enigma.py library to get a solution in 93ms.

    #!/usr/bin/env python -m enigma -r
    
    # solver to use
    SubstitutedExpression
    
    # parameters
    --symbols="bdghkmprxyABCDEF"
    --distinct="bdghkmprxy"
    
    # the division sum
    "AB * CDEF + g = kxxky"
    
    # the multiples
    "AB * C = ph"
    "AB * D = gpx"
    "AB * E = ypk"
    "AB * F = ymg"
    
    # the intermediate subtraction sums
    "kx - ph = bd"
    "bdx - gpx = rm"
    "rmk - ypk = ym"
    "ymy - ymg = g"
    

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: