Enigmatic Code

Programming Enigma Puzzles

Category Archives: enigma

Enigma 538: Rule of the road

From New Scientist #1690, 11th November 1989 [link]

I recently visited Ruralania with its five towns, Arable, Bridle, Cowslip, Dairy, Ewe, joined by one-way roads labelled high or low, as in the map:

Enigma 538

The Ruralanian road system is very simple; if a driver is at one of the five towns then the systems says whether he or she is to leave that town by the high road, by the low road, or to stop in that town.

The system is determined by the fact that it must be possible to make a Grand Tour by starting at a certain town and driving round visiting all the towns and stopping at the final town, while always obeying the single Rule (X):

Take the high road if taking the low road and then obeying Rule (X) again, results in your car next being at A or E. Otherwise, take the low road if taking the high road and then obeying Rule (X) again, results in your car next being at C. Otherwise, stop in the town where you are.

What is the Grand Tour? (List the towns in order).

[enigma538]

Enigma 972: Fifty-fifty

From New Scientist #2127, 28th March 1998

Bunko, Jack and Patience have a pack of cards that consists of fewer than one hundred cards which are numbered consecutively: 1, 2, 3, 4, 5, 6, …

On one occasion recently they were each given one of the cards (without the other two players seeing which).

Bunko said: “There’s an exactly 50:50 chance that my card is the highest of our three”.

Then Jack added: “In that case there’s an exactly 50:50 chance that, in decreasing order, the cards are Bunko’s, Patience’s then mine”.

How many cards are there in the pack? And what was Jack’s card?

[enigma972]

Enigma 537: The three sisters

From New Scientist #1689, 4th November 1989 [link] [link]

Sarah, Tora and Ursula are three sisters. One of them is honest, one always lies, and the third is simply unreliable.

Tora told me that the youngest of the three is fatter than the liar, and the oldest of the three told me that the fattest is older than the honest one. But Ursula and the thinnest sister both agreed that the oldest sister always lies.

The fattest sister and the oldest sister both agreed that Sarah always lies. Then the youngest sister whispered to Sarah who then claimed that the youngest had said that Ursula was the fattest.

Who is the honest sister?
Who is the fattest sister?
Who is the youngest sister?

[enigma537]

Enigma 973: Choss, anyone?

From New Scientist #2128, 4th April 1998

The game of choss is played by two players, Black and White, on a board of 6 × 6 squares. Each player has a number of pieces which he or she moves one square horizontally or vertically. The players take it in turns to move one of their own pieces. A piece cannot move into a square already occupied by a piece of the same colour. If a piece moves into a square occupied by a piece of the opposite colour, that the other piece is captured and removed from the board. One White piece is larger than the other pieces and is called the Target. Black wins by taking the Target.

The layout of the board is as shown and it is Black’s move. She can in fact definitely win in three or fewer moves.

1. What should the first of these moves be?

That was the Enigma that I intended to set, but the editor thought it was too easy. He suggested that I change the board layout above by moving the Target to some other unoccupied square where it cannot be immediately taken by Black, but so that from the new layout Black can again definitely win in three or fewer moves. He then suggested that I asked Question 1 about this new layout.

Of course I shall have to choose the new position of the Target so that Question 1 has a unique answer.

2. To which position should I move the Target?

[enigma973]

Enigma 536: A strange encounter

From New Scientist #1688, 28th October 1989 [link] [link]

At a Halloween party I met a strangely beautiful red-haired woman who was gazing with longing into a bonfire. To my inquiries she replied: “(My telephone number) 2 = AABCCD and the exchange is 04617. I was born in the year given by: (AE) F = EDGE”

I realised that it was one of those ‘letters-for-digits-and-digits-for-letters’ puzzles, but I must have looked confused for she added: “The other letters are HIS.” So saying she vanished into thin air.

Given that in the above relations the same letter stands for the same digit and the same digit stands for the same letter; that different digits stand for different letters and vice versa; and that 04617 stands for the place where she now resides:

Can you solve the mystery and write down the digits 0 to 9 in the alphabetical order of the letters that represent them?

[enigma536]

Enigma 974: Girls jump first

From New Scientist #2129, 11th April 1998

Each pony club competing at the gymkhana entered one boy and one girl for the showjumping. In order to determine the order of competition, Mary put all the riders’ names in a hat and drew them out one at a time.

