Crashing Light Bulbs

You are living in a 100-floor apartment block. You know that there is one floor in the block, such that if you drop a light bulb from there or anywhere higher, it will crash upon hitting the ground. If you drop a light bulb from any floor underneath it however, the light bulb will remain intact. If you have two light bulbs at your disposal, how many drop attempts do you need such that you can surely find which the floor in question is?

The answer is 14 drops. You can do this by throwing the first bulb from floors 14, 27, 39, 50, 60, 69, 77, 84, 90, 95, 99, 100 (notice that the difference decreases always by 1) until it crashes and then start throwing the second bulb from the floors in between. For example, if the first bulb crashes at floor 69, you start throwing the second bulb from floors 61, 62, 63, etc. This way the total number of throws would be always at most 14.

Proving that 14 is optimal is done using the same logic. In order to use at most 13 throws, the first throw should be made from floor 13 or lower. The second throw should be made from floor 13+12 or lower, the third throw should be made from floor 13+12+11 or lower, etc. Continuing with the same argument, we conclude that the 13th drop should be made from floor 13+12+…+2+1=91 or lower. However, if the first light bulb does not crash after the last throw, you will not be able to find out which number among 92-100 is X.

9 balls, 1 defective

You have 9 balls, 8 of which have the same weight. The remaining one is defective and heavier than the rest. You can use a balance scale to compare weights in order to find which is the defective ball. How many measurements do you need so that you will be surely able to do it? What if you have 2000 balls?

First, we put 3 balls on the left side and 3 balls on the right side of the balance scale. If the scale tips to one side, then the defective ball is there. If not, the defective ball is among the remaining 3 balls. Once left with 3 balls only, we put one on each side of the scale. If the scale tips to one side, the defective ball is there. If not, the defective ball is the last remaining one. Clearly we can not find the defective ball with just one measurement, so the answer is 2.

If you had 2000 balls, then you would need 7 measurements. In general, if you have N balls, you would need to make at least log₃(N) tests to find the defective ball. The strategy is the same: keep splitting the group of remaining balls into 3 (as) equal (as possible) subgroups, discarding 2 of these subgroups after a measurement. To see that you need no less than log₃(N) tries, notice that initially there are N possibilities for the defective ball and every measurement can yield 3 outcomes. If every time you get the worst outcome, you will make at least log₃(N) tries.

Coins on a Chessboard

There is a room with a chessboard inside. On each of its 64 squares, there is placed a coin, either heads up or heads down. You enter the room and a person inside points towards one special square on the chessboard and gives you the chance to flip one of the coins (whichever you choose). Then you leave the room, your friend enters and has to guess which was the special square on the chessboard. If you two could devise a plan before entering the room, how would you make sure your friend always guesses correctly which is the special square?

First, you must enumerate the coins with numbers from 1 to 64, locate the mystery coin, and calculate the binary representation of its number, padded with zeros on the left to 6 digits length. For example, if the mystery coin is the 5th one on the 4th row, its number would be 29 and will have a binary representation 011101. Then, consider the following sets of coins:

A1 = {row 1, row 2, row 3, row 4}
A2 = {row 1, row 2, row 5, row 6}
A3 = {row 1, row 3, row 5, row 7}
A4 = {column 1, column 2, column 3, column 4}
A5 = {column 1, column 2, column 5, column 6}
A6 = {column 1, column 3, column 5, column 7}

Now, the strategy is to flip the coin which makes the parity of heads in set Ai odd if and only if the i-th digit in the binary representation of the mystery coin is 1. It is easy to check that this is always a possible thing to do.

Thoka’s Rebus 3

Can you figure out which phrase is depicted by this rebus?

The first image on the first row depicts a BALL. The second image depicts a BROOM which is removing the B, so you end up with BALL+ROOM=BALLROOM.

The first image on the second row depicts TOES, and the second image on the second row transforms the first letter T to a silent SH. Therefore, the final answer is BALLROOM SHOES.

Drown or Burn

The ship you are traveling on crashes and you somehow succeed to reach the shores of an island. On this island however, a cruel tribe resides and decides to murder you. The tribals can not agree on how to do this, so they decide that if the first sentence you say is a lie, they will drown you, and if it is a truth, they will burn you. Luckily, you hear their conversation and come up with a plan. What do you tell them?

You can tell them “You will drown me”. This will result in a paradox – if your sentence is true, then they will drown you, but on the other hand will be forced to burn you, which is a contradiction. Similarly if your sentence if false. Therefore they will not have a choice except to give up on their plan.

The Majority Name

In a long list of names, one of the names appears more than half of the time. You will be read the names one at a time, without knowing how many they are, and without being able to write them down. If you have a very weak memory, how can you figure out which is the majority name?

Remember the first name and then keep track of whether it has been repeated more than half of the time. To do that, simply add 1 if you hear the name or subtract one when you hear another name. If the list finishes and your counter is positive, then the first name is the majority. If your counter drops to 0, simply restart the procedure with the next name you hear.

This algorithm, invented by R. Boyer and J. Moore, works, because if the counter ends up at 0, then each of the names up to that moment has been read at most half of the time. Therefore, the majority name appears more than half of the time in the remainder of the list.