Enigmatic Code

Programming Enigma Puzzles

Tag Archives: by: Keith Austin

Enigma 1028: A perfect pass

From New Scientist #2184, 1st May 1999

This is part of a football pitch; C is a corner, CE is a goal-line, CD is a side-line and AB is a side of the penalty area. Rovers have been awarded an indirect free-kick at the point F on AB and the ball is placed at F. Two players, Fay and Patricia, got to G on CD to discuss their plan. Then together they set off running, Fay towards F and Patricia towards P, each at a steady speed. After 10 seconds Fay reaches F and Patricia reaches P. Fay immediately takes the free-kick and kicks the ball along FA, so that it travels at a steady speed. Patricia carries on running at the same speed and in the same straight line. At the moment Patricia reaches AF, the ball reaches Patricia. Our problem is to find the speed of the ball, as follows:

Draw a line which passes through two of the labelled points, A, B, C, … Select a point where your line crosses an existing line and mark it X. Select a labelled point and mark it Y. You are to do this so that the distance between X and Y is the distance the ball travels in 10 seconds.

Which to labelled points should you choose to draw the line through? Which point is Y?




Enigma 479: Road island

From New Scientist #1630, 15th September 1988 [link]

On the faraway island of Roadio, the quaint villages with the curious one letter names A, B, C, …, S are joined by a network of roads as shown:

Enigma 479

The numbers indicate distances between villages in miles. I have written on all the distances I remember, however I also recall that, by road, no village is more than 20 miles from D and no village is more than 29 miles from P. What is the maximum distance between any two villages on the island?


Enigma 1033: Squirrels up and down

From New Scientist #2189, 5th June 1999

Samantha and Douglas are counting the squirrels visiting their garden. They record the monthly total for each of the 15 months January 1998 to March 1999. Samantha calculates that the number of squirrels is increasing, for she divides the 15 months into three five-month periods and finds the five-month totals are increasing with time. For example, there were more squirrels June to October 1998 than January to May 1998. But Douglas says the number of squirrels is decreasing, for he divides the 15 months into five three-month periods and finds the three-month totals decreasing with time, for example there were fewer squirrels April to June 1998 than January to March 1998.

1. Could there have been a total of 4 squirrels for the two months April and May 1998 and fewer than 75 squirrels for the whole of the 15 months? If so, how many squirrels were there for the 15 months?

2. Could there have been a total of 5 squirrels for the two months April and May 1998 and a total of fewer than 65 squirrels for the 15 months?

3. Could there have been 107 squirrels in June 1998 and 100 squirrels in October 1998? If so, how many squirrels were there in the 15 months?

4. Could there have been 108 squirrels in June 1998 and 100 squirrels in October 1998? If so, how many squirrels were there in the 15 months?


Enigma 1035: Connected numbers

From New Scientist #2191, 19th June 1999 [link]

Take a large sheet of paper and write on it the numbers, 5, 6, 7, …, 999998, 999999, 1000000. You are now going to draw lines that connect pairs of the numbers as follows. Start with 5. Split 5 into two numbers, both larger than 1, in as many ways as you can. So 5 = 2 + 3. Multiply the two numbers together. Now 2 × 3 = 6, so draw a line connecting 5 and 6. The next number is 6. Now 6 = 2 + 4 = 3 + 3 and 2 × 4 = 8 and 3 × 3 = 9, so draw a line connecting 6 and 8 and another connecting 6 and 9. The next number is 7 = 2 + 5 = 3 + 4, and so we draw a line that connects 7 and 10 and another connecting 7 and 12.

Repeat the procedure for 8, 9, 10, …, in turn. Note that when a product is larger than 1000000 then no line is drawn, for example: 500002 = 2 + 500000 = 3 + 499999 = …, so a line is drawn connecting 500002 and 1000000 but no line is drawn for 3 × 499999 = 1499997.

1) When your diagram is complete, are there two numbers, both less than 250000, such that there is no path along the lines connecting one to the other?

Now for your second task, take another piece of paper. You want to write the numbers 5, 6, 7, …, 98, 99, 100 on it, and then copy onto it, from your first piece of paper, all the lines connecting numbers which are both less than or equal to 100.

2) Can you complete your second task in such a way that no two of the lines in fact cross?


Enigma 475: Dance hall

From New Scientist #1626, 18th August 1988 [link]

At the dance there are 10 girls, Ann, Babs, Cath, Dot, Emma, Fay, Gwen, Hazel, Irene and Jane, and 10 boys. Jane knows one boy and Tom knows one girl, but I cannot tell you who they know. However, I can tell you all the other acquaintances:

Ken knows D, F;
Len knows E, H, I;
Mac knows B, F, G, I;
Ned knows A, B, H;
Owen knows E, G, I;
Pat knows A, B, C, D;
Quentin knows E, G;
Ray knows A, C;
Sam knows C, E.

The first dance pairs them off as follows:

Ann takes the hand of the first boy she knows, Ned (first always means first in alphabetical order), Babs does the same to Mac, then Cath, to Pat, then Dot, to Ken, then Emma, to Len. When Fay approaches Ken she finds he is holding Dot’s hand and the procedure becomes more complicated.

They form a line of the dance floor, F, K-D and ask the first boy who knows any girl on the floor to come out, bringing any girl that is holding his hand. The line becomes F, K-D, M-B. The procedure is repeated to give F, K-D, M-B, N-A. Repeating adds P-C to the line. Repeating again adds Ray to the line and the procedure stops as he has his hands free. The we have the line F, K-D, M-B, N-A, P-C, R.

Now Ray takes the hand of the girl he knows who is nearest to Fay in the line, Ann, and she releases Ned’s hand. Ned repeats the procedure Ray used and takes the hand of Babs who releases Mac. Mac repeated the procedure and takes the hand of Fay. That completes the pairing for Fay’s round.

The procedure is repeated for Gwen, Hazel, Irene, and Jane in turn. The pairing obtained after Jane’s round includes C-S, D-K, F-M, H-N and I-L.

Who do Jane and Tom know?

Note: I corrected a typo in the original puzzle while transcribing this (and I hope I didn’t introduce any more myself).


Enigma 471: What you do is what you get

From New Scientist #1622, 21st July 1988 [link]

You are given the following four instructions:

A. Put the card in box 1 into box 2, put the card that was in box 2 into box 3, put the card that was in box 3 into box 4, and put the card that was in box 4 into box 1.
B. Exchange the cards in boxes 1 and 4, and exchange the cards in boxes 2 and 3.
C. Exchange the cards in boxes 1 and 2, and exchange the cards in boxes 3 and 4.
D. Exchange the cards in boxes 1 and 3, and exchange the cards in boxes 2 and 4.

If you wrote the four instructions in any order then you get a procedure, e.g. B, C, A, D. The procedure is applied to four boxes numbered 1, 2, 3, 4, which initially contain cards labelled A, B, C, D, respectively.

To apply the procedure, simply obey the instructions in the selected order, e.g. for order B, C, A, D, we obey B to get D in 1, C in 2, B in 3, A in 4, then obey C to get C in 1, D in 2, A in 3, B in 4, then obey A to get B in 1, C in 2, D in 3, A in 4, and finally obey D to get D in 1, A in 2, B in 3, C in 4. This instruction order B, C, A, D produces final card order D, A, B, C.

Which instruction order produces a final card order which is the same as that instruction order?


Enigma 1042: Days of the year

From New Scientist #2198, 7th August 1999 [link]

Long ago, a village used a calendar similar to ours, except that February had 30 days. The villagers kept track of what day of the year it was, from Day 1, 1 January, to Day 367, 31 December.

If villagers wanted to know in which month Day D was, where D was a particular number, then they would go to the village green, where there were three piles of stones, one red, one yellow and one blue, containing RY and B stones respectively. The villager would calculate:

((D × R) + Y) ÷ B

and discard any figures to the right of the decimal point in the result of the calculation. The final answer would give the month, where 1 = January, …, 12 = December. This if R = 12, Y = 373, B = 367 and D = 100 then we have:

((100 × 12) + 373) ÷ 367 = 4.2861035…

which gives a final answer of 4. Thus day 100 is in April. These were not the actual number of stones; in fact there were fewer than 250 blue stones. How many stones were there in each of the three piles?


Enigma 466: Golden sum

From New Scientist #1617, 16th June 1988 [link]

Recently, I gave a talk on puzzles to the Mathematics Society of Goldsmiths’ College, and so this puzzle is dedicated to the students and staff in the society.

In the following addition sum, different letters stand for different digits. Also, I is greater than S.

Enigma 466

What is the sum?


Enigma 462: The cricket mystery

From New Scientist #1613, 19th May 1988 [link]

Our local cricket club consists of 11 married couples with surnames, Ashes, Bowler, Cricket, Declare, Eleven, Fielder, Googly, Hit, Innings, Join-at-the-wicket, and Kit. Recently there have been complaints that cricket balls have been hit out of the ground into local gardens. It was known that, in each couple, only one partner is capable of hitting the ball out of the ground.

On the last practice evening, 11 balls were hit out of the ground. From my position I could only tell, each time, that the hitter was one of a group of players, for example, the first ball hit out was hit by Mr Declare or Mrs Eleven or Mrs Hit. The full list was as follows:

1. Mr D, Mrs E, Mrs H;
2. Mrs B, Mrs F, Mrs J, Mr K;
3. Mrs A, Mr F, Mr G, Mr I;
4. Mrs F, Mrs K;
5. Mrs A, Mr C, Mr G;
6. Mrs A, Mr D, Mrs E, Mr F, Mrs G, Mr H;
7. Mrs B, Mrs F, Mr J, Mr K;
8. Mr A, Mr D, Mr F;
9. Mrs C, Mr F, Mrs I;
10. Mr B, Mrs F, Mr K;
11. Mr E, Mr F, Mrs G.

Who could I definitely say had hit a ball out of the ground?


Enigma 1048: Rows and columns

From New Scientist #2204, 18th September 1999 [link]

A square field has its sides running north-south and east-west. The field is divided into an 8 × 8 array of plots. Some of the plots contain cauliflower. A line of plots running west to east is called a row and line of plots running north to south is called a column.

John selects a row and walks along it from west to east, writing down the content of each plot as he passes it; he writes E to denote an empty plot and C to denote a plot containing cauliflower; he writes down EECECCEC. He repeats this for the other seven rows and writes down ECEECCCE, ECECEECC, ECCECCEE, CEECEECC, CECECECE, CECCECEE and CCECEEEC. The order in which John visits the rows is not necessarily the order in which they occur in the field.

Similarly, Mark selects a column and walks along it from north to south, writing down the content of each plot as he passes it; he writes down EECECCCE. He repeats this for the other seven columns and writes down EECCEECC, ECECECEC, ECCECEEC, CEECCECE, CECECECE, CCEEECEC and CCECECEE. The order in which Mark visits the columns is not necessarily the order in which the occur in the field.

Draw a map of the field, showing which plots contain a cauliflower.

Enigma 1248 was also called “Rows and columns”.

There are now 1200 Enigma puzzles on the site (although there is the odd repeated puzzle, and at least one puzzle published was impossible and a revised version was published as a later Enigma, but the easiest way to count the puzzles is by the number of posts in the “enigma” category).

There is a full archive of Enigma puzzles from Enigma 1 (February 1979) to Enigma 461 (May 1988), and of the more recent puzzles from Enigma 1048 (September 1999) up to the final Enigma puzzle, Enigma 1780 (December 2013). Which means there are around 591 Enigma puzzles to go.

Also on the site there are currently 53 puzzles from the Tantalizer series, and 50 from the Puzzle series, that were published in New Scientist before the Enigma series started.

Happy Puzzling!


Enigma 1051: Win on average

From New Scientist #2207, 9th October 1999 [link]

The top of the hockey league table looks like this:

All other teams have less than 8 points. There is just one match to play, Oldies v Housians.

There are 2 points for a win and 1 for a draw. Teams that are level on points in the table are ordered by their goal averages, that is, their “goals for” divided by their “goals against”. Teams with the same points and averages are ordered by drawing lots.

There are six different orders that the teams can finish in: HOW (that is, H first, O second and W third), HWO, OHW, OWH, WHO and WOH. An order is unexceptional if there are more than 100 different scores in the the Oldies v Housians game which would produce that order.

Which of the six orders are unexceptional? For each of the other orders, state how many different scores would produce that order without drawing lots.


Enigma 458: The brownies wrap things up

From New Scientist #1609, 21st April 1988 [link]

Our local brownie pack is divided into five teams — red, blue, green, yellow and purple. Each team contains at least one and not more than six brownies. Recently the were due to visit the old people’s home and Brown Owl suggested they should make some gifts and wrap them in coloured paper. What each team had to do depended on how many were in the team; for example, if a team contained one brownie then the team had to make two blue presents and one yellow present. The full list of instructions was as follows:

If 1 in the team then make 2 blue and 1 yellow;
If 2 in the team then make 1 red and 3 yellow and 1 purple;
If 3 in the team then make 2 red and 1 blue;
If 4 in the team then make 1 green and 1 yellow;
If 5 in the team then make 1 blue and 1 green and 2 yellow and 1 purple;
If 6 in the team then make 1 red and 1 green and 1 purple.

When the brownies had finished, Brown Owl found that, for each colour, the total number of presents of that colour was equal to the number of brownies in the team of that colour; for example, the number of red presents was equal to the number of brownies in the red team.

How many brownies were there in each team?


Enigma 453: Walkies

From New Scientist #1604, 17th March 1988 [link]

Each morning six dog owners take their dogs for a walk in the park, where there are eight trees. Each owner starts his or her walk at a tree at 9:00 or 9:05 or 9:10 or 9:15 or etc., and visits all the trees before going home, for example, the Alsatian’s walk is Fir, Cedar, Elm, Ash, Hawthorn, Beech, Gorse, Damson. The full list of walks is as follows:

It takes five minutes to walk from one tree to the next. If two dogs arrive at the same tree at the same time they fight, so the owners want to avoid this. The owners want to arrange their starting times so that the last owner(s) to finish should finish as early as possible.

At what times should the six dogs start their walks?


Enigma 1058: A row of colours

From New Scientist #2214, 27th November 1999 [link]

Pusicatto has been asked by a family to paint a picture consisting of a row of squares, which each square either red or green. Each member of the family has expressed a wish for something they would like to appear in the picture. For example, Mum asked for G??R?G, by which she meant that, somewhere in the row, there should be a green square, then two squares that could be of either colour, then a red square, then a square of either colour, and then a green square, without any other squares coming between them. Dad asked for G?R?R. The children’s requests were:

Kathy: R?G?R
Matthew: RG???G
Janet: G????R
Benjamin: R????R

Pusicatto decided to paint the picture so that it had the smallest number of squares possible.

What was the order of the squares in Pusicatto’s painting?


Enigma 1060: In order to solve…

From New Scientist #2216, 11th December 1999 [link]

I have a row of 8 boxes labelled A, B, C, …, H. Each box contains a card with a number on it. The contents of the boxes are one of the following 17 possibilities:

13683641, (that is, 1 in A, 3 in B, 6 in C, …, 1 in H)

And here are four more facts:

P. Given the above facts, if I now tell you the number in box A then you can work out the number in box D.

Q. Given the above facts, if I now tell you the number in box B then you can work out the number in box H.

R. Given the above facts, if I now tell you the number in box F then you can work out the number in box C.

S. Given the above facts, if I now tell you the number in box G then you can work out the number in box E.

Unfortunately, I have forgotten what order the for facts P, Q, R, S should be in. I do remember that when they are in the right order you can work out the contents of the boxes. Also that there is only one order that allows you to do that.

What order should the four facts be in? And what are the contents of the boxes?


Enigma 449: He who laps last

From New Scientist #1600, 18th February 1988 [link]

“This is Hurray Talker reporting from Silverhatch on the 40-lap Petit Prix. The leaders, Hansell and Bisquet, are each going round the circuit in an incredible 59 seconds, except when they have made a pitstop. They were neck and neck for the first seven laps but then things started to go wrong. However, each pit stop has been kept down to an amazing 23 seconds. Here they come now to cross the line and complete another lap. Hansel – now. Biscuit – now. That’s just a 2-second interval. There they go off on the next lap.”

How many laps have Hansell and Bisquet completed?


Enigma 1062: Christmas present

From New Scientist #2218, 25th December 1999 [link]

Joseph the carpenter used to cut out rectangular blocks of wood which his young son Jesus would paint. The blocks always had whole number dimensions. They used to say a block was fair if the numerical values of its volume and its surface area were the same, for example the 4×5×20 block was fair as it had volume and surface area both equal to 400. They felt that with a fair block the both did the same amount of work.

As Jesus’s birthday was coming up, Joseph asked him to choose a number and he would try and cut a fair block with volume equal to that number. Jesus chose 2000 which so surprised Joseph that he asked Jesus if he thought people would remember him on his 2000th birthday. Jesus thought for a while then replied that it was hard to say, as it depended on so many things.

Can Joseph cut a fair block with volume 2000? If he can, give its dimensions. If he cannot, give the dimensions of the fair block with volume nearest to 2000.


Enigma 445: Court order

From New Scientist #1596, 21st January 1988 [link]

The draw for the Humbledon Ladies Tennis Tournament was as follows:

Enigma 445

After the tournament the umpire noticed that six ladies each lost to the lady one place below them in the above list, three ladies each lost to the lady one place above them, one lady to the lady two places below, one to the lady two places above, one to the lady three places below, one to the lady three places above, one to the lady five places below, and one to the lady six places above.

Who won the tournament and whom did she defeat in the final?


Enigma 1066: Members of the clubs

From New Scientist #2222, 22nd January 2000 [link]

There are only 10 people on Small Island. However, there are many clubs, each consisting of the people with a particular interest. The island’s government will give a grant to any club with more than half the population as members. There are 12 such clubs.

The government wants to set up a committee of two so that every one of the 12 clubs has at least one member on the committee. This afternoon, the government is to look at the 12 membership lists and try to find 2 people to form the committee.

(1) This morning, before it sees the membership lists, can the government be certain that it will be able to find 2 people this afternoon?

There are 1000 people on Larger Island. The situation is similar to Small Island, except that there are 50 clubs that each have more than half the population as members. Also, the government wants to set up a committee of five so that every one of the 50 clubs has at least one member on the committee.

(2) Before the government sees the 50 membership lists, can it be certain that it will be able to find 5 people to form the committee?

The situation on Largest Island is similar to that on Larger Island, except that there are 1 million people.

(3) Before the government of Largest Island sees its 50 membership lists, can it be certain that it will be able to find five people to form its committee?


Enigma 442a: Hark the herald angels sing

From New Scientist #1592, 24th December 1987 [link]

“Have a mince pie.”

“Thanks. How did the carol singing go this evening?”

“Very well indeed. There were 353 of us. We started from the village church at 6:00pm and arrived here at the hall some time ago. Have a look at this map here on the wall.

Enigma 442a

“We divided into groups and between us we covered every one of the 12 roads once. For each road, the group would enter at one end, sing the carols as they walked along the road, and leave at the other end. At each of the five junctions, all the groups due to arrive at that junction would come together and then re-divide before setting off again.”

“Did you sing many carols?”

“On each road, every member of the group would sing one verse as a solo. A verse takes one minute to sing.”

“Did people get cold waiting at the junctions for the other groups to join them?”

“No. That is the marvellous thing. We had divided into groups so that, at each junction, all the groups for that junction arrived at precisely the same time. Similarly, all the groups arrived at the hall at the same time.”

“You were very fortunate — a little miracle.”

“Don’t forget,” said the vicar who had been standing with us, “it is Christmas Eve.”

What time did the singers arrive at the hall and what was the total number of verses that they sang?

[enigma442a] [enigma442]