When Mary had drawn precisely half of the names she was surprised to find she had drawn one rider from each club. She calculated that if she did such a draw a thousand times this would only be likely to happen with this number of competing clubs on three occasions (to the nearest whole number). She then realised in amazement that the riders she had drawn in that first half were all the girls.

1. How many clubs were competing?
2. If the number of clubs competing is still as in question 1, on how many occasions (to the nearest whole number) would Mary be likely to draw all the girls first if she carried out the draw five million times?

[enigma974]

Enigma 535: For old time’s sake

From New Scientist #1687, 21st October 1989 [link]

“What time is it dear?” asked old Mrs Protheroe, from her wheelchair. “Is it time for the evening news yet?” Her husband pulled the watch, on the end of its chain, from his waistcoat pocket. “Drat! It’s stopped; I must have forgotten to wind it up last night.”

“That’s no cause for you to use such strong language,” snapped his wife. “Anyway, Joanna has left her watch on the sideboard. Perhaps that’s working.”

Mr Protheroe picked up his grand-daughter’s watch and stared at it. Now he was what one might call old-fashioned: he had no truck with modern contraptions, like digital watches. His brow furrowed in concentration as, for the first time in his life, he tried to decipher the strange looking figures on the face of the watch. He turned it first one way, then the other, until, with a triumphant “Ah!”, he announced the correct time to his wife.

What Mr Protheroe did not realise was that:

(a) He was holding the watch upside-down;
(b) The watch was 21 minutes slow.

Nevertheless, the time he announced was the correct one.

What time was it?

[enigma535]

Enigma 975: Ant goes for a walk

From New Scientist #2130, 18th April 1998

Imagine an 8 × 8 chess board and imagine that in each square of the board there is written one of the following four instructions:

Turn right;
Turn left;
Go straight ahead;
Go back.

An ant is placed at the centre of the bottom left corner square. She walks, parallel to the bottom edge of the board, until she reaches the centre of the next square. She reads the instruction in the square she is in and sets off walking in the direction specified by that instruction. She walks in a straight line until she reaches the centre of a square or until she walks off the board; in the latter case, her walk stops. She continues her walk in this way, from square to square, obeying the instruction each time. She walks until she reaches the top right corner square, or she walks off the board; when either happens, her walk stops. In the former case it is called a successful walk.

Answer each of the following questions, “Yes” or “No”.

1. Is it possible to find a successful walk in which the ant repeats some part of her walk?

2. Is it possible to find a walk in which the ant does not repeat the first part of her walk but does repeat some part of her walk?

3. Is it possible to find a successful walk in which the ant visits the top left-hand corner square of the board more than once?

4. Suppose now that the board is 4 × 4. Is is possible to write an instruction in each square, using each of the four different instructions four times, so that the ant’s walk visits every square of the board at least once?

[enigma975]

Enigma 534: Under and over

From New Scientist #1686, 14th October 1989 [link]

The important C.A.R. Rally has just been held at Bun’s Hutch, where the track is as in the map.

Enigma 534

There were 12 cars in the rally, numbered 1 to 12. For the start at 10:00, the cars took up the 12 lettered positions on the map, one car to each position. At 10:01 the cars all reached their first bridge, going under or over; at 10:02 the cars all reached their second bridge.

I had taken a photo at 10:01 and also at 10:02. Each photo showed all the numbers of the cars and so each bridge showed a fraction with one number over another. On one photo the fractions worked out to be 1/2, 2/3, 2/3, 2 1/3, 4, 5 1/2, and on the other 2, 2, 2, 3, 5 1/2, 7, but I forget which photo was which.

Which cars started at each of the 12 letters?

[enigma534]

Enigma 976: This happy breed

From New Scientist #2131, 25th April 1998

At the end of 1991 the Society for the Protection of Our Obscure Furry Friends (SPOOFF) released a trial number of breeding pairs (born in March of that year) of the spotted tree-rat Sciurus maculatus incastus in the small forested island of Yorkiddin.

The result is a doubtful success. In 1997 they found that the island was being overrun: the local foresters were seeking compensation for damage and local rare species of birds were near extinction.

Tree-rats are born in March, and are driven from the patch of forest of their birth at the end of that year. They find a new patch, always of 2500 square metres, and immediately start breeding. They die in the fourth December of their lives. The society realised too late that every year each pair invariably produces 2 pairs of young, each of which incestuously produces 2 more pairs next year. In 1998 the number of pairs will reach nearly 6000.

