### Random Post

### Recent Posts

### Archives

### Categories

- article (10)
- enigma (1,034)
- misc (2)
- project euler (2)
- puzzle (8)
- site news (40)
- tantalizer (8)
- teaser (3)

### Site Stats

- 145,982 hits

Programming Enigma Puzzles

20 January 2017

Posted by on **From New Scientist #1529, 9th October 1986** [link]

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

Write the sum out with the letters replaced by digits.

[enigma380]

18 January 2017

Posted by on **From New Scientist #1044, 24th March 1977** [link]

I met Tom on his way back from the pet show looking pleased with himself. “Prize for my budgie, prize for my cat, prize for my dog”, he explained, “How did Dick and Harry do?”

“Don’t you know?” I asked.

“Not a thing.”

“They too got a prize each for each of a budgie, cat and dog. So you scooped all those nine prizes between you — no ties, incidentally. Dick’s lowest prize was for his budgie.”

“Oho,” exclaimed Tom after reflection, “so Harry did better with his cat than with his dog.”

He then listed all nine prizes correctly. Can you?

[tantalizer493]

16 January 2017

Posted by on **From New Scientist #2288, 28th April 2001**

The PIN code on George’s cash card is a semi-prime number, that is to say it is the product of two different prime numbers. He discovered some time ago that the PIN code multiplied by his car registration number gives his six-digit phone number, which does not begin with a zero. But George has now discovered a slightly more obscure coincidence. If he subtracts his house number from his phone number and multiplies the result by his house number, the result is his phone number with its digits in reverse order!

What is George’s car registration number?

[enigma1132]

13 January 2017

Posted by on **From New Scientist #1528, 2nd October 1986** [link]

Write, in words, different whole numbers in each of the other eight squares so that the sum of each row, column and corner-to-corner diagonal is the same. But do it in such a way that the number of

lettersin each of the nine squares is different and the total of letters in each row, column and corner-to-corner diagonal is the same.What’s the highest number in the magic magic square?

[enigma379]

11 January 2017

Posted by on **From New Scientist #1136, 4th January 1979** [link]

Across:1. The sum of the digits is 10.

3. Digits all even.

4. Digits all odd, and each one is less than one before.

Down:1. The second digit is greater than either of the other two.

2. A multiple of 3 Down.

3. The second digit is greater than the first one.(One of these numbers is the same as another one reversed and there are no 0s).

This completes the archive of *New Scientist* puzzles published in 1979.

[puzzle84]

9 January 2017

Posted by on
6 January 2017

Posted by on **From New Scientist #1527, 25th September 1986** [link]

I fell asleep during a lecture and dreamed that I was out in the country. In my dream I saw a field and in this field some four-legged cows being milked by at least one two-legged milkmaid who had the use of a number of three-legged stools. There were more stools than would suffice for one per milkmaid, and more cows than would suffice for one per milking stool.

Given this information, and the number of legs in the collection, I realised that one could work out unambiguously the number of cows, stools and milkmaids in the field. Furthermore, the number of legs in the field was the largest it could have been, consistent with these facts.

I awoke with quite a start when the lecturer addressed a question to me. Unfortunately, the answer I gave to his question was the number of cows, milking stools and milkmaids that I had dreamed of. Of course, everyone laughed, but I bet they wouldn’t be able to solve that in their sleep!

How many milkmaids were there in my dream, and how many milking stools and cows?

[enigma378]

4 January 2017

Posted by on **From New Scientist #1045, 31st March 1977** [link]

Burpwater’s Best is not the greatest of beers and is to be had only in the five pubs owned by the brewery. The customers are so rude about it that the landlord keeps putting in for transfers. Until four years ago these requests were always refused but there was then a change of policy, resulting in complete annual reshuffles. Now, after four such upheavals, each landlord has had a disgruntled go at running four of the pubs and it at present ensconced in the fifth.

Patrick’s first move was from the Duck to the Anchor and his next to the Cormorant. This second shuffle took Quentin to the Eagle and Roger to the pub previously run by Tony. At the third move Tony handed the Bull over to Roger, who took over from Simon at the following move.

Where is each gloomy publican to be found now?

[tantalizer494]

4 January 2017

Posted by on **From New Scientist #1137, 11th January 1979** [link]

In the following addition sum all the digits are wrong. But the same wrong digit stands for the same correct digit wherever it appears, and the same correct digit is always represented by the same wrong digit.

Find the correct addition sum.

This puzzle was republished in **New Scientist** #1316 (29th July 1982) as **Enigma 171**.

[puzzle85]

2 January 2017

