Enigmatic Code

Programming Enigma Puzzles

Category Archives: puzzle#

Puzzle #97: Cabinet reshuffle

From New Scientist #3318, 23rd January 2021 [link] [link]

The Ruritanian prime minister is in a fix. Thanks to a series of incompetent policy decisions, all five of her senior ministers need to be axed from their posts. However, the PM cannot afford to sack them completely, because they will wreak havoc if moved to the back benches.

She has a solution: a reshuffle! She will move each of the five ministers to one of the other top posts, but no two of them will directly swap with each other. Anerdine will move to the department of the person who will become chancellor. Brinkman will replace the person who will be the new home secretary. Crass will take over the post being vacated by the person who will take Eejit’s job. Dyer will become health secretary even though he has been lobbying to become chancellor. The current defence secretary will get the department of the person who is becoming the education secretary.

Can you figure out who currently has which job, and where they are moving to?

[puzzle#97]

Puzzle #96: Inside the box

From New Scientist #3317, 16th January 2021 [link] [link]

Can you join the 36 dots below using 10 straight lines, with your pen never leaving the paper and no lines going outside the grid? At least one line must pass through each dot and no devious rule-bending is required. You will find lots of ways to do it with 11 lines, but 10 is much more of a challenge.

P.S. This puzzle forces you inside the box, but its solution is related to the classic four-line, nine-dot problem that was the origin of the cliché “thinking outside the box”.

[puzzle#95]

Puzzle #95: Catch up

From New Scientist #3316, 9th January 2021 [link] [link]

Catch Up 5 is a two-player game using five stacks of toy bricks of height 1, 2, 3, 4 and 5. The aim is to end with a taller tower than your opponent. Player A starts by taking a single stack of any height – in the example above, they chose the “2” stack. B then takes as many stacks as they want, piling them up until their tower is the same height or taller than A’s, which ends B’s turn. Here, B took the “1” stack, then the “5”. A now does the same, stacking until their tower is at least as tall as B’s. Here, A took the “3” stack, then the “4”. The players take turns until all the stacks of bricks have been used up, so A won this game.

Imagine you are going first in game against a Catch Up 5 expert who always plays the optimal move when it is their turn. Which piece should you choose?

[puzzle#95]

Puzzle #94: Fastest fingers first

From New Scientist #3315, 2nd January 2021 [link] [link]

The contestants were lined up, each hoping to get into the Millionaire chair. First, they would need to get through the “fastest fingers first” round.

The host cleared his throat: “List these animals in order of the number of legs they have, starting with the most:”

A: Fettlepod
B: Eldrobe
C: Sentonium
D: Quizzlehatch

Guessing blindly, Jasmine went for CDBA, Virat chose CBDA and Finnbarr picked ADCB, but none got all four right. In fact, they all got the same number of answers in the correct position.

Which has more legs, a Fettlepod or a Sentonium?

[puzzle#94]

Puzzle #93: Battenberg returns

From New Scientist #3313, 19th December 2020 [link] [link]

Lady Federica von Battenberg has baked a cake for her daughter Victoria’s birthday party. Eight children will be attending in all, so eight slices are needed.

She could, of course, make seven vertical cuts to make eight identical slices. But Victoria has heard it is possible to cut the cake into eight identical slices with only three straight cuts of the knife. In fact, there are at least two different ways to achieve this.

To be clear, not only must each slice be the same shape, they must all have the same amount of pink and yellow sponge and the same amount of marzipan on the outside.

Can you find two ways for Lady Federica to achieve this?

[puzzle#93]

Puzzle #92: Major tune

From New Scientist #3313, 19th December 2020 [link] [link]

The major system is a centuries-old technique for memorising numbers in which they are converted into letters and words. Each digit is converted into a particular phonetic sound. For example “tch” represents one digit, and “n” another. Sometimes the same digit will represent different, but similar, sounds. For example “k” and “g” are represented by the same digit.

Each number below is shown alongside its conversion into the major system:

94146 → a partridge
84180 → four doves
07070 → six geese
125410 → ten lords

What numbers to the words “major” and “tune” represent, and why are they appropriate here? (It will all add up in the end).

[puzzle#92]

Puzzle #90 & #91: Colourful beehive

From New Scientist #3313, 19th December 2020 [link] [link]

Colour the remaining hexagons red, yellow, blue or green — using at least three of each colour — so that these three rules hold:

1. Each green shares a border with exactly three reds;
2. Each blue shares a border with exactly two yellows; and
3. Each yellow shares a border with at least one red, green and blue

Puzzle #91: As a bonus, if the leftmost hexagon was not red, can you find another pattern that would work?

[puzzle#90] [puzzle#91]

Puzzle #89: Sunday drivers

From New Scientist #3312, 12th December 2020 [link] [link]

The single lane road around Lake Pittoresca is scenic, but a pain if you want to get somewhere fast. Four couples staying at the Hotel Hilberto plan a day trip to the lakeside village of Paradiso. The driver for each couple habitually takes life at a different speed. Mr Presto likes to go full throttle in his Porsche. Mme Vivace isn’t quite such a speedy driver. The Andantes prefer a leisurely drive, while inconsiderate Mr and Mrs Lento creep along in second gear.

If a car finds itself behind a slower car, there is no choice but to follow at the slower speed, and form a larger “clump” of cars (a clump can be any number from 1 upwards).

After Sunday breakfast, all four couples set off and find they are in the only cars on the road. By the time they arrive at Paradiso, they are in two clumps. Later, they all head back in reverse order, and arrive at the hotel in three clumps. Mr Presto looks particularly stressed because he was barely able to put his foot down on the journey back.

In which order did they set out?

[puzzle#89]

Puzzle #88: Rifling the draw

From New Scientist #3311, 5th December 2020 [link] [link]

Members of the Rackemup rifle club are tired of Pat Perfect winning the annual shooting tournament every year. She always hits the bullseye. To spice up the contest, this year she has agreed to be blindfolded. Even so, during practice she still hits the target four times out of five. In the first round she competes against Kate, who, even when fully sighted, only hits two times in five.

To give Kate the best chance of a fluke win, the contest will involve just a single shot each. The two competitors fire, but only one of them hits the target. “I reckon it’s a 1 in 3 chance that’s yours Kate”, says the referee as he strides up to inspect whose bullet it was. But he is wrong about the odds.

What is the chance that Kate is the victor?

[puzzle#88]

Puzzle #87: Poll position

From New Scientist #3310, 28th November 2020 [link] [link]

A biased and manipulative pollster is doing a survey of your cul de sac, where half the residents vote Red and the other half Blue. He wants to use the poll to “prove” that Reds are in the majority. His plan is to pick a house to start and visit all the homes in a loop going clockwise, but to stop the poll at the first instance that Red takes the lead.

As it happens, you know how everyone on the street votes. Is there a house where you can get the pollster to start from where you can be certain his plan will be foiled? If so what is an easy way to find it?

[puzzle#87]

Puzzle #86: Yam tomorrow

From New Scientist #3309, 21st November 2020 [link] [link]

Three shipwrecked sailors discover a crate of yams on the beach. The crate is labelled “100 Yams”, but they notice it has been prised open and some of the yams have been pinched, possibly by the monkey they spot nearby. In the night, one of the sailors, Abel, wakes and decides he will take one-third of the yams, but he can only do so in whole yams if he first gives one to the monkey. Later, Babel has the same idea, but again to take one-third in whole yams, he has to first give the monkey a yam; and later still, the same thing happens with Cabel. In the morning, the three sailors, who have all hidden their secret stashes, share out what yams remain equally among them, and this time around the poor monkey receives nothing.

How many yams did they each end up with in total?

[puzzle#86]

Puzzle #85: Chopping board

From New Scientist #3308, 14th November 2020 [link] [link]

The Board of Overseers of the Bottlecap Preservation Society has grown to an unwieldy 10 members, who have agreed to the following procedure.

The board will take a series of votes on whether to reduce its size. A majority of “ayes” results in the immediate ejection of the newest board member. Then another vote is taken, and so on.

If at any point, half or more of the surviving members vote “nay”, the session ends and the board is fixed at that level.

Of course, each member’s highest priority is to remain on the board, but given that, everyone agrees that the smaller the board, the better.

If logic prevails, how big will the board be when the voting comes to an end?

[puzzle#85]

Puzzle #84: Squarebot

From New Scientist #3307, 7th November 2020 [link] [link]

“What’s that you are holding, Squarebot?”

Square

I have met Squarebot before and am suspicious. “Are you sure, Squarebot? I can see it must be a rectangle, because you have drawn it on squared paper. But I can’t count the squares without breaking social distancing rules. How wide is it?”

16

“And its height?”

16

“Sounds like a square, then. Just to check: what is its area?”

289

“Hold on, that doesn’t work: 289 is 17 squared. You are rounding every numerical answer you say to the nearest square number, aren’t you? And if the answer isn’t a number you just say ‘Square’?”

Square“, chuckles Squarebot.

“So the width might be 17? Or 18? Or 15? Or even 20?”

Square“, grins Squarebot.

Can you think of a question to ask Squarebot to find out if the rectangle really is a square?

[puzzle#84]

Puzzle #83: Albatross

From New Scientist #3306, 31st October 2020 [link] [link]

Perched on top of the ship’s mast, the albatross winked at his nemesis Captain Pugwash, who was lying on the deck below. “I’ll get that wretched bird”, cursed the captain, seizing a catapult and loosing a stone. It was a perfect aim, but at the moment the stone was released the albatross started to fly away horizontally. The stone passed through where the albatross had been and rose a third as high again.

“Drat”, said Pugwash, but his disappointment turned to joy when the stone struck the bird on the way down. “Perfect hit”, said Mr Suvat the navigator, reaching for his astrolabe, watch and ruler to work out how fast the stone was moving horizontally to be able to hit the bird.

“No need for any of that”, said Tom the cabin boy. “Albatrosses fly at 10 knots and the path of the stone was a parabola. That’s all you need to know”.

What was the horizontal speed of the stone?

[puzzle#83]

Puzzle #82: Dogmandoo

From New Scientist #3305, 24th October 2020 [link] [link]

When “Hairy” Potter returned from his failed expedition to find the legendary lost city of Dogmandoo, he gave a press conference. “It was a jungle out there!” joked the great man. “Luckily for me, it wasn’t the rainy season. For the whole expedition, I noticed that if it rained in the morning it was fine in the afternoon; if it rained in the afternoon it was fine in the morning. In fact, I see from my diary that it was fine on 37 mornings and 43 afternoons. Mind you, it did rain on a total of 40 days”.

Back at the office of The Daily Grind, I found that my notes weren’t quite as compendious as I had thought. On how many afternoons of Potter’s expedition had it rained? If this was typical of the rainy season what (roughly) are the chances in that season of a day unspoilt by rain?

[puzzle#82]

Puzzle #81: A bridge too far

From New Scientist #3304, 17th October 2020 [link] [link]

“Finally, we always test our candidates with a puzzle about four students crossing a bridge with a torch”, said the interviewer at Microsoogle.

“Oh goody, I’ve heard this one before!”, thought Sam, smugly.

“The rickety bridge is only strong enough to take two people at a time, and the torch is needed for each crossing, walking at the pace of the slower student. The most timid student, Tim, needs 10 minutes to cross the bridge. Tom can cross faster than Tim, and the other two are quicker still. All of them take a different whole number of minutes to cross”.

“Yeah, yeah”, smiled Sam.

“All four students get across the bridge in 17 minutes. What is the longest time that it could take for Tom to cross the bridge on his own?”

“Wait — that’s not the normal puzzle!”, blurted Sam.

Can you help?

[puzzle#81]

Puzzle #80: Vive la Différence

From New Scientist #3303, 10th October 2020 [link] [link]

The eccentric manager of Bistro Vive la Différence has a bizarre method of offering discounts to his customers.

Each seat has a number and each customer gets a discount (in euros) equal to the difference between the numbers of the seats either side of them. For example, a guest seated between seats 6 and 1 would get a discount of €5 on their meal.

Seven friends have booked a meal, and arrive to find chairs numbered 1 to 7 in order around their table. They figure that with the seats arranged like this, they can get a combined discount of €20. But they reckon they can do better. They want to maximise their discount, but only have time to swap two chairs before the waiter comes to take their order.

Which chairs should they swap?

[puzzle#80]

Puzzle #79: Marathon relay

From New Scientist #3302, 3rd October 2020 [link] [link]

Ruritania is thrilled to be hosting The Continental Games, and the Queen has decreed that two of the country’s greatest athletes, Rimsky and Korsakov, will take it in turns to carry the torch on its 26.2-mile journey from the harbour to the stadium. For each leg of the journey, the athlete can choose to run for any distance between 1 and 3 miles before handing over the torch to the other. Of course, Rimsky and Korsakov both privately hope that they will be the one who runs the last leg and hence gets to light the Continental flame. A coin is flipped, and Rimsky correctly calls heads. Should he choose to run the first leg, or should he give that honour to Korsakov?

[puzzle#79]

Puzzle #78: Farewell My Blubbery

From New Scientist #3301, 26th September 2020 [link] [link]

“The most interesting thing about Milly Farlowe’s latest ‘effort’ in the detective fiction genre is the page numbering: it starts at 1 and goes up to some highest number, a number of itself quite modest, but far too high for a plot of such flimsy construction”. Thus spake Zara Thrusta, the literary critic of the Daily Grind, dismissing her best friend’s new crime novel, “Farewell My Blubbery”.

Well, I had a look at the numbering and it was just as Thrusta had said. But I noticed something else. If you reverse the order of the digits of the three-digit number at the bottom of the last page of this book, you get exactly the same number as the total number of digits used in numbering its pages.

“Is it a long book?” I hear you ask.

Well you tell me: how many pages are there in “Farewell My Blubbery”?

[puzzle#78]

Puzzle #77: Sir Prancelot’s archers

From New Scientist #3300, 19th September 2020 [link] [link]

Sir Prancelot employs nine of the finest archers in the shire to defend his castle, dispatching them to a turret that has eight gaps in its battlements [plan shown above]. Prancelot has numbered his archers 1 to 9 so he doesn’t have to remember their names. The castle is under attack and Prancelot sends his messenger to check on things. “Sire, there is an archer in each gap, but no sign of the ninth – they must be taking a nap”. “What? Which one is napping?” “I don’t know – but if it helps, I noticed that each neighbouring pair of archers adds up to a prime number”. Prancelot sighed. “That doesn’t answer my question – go and look again!”. The messenger runs out and returns with more news. “The archers have taken up defence formation, every other one around the tower has knelt down, and I noticed that the sum of the four standing archers was the same as the sum of the four kneeling ones. Does that help?”.

Which archer is napping? And in what two ways might the turret archers be arranged?

[puzzle#77]

%d bloggers like this: