### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,314)
- misc (3)
- project euler (2)
- puzzle (78)
- puzzle# (21)
- site news (54)
- tantalizer (80)
- teaser (7)

### Site Stats

- 217,165 hits

Programming Enigma Puzzles

24 July 2019

Posted by on **From New Scientist #975, 13th November 1975 **[link]

Mr Meek is pleased with his new phone number, because it has four digits, the middle two of which are identical. “Like my name”, he explains. The repeated digit is also the first digit of Mr Humble’s new four digit number. Moreover Mr Meeks first digit is the same as the first digit of Mr Lowly’s new four digit number.

If you interchange the first and last digits of Mr Lowly’s number, you get Mr Humble’s. If you subtract Mr Lowly’s number from Mr Humble’s, you get Mr Meek’s.

So what is Mr Meek’s new number?

[tantalizer424]

%d bloggers like this:

The phone numbers are:

So:

We can plug this into the [[

SubstitutedExpression()]] solver from theenigma.pylibrary:Run:[ @repl.it ]Solution:Mr Meek’s new phone number is 4995.The alphametic can be further simplified to:

Which can be solved manually, or we can use a simple Python program:

Although there is only 1 solution for Mr Meek’ s telephone number, I wondered how many solutions there were for Mr Lowly and Mr Humble’s telephone numbers.

The single solution for Mr MEEK uses the digits 4,5 and 9, whilst the other two telephone numbers use digits E and M ie 4 and 9. This leaves possible digits 1,2,3,6,7,8 for X and Y. Digit X can be any one digit from 6 digits, leaving 5 digits for digit Y, so a total of 6 * 5 = 30 values for X and Y.

Setting MiniZinc for multiple configuration output (with Mr Lowly and Mr Humble’s telephone numbers included). does confirm that there are 30 possible solutions for Mr Lowly and Mr Humble’s telephone numbers.

@GeoffR:

XandYare unconstrained so can take on any of the values of the remaining digits. Normally the digit 0 is allowed in telephone numbers, so there areP(10 – 3, 2) = 42possible solutions, ifXandYare taken into account.