The process will continue until the population reaches its limit at the beginning of 2000, when the whole forested area will have been partitioned into occupied territories.

What is the forested area in hectares? (One hectare is equal to 10,000 square metres).

[enigma976]

Enigma 533: An odd enigma

From New Scientist #1685, 7th October 1989 [link]

In this long division sum, in the dividend and divisor, I’ve replaced digits consistently with letters, with different letters for different digits, and left gaps in all other places where digits should be:

You don’t actually need any more clues, but I can tell you that this ENIGMA is odd.

What is this odd ENIGMA?

[enigma533]

Enigma 977: Walk and drive

From New Scientist #2132, 2nd May 1998

Anne, Barbara and Christine walk at 4 mph and drive at 48 mph. They have a journey of 24 miles to do but their car only takes 2 people. So Anne sets off walking, while Barbara drives so far with Christine, who then gets out and walks the rest of the journey. Barbara drives back until she meets Anne, picks her up and the drive the rest of the journey. They choose Christine’s dropping place so as to minimise the time taken by the last person to arrive.

1. How many minutes did the last person take for the journey?

Donald, Eric and Frank have to make a journey of 265 miles. They each walk at a speed which is a whole number of mph and the speed of their 2-seater car is a whole number times their walking speed and is less than 50 mph. They use the same plan as the ladies. The last person to arrive takes an odd number of hours for the journey.

2. How many hours did the last person take for the journey?

[enigma977]

Enigma 532: Friday the 13th

From New Scientist #1684, 30th September 1989 [link]

John Thomas, who is 50 this year [i.e. in 1989], was not really superstitious till Betty left him. In fact, they were engaged on a Friday the 13th. They were married after 13 weeks of courtship on a Friday the 13th. The married couple were abroad for their Christmas vacation. Towards the end of that vacation they quarrelled and disagreed on almost everything. They were eventually separated on a Friday the 13th, after exactly 13 weeks of married life. These events made John very, very superstitious.

When did Betty leave John?

[enigma532]

Enigma 978: The ABC brick company

From New Scientist #2133, 9th May 1998

The ABC brick company prides itself on making unique toys. It has just produced a range of wooden bricks, all of the same size, in the shape of a tetrahedron (a solid with four equilateral-triangle faces). Each of the four faces on every tetrahedron is painted in one of the company’s standard colour range. For example, one of the bricks has one yellow face, two blue faces, and a green face. The company ensures that each tetrahedron is different — there is no way of rotating one to make it look like another. With that restriction in mind, the company has manufactured the largest possible number of these bricks.

To add to the uniqueness of the toys, each brick is placed in an individual cardboard box with the letters “ABC” stencilled on it. Then using the same standard range of the company’s colours, an artist paints each of the letters on the boxes. For example, one has a red “A”, a blue “B”, and a red “C”. No two of the colourings of the ABCs are the same, and, with that restriction in mind, once again the company has produced the largest possible number of boxes.

By coincidence, there are just enough boxes to put one of the tetrahedra in each.

How many colours are there in the company’s standard range?

News

There are now 450 Enigma puzzles remaining to post, which means that 75% of all Enigma puzzles are now available on the site.

[enigma978]

Enigma 531: Petits fours

From New Scientist #1683, 23rd September 1989 [link]

“Four-armed is four-warmed,” declared Professor Törqui as he placed the petits fours in the oven in his lab at the Department of Immaterial Science and Unclear Physics. “There are 4444 of them: a string of 4s. By which I mean, naturally enough, a number in base 10 all of whose digits are 4. Do you like my plus fours? [*] Speaking of 10s and plus fours, you can hardly be unaware of the fact that all positive integral powers of 10 (except 10¹, poor thing) are expressible as sums of strings of 4s.”

“The most economical way of expressing 10² as a sum of strings of 4s (that is, the one using fewest strings and hence fewest 4s) uses seven 4s:”

10² = 44 + 44 + 4 + 4 + 4.

“The most economical means of expressing 10³ as a sum of strings of 4s requires sixteen 4s:”

10³ = 444 + 444 + 44 + 44 + 4 + 4 + 4 + 4 + 4 + 4.

“Now, it’s four o’clock, and just time for this puzzle: Give me somewhere to put my cakestand and I will make a number of petits fours which is an integral positive power of 10 such that the number of 4s required to write it as a sum of strings of 4s in the most economical way is itself a string of 4s.”

What is the smallest number of petits fours Törqui’s boast would commit him to baking? (Express your answer as a power of 10.)

[*] £44.44 from Whatsit Forum.

[enigma531]

Enigma 979: Triangular and Fibonacci numbers

From New Scientist #2134, 16th May 1998 [link]

Triangular numbers are those that fit the formula n(n + 1)/2, so that the sequence starts: 1, 3, 6, 10, 15, 21, 28, …

From the first 30 triangular numbers select a set that uses each of the ten digits 0 to 9 once.

1. What are the largest and smallest numbers in your set?

In the Fibonacci sequences the first two terms are 1 and 1 and each succeeding term is the sum of the previous two terms, so that sequence starts: 1, 1, 2, 3, 5, 8, 13, …

From the first 30 Fibonacci numbers select a set that uses each of the ten digits 0 to 9 once.

2. What are the largest and smallest numbers in your set?

[enigma979]

Enigma 530: Sudden death

From New Scientist #1682, 16th September 1989 [link]

There were eight players in the Greenchester Knock-Out Golf Championship. Unfortunately, due to rain, the whole competition had to be played on Saturday afternoon, and so it was decided to play the four first-round matches, the two semifinals and the final as sudden-death matches.

Thus in each match the two players played one hole and, if the scores were different, then the lower was the winner of that match. If the scores were equal then the played another hole with the same procedure applying, and so on, until the winner of that match was found.

After the competition the organiser listed each player’s scores for the holes (s)he had played, in order. Unfortunately he did not indicate the number of holes played in each round, but ran the scores together in a single list, as follows:

Anne: 3,3
Bern: 4,2,3,4
Chris: 4,2,3,3,3,3,3,3,2
Donald: 3,2,3,3,3
Eric: 4
Frances: 4,2,3,3,4
Grace: 3,2,3,4
Harriet: 4,2,3,3,2,4

Who beat whom in the semifinals?

[enigma530]

Enigma 980: Near and fair

From New Scientist #2135, 23rd May 1998 [link]

Mary stood at the side of a large pile of turnips, which she was to distribute evenly between the needy people of the area, who were standing in front of her. The rule was that if the turnips did not divide evenly between the people that Mary should go to the nearest sensible division. (If necessary, extra turnips could be added or spare turnips disposed of). Quickly, she divided the number of turnips by the number of people and found the answer was between 99 and 100, and nearer to 99. As she knew that 100 turnips would be better for people’s health she decided to carry out the division in a special way.

She announced: “Suppose everyone get 99 turnips. I have the divided the number of turnips by 99”, and she gave the answer to lots of decimal places. “Now, suppose everyone gets 100 turnips. I have divided the number of turnips by 100”, and she again gave the answer.

“If we look at our two answers, then we find that the one that is nearer to the actual number of people is when everyone gets 100 turnips. So, by the rule, that is what everyone will get”.

The distribution did not take long as there were fewer than twenty thousand turnips in the pile.

How many people were there to receive turnips, and how many turnips were there in the pile?

[enigma980]

Enigma 529: Statistical sickness

From New Scientist #1681, 9th September 1989 [link]

Only eight of our statistics students have handed in sick-leave certificates this year — which, if averaged over all our complement, would amount to precisely one day’s illness per student.

All absences were of different lengths, of between 1 and 365 days duration, with none having two consecutive digits the same, and none ending in a zero. An odd coincidence was that these eight absences were such that they split into four pairs, each member of a pair being the same as its companion with the digits reversed. But what is really strange is that these four pairs shared a further interesting property. The square of each absence was also the digit-reversal of the square of its companion.

How many students did we have this year?

[enigma529]

Enigma 981: Crossing a river

From New Scientist #2136, 30th May 1998 [link]

Abe, Bill, Chad and Dave, planning a picnic to an island, find that only one boat is available for them and that it can take at most two people. The time taken by each to row across the river increases in the order in which their names are listed above. Furthermore, each of them when riding the boat with another, does not allow the boat to go faster than the speed at which he would row.

When they find that the minimum time of rowing that would take all of them across the river is 72 minutes, Chad does not want to go. They find that the minimum time of rowing for the remaining three is 48 minutes.

How long would it take for Bill to row across the river, given that the speed at which he rows is more than double the speed at which Chad rows?

[enigma981]

%d bloggers like this: