Enigmatic Code

Programming Enigma Puzzles

Tantalizer 484: Blockwork

From New Scientist #1035, 20th January 1977 [link]

Someone gave my small son a bag of 1in cubes for Christmas and he was soon busy stacking them. First he built a rectangular wall one brick thick. Then he used the rest of the bricks to build another rectangular block, using 140 bricks more than the other. Then he got bored.

But I didn’t, as I spotted an intriguing fact. The sum of the lengths of the twelve edges on each construction was the same. So were the total surface areas of the two constructions (including the faces standing on the carpet). All the six dimensions involved were different.

How many bricks had he been given?


Enigma 392: Nothing written right

From New Scientist #1542, 8th January 1987 [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.


Puzzle 75: C is silent

From New Scientist #1126, 26th October 1978 [link]

The four tribes seem now, for better or worse, to be firmly established on the Island of Imperfection. They are the Pukkas, who always tell the truth; the Wotta-Woppas, who never tell the truth; the Shilla-Shallas, who make statements which are alternately true and false or false and true; and the Jokers, whose rules for truth-telling in making three statements are any rules that are different from those of any of the other three tribes.

In the story which I have to tell about ABC and D there is one member of each tribe. C, I am afraid, does not actually say anything. Can he just be fed-up? I don’t blame him. The other three speak as follows:

A: B is a Pukka;
B: C is a Shilla-Shalla;
D: A is a Pukka;
D: I am a Shilla-Shalla or a Wotta-Woppa;
D: B is a Joker.

Find the tribes to which ABC and D belong.


Enigma 1119: Six primes

From New Scientist #2275, 27th January 2001

I invite you to select a three-digit prime number such that if you reverse the order of its digits you form a larger three-digit prime number. Furthermore the first two digits and the last two digits of these two three-digit prime numbers must themselves be four two-digit prime numbers, each one different from all the others.

Which three-digit prime number should you select?


Enigma 391b: Christmas recounted

From New Scientist #1540, 25th December 1986 [link]

Delivering Christmas presents is not an easy task and Exe-on-Wye has grown to be so populous that it is hardly surprising that this year Santa Claus decided to delegate the delivery to his minions. Thanks to some failure in communication, however, instead of each house receiving one sack of presents, each of his helpers left a sack at each and every house. The number of sacks that should have been delivered happens to be the number obtained by striking out the first digit of the number of sacks delivered.

When Santa Claus discovered this, he was not pleased. “Things couldn’t be worse!” he groaned. “The number of sacks you should have delivered is the largest number not ending in zero to which the addition of a single digit at the beginning produces a multiple of that number”. And he disciplined the unhappy helpers.

But for each unhappy helper there were many happy households in Exe-on-Wye on Christmas morning.

Can you say how many unhappy helpers and how many happy households?

This puzzle completes the archive of Enigma puzzles from 1986, and brings the total number of Enigma puzzles on the site to 1,058. There is a complete archive from the start of Enigma in February 1979 to the end of 1986, as well as a complete archive from February 2001 to the end of Enigma in December 2013, which is 59% of all Enigma puzzles, and leaves 733 Enigma puzzles left to publish.

I have also started to post the Tantalizer and Puzzle problems that were precursors to the Enigma puzzles in New Scientist, and so far I have posted 16 of each. In total there are 90 Puzzles (which I can get from Google Books) and 500 Tantalizer puzzles (of which the final 320 are available in Google Books).

Happy puzzling (and coding)!

[enigma391b] [enigma391]

Tantalizer 485: Screen test

From New Scientist #1036, 27th January 1977 [link]

Our local cinema has been split into three and the manager has to pick a balanced programme from a list of options supplied by head office. At present he is busy arranging the two weeks after Easter.

He works in whole weeks and here are his thoughts so far. “Sizzling Sixteen” will be shown for at least one week and the Russian “Hamlet” for exactly one week. If “Hamlet” is on for the second week, it will be teamed with that award-winning Western “Dead Fish Gulch” and if  “Hamlet” is on for the first, it will share the billing with “Sizzling Sixteen”. “Tarzan Meets Winnie the Pooh” is a must for the first week, if “Sizzling Sixteen” is screened for the second, and a must for the second, if “Dead Fish Gulch” is not shown in the first. If “Sizzling Sixteen” is to be in the first week, “Dead Fish Gulch” will be in the second. It would be a disaster to screen both “Dead Fish Gulch” and “Sizzling Sixteen” in the first week or both “Dead Fish Gulch” and “Tarzan Meets Winnie the Pooh” in the second.

If the worst comes to the worst, he can fill in with “The Resurrection” in either week or both.

Which three films should he pick for each week?


Enigma 1120: Assorted numbers

From New Scientist #2276, 3rd February 2001

Consider the five-digit and six-digit numbers represented by the words MELONS, PLUMS, APPLES, LEMONS and BANANA, in which different letters stand for different digits but the same letter always stands for the same digit whenever it appears.

If the product 2 × MELONS is greater than the product 35 × PLUMS, but less than the product 3 × APPLES; and if the product 99 × LEMONS is greater than the product 16 × APPLES, but less than the product 210 × PLUMS, then how big is a BANANA?

Thanks to Hugh Casement for providing the source for this puzzle.


Enigma 391a: Bon-bon time again

From New Scientist #1540, 25th December 1986 [link]

If you can find time between the turkey and the bon-bon, decipher this letter-for-digits long multiplication. As always, digits have been consistently replaced by letters, with different letters replacing different digits throughout.

(You do not need any more clues, but so that you can get it finished before New Year, I can tell you there is no need to be too careful distinction between the letter O and the number 0!)

Find the numerical value of GIFT.

[enigma391a] [enigma391]

Puzzle 76: Addition: letters for digits (one letter wrong)

From New Scientist #1127, 2nd November 1978 [link]

Below is an addition sum with letters substituted for digits. The same letter should stand for the same digit wherever it appears, and different letters should stand for different digits. Unfortunately, however, there has been a mistake and in the third line across one of the letters is incorrect. The sum looks like this:

Which letter was wrong? What should it be? Write out the correct addition sum.


Enigma 1121: Families

From New Scientist #2277, 10th February 2001

There are six families, each consisting of mother, father and child. The mothers are Amber, Barbara, Christine, Dorothy, Ellen and Frances; the fathers are George, Harry, Inderjit, James, Kenneth and Lewis; the children are Matthew, Naomi, Oliver, Peter, Quentin and Rachel. The other day, everyone kept a diary of who they met in the 24-hour period; of course, everyone met the other two members of their family, but they also met other people. These are the diary records, given by initials:

A met G, J, L, M, N, P;
B met H, J, K, O, P, R;
C met I, K, L, M, O, Q;
D met G, I, L, P, Q, R;
E met H, I, K, M, N, R;
F met G, H, J, N, O, Q.


G met M, N, P;
H met O, P, R;
I met M, O, Q;
J met N, O, Q;
K met M, N, R;
L met P, Q, R.

If I told you who the wife of Inderjit is, then you could not work out who the father of Oliver is.

Question 1: Who is the wife of Inderjit?

If I told you who the mothers of Oliver and Quentin are, then you could work out who the mother of Peter is.

Question 2: Who are the mothers of Oliver, Quentin and Peter?


Enigma 390: Which statements are false?

From New Scientist #1539, 18th December 1986 [link]

Each of the following six statements is true or false or we cannot say whether it is true or false.

(1) Either 2 or 3 is the first true statement in the list of six.
(2) We can say both 4 and 5 are true.
(3) 6 is false and/or 4 is true.
(4) 1 is true and/or 6 is true.
(5) 3 is false and/or 1 is true.
(6) Both 2 and 5 are true.

Which of the six statements are false?


Tantalizer 486: Go to work on an egg

From New Scientist #1037, 3rd February 1977 [link]

Miss Megawatt is one of those sensible people who go to work on an egg. Since variety is the spice of life, she cooks it differently each day but, seeing virtue in routine too, she repeats the same order each working week. She eats no eggs at weekends.

Here are five statements she made recently to a chap from Consumer Research. To keep him on his toes, she included a false one.

1. “On Wednesdays I have it poached or boiled.”
2. “When yesterday’s was coddled, tomorrow’s will be scrambled or vice versa.”
3. “Poached is neither next before nor next after scrambled.”
4. “I coddle and poach earlier in the week than I boil or scramble.”
5. “I scramble earlier than I fry and later than I poach.”

What is her order each working week?


Puzzle 77: Letters for digits: a multiplication

From New Scientist #1128, 9th November 1978 [link]

In the multiplication sum below the digits have been replaced by letters. The same letter stands for the same digit whenever it appears, and different letters stand for different digits.

Write the sum out with letters replaced by digits.


Enigma 1122: Chapter and worse

From New Scientist #2278, 17th February 2001

While waiting for a much-delayed train, George found himself trying to read a very boring book. He soon gave up and started counting its pages instead. Chapter 1 started on Page 1, and each subsequent chapter started at the top of a page. The boredom factor was enhanced by the fact that the length in pages of each chapter was equal to the chapter number multiplied by the length of Chapter 1.

With still no sign of the train, George proceeded to total all the page numbers in each chapter. Again, the totals for each chapter were exact multiples of the total for Chapter 1, but this time the multiples did not equate to chapter numbers. For the last chapter the multiple was a prime number, even though the chapter number was not.

How many pages were there in the book?


Enigma 389: Missing, presumed …?

From New Scientist #1537, 11th December 1986 [link]

In the following division sum, some of the digits are missing and some are replaced by letters. The same letter stands for the same digit wherever it appears. The digits in the answer are all different.

Find the correct sum.


Tantalizer 487: Number system

From New Scientist #1038, 10th February 1977 [link]

If you look up the phone number of Sir William Watergate in the book, you will not find it. He is ex-directory. But you can work it out from the list of ten numbers below. Each of the ten has exactly one of Sir William’s digits correctly placed. Consider the first number, 14073, for instance. It implies that Sir William is not on 14257, which would mean two digits correctly placed, nor on 40731, which would mean none.


If I just add that Sir William’s true number has five digits, can you discover it?


Enigma 1123: German squares

From New Scientist #2279, 24th February 2001

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

VIER and NEUN are both perfect squares.

If I told you the number represented by VIER you could deduce with certainty the number represented by NEUN. Alternatively, if I told you the number represented by NEUN you could deduce with certainty the number represented by VIER.

What is the numerical value of the square root of (VIER × NEUN)?


Enigma 388: See the light!

From New Scientist #1537, 4th December 1986 [link]

My niece was playing with my calculator recently. She showed me a three-figure number displayed (and I could see three different digits) and then she pushed the “square” button. This resulted in another number being displayed. I could see a number, but I soon realised that it was not the square of the original number.

On investigation we soon find out what was wrong. My calculator usually lights up the digits in this way:

Enigma 1701

that is, it lights up some of the seven little elements in each case. But we found out that the calculator had developed a fault. Although it did all its calculations correctly, in each place where a digit could be displayed the same one of the seven elements never lit up.

Some digits from 0 to 9 could still be lit up correctly, but over half of them couldn’t. Just that fact, together with knowing how many of the 10 digits could light up correctly, would enable you to work out which of the seven elements consistently failed.

If my calculator had been working correctly, what would I have seen displayed after the “square” button had been pushed?


Puzzle 78: Football: new method

From New Scientist #1129, 16th November 1978 [link]

Three teams, AB and C are all to play each other once at football. 10 points are given for a win, 5 points for a draw and 1 point for each goal scored whatever the result of the match. After some, or perhaps all, the matches have been played the points were as follows:

A   21
B   20
C    4

Not more than 6 goals were scored in any match.

What was the score in each match?


Enigma 1124: Classy glass

From New Scientist #2280, 3rd March 2001

On each anniversary of its foundation my company asks a local artist to make a glass sculpture consisting of a three-by-three arrangement of squares of glass. On the first anniversary just one of the squares had to be red, the rest being blue. On the second anniversary two of the nine had to be red, the rest blue, etc. Before making the final work the artist produces scale models of all the possibilities so that we can choose the one we like best. For economy she does not make any two that look the same when rotated or turned over. So, for example, her first anniversary models were as illustrated, involving a total of just three red squares:


For our current anniversary she has again produced scale models of all the possibilities, and for these she has had to make more than one hundred small red squares of glass.

Which anniversary is it, and precisely how many small red squares does she need?