Enigmatic Code

Programming Enigma Puzzles

Puzzle #17: Which flipping year?

From New Scientist #3243, 17th August 2019 [link]

2019 is an example of a year that can be “flipped”. This means that on an old-style calculator display, it still forms a four-digit number when spun both horizontally and vertically:

The difference between a flippable year and its flipped version is called the flipping difference, and for 2019 the flipping difference is 6102 – 2019 = 4083.

Since the Romans conquered Britain in AD 43, which year has had the biggest flipping difference?


Enigma 997: Building sites

From New Scientist #2152, 19th September 1998

A small building site is offered for sale, divided into three plots, each at the same price per acre.

The plots are all rectangles of different sizes but each is the same shape as the overall site — that is, the ratio of the sides is the same for each, although two of the rectangles are rotated through 90° relative to the other two.

If the asking price of the largest plot is £20,000 more than that of the smallest, how much is the middle-sized plot?


Puzzle 16: Addition. Digits all wrong

From New Scientist #1067, 1st September 1977 [link]

Each digit in the addition sum below is 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.


Enigma 512: Sufficient evidence

From New Scientist #1664, 13th May 1989 [link]

Four football teams are to play each other once. After some of the matches have been played a document giving some details of the matches played, won, lost and so on looked like this:

Enigma 512

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

Find the score in each match.


Puzzle #16: Clever code

From New Scientist #3242, 10th August 2019 [link] [link]

Rashmi told us that she had to make up some codes, ones that preferably have a unique quality to them.

“For a four-digit code, I chose 2020, because it has two 0s, zero 1s, two 2s and zero 3s. I chose 3211000 for a seven-digit code.”

She then told us that she used the same idea for a 10-digit code.

What was this code?


Enigma 998: Multiple purchases

From New Scientist #2153, 26th September 1998

The denominations of coins in circulation which are less than a pound are 50, 20, 10, 5, 2 and 1p.

Harry, Tom and I went into a shop recently and each made a purchase costing less than £1 (100p). The cost of each of these purchases was different. We each paid with a £1 coin and each received four coins in change — in each case the change due could not be given in fewer than four coins; but equally if we had paid the exact price for our purchases it would have been possible for each of us to have done so with four coins, but not with fewer.

The total cost of our three purchases was not only more than, but also an exact multiple of, the total amount of change than between us we received.

What did each of our purchases cost?


Tantalizer 423b: Body count

From New Scientist #974, 6th November 1975 [link]

The first motion before the conference of Family Doctors was that Miss Emily Scroggins be invited to deliver a lecture on the female epidermis. The Chairman rapped importantly with his gavel:

“I shall put the motion without debate. Those in favour? … Those against? … I declare the motion lost by a majority exactly equal to one quarter of the number voting in favour. Good gracious! Well there’s no need for anyone to be disappointed. Those who wish can view Miss Scroggins tonight at the Golden Tuffet, where she strips to music under the name of Gloria Gunn. What’s that you say, Sir? You would like to change your vote? I daresay you are not alone in that. How many of those previously opposed are now in favour? Twelve, I see. And those previously for but now against? None, I see. This more like it. I declare the motion carried by one vote”.

How many persons were present and voting?

This puzzle and the previous puzzle were both labelled Tantalizer No 423, when originally published in New Scientist. So I’ve labelled this one as 423b to distinguish them.

[tantalizer423b] [tantalizer423]

Enigma 511: Double, double …

From New Scientist #1663, 6th May 1989 [link]

I wrote an odd number on the board and asked the class how many numbers (including the original number itself) could be made by writing exactly the same digits but in different orders. (For example, if the number had been 5051, the answer would have been nine, namely 5051, 5015, 5105, 5150, 5501, 5510, 1055, 1505 and 1550).

Clever Dick got the right answer immediately, so to keep him busy I told him to repeat the exercise with exactly double my original number.

“That just doubles the number of ways, Miss,” he reported.

I told him to double again and repeat the exercise, and again he reported “That doubles the number of ways yet again, Miss.”

So I told him to double the number yet again and to repeat the exercise with the four-figure answer.

“It’s doubled the number of ways again, Miss,” he replied and, as always, he was quite right.

What number did I write on the board?


Puzzle #15: Lines through the chessboard

From New Scientist #3241, 3rd August 2019 [link] [link]

Linus is using a thin felt-tip pen and a ruler to draw straight lines on a conventional 8×8 chessboard. With eight lines, he can easily ensure that a line passes through every square on the board. For instance, he can just draw a line through the middle of each row of squares, which means each line would go through eight squares. But a line can pass through more than eight squares – for example, the one in the illustration goes through nine – so Linus wants to find a way to cut through all 64 squares with fewer than eight lines.

Can you help?


Enigma 999: Combined celebrations

From New Scientist #2154, 3rd October 1998 [link]

To celebrate next week’s 1000th edition of Enigma, we each made up an Enigma. Each one consisted of four clues leading to its own unique positive whole number answer. In each case none of the four clues was redundant. To avoid duplication, Keith made up his Enigma first and showed it to Susan before she made up hers.

The two Enigmas were meant to be printed side-by-side but the publishers have made a (rare) error and printed the clues in a string:

(A) It is a three-figure number;
(B) It is less than a thousand;
(C) It is a perfect square;
(D) It is a perfect cube;
(E) It has no repeated digits;
(F) The sum of its digits is a perfect square;
(G) The sum of its digits is a perfect cube;
(H) The sum of all the digits which are odd in Keith’s answer is the same as the sum of all the digits which are odd in Susan’s.

Which four clues should have formed Keith’s Enigma, and what was the answer to Susan’s?

There are now 1300 Enigma puzzles available on the site (or at least 1300 posts in the enigma category). There are 492 Enigma puzzles remaining to post.

There are currently also 76 puzzles from the Tantalizer series, 75 from the Puzzle series and 13 from the new Puzzle # series of puzzles that have been published in New Scientist which together cover puzzles from 1975 to 2019 (albeit with some gaps).

I also notice that the enigma.py library is now 10 years old (according to the header in the file – the creation date given coincides with me buying a book on Python). In those 10 years it has grown considerably, in both functionality and size. I’m considering doing a few articles focussed on specific functionality that is available in the library.


Puzzle 17: Goals rewarded

From New Scientist #1068, 8th September 1977 [link]

A lot of people have been of the opinion for some time that in football competitions some importance should be attached to the number of goals scored as well as to the actual result of the game. It is hoped that this will lead to more goals and therefore to more attractive games.

Three local teams of my acquaintance have been experimenting on these lines. The have had a competition in which they all played each other once, and they have awarded ten points for a win, five points for a draw, no points of course for a loss, and one point for each goal scored.

As a result of this competition one team scored 16 points, the second scored 18 points, and the third scored 10 points. It was interesting to notice that at least one goal was scored by both sides in every match.

What was the score in each match?


Enigma 510: Out of court

From New Scientist #1662, 29th April 1989 [link]

Professor Puzzleothers has privately decided to allow his ex-wife a resettlement of precisely one third his current annual salary, but only if she can work out exactly how much she is to get.

He instructs his solicitor to tell her lawyers that he will agree to alimony calculated according to the following formula.

She has to find two numbers A and B which between them contain each of the digits from 1 to 9 exactly once and contain no 0 digit, such that B = 2A, A is divisible by 3, and the quotient when A is divided by 3 is a number which contains all the digits from 1 to 4. Then £A will be the annual settlement.

What does Puzzleothers currently earn?


Puzzle #14: The H coins problem

From New Scientist #3241, 27th July 2019 [link] [link]

Seven coins have been placed in the “H” shape above. Altogether there are five lines of three, including the diagonals.

Your challenge is to place two more coins so that you can make 10 straight lines of three. No stacking of coins or other sneaky trick is required.

If you find a way to do this, give yourself a silver medal. If you find a second way to do it that isn’t a mirror image of the first, award yourself a gold.


Enigma 1000: One thousand times

From New Scientist #2155, 10th October 1998 [link]

Since M is the Roman numeral for 1000, we can say that with this puzzle New Scientist has published its Enigma M times — which is significant because:


In this problem each letter stands for a different digit, and the same letter represents the same digit wherever it appears. No number starts with a zero.

I reckon that, with the extra puzzles that are sometime published under the same number at Christmas time, by the time Enigma 1000 was published there had actually been 1011 Enigma puzzles in New Scientist.

However, a number of the puzzles in that range were flawed (I have found 17 so far, and there are 494 puzzles remaining to add to the site).

Enigma 401 is unusual, as not only was the flaw acknowledged by New Scientist, but a corrected version of the puzzle was published as Enigma 405. Also Enigma 9 is identical to Enigma 83. Together these reduce the count by 2 to give 1009 puzzles published.


Tantalizer 424: Directory enquiry

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?


Enigma 509: Banking on a prime

From New Scientist #1661, 22nd April 1989 [link]

I have two accounts at Midloids bank, both with unusual eight-digit account numbers, which are made up of a combination of only odd digits.

If either of the account numbers is split in half it gives two four-digit prime numbers. These two primes contain the same four digits, but in a different order, and with no digit repeated. Furthermore if these four-digit primes are split in half, they each give two two-digit prime numbers.

If, for both numbers, the prime formed from the first four digits is larger than the prime formed from the second four digits, what are the numbers of my accounts?


Puzzle #13: Snail party

From New Scientist #3240, 20th July 2019 [link] [link]

Sam has four pet snails. She puts one of them at each corner of a square ABCD with sides 2 metres long. Being very friendly, each snail moves towards its neighbour, snail A to snail B, B to C, and so on, at all times pointing directly towards that neighbour. If each snail moves at a constant speed of 2 metres per hour, how long will it be before they meet?


Enigma 1001: What the hex?

From New Scientist #2156, 17th October 1998 [link]

In this hexagon of circles I’ve written some digits:

Reading the six sides, clockwise, as three-figure numbers you get 187, 714, 425, 527, 799, and 901, all of which are multiples of 17. Your task today is to write a new collection of non-zero digits in the circles, with no two adjacent digits the same, so that the six three-figure numbers are all different multiples of some particular two-figure number, the number in the top row being twice that two-figure number.

What are the numbers in your hexagon?


Puzzle 18: Division (letters for digits)

From New Scientist #1069, 15th September 1977 [link]

In this division sum each letter stands for a different digit. Rewrite the sum with the letters replaced by digits.


Enigma 508: A colourful deception

From New Scientist #1660, 15th April 1989 [link]

Tour the Tulip Fields of Bulbania

Enigma 508

Towns: Aldingsp, Beachhol, Chholbea, Dingspal, Eachholb, Fresh, Gspaldin.

The colours are those of the tulips in that area.

You will fly to Eachholb and then drive by coach, visiting each town exactly once.

“Miss Wheel, I understand you will be driving the coach for the tour. I am afraid we have a problem. The flight is being diverted to Chholbea, so you will collect your passengers there.”

“We do not want the tourists to realise there has been a change to the tour as advertised on the above leaflet, as they might ask for their money back. Now, they will not be able to read the names of the towns as they are in Bulbanian, but they can tell the colours of the tulips and they have the map. I want you to start at Chholbea and drive round visiting each town exactly once, but so that as the tourists notice the colours on each side of the road, they will believe from their map that they are following a route as described on the leaflet, beginning at Eachholb.”

What route did Miss Wheel take and what route did the tourists think they were taking?

Some of the Bulbanian towns are anagrams of the Lincolnshire town of Spalding, and others are anagrams of town of Holbeach, also in Lincolnshire.


%d bloggers like this: