Three Voting Prisoners

Each night one of three prisoners has steak for dinner, while the other two have fish tacos. Also every night, each of the three prisoners votes for one of the following two options:

  1. All of us have had steak at least once.
  2. Don’t know yet.

If a majority go with option 2, nothing happens that night. If a majority go with option 1, then they are set free if they are right and executed if they are wrong. The distribution of votes is kept secret, so it is unknown what each of the others voted. Also, it is known that every prisoner eventually will get a steak.

The three prisoners can have a brief strategy meeting and after that, they are not allowed to communicate.  What should the prisoners’ strategy be?

The prisoner who gets a steak the first night should always vote 2, whereas the other two prisoners should vote 2 until the night they get a steak, and 1 every night after.

Source:

Puzzling StackExchange

Digital Scale

You have 10 unlimited piles of balls and one digital scale. All balls in a pile have the same weight, which is an integer between 1 and 9 grams. How many measurements do you need in order to find the weight of the balls in every pile?

You need only one measurement – take 1 ball from pile 1, 10 balls from pile 2, 100 balls from pile 3, etc., and measure their total weight. The first digit of the number shown on the scale determines the weight of the balls in the 10th pile, the second digit determines the weight of the balls in the 9th pile and so on.

Wine and Water

You have two 1 liter mugs – one of them halfway filled with water and the other one halfway filled with wine. You pour 300ml water from the first mug into the second one, stir it well, then pour 300ml of the mix from the second mug back to the first one. Now, do you have more water in the first mug than you have wine in the second one?

If you have X ml water in the first mug, then in the second mug you have 500-X ml water and X ml wine. Therefore you have exactly as much water in the first mug as you have wine in the second one.

Non-Negative

You have a rectangular grid and arbitrary real numbers in its cells. You are allowed repeatedly to multiply the elements in any row or any column by -1. Prove that you can make all row sums and all column sums non-negative simultaneously.

If there is any row or column in the grid with a negative sum, multiply it by -1. Since on every step the total sum of the numbers in the grid increases, we will be able to do this procedure only finitely many times. In the end, all row sums and column sums will be non-negative.

Hourglasses

You have a 7-minute hourglass and an 11-minute hourglass. How can you measure exactly 15 minutes with them?

Turn both hourglasses upside down. When the time of the 7-minute hourglass runs out, turn it upside down. When the time of the 11-minute hourglass runs out, turn the 7-minute hourglass upside down again. Finally, when the time of the 7-minute hourglass runs out, exactly 15 minutes will have been passed.

Chessboard Infection

On a standard 8×8 chessboard there are 7 infected cells. Every minute each cell which has at least 2 infected neighbors gets infected as well. Is it possible for the entire chessboard to get infected eventually?

The total perimeter of the infected regions never increases. If there are 7 infected cells initially, their total perimeter is at most 28. The perimeter of an 8×8 square is 32. Therefore, it is impossible to infect the entire chessboard.

Pirate’s Treasure

Five pirates steal a treasure which contains 100 gold coins. The rules for splitting the treasure among the pirates are the following:

  1. The oldest pirate proposes how to split the money.
  2. Everybody votes, including the proposer.
  3. If there are more than 50% negative votes, the proposer gets thrown in the water and the procedure repeats.

Given that the pirates are very smart and bloodthirsty (if they can kill another without losing money, they will do it), how should the oldest pirate suggest to split the money among the five of the in order to maximize his profit?

Solve the problem backward. Let the pirates be called A, B, C, D, E, where A is older than B, B is older than C, C is older than D and D is older than E.
If there are only two pirates left – D and E, then the D will keep all the treasure for himself.
If there are three pirates left – C, D, and E, C can propose to give just 1 coin to E and keep the rest for himself. Pirate E will agree because otherwise, he will get nothing.
If there are four pirates left – B, C, D, and E, then B can propose to give just 1 coin to D and keep the rest for himself. Pirate D will agree because otherwise, he will get nothing.
Now if there are five pirates – A, B, C, D and E, A should give coins to at least two other pirates, because otherwise at least three of them will vote negative. Clearly, B will always vote negative, unless he gets offered 100 coins and D will also vote negative, unless he gets 2 coins or more. Pirate A can offer to give one 1 coin to C, 1 coin to E and keep the rest for himself and this is the only optimal proposal – 98:0:1:0:1.