# Enigmatic Code

Programming Enigma Puzzles

## Teaser 2779: New Year Party

We have a game planned for our forthcoming New Year party. Each person there will write their name on a slip of paper and the slips will be shuffled and one given to each person. If anyone gets their own slip, then all the slips will be collected up and we shall start again. When everyone has been given a name different from their own, each person will use their right hand to hold the left hand of the person named on their slip. We hope that everyone will then be forming one circle ready to sing Auld Lang Syne — but there’s a slightly less than evens chance of this happening.

How many people will there be at the party?

[teaser2779]

## Teaser 2907: Combinatorial cards

From The Sunday Times, 10th June 2018 [link]

On holiday once with lost luggage and trapped indoors, we decided to recreate our favourite card game. With limited resources, we used just seven cards and seven images (red heart, green tree etc.) with three images on each card. Remarkably, just as in the game at home, every pair of cards had exactly one image in common. Labelling the seven images from 1 to 7, the cards were as follows:

{1,2,4} {2,3,6} {1,3,5} {1,6,7} {2,5,7} {3,4,7} {4,5,6}

Interestingly, each image appears on just three cards.

Our original set of cards at home has eight images per card, each image appears on just eight cards and again the total number of images is the same as the number of cards.

What is that number?

Today’s bonus puzzle revisits one of the Sunday Times Teasers from 2018 that I found interesting.

[teaser2907]

## Teaser 2935: A palindrome

From The Sunday Times, 23rd December 2018 [link]

In this Teaser, a jig* is defined as an outwards move to an adjacent empty square, either horizontally, upwards or downwards, the letter * being inserted in all such squares.

Begin with the letter W on a regular grid of empty squares.

From the W, jigO. From every O, jigN. From every N, jigD, and so on until the central diagonal reads SELIM’S TIRED, NO WONDER, IT’S MILES.

Looking at your grid of letters, in how many ways can you trace the palindrome above?

[You can start at any S, move to adjacent letters till you reach the W and then on to any S (including the one you started at). You may move up and down, left and right.]

[teaser2935]

## Teaser 2503

George has placed two vertical mirrors touching each other, with an angle between them. He has also placed a small cube between the mirrors and counted how many images there are of it in the mirrors. (For example, if the mirrors had 90 degrees between them, there would be three images). He wrote down two whole numbers – the angle between the mirrors, in degrees, and the number of images of the cube. When Martha saw the two numbers, she commented that their product, appropriately, was a perfect cube.

What was the angle between the mirrors?

Note: After much discussion of this puzzle, regular solvers of The Sunday Times Teaser puzzles have decided that the puzzle is flawed, and there is not enough information given to arrive at a unique solution. Nevertheless the puzzle has some interesting aspects to it.

[teaser2503]

## Teaser 2784: Three lives

I think of a whole number from 1 to 20 inclusive and Andy has to try to guess the number. He starts with three lives and makes successive guesses: after each guess I tell him whether it is right or too low or too high. If it is too high he loses one of his lives. To win the game he has to guess my number before his lives run out. He has developed the best possible strategy and can always win with a certain number of guesses or fewer. In fact no-one could be sure of winning with fewer guesses than that “certain number”.

What is that “certain number”?

[teaser2784]

## Teaser 2773: King Lear III

King Lear III had a square kingdom divided into sixteen equal-sized smaller square plots, numbered in the usual way. He decided to keep a realm for himself and share the rest into equal realms (larger than his) for his daughters, a “realm” being a collection of one or more connected plots. He chose a suitable realm for himself and one for his eldest daughter and he noticed that, in each case, multiplying together [the] plot numbers within the realm gave a perfect square. Then he found that there was only one way to divide the remainder of the kingdom into suitable realms.

What are the plot numbers of the eldest daughter’s realm and of the king’s realm.

The puzzle text on The Sunday Times website, uses “any” where I have placed “[the]”.

[teaser2773]