Enigmatic Code

Programming Enigma Puzzles

Tag Archives: by: Rob Eastaway

Puzzle #45: Beetles on a clothes line

From New Scientist #3268, 8th February 2020 [link] [link]

Peg beetles are a rare species with rather odd behaviour. As any peg beetle expert will know, these beetles always walk at 1 metre per minute, and when two beetles meet, they immediately reverse direction.

Six peg beetles are on a 2-metre-long clothes line, some walking left to right and others right to left (as the diagram shows). As we join the action, beetle A is at the left-hand end of the line and walking towards the right, while beetle F is at the right-hand end, walking left.

When a beetle reaches the end of the clothes line, it drops off onto the ground.

Which two beetles will be the last to drop off the clothes line, and how long will it be before that happens?


Puzzle #43: Dividing Grandma’s field

From New Scientist #3266, 25th January 2020 [link]

Two brothers have inherited a plot of land from their grandmother. The map shows that the land is made up of five identical squares, and the green dots indicate the location of four old oak trees.

There are two stipulations in Grandma’s will:

First, the land must be divided so that the brothers get exactly half of the area each, and;
Second, each brother should have two of the trees on their land.

The brothers would love to divide the land with a single straight fence from one edge to another. Can you find a line for the fence that fulfils everyone’s wishes — and without you needing to do any measurement?


Puzzle #42: The card conundrum

From New Scientist #3265, 18th January 2020 [link]

Carl scribbled down an equation that contained only numbers and the letter X on a scrap of paper and left it on a table:

Bob found the card and realised that this was just a straightforward algebra problem. “I’ve found the solution”, he announced a minute later, dropping the card back on the table and leaving the room. Amy overheard him, walked over and picked up the card. After a while she announced: “That’s strange, I’ve found two solutions”.

Even stranger, Amy’s solutions were both different to Bob’s.

What were the solutions that Bob and Amy found?


Puzzle #40: Light bulb moment

From New Scientist #3263, 4th January 2020 [link] [link]

A tall office building is being rewired. There is a staircase, but the lift is out of action.

There are four identical-looking wires, A, B, C and D, feeding into a pipe in the ceiling of the basement. You are reasonably confident that it is those same four wires that emerge from a pipe on the top floor. Unfortunately the wires have become tangled, so it isn’t known which wire becomes 1, 2, 3 or 4.

To find out, you can join two wires together in the basement (for example A and C) and you can attach two wires at the other end to a light bulb and battery (for example 1 and 3). If the bulb lights, you have made a circuit.

Starting in the basement, what is the smallest number of light bulb flashes that you need in order to figure out which wire is which? And how many times do you need to climb the stairs?


Puzzle #30: Sticking in a pin

From New Scientist #3256, 16th November 2019 [link] [link]

Sachin tells me that the four-digit PIN that he uses for his credit card has an unusual property. When he enters his PIN into a calculator and squares it, the last four digits of the answer are also his PIN. He tells me that exactly one of the digits in his PIN is a zero, but he won’t tell me which position it is in.

What is Sachin’s PIN?


Puzzle #23: Circling the squares

From New Scientist #3249, 28th September 2019 [link] [link]

Darts player Juan Andred has noticed that on a standard dartboard, there are some neighbouring pairs of numbers that add up to a square number. For example, 20 and 5 make 25, while 6 and 10 add up to 16. He has been wondering if he can come up with a new arrangement of the numbers 1 to 20 so that all neighbouring pairs add up to a square number. And he has nearly succeeded.

He has 20 at the top of the board, and every pair of neighbours adds to a square — with one exception. On his new board, 18 doesn’t form a square with its clockwise neighbour, which is 15, or with its anticlockwise neighbour.

What does Juan’s “square” dartboard look like?


Puzzle #17: Which flipping year?

From New Scientist #3243, 17th August 2019 [link]

2019 is an example of a year that can be “flipped”. This means that on an old-style calculator display, it still forms a four-digit number when spun both horizontally and vertically:

The difference between a flippable year and its flipped version is called the flipping difference, and for 2019 the flipping difference is 6102 – 2019 = 4083.

Since the Romans conquered Britain in AD 43, which year has had the biggest flipping difference?


Puzzle #05: Murphy’s law of socks

From New Scientist #3232, 1st June 2019 [link] [link]

I am convinced that my washing machine eats socks. Every time I wash a load, another sock disappears. Last week I ran out of socks, so I bought myself three new pairs.

What is the chance that, after my first three washes, I will be left with three odd socks? Indeed, what is the chance that I will have even one pair intact?


Puzzle #04: Which door?

From New Scientist #3231, 25th May 2019 [link] [link]

You may have heard of the US game show “Let’s Make a Deal”, in which the star prize is hidden behind one of three doors and the contestant has to pick the lucky door.

Now there is a new game show, “Let’s Make a Bigger Deal”, hosted by Jayne Brody. There are five doors, A, B, C, D and E, and contestant Nico is allowed to choose three. If the prize is behind one of them, he wins. Nico picks doors A, B and D.

As always happens on the show, to build drama, Brody opens three doors (two of them Nico’s) that she knows don’t have the prize behind them: A, D and E. Two remain closed: Nico’s (B) and C. Brody says: “Nico, do you want to stick with B, or switch to C? You can phone a friend if you want”.

Nico likes this idea and rings his friend Leah: “Hi Leah, there are two doors left. Should I choose door B or door C?”.

Which should Leah suggest? And should Nico follow Leah’s advice?


%d bloggers like this: