Enigmatic Code

Programming Enigma Puzzles

Enigma 1377: Susan Denham

From New Scientist #2537, 4th February 2006

Regular enigmatists will have encountered many puzzles by Susan Denham but many may not know that this name is a pseudonym, Sue Denham and pseudonym being approximate homophones. So it is appropriate that I can set you the following sum, in which digits have been consistently replaced by letters, different letters representing different digits.

Enigma 1377

But there is no solution to it in base 10. You must tackle the puzzle in the base that allows just one possible value for PSEUD. Your task is to find that value of PSEUD, convert it into its equivalent in base 10 and find the base 10 equivalent of PSEUD as your answer.

According to this article in the Independent, Susan Denham is a pseudonym of Dr Victor Bryant.


One response to “Enigma 1377: Susan Denham

  1. Jim Randell 16 February 2013 at 9:11 am

    My original Python program ran in 2.1s (under PyPy), but using the [[ SubstitutedSum() ]] solver from the enigma.py module I can get a much neater program that runs in only 335ms.

    from itertools import count
    from collections import defaultdict
    from enigma import SubstitutedSum, printf
    # there are 9 different letters
    for b in count(9):
      # make a sum in the required base
      p = SubstitutedSum(['PSEUD', 'SUSAN'], 'DENHAM', base=b)
      # accumulate solutions by the value of PSEUD
      r = defaultdict(list)
      for s in p.solve():
        printf("[base={b}: {t}]", t=p.substitute(s, p.text))
        r[p.substitute(s, 'PSEUD')].append(s)
      # check for unique values of PSEUD
      n = len(r.keys())
      if n != 1: continue
      for (k, v) in r.items():
        # convert the value to decimal
        d = int(k, b)
        printf("base={b} PSEUD={k} => {d} decimal [{m} solutions]", m=len(v))
      # and we're done

    Solution: PSEUD is 156454 (in decimal).

    The sum is in base 11, and PSEUD = A7601 (base 11).

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: