Enigmatic Code

Programming Enigma Puzzles

Puzzle #53: Painting by numbers

From New Scientist #3276, 4th April 2020 [link] [link]

When the famous artist Pablo Picossa held his final exhibition at the Galleria del Pardo, he wanted the public to experience his works in the order in which he had created them. Paintings from his early “Green” period were in room 1. From there, visitors should go to room 2 to see his Mauve works and then to the adjacent rooms 3, 4, 5 and so on, until they reached the Black paintings (generally viewed as Picossa’s darkest period) in room 9.

Alas, no details remain to indicate which room was where. Yet his widow Bella does recall a curiosity about the numbering of the rooms: the three-digit number formed by the top row added to the the number formed by the middle row equals the number formed by the bottom row.

Can you recreate Picossa’s gallery tour?

This is a rewording of the puzzle previously published in New Scientist as Tantalizer 467 (September 1976) and Enigma 328 (October 1985).

[puzzle#53]

Puzzle #47: Geometra’s tomb

From New Scientist #3270, 22nd February 2020 [link] [link]

Long before the invention of satnav, the great explorer Asosa Lees embarked on a trek across the square desert of Angula in a quest to find the lost tomb of Geometra, which lay somewhere along the line marked A.

Lees had nothing but the crude and incomplete diagram shown and some basic instructions: proceed south-west for 100 kilometres, and then turn left. The only other information she had was that at the moment she turned left, the distance to the south-west corner of the desert was 100 kilometres further than the distance to the south-east corner.

To reach the tomb, Lees needed to head in precisely the right direction. Fortunately using her knowledge of geometry she was able to take the correct bearing.

At what angle did she head off towards the tomb?

[puzzle#47]

Puzzle #46: Pi-thagoras

From New Scientist #3269, 15th February 2020 [link] [link]

Pythagoras’s theorem says that for any right-angled triangle, the square of the hypotenuse (the longest side of the triangle) is equal to the sum of the squares of the other two sides.

There are some right-angled triangles whose sides are all whole number lengths. The simplest and best known is the “3-4-5” triangle (3² + 4² = 5²).

I have drawn a circle that fits precisely inside a 3-4-5 triangle. What is the area of the circle? Have a guess. And then see if you can prove that you are right.

[puzzle#46]

Puzzle #41: Hen party dorm

From New Scientist #3264, 11th January 2020 [link]

Ten friends have rented a dormitory for the night of a hen party. Each person picks a bed for the night before heading out on the town. At 2 am they start heading home a little the worse for wear.

Amy, the first to arrive back at the dorm, can’t remember which bed she chose, so she picks one at random. The next person to return, Bethan, heads for her own bed, but if she finds it has already been taken, she randomly picks another.

The remaining friends adopt the same approach of going to their bed if it is available and randomly picking another if it isn’t. Janice is the last to get home. What is the chance that her own bed is still empty? And was Janice more or less likely to find the bed she first chose empty than Iona, who got back just before her?

[puzzle#41]

Puzzle #33: The mountain pass

From New Scientist #3259, 7th December 2019 [link] [link]

Aaron has spent the night camped at the foot of a mountain, while Bonnie camped at the summit. In the morning, Bonnie sets off down the path to base camp at exactly the same time as Aaron begins his ascent.

At midday they pass each other and nod a greeting, both of them maintaining their constant walking pace. Bonnie gets to the bottom at 4pm and sets up camp, but it isn’t until 9pm that Aaron finally reaches the top.

What time did the two hikers set off in the morning?

[puzzle#33]

Puzzle #32: Rearranging books

From New Scientist #3258, 30th November 2019 [link] [link]

Once a week, it is Jordie’s job at the library to put books back in order on the shelves.

This week, he finds that the 10-volume encyclopedia has been mixed up in the order shown above. He has to put them back in order, and since the books are heavy, he wants to move as few volumes as possible.

A move consists of taking a book off the shelf and sliding the other books to the side to make space, if necessary. What is the smallest number of moves he needs to make to rearrange the books in the order 1 to 10 from left to right?

[puzzle#32]

Puzzle #27: The goblin game

From New Scientist #3253, 26th October 2019 [link] [link]

Annie and Beth are about to play “Goblin”. Like snakes and ladders, it is a game played on a 10 × 10 grid of squares numbered from one to 100. Players start with their counter off the board (next to square one) and take it in turns to roll a single die, aiming to be the first to get to square 100.

However, instead of snakes or ladders, there is just one hazard: a goblin. Each player gets one goblin and is allowed to place it on any square they want (apart from square 100) before the game starts.

If you land on your opponent’s goblin, you lose, and the same goes for your opponent. If a player lands on their own goblin, they are safe. If neither player lands on a goblin, the first to get to 100 wins (an exact final roll isn’t required, just getting to the 100 square is enough).

Annie, who has never played before, decides to place her goblin on square 31, because that is her lucky number.

Where should Beth place her goblin to have the maximum chance of winning?

[puzzle#27]

Puzzle #19: The vicar’s age

From New Scientist #3245, 31st August 2019 [link] [link]

A bishop visited his friend the vicar on her birthday. Knowing the bishop liked number puzzles, the vicar told him about a family that had just joined her church.

“If you multiply their three ages together, you get 2450, and if you add their ages together, you get your own age, your grace.”

The bishop, after some thought, said: “I can’t be certain how old everyone in the family is.”

The vicar responded: “I am older than everyone in that family.”

The bishop could then tell how old everyone was.

How old was the vicar on that day?

[puzzle#19]

Puzzle #18: Cable on the moon

From New Scientist #3244, 24th August 2019 [link]

It is the year 2100, and the Moon Colonisation Programme is well-advanced.

A power cable is being laid all the way around the moon’s equator. The original plan was to put the cable on the moon’s surface, but it has been suggested that instead it should be buried in a trench that is 1-metre deep. This will make it safer and will also save on the amount of cable needed.

How much shorter will the cable be if it is buried in this way?

[puzzle#18]

Puzzle #08: Prisoners locked up

From New Scientist #3235, 22nd June 2019 [link] [link]

There are 40 prisoners in Hallaway women’s prison, each in their own numbered cell, and 40 prison officers. All the cell doors are open and it is time to lock up for the night. Unfortunately, the prison officers have been drinking. Near the cells, there is a bucket containing the numbers 1 to 40 on pieces of paper.

Each prison officer in turn does the following: Picks a number from the bucket (and doesn’t put it back); turns the key in the cell of the number on her paper and of all cells that are multiples of that number; then goes to bed.

Turning the key makes a locked cell unlocked and an unlocked cell locked.

The first officer picks number 12, so turns the key (and locks) cells 12, 24 and 36. The next picks 8, and turns the key in 8, 12, 16, 24 (again), 32 and 40. The other officers follow in turn, each with a different number. After all 40 officers have done the rounds, the prison director, knowing her staff were drunk, now visits each cell and turns the key.

Which prisoners were able to escape?

[puzzle#08]

Puzzle #07: Amveriric’s boat

From New Scientist #3234, 15th June 2019 [link] [link]

[diagram]

The billionaire Mr Amveriric keeps a yacht in a private dock in the Mediterranean. It is tethered to the quay by a rope.

Last time his staff tied up the boat, they left too much slack in the rope, so the boat is now 1 metre away from the quay when the rope is taut. Hearing that a storm is on the way, Amveriric realises that the boat might get smashed against the wall by the buffeting wind, so he sends his henchman, Benolin Chestikov, to shorten the rope.

Seeing that the boat is 1 metre from the wall, Benolin decides he will pull the rope horizontally by 1 metre, and as he pulls the boat moves in horizontally.

Will the boat reach the wall or not? (And can you prove to yourself without resorting to trigonometry?)

[puzzle#07]

Puzzle #06: Darts challenge

From New Scientist #3233, 8th June 2019 [link] [link]

Everyone knows that on a regular dartboard you can score 180 with three darts, by getting three treble twenties. However, there are scores below 180 that you can’t get with three darts.

What is the lowest score you can’t get with three darts? And for that matter, what is the lowest score that you can’t get with two darts? And with one dart? (You can of course score zero with a dart, simply by missing the board).

[puzzle#06]