### Random Post

### Recent Posts

### Archives

### Site Stats

- 113,461 hits

Programming Enigma Puzzles

8 February 2016

Posted by on **From New Scientist #2337, 6th April 2002**

George has been investigating pandigital numbers, which he defines as 10-digit numbers with no leading zero, containing the digits 0-9 once each. The largest pandigital number is 9876543210. Since it ends in 0 it is clearly divisible by 2 and 5, giving quotients 4938271605 and 1975308642 – both pandigital!

Inspired by this discovery, he set out to list, for each possible multiple, the largest pandigital number which is an exact multiple of another pandigital number. The solutions for 4 and 8 can be found by small-scale number juggling; the others require a more systematic approach.

What is the smallest number in George’s list of largest pandigital multiples?

Thanks to Hugh Casement for providing a complete transcript for this puzzle.

[enigma1181]

5 February 2016

Posted by on **From New Scientist #1479, 24th October 1985** [link]

In the following long division sum the figures given have this is common — they are all wrong. The sum comes out exactly.

Write out the correct long division sum.

[enigma331]

1 February 2016

Posted by on **From New Scientist #2338, 13th April 2002**

Some fractions expressed as decimals consist of a decimal point followed immediately by a set of digits that recurs

ad infinitum: for example 2/37 = 0.054054054…In this example the digits that form the fraction and the recurring decimal are all different from each other, but there are only six of them (2, 3, 7, 0, 5, 4).

Your task is to find another fraction written in its simplest form that when expressed as a decimal consists of a decimal point followed immediately by a set of digits that recurs

ad infinitum. The digits that form the fraction and the recurring decimal must all be different from each other and there must be nine of them.What is the fraction?

[enigma1182]

29 January 2016

Posted by on **From New Scientist #1478, 17th October 1985** [link]

The four teams Alphas, Betas, Gammas and Deltas are part way through their football season, in which each plays each of the others once. Part of the league table (with the teams in decreasing order) is given below with digits consistently replaced by letters. Three points are awarded for a win and one for a draw.

There’s only one entry in Alpha’s row — and that’s wrong! It should in fact be lower than the entry implies. Luckily the rest is right.

List the matches played so far and the score in each.

[enigma330]

25 January 2016

Posted by on **From New Scientist #2339, 20th April 2002**

Our local football team consists of BERT, DAVE, FRED, JACK, JOHN, LEON, MARK, MIKE, NICK, PHIL and STAN. The team is in a large league. On match evenings each team plays in a match and by the end of the season each team has played each of the others once.

I’ve kept a note of last season’s results and I’ve counted up the number of matches in which there was a win for one team or the other, and I’ve also counted the rest, which were draws. I’ve then replaced digits consistently with letters, different letters being used for different digits.

How many matches resulted in a win? [The answer is] WIN.

And in how many was there a tie between two teams? [The answer is] TIE.

How many games were played altogether? The answer is one of our player’s names!

Whose name? And how many teams in the league?

[enigma1183]

22 January 2016

Posted by on **From New Scientist #1477, 10th October 1985** [link]

An n-circuit is a closed path of n different points and n different legs. Every leg runs along a grid-line and every point is a junction of grid-lines. Legs do not overlap, but they may cross.

A clear circuit is one that you cannot make a circuit with just some of the points. Thus the 5-circuit

Ais not clear. Points 1, 2 and 5 would make a 3-circuit: so would points 3, 4 and 5. ButBis clear.The length of a circuit is just the sum of the lengths of the legs. Thus

Ahas length 7, andBhas length 11.Can you find a clear 12-circuit with a length of 21 (or less)?

A similar problem to **Enigma 325**.

[enigma329]

18 January 2016

Posted by on **From New Scientist #2340, 27th April 2002**

My young nephew recently asked me to draw him a church. He gave me a sheet of A4 paper, and I began by drawing a square. I next added an isosceles triangle, using the whole of the top of the square as its base. To the whole of one side of the square I then added a rectangular nave. Of the three shapes, the rectangle occupied the largest area. The four different constituent dimensions were each a whole number of centimetres, these dimensions being the sides of each shape and the vertical height of the triangle. The areas of the three shapes added together produced a total which was perfectly divisible by each of the four dimensions.

What were the overall length and overall height of my church?

[enigma1184]

15 January 2016

Posted by on **From New Scientist #1476, 3rd October 1985** [link]

Nine men went to mow, went to mow a meadow. Write “9” in one of the meadows. Eight men left the ninth in the meadow and went through a gate into the next. Write “8” in the meadow they went into. Seven men left the eighth behind and went through a gate. Write “7” in the meadow they went into. Carry on in this way until you have “6”, “5”, “4”, “3”, “2” and “1” duly inscribed in the remaining meadows. You must use a gate each time and never enter the same meadow twice.

That gives you a three-digit number on each of the three lines. Try adding the top number to the middle number and see if they sum to the bottom number. If not, bad luck — you’ll have to sing the song all over again.

When you have got it right, please give the completed grid.

[enigma328]

11 January 2016

Posted by on **From New Scientist #2341, 6th May 2002**

The relative frequencies of the notes of the diatonic music scale are:

C = 24, D = 27, E = 30, F = 32, G = 36, A = 40, B = 45, C’ = 48.

I recently built a series of oscillators so that I could hear how it sounded, but something went wrong with the wiring, so that I ended with an eight-note keyboard where only two were in the correct places.

However, when I played each key in order from the left, I noticed that the only intervals between adjacent notes were fourths (frequency ratio 4/3 or 3/4), fifths (3/2 or 2/3), or sixths (5/3 or 3/5).

Further, the interval (frequency ratio) between the two notes I did get right was one of these.

(a) If I played the left-hand key, what note letter did it sound?

(b) Could the notes have been arranged according to the same rules and have none in the right place?

(c) Could the notes have been arranged according to the same rules and have had more than two in the right place?

[enigma1185]

8 January 2016

Posted by on **From New Scientist #1475, 26th September 1985** [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.

Write out the sum with numbers substituted for letters.

[enigma327]

4 January 2016

Posted by on **From New Scientist #2342, 11th May 2002**

At snooker a player scores 1 point for potting one of the 15 red balls, but 2, 3, 4, 5, 6 or 7 points for potting one of the 6 “colours”.

Whyte potted his first red, then his first colour, then his second red, then his second colour, and so on until he had potted all 15 reds, each followed by a colour. Since the colours are at this stage always put back on the table after being potted, the same colour can be potted repeatedly.

After Whyte had potted each of the 15 colours his cumulative score called by the referee was always a semi-prime. A semi-prime is the product of two prime numbers; the square of a prime number counts as a semi-prime.

After potting the 15 reds and 15 colours a player tries to pot (in this order) the balls scoring 2, 3, 4, 5, 6 and 7 points. Whyte did so to complete a total “clearance”, but his cumulative score after each of those six pots was never a semi-prime.

What was his final score?

Thanks to Hugh Casement for providing a complete transcript for this puzzle.

[enigma1186]

1 January 2016

Posted by on **From New Scientist #1474, 19th September 1985** [link]

We are going to run a tombola at our big local charity ball. We’ve had a particular number of tickets printed, numbered consecutively from 1 upwards. We asked the printer to put “Prize-winner” on all those tickets whose number had its digits increasing from start to finish (e.g. 9, 37, 256, etc), but in error he marked those tickets whose numbers had their digits decreasing from start to finish (e.g. 7, 54, 310, etc). (Single digit numbers were intended to be winners and were printed as winners).

By a great coincidence this meant that there were as many prize-winning tickets as we had wished. But had the number of tombola tickets been any higher that could not have been the case.

How many tickets were there?

[enigma326]

31 December 2015

Posted by on There are now 923 *Enigma* puzzles on the site. There is a complete archive of all puzzles published from January 1979 – September 1985 and also from May 2002 – December 2013. Which is about 52% of all *Enigma* puzzles published in *New Scientist*, and leaves around 860 puzzles to add to the site.

In 2015 I added 160 *Enigma* puzzles (as well as a handful of puzzles from other sources). Here’s my selection of the ones I found most interesting to solve programatically this year:

**Enigma 252: Three-point circle****Enigma 257: Hexa-draughts****Enigma 258: Monkey business****Enigma 266: Twelve trees****Enigma 278: Uncle Pinkle’s new system****Enigma 287: GAGA’s friends****Enigma 288a: Multiplets****Enigma 288b: Christmas viewing****Enigma 289: All for one****Enigma 293: Red is not a colour****Enigma 295: The max-multiple game****Enigma 321: Going to pieces****Enigma 325: Clear thin circuit**

**Enigma 1190: Triple duel****Enigma 1194: Only two coins****Enigma 1221: Flower beds****Enigma 1225: Rows are columns****Enigma 1226: Megafactors****Enigma 1240: Stack ’em high****Enigma 1241: Jigsaw squares****Enigma 1244: All in one****Enigma 1247: Recurring decimal****Enigma 1248: Rows and columns****Enigma 1249: Root routes****Enigma 1251: Jigsaw of rectangles****Enigma 1252: Cards on the table****Enigma 1253: Votes and taxes****Enigma 1254: Piles of money****Enigma 1260: Latin fives**

During 2015 I switched to posting puzzles twice a week (on Monday and Friday, with the occasional extra posting on Wednesdays if I had something interesting to post), so there are around 8 years worth of puzzles to go.

Thanks to everyone who has contributed to the site in 2015, either by adding their own solutions (programmatic or analytical), insights or questions, or by helping me source puzzles from back-issues of *New Scientist*.

Here is the **2015 Annual Report** for *Enigmatic Code* generate by **WordPress**.

28 December 2015

Posted by on **From New Scientist #2343, 18th May 2002** [link]

“When you reap the harvest of your land, you shall not reap to the very edges of your field, …, you shall leave them for the poor and the alien: I am the Lord your God.”

The land of Fairfield has put that commandment into its legal code. All the fields of Fairfield are the same size; they are rectangles, 100 metres wide and a whole number of metres long. Each field contains a border strip along each of its four sides. This strip is a whole number of metres wide and is not to be reaped. The width of that strip has been chosen so that exactly half the area of each field is in the strip. I noticed that the digits in the length, in metres, of each field are in decreasing order when read from left to right.

Find the length of each field and the width of each strip.

[enigma1187]

25 December 2015

Posted by on **From New Scientist #1473, 12th September 1985** [link]

An n-circuit is drawn on a triangular grid made up of equilateral triangles. It is a closed path of n different points and n different legs. Every leg runs along a grid-line and every point is a junction of grid-lines. Legs do not overlap, but they may cross.

A clear circuit is one that you cannot make a circuit with just some of the points. Thus the 5-circuit

Ais not clear. Points 1, 2 and 5 would make a 3-circuit: so would points 3, 4 and 5. ButBis clear.The fatness of a circuit is the area it encloses. Thus

Ahas fatness 5 (measured by the number of little triangles enclosed), andBhas fatness 7.Can you find a clear 9-circuit with a fatness of 9 (or less)?

**Happy Christmas** from **Enigmatic Code**!

[enigma325]

21 December 2015

Posted by on **From New Scientist #2344, 25th May 2002** [link]

I was playing about with my seven-digit-display calculator, showing my numerate nephew a trick or two. I displayed a number on the calculator and he looked at it upside down. After some jottings of his own he declared “I can see a number too, and it’s a perfect square”.

I then doubled my original number and displayed the answer and again he looked at it upside down and did some calculations.

“I can still see a number, and it’s another perfect square”, he said.

Which number did I originally display?

[enigma1188]

18 December 2015

Posted by on **From New Scientist #1472, 5th September 1985** [link]

As you probably know, Nondag, Ondag, Pondag, Quondag, Rondag, Shondag and Tvondag are the days of the Ruritanian week. But I wonder if you know which is which.

Well, think of the week as starting with Monday. You can get three Ruritanian days right by calling out the alphabetical order above. That does not help much, of course, as you do not know which three. So her is another order which gets three right: Quondag, Ondag, Nondag, Pondag, Rondag, Tvondag, Shondag. And here is another which also gets three right: Tvondag, Quondag, Pondag, Ondag, Nondag, Shondag, Rondag.

That should be enough to go on. What is the fully correct order?

[enigma324]

14 December 2015

Posted by on **From New Scientist #2345, 1st June 2002** [link]

I recently bought a compilation of archive recordings by the Prime Players, issued as a set of three CDs. Each CD has a different playing time of not more than one hour and contains four tracks. Within each CD each track lasts a different prime whole number of minutes, and any combination of three different tracks on that CD lasts a prime whole number of minutes.

For each CD, give its playing time and the length of its longest track.

[enigma1189]

11 December 2015

Posted by on **From New Scientist #1471, 29th August 1985** [link]

Professor D. O’Phantus does all his calculations in code, with each digit represented by a letter of the alphabet. Each letter always stands for the same digit and each digit is always represented by the same letter. At the end of one of his confusing lectures on “Letter Theory” some examples of calculation remained on the blackboard.

According to the professor:

Sadly, the result of another addition:

had been wiped out, but when it was multiplied by the result of the previous sum it apparently yielded OMTTOUI.

“This is quite hopeless”, said Magnus Swottus. “How can we do lots of lovely homework if we don’t know what the letters stand for? It might as well be Greek.”

But Goody-Goody Major, unwilling to be done out of his homework, was more philosophical. “We’ll just have to crack old Doodah’s code, and then just think of all the problems open to us? We’ll even be able to invent our own!”

Can you help these young enthusiasts by writing out in order the letters corresponding to the digits from 0 to 9?

[enigma323]

7 December 2015

Posted by on **From New Scientist #2346, 8th June 2002** [link]

In an earlier incarnation, George fought a “duel” with Ernest and Fred. Ernest was a crack shot, 100 per cent certain to hit his target. Fred had a 75 per cent chance and George only 60 per cent. They agreed to fire one shot at a time in rotation, George (the weakest shot) first, then Fred, then Ernest, until two were dead. Each could aim where he pleased.

If each adopted his best strategy, who was most likely to survive and what was his percentage chance of survival?

[enigma1190]

## Recent Comments