Posted by on **From New Scientist #2290, 12th May 2001**

I’ve asked Mystic Mog to advise me on my choice of lottery numbers. She has a way of assigning a measure of luck to each of the numbers from 01 to 49. She has given each of the digits a “luck factor”, with 0’s being less than 1’s, which is less than 2’s, etc. Then to calculate the luckiness of any of the lottery balls she simply adds together the luck factors of the two digits. For example, she regards 27 as luckier than 31 because the digit 2 has a higher luck factor than the 1 and the 7 has a higher luck factor than the 3.

She also tells me that if you consider all the balls excluding number 25, then precisely half of them are luckier than number 25 and half are less lucky than 25. Knowing all these facts, I can decide for most balls whether they are luckier than 25 or not. There are just three balls that I cannot decide about.

Which three?

[enigma1134]

31 December 2016

Posted by on There are now 1,028 *Enigma* puzzles on the site (plus a few other puzzles). There is a complete archive of all puzzle published from January 1979 to September 1986 and also from May 2001 to December 2013, which is about 57.5% of all *Enigma* puzzle published in *New Scientist* and leaves around 760 puzzles to add to the site.

In 2016 I added 105 *Enigma* puzzles to the site (as well as a puzzles from other sources). Here’s my selection of the ones I found most interesting to solve this year:

**Enigma 329: Clear short circuit****Enigma 343: In the mews****Enigma 344: Five-nations championship****Enigma 359: Neat odd quad****Enigma 362: On the face of it****Enigma 373: Date the painting**

**Enigma 1182: Recurring decimals****Enigma 1174: Small sums****Enigma 1172: Plant a tree****Enigma 1154: Funny money****Enigma 1152: Tet on the Nile****Enigma 1147: Multiply and add****Enigma 1146: Units fore and aft****Enigma 1143: Count and count****Enigma 1137: On, off, on, off**

I have continued to maintain the **enigma.py** library (in particular I added some routines to help in solving football problems with letters substituted for digits in score tables, and for solving general *Alphametic* problems). I wrote up some notes on the solving of *Alphametics* using *Python* here and here, and the `SubstitutedExpression()` class in **enigma.py** can now be used to solve many *Enigma* problems directly.

Since switching to posting puzzles on Monday and Friday I have also added Wednesday *Bonus* Puzzles, which are posted on Wednesdays (naturally), if I have the time. Unless there is a particularly interesting puzzle that’s caught my eye that week I will alternate posting *Tantalizer* (set by Martin Hollis) and *Puzzle* (set by Eric Emmet) problems, which are the predecessors of the *Enigma* puzzles in **New Scientist**. (Although Eric Emmet seems to like puzzles involving substituted addition or division sums, and football problems a bit too much for my liking).

Thanks to everyone who has contributed to the site in 2016, either by adding their own solutions (programmatic or analytical), insights or questions, or by helping me source puzzles from back-issues of *New Scientist*.

30 December 2016

Posted by on **From New Scientist #1526, 18th September 1986** [link]

Three runs were scored in each over and they were all scored in singles.

What was the number of runs scored at the fall of each wicket?

[enigma377]

28 December 2016

Posted by on **From New Scientist #1046, 7th April 1977** [link]

Morning coffee at the Logicians’ Union could be with or without any or all of milk, sugar and biscuits. You ordered as you went in by putting your name on any or all of three lists headed “milk”, “sugar” and “biscuits”.

Well, that was not too hard and, by the time Professor Haarschneider was half way through his seminal paper on Semi-opaque Designators, 21 names appeared under each heading. It fell to Professor Nachtwebel, as president, however, to regroup the names into the appropriate seven subsets. Working on the back of an envelope in Polish notation, he found that no two subsets were the same size, that the smallest had three members and that the largest was of those requiring milk but neither sugar not biscuits.

As it was by now the hour appointed for luncheon, the delegates had to forego coffee. How many of those who would have taken sugar were also hoping for biscuits?

[tantalizer495]

26 December 2016

Posted by on **From New Scientist #2291, 19th May 2001**

The Ancient Greeks studied “harmonic triads” of integers, the simplest of which is {2, 3, 6}. The middle number is known as the “harmonic mean” of the other two and is calculated so that its reciprocal is the mean (“average”) of the reciprocals of the other two numbers. George has constructed a “harmonic square” — nine different integers in a 3 × 3 grid such that in each of the three rows, the three columns and the two diagonals, the three numbers form a harmonic triad with the harmonic mean in the middle.

Using his computer, George has discovered that the smallest number which can appear in such a square is 210. You should need only progressive intuition to deduce the other eight numbers which accompany 210 in a harmonic square.

What is the largest of these numbers?

[enigma1135]

23 December 2016

Posted by on **From New Scientist #1525, 11th September 1986** [link]

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

Rewrite the sum with the letters replaced by digits.

[enigma376]

21 December 2016

Posted by on **From New Scientist #1138, 18th January 1979** [link]

A lot of experts did a great deal of hard thinking to produce a new football method designed to encourage more goals and therefore to produce matches that would be likely to be more attractive to the spectators. Under this method 10 points were awarded for a win, 5 points for a draw and 1 point for each goal scored, whatever the result of the match. But it seems that perhaps there was not enough thinking, for in a recent competition between four teams, A, B, C and D, who all played each other once, the team that came first lost all their matches. The result was as follows:

B – 45 points

D – 43 points

A – 39 points

C – 34 pointsIn the matches between A, C and D not more than 3 goals were scored in any match, and in the matches which B played neither side scored more than 18 goals. Each match that was won was won by a single goal.

Find the score in each match.

[puzzle86]

19 December 2016

Posted by on **From New Scientist #2292, 26th May 2001**

Triangular numbers are those that fit the formula ½n(n+1), like 1, 3, 6 and 10.

In the following statement digits have been consistently replaced by capital letters, different letters being used for different digits:

“ONE, THREE, SIX and TEN are all triangular numbers, none of which starts with a zero”.

Which numbers are represented (in this order) by ONE, THREE, SIX and TEN?

[enigma1136]

16 December 2016

Posted by on **From New Scientist #1524, 4th September 1986** [link]

A French friend had a road journey to make from London and he knew the shortest distance in miles, so he wanted to know what fraction to multiply by to make it into kilometres.

“Just multiply by 2.”

“No, 3/2 is better.”

“No, 5/3 is more accurate.”

“No, 8/5 is more usual.”Those were the suggestions made to him and each would have led him to calculate the distance as a whole number of kilometres.

The suggested fractions were, by chance, all obtained by taking a pair of successive terms in the well-known sequence 1, 2, 3, 5, 8, … where new terms are calculated by adding the two previous terms. This led me, knowing that one mile is 1.60934 kilometres, to calculate

whichpair of successive terms of the sequence would give the best fraction to use. I reported my findings to my French friend and this fraction, too, led him to calculate his distance as a whole number of kilometres.How far, in miles, was his journey?

[enigma375]

14 December 2016

Posted by on **From New Scientist #1047, 14th April 1977** [link]

Having unearthed a thriving protection racket in the nursery class, Miss Marple summoned the mothers of the six boys concerned to a friendly little chat. She settled the embarrassed ladies equidistantly round a circular table, while she herself paced about lecturing them.

The seating is what concerns us. On Pam’s right sat Mrs Fagin, mother of Yvor. Xerxes’ mum had Ulrich’s mum, Rhona, on her right and Sylvia on her left. Vince’s mum was on Pam’s left and opposite Sylvia. Willy’s mum was opposite Queenie, who sat on Mrs Armstrong’s right. Zacharia’s mother was opposite Mrs Capone. Tess sat opposite Mrs Ellis. Olive was on Mrs Diamond’s left.

Only Mrs Borgia had the guts to blame the whole thing on the school. Can you discover her first name?

[tantalizer496]

12 December 2016

Posted by on **From New Scientist #1523, 28th August 1986** [link]

Mr Bagel was intrigued when approached by Mr Bola selling raffle tickets, for he had never taken part in a raffle.

“I see that each ticket in your book has the same number of digits on it, the first having a number of zeros followed by a one, and the number on each successive ticket increasing by one.”

“That’s true,” replied Bola. “I haven’t sold any yet. Perhaps that’s because there is to be only one winning ticket.”

“Now tell me, Tom,” asked Bagel, “what happens if a ticket number is composed entirely of invertible digits, namely 0, 1, 8, 6 or 9, so that is also forms a number when viewed upside down?”

“In a draw we always read the tickets out with the perforation on the left,” replied Bola.

“That’s a pity, otherwise one could buy two numbers for the price of one ticket.”

Bagel, being superstitious, chose a ticket with an invertible number. One way up the number was divisible by all the even digits, and the other way up it was divisible by all the odd digits. Moreover, when his ticket number was multiplied by a digit (I forget which), the product was the number of the last ticket in the book, a number in which none of the digits was invertible.

I forget whether he won the draw, or even what the draw was for. But, given the chances of his winning were better than one in 100,000, what was the number on the last ticket in the book?

[enigma374]

## Recent Comments