Enigmatic Code

Programming Enigma Puzzles

Enigma 1000: One thousand times

From New Scientist #2155, 10th October 1998 [link]

Since M is the Roman numeral for 1000, we can say that with this puzzle New Scientist has published its Enigma M times — which is significant because:

ENIGMA ÷ M = TIMES

In this problem each letter stands for a different digit, and the same letter represents the same digit wherever it appears. No number starts with a zero.

I reckon that, with the extra puzzles that are sometime published under the same number at Christmas time, by the time Enigma 1000 was published there had actually been 1011 Enigma puzzles in New Scientist.

However, a number of the puzzles in that range were flawed (I have found 17 so far, and there are 494 puzzles remaining to add to the site).

Enigma 401 is unusual, as not only was the flaw acknowledged by New Scientist, but a corrected version of the puzzle was published as Enigma 405. Also Enigma 9 is identical to Enigma 83. Together these reduce the count by 2 to give 1009 puzzles published.

[enigma1000]

2 responses to “Enigma 1000: One thousand times

  1. Jim Randell 26 July 2019 at 8:46 am

    This alphametic problem can be solved using the [[ SubstitutedExpression() ]] solver from the enigma.py library.

    The following command line executes in 133ms.

    Run: [ @repl.it ]

    % python -m enigma SubstitutedExpression --invalid="0,EMT" "TIMES * M = ENIGMA"
    (TIMES * M = ENIGMA)
    (90213 * 2 = 180426) / A=6 E=1 G=4 I=0 M=2 N=8 S=3 T=9
    [1 solution]
    

    Solution: ENIGMA = 180426.

  2. GeoffR 26 July 2019 at 9:55 am
    from itertools import permutations
    
    digits = set(range(10))
    
    # 1st stage permutation
    for p1 in permutations (digits, 4):                       
      e, n, i, g = p1
      if e == 0: continue
    
      # 2nd stage permutation
      qs = digits.difference(p1)
      for p2 in permutations(qs, 4):
        m, a, t, s = p2
        if m == 0 or t == 0: continue
        enigma = 100000*e + 10000*n + 1000*i + 100*g + 10*m + a
        times = 10000*t + 1000*i + 100*m + 10*e + s
        if m * times == enigma:
          print(f"Sum is {enigma} / {m} = {times}")
    
    # Sum is 180426 / 2 = 90213
    
    

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

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

%d bloggers like this: