Enigmatic Code

Programming Enigma Puzzles

Enigma 1252: Cards on the table

From New Scientist #2408, 16th August 2003

I have a square table top of side 36 inches and I have a collection of rectangular cards, each 5 by 7 inches. I have just placed some of the cards flat on the table top without any overlapping. I have done this in such a way that the only part of the table-top left uncovered is itself a square.

How many cards have I placed on the table top?

Enigma 261: Point in square

From New Scientist #1408, 3rd May 1984 [link]

It took some hours for the ZX Spectrum I received for Christmas to produce this pretty specimen of an integral-sided square, with a point P lying inside it at integral distances from three of the square’s corners.

If you use a computer, it will probably take you just as long to find another such specimen with smaller square-side. But without a computer, it is possible to find a solution in a fraction of the time. P must be inside the square, not outside or on the edge.

What is the length of the side of the smaller square and what are the distances PAPBPC?

Enigma 261

Enigma 1253: Votes and taxes

From New Scientist #2409, 23rd August 2003

The land of Votax has two tax systems, Rich and Poor. On the 1st March the people vote for which tax system they want and that is then used on the 1st April. There are 7 people on the island and they each have savings which only change according to the tax system. On 1st May 2003 the savings, in ascending order, were £5.10, £5.26, £5.30, £5.42, £6.14, £7.70, £7.90.

The tax systems are based on H, which is half of the highest savings. In the Rich system, if there are n people below H then we take £n from the poorest and give it to the richest, take £(n-1) from the next poorest and give it to the next richest, and so on, until we take £1 from the nth poorest and give it to the nth richest. The Poor system is the reverse of that, taking money from the richest to give to the poorest. People with savings below H vote for the Poor system and the others for the Rich system. In 2002 the Rich system was used.

Note that in 2004, H will be £3.95 and so all the savings will be on the same side of H; this has never happened before.

If the savings on 1st May 2001 were written in ascending order, what would the third and seventh amounts be?

Enigma 260: Willy Wonty

From New Scientist #1407, 26th April 1984 [link]

Mr and Mrs Wonty are having a spot of bother with the two-year school programme, which their son Willy is to follow. He is going to study exactly three subjects in each year.

He must have at least one year of chemistry and exactly one year of physics. If he does physics in the second year, he must do history in the second year too. If he does physics in the first year, he must do chemistry in the first year too. He cannot do chemistry in the first year, unless he does history in the second.

Then there’s English, which he must do in the first year, if he is to do chemistry in the second, and which he must do in the second year, if he does not do history in the first. The time-table stops him combining history and chemistry in the first year and also prevents a combination of history and English in the second.

Thank God for Religion! If all else fails, he can always take that.

Which subjects will Willy take when?

Enigma 1254: Piles of money

From New Scientist #2410, 30th August 2003

I have a pile of coins consisting of at least one of each of the 1p, 2p, 5p, 10p, 20p and 50p coins. They total less than £2.50 and there is a different number of coins of each denomination. The pile has those of largest width on the bottom decreasing to the tiniest coins on the top (that is, the 50p are at the bottom, then the 2p, 10p, 20p, 1p and the 5p).

This reminded me of the famous puzzle where a pile of coins has to be moved from one place to another, one coin at a time. One temporary pile can also be formed but at no stage in any of the three piles may a coin be placed on top of one of smaller width. So, for example, to move a pile consisting of a 50p, three 20p and four 5p would take a minimum of 23 moves.

Now the minimum number of moves required to move my pile in this way equals the total value of the coins in pence.

What is that total value?

Enigma 259: Half burnt

From New Scientist #1406, 19th April 1984 [link]

“Just for once,” said Uncle Bungle, “I will make up a football puzzle in which all the information is included, instead of one with about half the figures left out.”

He undoubtably meant well — my uncle nearly always does. But as so often his plan went sadly wrong. He was doing a bit of tidying up and the wrong piece of paper — or rather half of it — got thrown on the fire.

All that was left was this:

Enigma 259

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

Calling the five teams A, B, C, D and E in that order find who played whom and the score in each match.

(They are all to play each other once eventually. C had not yet played E).

Enigma 1255: Wrong! But only by 1

From New Scientist #2411, 6th September 2003

Billy was no good at maths. No matter how hard he tried, he never got things quite right. His attempt at a long-division sum received the usual big red cross next to it from his teacher. This was fair enough as it was plainly completely wrong — he had even copied down the original sum incorrectly, and a big ink smudge obscured the divisor making it illegible:

Enigma 1255

This time, however, Billy felt moved to protest that he hadn’t done quite as badly as usual. “All the numbers may be wrong,” he cried indignantly, “but only by one!”

Billy’s teacher had to concede that he had a point — every single readable digit in Billy’s sum was either one too big or one too small.

What was the original sum that Billy had been asked to calculate?

I think there are only about 1,000 Enigma puzzles left to publish now.

Enigma 258: Monkey business

From New Scientist #1405, 12th April 1984 [link]

A group of monkeys had a sackful of nuts. One night one of the monkeys decided secretly to take his share of the nuts, so he divided them into equal piles, one for each monkey: there was one nut left over so he gave it to his organ-grinder. He hid his own pile away and returned the remaining piles to the sack.

A little later than night the second monkey did precisely the same thing, divided the nuts into equal piles, one pile for each of the monkeys, and gave the odd remaining nut to the organ-grinder. He hid away his own pile and returned the rest of the piles to the sack.

This continued through the night, each monkey repeating the same performance not knowing that the others had already removed their shares.

The number of nuts originally in the sack was the smallest number possible for all this to have happened to that particular group of monkeys.

At this point the organ-grinder turned to the monkeys and said: “Isn’t this a rather clichéd puzzle?”, to which one of the monkeys replied: “Ah, yes, but in this case we are now able to divide the remaining nuts equally between all the monkeys and you, my organ-grinding friend”.

How many monkeys were there?

Enigma 1256: High turnover

From New Scientist #2412, 13th September 2003

Joe’s puzzle for his daughter used 25 two-colour counters, red on one side, white on the other and a small board on which Joe had drawn a grid, five squares by five.

Joe’s puzzle was to place a counter on each square one at a time, either red side up or red side down, in such an order as to finish with 25 counters all red side up.

If there were any counters on adjoining squares to the square where a counter was being placed, that is, next to it in the same row or column, then those counters had to be turned over. In the process of placing the 25 counters on the board many counters were turned over, some more than once.

In total, how many times were counters turned over?

Enigma 257: Hexa-draughts

From New Scientist #1404, 5th April 1984 [link]

This is an easy introduction to Hexa-draughts, which is played on a board with a “hexagonal” pattern of points extending as far as you like in all directions.

First you place a number of men on points on or below Row 0. That is your start position. Then you hop, as in draughts: one man A hops over an adjacent man B, landing on the point beyond, and removing B from the board. And so on, till only one man is left, as far as possible above Row 0.

The picture shows a start position with three men — the fewest needed to get a man to row 2; so we say M(2) = 3. The numbers in the circles and the arrows on them show the order and direction of hops.

Enigma 257

What is M(4)?

The setter added the following note:

If you find this interesting, you may like to seek M(5), M(6), and M(7). My best answers so far are 17, 38, and “probably impossible”. If you can do better, no prizes, but I should rather like to know M(8) is certainly impossible.

Enigma 1257: Boxing clever

From New Scientist #2413, 20th September 2003

Triangulo, the world-famous Cuban cubist, has created five boxes, each of which contains a number of cubes of the same colour, but with a different colour in each box.

At a master class, he tries to construct a particular size of cube using all the cubes from just two boxes.  But whichever pair he selects, he finds that at least one pair has too many pieces and all the other pairs have too few.

Each different pair of boxes gives a different total of cubes and the largest total is 10 more than the smallest.

With a stoke of genius, using all the cubes together, he creates instead a flat square, multi-coloured masterpiece!

How many cubes (in ascending order) are there in each box?

This puzzle is Enigma 1257 and the previous puzzle I published was Enigma 256, so there are now 1,000 puzzles left to publish (ignoring for the moment that sometimes multiple puzzles are published under the same number, and that I’ve already published Enigma 1095). Which means just under 44% of all Enigma puzzles are now available on the site.

Enigma 256: Ups and downs

From New Scientist #1403, 29th March 1984 [link]

“You’re looking fit!” I remarked to my nephew Henry.

“Thanks,” he replied. “I keep fit by running down Bill’s field then walking up.”

“Do you know your average speed?” I inquired.

“I’ll let you work it out — it’s a one digit number — while my speeds, up and down, are whole numbers. As you know, I don’t like fractions, and all these speeds are in miles per hour.”

“I don’t think you’ve given me enough information,” I complained.

“I think I will have, if I tell you the difference between my speeds, up and down the field.” Then he did so.

“Still not enough information.”

“Sorry! — I should have told you that I run down the field at less than 17 miles an hour. Now you have enough information.”

What was his average speed?

Enigma 1258: Not so secret

From New Scientist #2414, 27th September 2003 [link]

George’s supposedly secret four-digit PIN code is the product of five different prime numbers. It is also the product of the ages of Fred, George and Herb. George’s age is the average of the other two. Only one of the trio is a teenager.

What is the PIN code?

Enigma 255: Two heads are better than one

From New Scientist #1402, 22nd March 1984 [link]

“Care for a flutter?” Alf asked Bert.

“Suits me,” Bert replied.

“We need a 50p, a 20p, a 10p and a 5p coin. I’ll contribute one of them and you the other three.”

“Then what?”

“We toss all four. If any come up Heads, then whichever of us has the most money (not the most coins) head-side up scoops all four coins. If all four come up Tails, we toss again.”

“OK. Who contributes what?”

“Well,” said Alf, “as I am putting in only one coin, I’ll decide which it is to be.”

Which coin gives the crafty Alf the best bet?

This puzzle brings the total number of Enigma puzzles on the site to 780. As the final Enigma was #1780, you might think that means there are 1,000 puzzles left to publish. But at Christmas time, especially in the 80’s, multiple puzzles were often published under the same number. (Also, I’ve so far come across three puzzles that are duplicates of already published puzzles). So, my current estimate is that I will need to publish around 1,788 puzzles to have a full archive of Enigma puzzles, so it’ll be a couple of weeks before there are around 1,000 puzzles left to go.

Enigma 1259: Keeping order

From New Scientist #2415, 4th October 2003 [link]

As part of an exam the letters A to F were written down in some order and briefly shown to the candidates, who then tried to memorise the order. Their individual recollections were:

candidate 1: BCDAEF;
candidate 2: DAEFBC;
candidate 3: ABEFDC;
candidate 4: BCFDEA;
candidate 5: AEBDFC;
candidate 6: CFEABD;
candidate 7: DCAEFB.

Then the written exam consisted of a list of questions: for each pair of the letters the candidates were asked which came first. So, for example, one of the questions was “Which came first, A or B?” and another question was “Which came first, A or C?” and so on.

The candidates based their answers on their own individual recollections of the order and, as a consequence, each candidate got a different, even number of the questions right.

What was the correct order?

Enigma 254: Triangular addition

From New Scientist #1401, 15th March 1984 [link]

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

Enigma 254

Write the sum out with numbers substituted for digits.

Enigma 1260: Latin fives

From New Scientist #2416, 11th October 2003 [link]

Enigma 120Your task today is to put one letter C, L, X, V or I into each of the 25 squares in the grid so that each row and each column (read downwards) forms a different valid Roman numeral. The sum of the numbers in the rows is to equal the sum of the numbers in the columns. Use the smallest number of Cs you can. As a hint, one of your diagonals will be a valid Roman numeral and the other will contain only one letter.

What are:

(a) the sum of the numbers in the rows (or columns); and
(b) the Arabic value of the valid diagonal?

Enigma 253: Sum times

From New Scientist #1400, 8th March 1984 [link]

As usual in this letter-for-digits puzzle each letter stands consistently for a digit, different letters representing different digits. This enigma uses a sum and a times:

ENI + GMA = SUM

ENI × GMA = ??MES

That is enough information to determine what the letters stand for, but if you’d like an extra personal clue.

I is (am?) over twice as big as U.

What is ENIGMA?

Enigma 1261: It’s all Greek to us

From New Scientist #2417, 18th October 2003 [link]

In the following addition sum digits have been consistently replaced by letters, with different letters used for different digits: Our alphabet has 26 characters whereas the Greek alphabet has only 24. Appropriately enough, ALPHABET is divisible by both 26 and 24. Also we can tell you that the third Greek letter GAMMA is divisible by 3.

Enigma 1261

Find DELEGATE.

Enigma 252: Three-point circle

From New Scientist #1399, 1st March 1984 [link]

Enigma 252

Each of the black dots in the picture is one of the elements — 3 speakers and 22 suppressors — in Uncle Pinkle’s Triphonic Asymmetric Garden Audio-system. The whole square array measures 40 × 40 metres. Uncle Pinkle sits at C, precisely the same distance D from each speaker, but not at distance D from any suppressor; and C must not be directly between any two system-elements, so it isn’t on any of the vertical, horizontal or diagonal lines in the picture. Within these restrictions, Uncle Pinkle has arranged the system-elements and placed his seat so that D is as small as possible.

How far is the distance D? (An answer to the nearest centimetre will do).

Follow

Get every new post delivered to your Inbox.