Enigmatic Code

Programming Enigma Puzzles

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.

14073
29402
35862
42936
50811
63136
79588
84771
98174
07145

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

[tantalizer487]

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)?

[enigma1123]

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?

[enigma388]

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?

[puzzle78]

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:

enigma-1124

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?

[enigma1124]

Enigma 387: Tea for two

From New Scientist #1536, 27th November 1986 [link]

The Emperor decided to reward two philosophers, who, despite their widely different lifestyles, had never disagreed in the whole of their careers. Their reward was explained to them as follows:

“You, Ti-Fu-Tu, poet and hedonist, drink jasmine tea, while you, Tu-Fu-Ti, old warrior and ascetic that you are, drink only gunpowder tea. In my storehouse are vast numbers of identical cubical boxes of both teas. You may take as many boxes as you will as long as you stack them thus:

The stack must form a singular rectangular parallelepiped consisting of equal numbers of boxes of jasmine and gunpowder. The surface of the stack on all its six sides must be a single layer of boxes of jasmine. Within this single layer must be a rectangular parallelepiped of gunpowder tea. Of course, the boxes must be stacked face-to-face with no gaps.

“A stack of 960 boxes, measuring 8 by 10 by 12 should answer,” reasoned Tu-Fu-Ti. “Stripping off the outer layer would reveal a stack measuring 6 by 8 by 10 containing 480 boxes of beloved gunpowder.”

“Tchah!” snapped Ti-Fu-Tu. “I’m sure we can do better than that!”

Can you tell them (before they squabble and forfeit their reward) the number of boxes they would each have if they produce the largest stack obeying the above conditions?

[enigma387]

Tantalizer 488: Dog’s life

From New Scientist #1039, 17th February 1977 [link]

The Smiths have ten children and a dog called Marmaduke. Every so often they buy a huge tin of toffees and them out after tea, one at a time starting with the oldest child. They never miss a child out but whether Marmaduke gets a toffee at every, some or any turn depends on the whim of the moment. Mr and Mrs Smith never take any toffee for themselves.

Now look at it from Marmaduke’s point of view. He never gets one of the first ten toffees. He may or may not get the 11th. He certainly won’t get the 12th, 13th, 14th etc, but he becomes eligible for one at the end of the round, exactly when depending on whether he was lucky or not on the first round.

Now go back to the start of the process with a fresh tin about to be broached. Which is the highest numbered toffee which Marmaduke will certainly not get?

[tantalizer488]

Enigma 1125: The same sum

From New Scientist #2281, 10th March 2001

As you can see, my three additions have the same sum [total] and in all additions different letters stand for different digits but the same letter always stands for the same digit whenever it appears. Asterisks can be any non-zero digit.

enigma-1125

If THIS and THAT are both even, what is the sum of any addition?

[enigma1125]

Enigma 1126: Enigmatic dice

From New Scientist #2282, 17th March 2001

George has been winning free drinks at his local pub using a trick with four non-standard dice. Each face of each die is marked with one of the numbers 1 to 9, not necessarily all different. One of the nine numbers does not appear on any die, but each die has the same total of its six faces.

George allows you to choose one die, then he chooses one of the others. The two selected die are thrown simultaneously, and the one who throws the smaller number buys the drinks. Draws are impossible.

His friends have discovered that if they choose the red die, George chooses the yellow — if they choose yellow, George chooses green — if they choose green, George chooses blue — and if they choose blue, George chooses red! George expects (statistically) to win exactly two throws in every three with any of these pairs of dice.

We can conveniently represent the markings on a die as a six-digit number, with the digits in ascending order. You can check that 334455 beats 222288 two-to-one, but George’s set does not include either of these dice. The red die includes at least one lucky seven. There is only one set of four dice which will do the trick.

List the six numbers for each of the four colours.

[enigma1126]

Puzzle 79: Division: some letters for digits, some digits missing

From New Scientist #1130, 23rd November 1978 [link]

In the following division sum most of the digits are missing, but some are replaced by letters. The same letters stand for the same digit whenever it appears:puzzle-79

Find the correct sum.

[puzzle79]

Enigma 386: Triangle of stones

From New Scientist #1535, 20th November 1986 [link]

I emerged from the impenetrable jungle into a clearing, at the centre of which were 21 stones laid on the ground to form a triangle.

Enigma 386

Just then, three native girls approached the stones; each wore a coloured sarong, one red, one blue, one white. They painted the six stones in the bottom row, white, white, blue, blue, red, red, in that order from left to right, and placed a coconut on the single stone in the top row. My guide explained that this was a traditional game. The girls would go and turn in the order red, white, blue, red, white. At each turn the girl would move the coconut to a stone which touched the coconut’s present stone and which was on a lower row. The game ended when the coconut reached the bottom row, and the colour of its final stone indicate the winner.

My guide knew the girls and said that if red could not win she would try to help white to win, similarly white would help blue and blue would help red: all the girls knew this.

After the game they exchanged the colours on two of the stones and played again. Blue won the second game.

Who won the first game and what was the row of colours for the second game?

[enigma386]

Enigma 385: A multiletteral problem

From New Scientist #1534, 13th November 1986 [link]

In the following multiplication sum letters have been substituted for most of the digits.

enigma-385

Write out the whole multiplication sum.

[enigma385]

Tantalizer 489: Buttons and bows

From New Scientist #1040, 24th February 1977 [link]

Great is the rejoicing in the firm of Furbelows over the engagement of Bertha Button of the button department to Bertie Bow, beau of the bows. Since Miss button is the fanciest of the three spinsters in buttons, while Mr Bow is quite the most eligible of the eight bachelors in the bows, it may seem none too astonishing that Cupid has singled them out. But, considering the number of bachelors in buttons and of spinsters in bows, it is as well that the merry archer does not loose his shaft at random. For, had he done so, the chances are 29 to 23 in favour of an engagement between two members of the same department.

How many bachelors are there in buttons?

[tantalizer489]

Puzzle 80: Addition: letters for digits

From New Scientist #1131, 30th November 1978 [link]

Below is an addition sum with letters substituted for digits. The same letter stands for the same digit wherever it appears, and different letters stand for different digits:

puzzle-80

Write the sum out with numbers substituted for letters.

[puzzle80]

Enigma 1127: Lights out

From New Scientist #2283, 24th March 2001

There are 13 lights, A, B, C, …, L, M, in the dormitory and each one has its own switch. To save matron having to operate all 13 switches, 34 pairs of lights are connected. They are:

AB, AC, AD, AJ, BC, BE, BI, CE, CF, CG, CH, CI, CK, CM, DE, DF, DG, DI, DJ, DK, DL, DM, EF, EG, EH, EI, EJ, EL, FJ, FM, GH, GM, KL, LM.

Whenever a switch is operated it changes its own light and each of the lights connected to it from on to off, or from off to on. When matron enters the dormitory at 9.00 pm all the lights are on. As an example, if she operates switch A then lights A, B, C, D and J go off. If she then operates switch J then lights A, D and J come back on and lights E and F go off.

Question: Which switches should matron operate so that all the lights are off when she has finished.

See also Enigma 1137.

[enigma1127]

Enigma 384: Hang it!

From New Scientist #1533, 6th November 1986 [link]

Our local club’s darts’ champion Rice Robswit was about to throw three darts in an attempt to win the match. The score he needed could have been got with one treble, but in order to show his prowess and to finish with a double he went for a single, a treble of a different number, and a double of a different number again (avoiding the bulls) in order to give him exactly the total he wanted. Being an experienced player he did not actually look at the numbers around the board — he simply threw the three darts into exactly the positions he had planned.

The crowd roared their approval until someone pointed out that, after the board had fallen on the floor at the end of the previous player’s throw, it had been hung up upside down. There was a groan from the crowd until, on a fresh and proper count, it was found that Rice had still scored his correct required total.

What was that total?

(The numbers around a darts board are in the order 20, 1, 18, 4, 13, 6, 10, 15, 2, 17, 3, 19, 7, 16, 8, 11, 14, 9, 12, 5, 20, …).

[enigma384]

Tantalizer 490: Diplomatic niceties

From New Scientist #1041, 3rd March 1977 [link]

Before assuming office as governor of Coconut Island, Sir Donald Duck briefed himself as best he could. There were, he discovered, four chiefs called Fe, Fi, Fo and Fum. The mark of chiefly rank was a turkey feather, red or green at will. The senior chief wore an old pair of Wellington boots and the others went barefoot. Fe always spoke the truth, Fi never, Fo pleased himself and Fum spoke the truth when and only when wearing a green feather.

Knowing no more than this, Sir Donald landed with pomp and found the four chiefs awaiting him. He shook hands all round and inquired, “What is the name of the senior chief?” One chief replied “Fe”, another “not Fum” and a third “Fo”. Sir Donald did not hear the fourth reply but it did not matter, since, being a Balliol man and so very clever, he worked out the name of the senior chief without it.

What was the name of the senior chief?

[tantalizer490]

Puzzle 81: Uncle Bungle and the vertical tear

From New Scientist #1132, 7th December 1978 [link]

It was, I’m afraid, typical of Uncle Bungle that he should have torn up the sheet of paper which gave particulars of the numbers of matches played, won, lost, drawn and so on of four local football teams who were eventually going to play each other once. Not only had he torn it up, but he had also thrown away more than half of it onto, I suspect, the fire, which seems to burn eternally in Uncle Bungle’s grate. The tear was a vertical one and the only things that were left were the “goals against” and the “points” — or rather most of the points, for those of the fourth team had also been torn off.

What was left was as follows:

puzzle-81

(2 points are given for a win and 1 for a draw).

It will not surprise those who know my uncle to hear that one of the figures was wrong, but fortunately it was only one out (i.e. one more or one less than the correct figure).

Each side played at least one game, and not more than seven goals were scored in any match.

Calling the teams ABC and D in that order, find the score in each match.

[puzzle81]

Enigma 1128: Daffodils

From New Scientist #2284, 31st March 2001

Saul Tregenza is a market gardener. He has a field in which he decided that it could be profitable to plant equal rows of daffodils. On a whim prompted by helping with his daughter’s homework, he decided that the number of rows and the number of bulbs in each row should be prime, and that all the digits that would form the two numbers and their product would be different.

Luckily, he found that the field is long enough to hold the maximum possible number of plants under these whimsical conditions.

What was the maximum possible number of bulbs he could plant?

[enigma1128]

Enigma 383: Stop watch

From New Scientist #1532, 30th October 1986 [link]

My watch is pretty accurate — when it’s working. It has a sweep second-hand that advances in jerks, one each second; if the watch stops, it stops with the second hand pointing directly to one of the 60 “second” (or “minute”) marks round the rim. At noon all three hands are (naturally) pointing directly to the zero-minute mark.

At noon yesterday my watch was certainly working, but when I checked it at 6:00 pm I found that it had stopped. The angles the three hands made with each other all differed from 120 degrees by less than 1 degree.

At what time had my watch stopped? (Hours : minutes : seconds).

[enigma383]