Enigmatic Code

Programming Enigma Puzzles

Tantalizer 411: Diplomatic niceties

From New Scientist #961, 7th August 1975 [link]

When H.M.G.’s five top ambassadors all fell under the same bus, there was an immense fuss about their replacements. The corridors of power hummed with insinuations, until at last a list of five names and a set of conditional agreements was achieved. The latter read:

1. If Sir Basil Brace does not get Paris, Sir Emlyn Entry shall have Bonn or Rome.
2. If neither Sir Ambrose Amble nor Sir Donald Duck gets Washington, Sir Crispin Carruthers shall have Paris.
3. If Sir Ambrose Amble does not get Bonn, Sir Crispin Carruthers or Sir Emlyn Entry shall have Paris.
4. If Sir Donald Duck does not get Rome, then, if Sir Ambrose Amble does not get Paris, Sir Emlyn Entry shall have Moscow.
5. If Sir Ambrose Amble does not get Washington, then, if Sir Donald Duck does not get Moscow, Sir Crispin Carruthers shall have Bonn.

Having been duly warned that “if x then y” does not mean or imply “if not x then not y”, can you assign the top chaps to the right places?


Enigma 538: Rule of the road

From New Scientist #1690, 11th November 1989 [link]

I recently visited Ruralania with its five towns, Arable, Bridle, Cowslip, Dairy, Ewe, joined by one-way roads labelled high or low, as in the map:

Enigma 538

The Ruralanian road system is very simple; if a driver is at one of the five towns then the systems says whether he or she is to leave that town by the high road, by the low road, or to stop in that town.

The system is determined by the fact that it must be possible to make a Grand Tour by starting at a certain town and driving round visiting all the towns and stopping at the final town, while always obeying the single Rule (X):

Take the high road if taking the low road and then obeying Rule (X) again, results in your car next being at A or E. Otherwise, take the low road if taking the high road and then obeying Rule (X) again, results in your car next being at C. Otherwise, stop in the town where you are.

What is the Grand Tour? (List the towns in order).


Puzzle #47: Geometra’s tomb

From New Scientist #3270, 22nd February 2020 [link] [link]

Long before the invention of satnav, the great explorer Asosa Lees embarked on a trek across the square desert of Angula in a quest to find the lost tomb of Geometra, which lay somewhere along the line marked A.

Lees had nothing but the crude and incomplete diagram shown and some basic instructions: proceed south-west for 100 kilometres, and then turn left. The only other information she had was that at the moment she turned left, the distance to the south-west corner of the desert was 100 kilometres further than the distance to the south-east corner.

To reach the tomb, Lees needed to head in precisely the right direction. Fortunately using her knowledge of geometry she was able to take the correct bearing.

At what angle did she head off towards the tomb?


Enigma 972: Fifty-fifty

From New Scientist #2127, 28th March 1998

Bunko, Jack and Patience have a pack of cards that consists of fewer than one hundred cards which are numbered consecutively: 1, 2, 3, 4, 5, 6, …

On one occasion recently they were each given one of the cards (without the other two players seeing which).

Bunko said: “There’s an exactly 50:50 chance that my card is the highest of our three”.

Then Jack added: “In that case there’s an exactly 50:50 chance that, in decreasing order, the cards are Bunko’s, Patience’s then mine”.

How many cards are there in the pack? And what was Jack’s card?


Puzzle 4: Football (4 teams. Old method)

From New Scientist #1054, 9th June 1977 [link]

Four football teams, A, B, C and D, are to play each other once. After some — or perhaps all — of the matches have been played a table giving some details of matches played, won, lost, etc, looked like this:


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

Find the score in each match.


Enigma 537: The three sisters

From New Scientist #1689, 4th November 1989 [link] [link]

Sarah, Tora and Ursula are three sisters. One of them is honest, one always lies, and the third is simply unreliable.

Tora told me that the youngest of the three is fatter than the liar, and the oldest of the three told me that the fattest is older than the honest one. But Ursula and the thinnest sister both agreed that the oldest sister always lies.

The fattest sister and the oldest sister both agreed that Sarah always lies. Then the youngest sister whispered to Sarah who then claimed that the youngest had said that Ursula was the fattest.

Who is the honest sister?
Who is the fattest sister?
Who is the youngest sister?


Puzzle #46: Pi-thagoras

From New Scientist #3269, 15th February 2020 [link] [link]

Pythagoras’s theorem says that for any right-angled triangle, the square of the hypotenuse (the longest side of the triangle) is equal to the sum of the squares of the other two sides.

There are some right-angled triangles whose sides are all whole number lengths. The simplest and best known is the “3-4-5” triangle (3² + 4² = 5²).

I have drawn a circle that fits precisely inside a 3-4-5 triangle. What is the area of the circle? Have a guess. And then see if you can prove that you are right.


Enigma 973: Choss, anyone?

From New Scientist #2128, 4th April 1998

The game of choss is played by two players, Black and White, on a board of 6 × 6 squares. Each player has a number of pieces which he or she moves one square horizontally or vertically. The players take it in turns to move one of their own pieces. A piece cannot move into a square already occupied by a piece of the same colour. If a piece moves into a square occupied by a piece of the opposite colour, that the other piece is captured and removed from the board. One White piece is larger than the other pieces and is called the Target. Black wins by taking the Target.

The layout of the board is as shown and it is Black’s move. She can in fact definitely win in three or fewer moves.

1. What should the first of these moves be?

That was the Enigma that I intended to set, but the editor thought it was too easy. He suggested that I change the board layout above by moving the Target to some other unoccupied square where it cannot be immediately taken by Black, but so that from the new layout Black can again definitely win in three or fewer moves. He then suggested that I asked Question 1 about this new layout.

Of course I shall have to choose the new position of the Target so that Question 1 has a unique answer.

2. To which position should I move the Target?


Tantalizer 412: Consider your verdict

From New Scientist #962, 14th August 1975 [link]

While waiting for the judge to settle his wig, sharpen his quill and pump up his cushion, each member of the jury wondered how the 11 others would vote when it came to the point. Here are their predictions in alphabetical order:

Juror A thought all the others would favour acquittal.

Juror B thought all the others would be for convicting.

Juror C thought exactly one of the others would want to convict.

Juror D thought exactly one of the others would want to acquit.

Juror E thought exactly 10 of the others would want to convict.

Juror F thought exactly 3 of the others would want to acquit.

Juror G thought exactly 8 of the others would want to convict.

Juror H thought exactly 7 of the others would want to acquit.

Juror I thought exactly 4 of the others would want to convict.

Juror J thought exactly 8 of the others would want to convict.

Juror K thought exactly 3 of the others would want to acquit.

Juror L thought exactly 9 of the others would want to convict.

In the event all those whose predictions were incorrect voted for one verdict, whereas those (if any) whose predictions were correct voted for the other.

Which jurors favoured acquittal?

A correction (applied to the text above) was published with Tantalizer 416.


Enigma 536: A strange encounter

From New Scientist #1688, 28th October 1989 [link] [link]

At a Halloween party I met a strangely beautiful red-haired woman who was gazing with longing into a bonfire. To my inquiries she replied: “(My telephone number) 2 = AABCCD and the exchange is 04617. I was born in the year given by: (AE) F = EDGE”

I realised that it was one of those ‘letters-for-digits-and-digits-for-letters’ puzzles, but I must have looked confused for she added: “The other letters are HIS.” So saying she vanished into thin air.

Given that in the above relations the same letter stands for the same digit and the same digit stands for the same letter; that different digits stand for different letters and vice versa; and that 04617 stands for the place where she now resides:

Can you solve the mystery and write down the digits 0 to 9 in the alphabetical order of the letters that represent them?


Puzzle #45: Beetles on a clothes line

From New Scientist #3268, 8th February 2020 [link] [link]

Peg beetles are a rare species with rather odd behaviour. As any peg beetle expert will know, these beetles always walk at 1 metre per minute, and when two beetles meet, they immediately reverse direction.

Six peg beetles are on a 2-metre-long clothes line, some walking left to right and others right to left (as the diagram shows). As we join the action, beetle A is at the left-hand end of the line and walking towards the right, while beetle F is at the right-hand end, walking left.

When a beetle reaches the end of the clothes line, it drops off onto the ground.

Which two beetles will be the last to drop off the clothes line, and how long will it be before that happens?


Enigma 974: Girls jump first

From New Scientist #2129, 11th April 1998

Each pony club competing at the gymkhana entered one boy and one girl for the showjumping. In order to determine the order of competition, Mary put all the riders’ names in a hat and drew them out one at a time.

When Mary had drawn precisely half of the names she was surprised to find she had drawn one rider from each club. She calculated that if she did such a draw a thousand times this would only be likely to happen with this number of competing clubs on three occasions (to the nearest whole number). She then realised in amazement that the riders she had drawn in that first half were all the girls.

1. How many clubs were competing?
2. If the number of clubs competing is still as in question 1, on how many occasions (to the nearest whole number) would Mary be likely to draw all the girls first if she carried out the draw five million times?


Puzzle #44: Elevator pitch

From New Scientist #3267, 1st February 2020 [link] [link]

On the way back from a party the other day, my daughter and I got into an elevator. I was holding a cup of water with an ice cube floating in it, while my daughter was admiring her helium-filled balloon as it floated above her on a slack string. Our only company in the elevator was a spider, dangling from the lift’s ceiling on a thin thread of silk. As the lift accelerated upwards, what did we see happening to the balloon, the ice cube and the spider?


Puzzle 5: “I would if I could”

From New Scientist #1056, 16th June 1977 [link]

“I would if I could, but I’m sorry I can’t.”
I felt that I had to say this to my Aunt.
She seemed to expect me to lend her some cash.
And knowing my Aunt that would surely be rash.
I happen to know what her overdraft is;
My Uncle’s is large, hers is much more than his.
Her husband, my Uncle, in fact owed the bank
A number of pounds which was, let’s be frank,
Sixty-three more than my overdraft then.
Aunty’s and mine are two-hundred-and-ten;
Between them, I mean, and I’d like you to see,
When I say “much”, Aunt’s is Uncle’s times three —
Or as near to three as it can be,
Bearing in mind this vital fact:
The pounds we owe are all exact.

