Five card trick

Posted October 14, 2009 by simpple
Categories: Puzzles

Tags: , ,

(Taken from Nick’s mathematical puzzles, puzzle 19)

Two information theoreticians, A and B, perform a trick with a shuffled deck of cards, jokers removed. A asks a member of the audience to select five cards at random from the deck. The audience member passes the five cards to A, who examines them, and hands one back. A then arranges the remaining four cards in some way and places them face down, in a neat pile.

B, who has not witnessed these proceedings, then enters the room, looks at the four cards, and determines the missing fifth card, held by the audience member. How is this trick done?

Note: The only communication between A and B is via the arrangement of the four cards. There is no encoded speech or hand signals or ESP, no bent or marked cards, no clue in the orientation of the pile of four cards…

Line of colourful hats

Posted September 2, 2009 by simpple
Categories: Puzzles

Tags: , ,

(Given by Stephanie)

Consider “n” people in a line, each person looking at the person in front, except the one in front of the line that cannot see anyone. Each person has a hat that can be RED, GREEN, or BLUE. Furthermore, each person can see the colour of everyone in front of him, but he cannot see the colour of his own hat, nor the colour of the hat of the people in his back.

They then perform the following task. The person in the back says a colour (that must be RED, GREEN or BLUE), then the person in front also says one of these colours, and so on until the person in front. Everyone can hear the people colours.

Before receiving their hats and going into a single line, the group of people can discuss a strategy. The question is:
– What strategy can they use that maximises the number of people saying the colour of their own head (in the worst case)?

Chasing the terrorist

Posted December 4, 2008 by simpple
Categories: Puzzles

Tags: , ,

(Presented by Wojciech Mostowski in IPA herfstdagen 08)

There are two characters that move along a line: a terrorist and a policeman. The line has only discrete positions, this is, it is possible to count the possible positions on the line. However there are infinitely many positions to both sides of the line.

The terrorist is very predictable. At each move, he advances one position on the line. The initial position and direction is unknown, but he never changes the direction.

The policeman can jump between any position in the line, but he can only move at the same time the terrorist moves.

The question is: is there any strategy  for the policeman to move along the line that guarantees that he will catch the terrorist in a finite number of steps? Catching the terrorist means being on the same position as him.

Cube of cheese

Posted December 4, 2008 by simpple
Categories: Puzzles

Tags: ,

(Presented by Wojciech Mostowski in IPA herfstdagen 08)

Given a cheese cube the goal is to cut it into exactly 27 equal and smaller cubes.

The question is: what is the minimum number of cuts you need to make, and why? Take into account that you can move the pieces of cheese between each cut.

Half cube

Posted December 4, 2008 by simpple
Categories: Puzzles


(Presented by Arnar Birgisson in IPA herfstdagen 08)

You have a cube and you attach a string to one of its corners. You then pull the string up, and the gravity makes the cube stay with one corner up, and the opposite corner exactly under the upper corner.

You now grab a knife and cut the cube horizontally, exactly on the middle height.

The question is simple: what is the 2D shape you see on the part of the cube that has been cut?

(The answer is not difficult to get, but it is a bit unintuitive.)

Making a bigger square

Posted September 16, 2008 by simpple
Categories: Puzzles

Tags: ,

(Presented at a dinner table in Marktoberdorf summer school 2008)

You start with four point in a plane, making a square. You can move any point A by:

  • Choosing another point B in the plane;
  • Mirror point A with respect to point B, jumping A over B.

The question is: can you arrive to a configuration where you have a bigger square formed by the points? If not, why not? Note that the final square can be rotated with respect to the original square.

Mixing water and milk

Posted September 16, 2008 by simpple
Categories: Puzzles

Tags: , ,

(Given by Stephanie, taken from a german website.)

A farmer has two pots, one is filled with milk, the other is filled with water. He decides to decrease the quality of the milk as follows:

  1. From pot 1 (containing only water in the beginning), he pours as many gallons into pot 2 (containing only milk in the beginning) that the contents of pot 2 are doubled.
  2. Then he pours from pot 2 back into pot 1 the same amount as has been water left in pot 1.
  3. Then again he pours from pot 1 as many gallons into pot 2 that the contents of pot 2 double.

In this way, in the end both pots contained the same amount of liquid, just that pot 2 contains 2 gallons more water than milk.

Question: How many gallons of water and milk had the farmer in the beginning?

Selection of weights to weigh a thing

Posted August 8, 2008 by simpple
Categories: Puzzles

Tags: ,

(Extracted from Leino’s puzzle page)

You are given a balance (that is, a weighing machine with two trays) and a positive integer N. You are then to request a number of weights. You pick which denominations of weights you want and how many of each you want. After you receive the weights you requested, you are given a thing whose weight is an integer between 1 and N, inclusive. Using the balance and the weights you requested, you must now determine the exact weight of the thing.

As a function of N, how few weights can you get by requesting?

The prisoners and the switch

Posted July 23, 2008 by simpple
Categories: Puzzles

Tags: ,

(Can be found in Leino’s puzzle page)

N prisoners get together to decide on a strategy. Then, each prisoner is taken to his own isolated cell. A prison guard goes to a cell and takes its prisoner to a room where there is a switch. The switch can either be up or down. The prisoner is allowed to inspect the state of the switch and then has the option of flicking the switch. The prisoner is then taken back to his cell. The prison guard repeats this process infinitely often, each time choosing fairly among the prisoners. That is, the prison guard will choose each prisoner infinitely often.

At any time, any prisoner can exclaim “Now, every prisoner has been in the room with the switch”. If, at that time, the statement is correct, all prisoners are set free; if the statement is not correct, all prisoners are immediately executed. What strategy should the prisoners use to ensure their eventual freedom?

(Note that the initial state of the switch is unknown to the prisoners. The state of the switch is changed only by the prisoners. You may start by considering the state is originally known.)

Product and Sum (unsolved)

Posted March 15, 2008 by simpple
Categories: Puzzles

Tags: ,

(Seen in a presentation by Rineke Verbrugge, in NVTI Theory day, 2007)
Of two unknown integers, each between 2 and 99 inclusive, a person P is told the product and a person S is told the sum. When asked whether they know the two numbers, the following dialog ensues:

P: “I don’t know them.”
S: “I knew that already.”
P: “Then I now know the two numbers.”
S: “Then I now know them, too.” 

What are the two numbers? Prove that your solution is unique.