Enigmatic Code

Programming Enigma Puzzles

Enigma 441: The coloured painting

From New Scientist #1591, 17th December 1987 [link]

I looked down at the body slumped over my desk. One hand held my card “Newton Harlowe — Private detective”, and the other a painting. All I knew about painting came from watching my secretary Velda doing her nails. However, I could see in the dim light that is was a 6 × 6 array of small squares, each coloured red or blue or green. As the neon lights on the nightclubs opposite my office window flashed on and off and the light reflected from the wet sidewalks, I was able to make out the vertical columns of the painting. I saw:

though that was not necessarily the order they occurred in the painting. Suddenly the door opened and a raincoated figure with an automatic entered. There was a loud bang and everything went black.

I came round to find myself lying next to the body of a blonde on the floor of a living room. From the sound of the surf outside I could tell it was a beach-house. There on the wall was the painting. The moonlight shone onto it through the shutters. As they moved in the breeze I was able to make out the horizontal rows of the painting. I saw:

though again not necessarily in the right order. Just then a police siren sounded outside. I was going to have to do some explaining, and that painting was the key.

Reproduce the painting.



Puzzle 52: Football on the Island of Imperfection

From New Scientist #1103, 18th May 1978 [link]

There has been a great craze for football recently on the Island of Imperfection and I have been fortunate enough to get some details of games played there.

There are three tribes on the Island — the Pukkas, who always tell the truth; the Wotta-Woppas, who never tell the truth; and the Shilli-Shallas, who make statements which are alternately true and false, or false and true.

Three teams, one from each tribe, have been having a competition, in which eventually they will play each other [once] — or perhaps they have already done this. The secretaries of the three teams have been asked to give details of the number of matches played, won, lost and drawn and they do this in accordance with the rules of their tribe — so that, for example, all the figures given by the secretary of the Wotta-Woppa team will be wrong.

The figures given are as follows (calling the teams AB and C in no particular order):

(In no instance did a team win by a majority of more than three goals).

Find the tribe to which each of the three teams belong, and the score in each match.


Enigma 1070: Time to work

From New Scientist #2226, 19th February 2000

Amber cycles a distance of 8 miles to work each day, but she never leaves home before 0730h. She has found that if she sets off at x minutes before 0900h then the traffic is such that her average speed for the journey to work is (10 − x/10) miles per hour. On the other hand, if she sets off at x minutes after 0900h then her average speed is (10 + x/10) miles per hour.

(1) Find the time, to the nearest second, when Amber should set off in order to arrive at work at the earliest possible time.

Matthew lives in another town but he also cycles to work, setting off after 0730h, and he has found that his average speed for the journey to work follows exactly the same pattern as Amber’s. He has calculated that if he sets off at 0920h then he arrives at work earlier than if he sets off at any other time.

(2) How far does Matthew cycle to work?


Enigma 440: Three X

From New Scientist #1590, 10th December 1987 [link]

In the following division sum most of the digits are missing, but some are replaced by letters. The same letter stands for the same digit wherever it appears:

Find the correct sum.


Tantalizer 458: Knifemen

From New Scientist #1009, 15th July 1976 [link]

If you must have your operation at St. Vitus’ Hospital, choose your surgeon with care. There are four in residence and no two of them are equally safe. Here are six bits of information to cheer you up while you wait:

1. Cutaway is the most lethal.
2. Anyone safer than Borethrough is safer than Axehead.
3. Divot is not the safest.
4. Anyone safer than Divot is no less lethal than Cutaway.
5. Borethrough is not the safest.
6. Anyone safer than Axehead is safer than Divot.

Do I hear you complain that the six statements cannot all be true? Quite right — I put one false one in for diplomatic reasons. And now can you rank the butchers starting with the safest?


Enigma 1071: Special occasion

From New Scientist #2227, 26th February 2000

Your task this week is to find the day and date of my birthday this year in the form:

(for example, Monday / 8 / May).

If I told you the DAY and the NUMBER you could also work out the MONTH.

So now if I told you the first letter in the spelling of the MONTH you could work out the MONTH.

So now if I told you how many Es there are in the spelling of the MONTH you could work out the MONTH.

So now if I told you the NUMBER you could work out the DAY and MONTH.

What are the DAY, NUMBER and MONTH of my birthday this year?


Enigma 439: Ten to twenty

From New Scientist #1589, 3rd December 1987 [link]

“How many perfect squares are there between TEN and TWENTY?”


“Right. And are TWO, TEN, TWELVE and TWENTY even?”

“Of course. In fact the first and last digits of TWENTY are both even.”

“Right. And is TEN divisible by 3?”

“Of course not.”

In the above, digits have consistently been replaced by letters, different letters representing different digits.

Find NOW.


Tantalizer 459: Gardeners’ corner

From New Scientist #1010, 22nd July 1976 [link]

Our horticultural club had a little competition on Monday, with three events. For Vegetables you could enter either 1 cabbage or 2 turnips or 3 leeks or 4 potatoes; for Flowers either 2 hollyhocks or 4 lupins or 6 roses or 8 gladioli; for Fruit either 3 pears or 4 apples or 5 quinces or 6 strawberries. There were 5 competitors each of whom entered for two events.

Arthur Acorn displayed 12 items in all, Bill Barley 11, Crissie Canteloupe 9, Dahlia Dennis 6 and Edward Earthy 5. The prize for the entry judged best not only in its event but also in the whole show went to Crissie. She was in fact the only person to show that kind of item. You could deduce what it was, if I told you exactly what the other four competitors entered.

So what was it?


Enigma 1072: Into three piles

From New Scientist #2228, 4th March 2000

Sunny Bay fisherfolk have a tradition that when they return home with a catch of fish they take all the catch and divide it into three piles. Over the years they have pondered the question: given a particular number of fish, how many different ways can they be divided up? For example, they could divide up 10 fish in 8 ways, namely, (1, 1, 8), (1, 2, 7), (1, 3, 6), (1, 4, 5), (2, 2, 6), (2, 3, 5), (2, 4, 4) and (3, 3, 4).

One day the fisherfolk netted four large sea shells. On one side of each was one of the letters A, B, C and D and each shell carried a different letter. Each shell also had on its reverse one of the numbers 0, 1, 2, 3, 4, 5, 6, … The fisherfolk found that if they caught N fish then the number of different ways of dividing them into three piles was:

[(A × N × N) + (B × N) + C] / D

rounded to the nearest whole number. (Whatever the number of fish, the calculation would never result in a whole number plus a half; so there was no ambiguity about which whole number was the nearest).

I recall that D was less than 21, that is, the number on the reverse of the shell with D on it was less than 21. Also A and C were different.

What were A, B, C and D?


Enigma 438: Doubloons

From New Scientist #1588, 26th November 1987 [link]

Our gallant ship had been overrun by pirates just off Tortuga and their leader, the notorious Black Jake, was strutting about our decks among his jeering men tormenting the captives.

Black Jake swaggered through the smoke in my general direction. “They tell me you have a head for figures, landlubber,” he sneered, prodding me with a gnarled forefinger.

“Er yes,” I said, in what must have been one of my less distinguished utterances.

“Then solve this or walk the plank. In this purse I have doubloons and doubloons only; their number consists of four digits. If you double the number of doubloons and reverse the digits of the number so formed you obtain the same number of doubloons as there would be in the purse were you to add two doubloons to their number.”

By this time my head was swimming. But I knew that if I didn’t solve it on the double that worry would become a drop in the ocean.

How many doubloons were there in Black Jake’s purse?


Puzzle 53: Addition

From New Scientist #1104, 25th May 1978 [link]

In the following addition sum the digits have been replaced by letters. The same letter stands for the same digit wherever it appears and different letters stand for different digits.

Find the digits for which the letters stand.


Enigma 1073: Cross-country match

From New Scientist #2229, 11th March 2000

In cross-country matches, teams consist of six runners. The team scores are decided by adding together the finishing positions of the first four runners to finish in each team. The team with the lowest score is the winner. Individuals never tie for any position and neither do teams because if two teams have the same score the winner is the team with the better last scoring runner.

The fifth and sixth runners to finish in each team do not score. However if they finish ahead of scoring runners in another team they make they make the scoring positions of those scoring runners, and the corresponding team score, that much worse.

In a recent match between two teams, I  was a non-scorer in the winning team. Each team’s score was a prime number, and if I told you what each team’s score was you could deduce with certainty the individual positions of the runners in each team. I won’t tell you those scores, but if you knew my position you could, with the information given above, again deduce with certainty the individual positions of the runners in each team.

(1) What was my position?
(2) What were the positions of the scoring runners in my team?


Enigma 437: Find the fields

From New Scientist #1587, 19th November 1987 [link]

Long Acre Farm measures 6 furlongs by 10 furlongs as shown on the map; the dotted lines are at furlong intervals.

Enigma 437

In the old days, the farm was divided into 12 rectangular fields by straight hedges running north-south or east-west right across the farm. The dimensions of the fields were all whole numbers of furlongs.

Recently, five stones were discovered, bearing numbers and located as shown on the map. It appears that each such stone indicated the area, in square furlongs, of the field it was in.

Draw a map showing the 12 fields.


Tantalizer 460: War whoops!

From New Scientist #1011, 29th July 1976 [link]

The Patagonian navy used to have 16 class I gun boats with 5 guns apiece, some class II gun boats with 4 guns apiece and some class III gun boats with 3 guns apiece. That was until the admiral was ordered to crush a revolution which had broken out on seven scattered islands simultaneously.

After some thought and more gin he split his fleet into seven flotillas, each of six ships and each with a different number of guns. There was at least one gun boat of each class in each flotilla. This savage armada sailed truculently into the mist one grey dawn and was never seen again.

How many boats of class II were lost?


Tantalizer 461: Bea in her bonnet

From New Scientist #1012, 5th August 1976 [link]

Here are some cryptic clues, each indicating a colour of the rainbow:

1. Buzzing bottle.
2. What I do when I stub my toe.
3. Spring innocent.
4. Cold and depressed.
5. Iris for massed voices.
6. Almost violent.
7. Danger to health.
8. Mixed teenagers with no teas.
9. Stockings in gowns.
10. Butterfly in charge of the fleet.
11. Hammer with wings.

A certain number of them refer to the colour of Aunt Bea’s new bonnet. If I told you how many, you could work out what colour that is. So I shan’t. But you can. So what is it?


Enigma 436: Sixes and sevens

From New Scientist #1586, 12th November 1987 [link]

Six football teams — A, B, C, D, E and F — are to play each other once. After some of the matches have been played a table giving some details of the matches played, won, lost, and so on looked like the one shown here.

Enigma 436

(Two points are given for a win and one point to each side in a drawn match).

Find the score in each match.


Enigma 1074: Changing times

From New Scientist #2230, 18th March 2000

In Enigmaland they work in the usual decimal arithmetic using the usual +, × and =, but they have different symbols for the digits zero to nine. Or, to be more accurate, they use the same symbols 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 but in an entirely different order. In fact, for each of the digits, their symbol differs from the usual one.

Here are some correct sums which were done in Enigmaland (which surprisingly also work in our conventional system):

4 × 7 = 28

5 × 7 = 35

4 × 6 = 24

1 + 4 + 6 + 7 + 7 = 25

In Enigmaland if they wrote 2 × 302, what would their answer be?


Puzzle 54: Football

From New Scientist #1105, 1st June 1978 [link]

Three football teams — AB and C — are to play each other once. After some (or perhaps all) of the matches had been played, a table giving some details of the matches played, won, lost etc. looked like this:

(Two points are given for a win, and one point to each side in a drawn match).

Find the score in each match.


Enigma 1075: No factors

From New Scientist #2231, 25th March 2000

I have found a five-digit number such that it is impossible to factorise the numbers formed by its first digit or last digit or first two digits or last two digits or first three digits or last three digits or first four digits or last four digits or all five digits. In other words all those numbers are prime except that either or both of the single digit numbers may be unity.

Identify the five-digit number.


Enigma 435: An enigma to untangle

From New Scientist #1585, 5th November 1987 [link]

Here is an addition sum with some occurrences of digits replaced consistently by letters, different letters being used for different digits, with gaps being left in the remaining places, as shown:

By some cunning logic you can untangle this and … find the genuine number GENUINE.