What are the overdrafts of my Aunt, my Uncle and myself.

This puzzle was later re-published as Enigma 182.


Enigma 535: For old time’s sake

From New Scientist #1687, 21st October 1989 [link]

“What time is it dear?” asked old Mrs Protheroe, from her wheelchair. “Is it time for the evening news yet?” Her husband pulled the watch, on the end of its chain, from his waistcoat pocket. “Drat! It’s stopped; I must have forgotten to wind it up last night.”

“That’s no cause for you to use such strong language,” snapped his wife. “Anyway, Joanna has left her watch on the sideboard. Perhaps that’s working.”

Mr Protheroe picked up his grand-daughter’s watch and stared at it. Now he was what one might call old-fashioned: he had no truck with modern contraptions, like digital watches. His brow furrowed in concentration as, for the first time in his life, he tried to decipher the strange looking figures on the face of the watch. He turned it first one way, then the other, until, with a triumphant “Ah!”, he announced the correct time to his wife.

What Mr Protheroe did not realise was that:

(a) He was holding the watch upside-down;
(b) The watch was 21 minutes slow.

Nevertheless, the time he announced was the correct one.

What time was it?


Enigma 975: Ant goes for a walk

From New Scientist #2130, 18th April 1998

Imagine an 8 × 8 chess board and imagine that in each square of the board there is written one of the following four instructions:

Turn right;
Turn left;
Go straight ahead;
Go back.

An ant is placed at the centre of the bottom left corner square. She walks, parallel to the bottom edge of the board, until she reaches the centre of the next square. She reads the instruction in the square she is in and sets off walking in the direction specified by that instruction. She walks in a straight line until she reaches the centre of a square or until she walks off the board; in the latter case, her walk stops. She continues her walk in this way, from square to square, obeying the instruction each time. She walks until she reaches the top right corner square, or she walks off the board; when either happens, her walk stops. In the former case it is called a successful walk.

Answer each of the following questions, “Yes” or “No”.

1. Is it possible to find a successful walk in which the ant repeats some part of her walk?

2. Is it possible to find a walk in which the ant does not repeat the first part of her walk but does repeat some part of her walk?

3. Is it possible to find a successful walk in which the ant visits the top left-hand corner square of the board more than once?

4. Suppose now that the board is 4 × 4. Is is possible to write an instruction in each square, using each of the four different instructions four times, so that the ant’s walk visits every square of the board at least once?


Puzzle #43: Dividing Grandma’s field

From New Scientist #3266, 25th January 2020 [link]


Two brothers have inherited a plot of land from their grandmother. The map shows that the land is made up of five identical squares, and the green dots indicate the location of four old oak trees.

There are two stipulations in Grandma’s will:

First, the land must be divided so that the brothers get exactly half of the area each, and;
Second, each brother should have two of the trees on their land.

The brothers would love to divide the land with a single straight fence from one edge to another. Can you find a line for the fence that fulfils everyone’s wishes — and without you needing to do any measurement?


Tantalizer 413: Sports day

From New Scientist #963, 21st August 1975 [link]

There were three events after tea and the headmaster appointed Mr Prendergast as bookmaker. After some thought, Prendy produced quite a pretty plan. For a £1 stake you specified the three winners in the order of events (javelin, long jump, hurdles). If you were wholly right, you collected £10. If you got two events right you collected £4. If you were right about the javelin only, you collected £2. Otherwise you lost.

But Prendy had reckoned without Captain Grimes and Dr Fagan (the headmaster), who nobbled all entrants except Clutterbuck, Oglivie and Tangent. Grimes then staked £6 on bets of: CTT; TCC; OTT; COC; OTO; CCO. He made a profit of £4.

The headmaster also staked £6 and naturally did a little better, with a profit of £6 from his bets of: CCT; TOT; OTC; TOC; CTO; OCO.

Which boy won each of the events?

Corrections (applied to the text above) were published along with Tantalizer 414 and Tantalizer 416.

This issue of New Scientist also contains an article about a computer program for solving Tantalizer puzzles using natural language [link].


Puzzle #42: The card conundrum

From New Scientist #3265, 18th January 2020 [link]

Carl scribbled down an equation that contained only numbers and the letter X on a scrap of paper and left it on a table:

Bob found the card and realised that this was just a straightforward algebra problem. “I’ve found the solution”, he announced a minute later, dropping the card back on the table and leaving the room. Amy overheard him, walked over and picked up the card. After a while she announced: “That’s strange, I’ve found two solutions”.

Even stranger, Amy’s solutions were both different to Bob’s.

What were the solutions that Bob and Amy found?



I won’t be able to add new puzzles or comments to the site for the next few days.

Hopefully normal service will be resumed shortly.

%d bloggers like this: