Enigmatic Code

Programming Enigma Puzzles

Tantalizer 400: Loaves and fishes

From New Scientist #950, 22nd May 1975 [link]

A Trappist fête has its drawbacks and its triumphs too. You will see what I mean from an incident at one I attended last week. There was a sea-food stall, selling small items on sticks, where you could buy (in ascending order of price) a whelk, a mussel, a fishcake, a slice of eel and an oyster. While I watched, a party of five monks approached and gave a sign meaning that each of them wanted a different item. (I hasten to add that this was the only untoward sign they made throughout).

Each then placed the same amount of money of the counter. The stall-holder reflected a moment, and then handed each monk the exact item he had wanted. A total of 50 pence then passed across the counter, followed by the return of a total of 16 pence in change. No “tanners” (2½p pieces) were involved.

Assuming that everyone used his loaf and not any extraneous knowledge, what was the price of a fishcake?


Enigma 551: Mileage mix up

From New Scientist #1704, 17th February 1990 [link]

When I sold my old car last week I noticed something odd about the total mileage (a five figure number) displayed on its milometer: if the digits in this number were summed they formed a perfect square. Also, the results of multiplying this square by the original number was to give a figure which was an exact multiple of the number formed by reversing the digits in the mileage. Furthermore, if the square was multiplied by this reverse number, it gave a figure which was an exact multiple of the mileage.

However, the really strange thing was that when I bought my new car, which had a lower mileage than my old car, exactly the same properties applied to its total mileage. Neither of the totals were divisible by 10 or palindromic (that is, the number formed by reversing the digits was different to the original mileage but also had five figures)

What were the total mileages of: (a) my old car; (b) my new car?


Puzzle #61: Triple jump

From New Scientist #3283, 30th May 2020 [link] [link]

“My Auntie Connie just had triplets, three boys!”
“Wow, how old is she?”
“I dunno, but she’s really old.”
“Do you think the boys’ ages will ever catch up to your auntie’s? If you add all three together, I mean.”
“I’m not sure they’ll ever add up to her age exactly — I think it depends on how old she is now.”

Assuming they all live to a ripe old age, what are the chances that there will come a date in the future when the ages of the three boys add up exactly to their mother’s age?

(To be clear: your “age” is how old you were on your last birthday, so it is always a whole number).


Enigma 958: Three churches

From New Scientist #2113, 20th December 1997 [link]

In George’s small home town there are three churches, equidistant from each other as the crow flies — that is to say, the stand at the vertices of an equilateral triangle. George is standing exactly 1 mile in a straight line from one church, 5/8 mile from the second and just 3/8 mile from the third.

Exactly how far apart are the churches from each other?


Tantalizer 401: The way of all flesh

From New Scientist #951, 29th May 1975 [link]

Professor Pfiffelsammler has been looking into the motivation of cinemagoers. Recently he accosted a line of middle-aged men waiting patiently in the rain to get into “The Way of All Flesh”. The man at the head of the queue said: “There are 39 men behind me. The man at the rear is only here for the smut”. Each other man said: “I am here for the sake of the film’s aesthetic merits. The man in front of me is only here for the smut”.

One tenth of the queue having been admitted, the new front man declared: “There are 71 men behind me”. One ninth of those still waiting were then let in and the new front man said: “There are 15 men behind me”. One eighth of those still waiting were then admitted and the new front man asserted: “There are 27 men behind me”. There were less than 100 men in the queue at the start of the investigation and no one had joined or left (except those admitted into the cinema). Naturally, all and only those there for the aesthetics had spoken the truth. No one, of course, came both for the aesthetics and the smut.

Exactly how man men were there in the queue originally?


There are now 100 Tantalizer puzzles on the site. This means there is a complete archive of New Scientist puzzles from May 1975 – February 1990 and from December 1997 – December 2013, giving a total of about 1569 puzzles on the site. There are 414 Enigma puzzles remaining to fill in the gap from 1990 – 1997, and there are about 220 remaining Tantalizer puzzles in the Google Books archive.


Enigma 550: Do your level best

From New Scientist #1703, 10th February 1990 [link]

Bern, Cara and Loren are climbing in the Hillymayas and have decided to tackle Mount Veryrest which is 700 metres high. There are three different approaches and they each take a different one. Bern’s approach is shown in the diagram.

All slopes in the Hillymayas have the same steepness — 1 up or down for 1 across; all climbers go at the same pace — 100 metres up or down in each hour. Thus, Bern could reach the top in 13 hours.

Bern’s approach is described as: up 5, down 3, up 5.
Cara’s approach is: up 3, down 2, up 4, down 1, up 3.
Loren’s approach is: up 5, down 2, up 3, down 6, up 7.

The three decide that, to be fair, they will climb so that, at each point in time, all three are at the same height. This will involve some retracing of steps. Given that condition, they try to reach the top as soon as they can.

How may hours does it take them to reach the top?


Puzzle #60: Mexican standoff

From New Scientist #3282, 23rd May 2020 [link] [link]

The Good, the Bad and the Bumbling have decided the only way to resolve their differences is with a three-way duel, aka a Mexican standoff. They stand in a triangle, each armed with a gun and unlimited ammunition. As you might expect, Good has the deadliest shot: he kills his target 99 per cent of the time. Bad is more hit-and-miss: his success rate is 66 per cent. And Bumbling, in his role as the comedy relief, only fatally hits the mark 33 per cent of the time. On a count of three, each will draw their gun and, using the best strategy they can, will keep shooting with the aim of being the last spaghetti westerner standing.

Roughly what is the chance that Bumbling will survive?


Enigma 959: Christmas greetings

From New Scientist #2113, 20th December 1997

This year I have experimented with my own design of Christmas card. I started with a rectangle of white card and some identical right-angled triangles.

I slid one of the triangles around on the card with the two acute-angled vertices alway touching the perimeter, as shown below, hoping to spot some aesthetic position in which to glue it.

I noticed that one each circuit around the perimeter the right-angled vertex moved only five-sixths as far as each of the other two vertices.

I eventually settled in the design shown below, consisting of six of the non-overlapping triangles pasted on to the card.

What proportion of the card was covered by the triangles?


Tantalizer 402: Pairs of knits

From New Scientist #952, 5th June 1975 [link]

One day Snow White taught the seven dwarves to knit. They set to with great delight and each was soon the owner of a fine two-coloured muffler. As each colour of the rainbow was chosen by two dwarves and no two mufflers had the same two colours, the effect was a shade garish. But no one worried about that.

Happy, Dopey, Sleepy and Sneezy flaunted a whole rainbow between them. Happy, Grumpy and Bashful were only one colour short. Doc and Sneezy both chose green. Happy and Sleepy both picked blue. Neither Doc nor Bashful would be seen dead in red and Bashful cannot abide violet. Dopey objects on principle to wearing indigo. Grumpy’s muffler was half yellow and the other half was one of Sleepy’s colours.

Which two chose orange and combined it with what?


Enigma 549: Prime pairs

From New Scientist #1702, 3rd February 1990 [link]

The twenty children on the school trip had labels on their lapels. The numbers from 1 to 20 inclusive were written on the labels, one number on each label.

The twenty children were told to form pairs. I noted that the average number of each pair was prime. And when I noted the ten primes obtained in this way I saw that the primes which occurred each occurred a different number of times.

List the ten pairs.


Puzzle #59: Celebrate the differences

From New Scientist #3282, 16th May 2020 [link] [link]

Complete the diagram so that each of the nine circles contains a different digit from 1 to 9. Whenever two circles are connected by a straight line, the difference between the two numbers must be three or more (e.g. 5, 6, 8 and 9 can’t be connected to 7). The bottom-left square isn’t 1.


Enigma 960: Squares into squares

From New Scientist #2115, 3rd January 1998

Harry and Tom were trying to find a set of three 3-digit perfect squares which between them used nine different digits.

Harry found such a set and also discovered that if he took his one unused digit and the three digits of one of his squares he could arrange them to form a 4-digit perfect square.

(1) What was this 4-digit perfect square?

The best that Tom could manage was to find a 2-digit perfect square and two 3-digit perfect squares which between them used eight different digits. But he also discovered that if he took either one of his two unused digits and the digits of either of his two 3-digit squares he could arrange them to form a 4-digit perfect square.

(2) List in ascending order the four 4-digit perfect squares that Tom could form.


This puzzle completes the archive of Enigma puzzles from 1998. There is now a complete archive of New Scientist puzzles from the start of 1998 to the end of 2013, and also from June 1975 to January 1990, a total of 1565 puzzles available. There are 414 Enigma puzzles remaining to post.


Tantalizer 403: Monsters

From New Scientist #953, 12th June 1975 [link]

I don’t know why they bother to put the cornflakes in the cornflake packets. My small son doesn’t even like them. That doesn’t stop the house overflowing with opened packets, however. It’s the monsters, you see. There’s one in every packet and, if you collect a complete set, you get a genuine vampire kit.

So he and his seven best friends are collecting like mad. Indeed they’ve reached a point where any three of them can make a complete set by pooling stock. But you really can’t expect three children to share a vampire kit without squabbling. Two might manage it, I dare say, but just at present there are no two whose combined offerings would make a complete set.

Ah well, we can always give the cornflakes to Oxfam. By the way, how few monsters can there be in a complete set?


Enigma 548: A magic hexagon

From New Scientist #1701, 27th January 1990 [link]

In some circles, the Magic Hexagon is well known, and I give it here:

Each of the straight lines, whether of three, four or five numbers, in this hexagon adds up to 38. This is the only solution using the numbers 1 to 19.

Can you find a Magic Hexagon with nineteen positive integers, all different, so that:

(1) The numbers down the central column are consecutive, increasing, and as small as possible;
(2) The largest number is where the 19 is in the hexagon above;
(3) The number 31 does not occur in the hexagon;
(4) And, of course, the fifteen straight lines of numbers have the same sum?


Puzzle #58: Lego lockdown

From New Scientist #3281, 9th May 2020 [link] [link]

It is lockdown in my house and to keep the kids occupied, I have challenged them to find all the possible sequences when placing red 1×1 and blue 2×1 Lego blocks in a row.

There is only one way of making a row of length one (one red); there are two ways of getting a row of length two (B or RR); and three ways of getting a row of length three (BR, RB and RRR).

But after length three, the pattern seems to break down. There are five ways to get length four (BB, BRR, RBR, RRB and RRRR).

I’ve now set the kids the task of finding out how many ways there are of making a row of length 10. That should keep them busy. But their further challenge is to work out the pattern, so they can figure out the number of sequences for any length of row.

Can you help?


Enigma 961: Alphabetical hockey

From New Scientist #2117, 10th January 1998

There are 20 teams in our local hockey league, with the quaint 1-letter names, A, B, C, D, E, …, S, T. Last season, every team played every other team exactly once and there were no draws. Looking at the last season’s results, I noticed that if I choose any match then the winning team beat every team that occurs later in the alphabet than the losing team.

(1) Can you also say for certain that if I choose any match then the losing team lost to every team that occurs earlier in the alphabet than the winning team?

(2) Can you say for certain who won the match K vs O? If you can, name the winner.

I also noticed that at least 10 of the matches were won by the team that occurs later in the alphabet.

(3) Can you say for certain who won the match L vs M? If you can, name the winner.


Puzzle for Today #272: Arranging coins

From BBC R4 “Today” programme, 19th July 2018 [link]

I have a tray of length 5 and width 2 so 10 round coins of width 1 will fit in it snugly without overlaps. No room for another. Similarly, a tray of length 50 will accommodate only 100 coins. Things get more interesting with a longer tray; a tray of length 500 and width 2 can accommodate at least 1001 coins.

What is the smallest integer value of N, such that a tray of length N (and width 2) can accommodate 2N + 1 coins?


Enigma 547: Just a bite

From New Scientist #1700, 20th January 1990 [link]

The young apprentice finally summoned the nerve to ask Ted why he always pored over a pile of old diaries at lunch time.

“Well now”, Ted replied, “y’see when Alf ‘ere were apprentice ‘e asked me one day didn’t I get bored of ‘avin’ the same old fillin’s in me san’iches day after day. ‘Course not’, I told ‘im. Well, it’s not that bad, see, as I can change the order I eats ’em. An’ my missus cuts each one in ‘alf, diagonal like, so I gets more variety. If I ‘ad two san’iches I could eat ’em like: cheese, cheese, ‘am, ‘am; or ‘am, cheese, cheese, ‘am; or — well, you gets the idea. Well, ever since Alf joined the company I’ve kept a record of ‘ow I ate ’em. An’ I’ve ‘ad a different combination every day so far. Though I do reckon there’s only a few more ways to mix ’em before I eats ’em in a pattern as ‘ow I’ve ate ’em before”.

Alf took up the theme. “Ted got me doin’ t’same thing at first. I always ‘ave t’same fillin’s every day too, an’ like ‘im each butty’s different. But I ‘as one more butty than Ted. After a few year I realised I couldn’t ‘ope to keep track of all t’possibilities, so I gave up”.

How many combinations are available to Alf?


Puzzle #57: Matchstick magic

From New Scientist #3280, 2nd May 2020 [link] [link]

Your challenge is to move two matchsticks to produce a calculation that gives an odd number.

How many solutions can you find?

[1-3: well done. 4-6: brilliant. 7-10: amazing. 11: exceptional]


Enigma 962: What’s the difference

From New Scientist #2117, 17th January 1998

This is one of those usual letters-for-digits puzzles where the digits, 1-9, are consistently replaced by different letters. It arose when I was testing my young nephew on his newly learnt arithmetic.

“Is SEVEN odd or even?” I asked. “Odd”, he replied.

“Is EIGHT odd or even?” I asked. “Even”, he replied.

“And what do I get if I take SEVEN away from EIGHT?” I asked.

After some hesitation he replied “LESS”!

What number does EIGHT represent?


%d bloggers like this: