What is the best brain-teaser you know?

To optimize the answer to the third problem, consider that at each step you want to split the possibilities evenly, so that you'll need the same number of drops (plus or minus one) whether you break the first egg or not.

Let's do this backwards, starting with two drops and adding one drop at a time until we reach 100 floors or more.

A - Let's say we know the breaking floor is 97 or above and we have two surviving eggs. We can drop the first egg at 98 and the second egg at 97 or 99, depending on whether the first one broke or not. That is enough to find the breaking floor: * 98 breaks, 97 breaks --> floor 97 * 98 breaks, 97 survives --> floor 98 * 98 survives, 99 breaks --> floor 99 * 98 survives, 99 survives --> floor 100 (we know from the riddle that it would break at floor 100, even though we didn't test).

B - Now what if we start with one drop at floor 96? If the egg survives, we know it's floor 97 or above and we have two surviving eggs, so we are in situation A and we can find the floor in two more drops. Let's balance it and also do a maximum of two more drops if the egg doesn't survive floor 96: we can drop the second egg from 94, then 95. This means that if we know the breaking floor is 94 or above and we have two surviving eggs, we can find the lethal floor in 3 drops.

C - Let's keep going and start with a drop at floor 93. If it doesn't break, we're in situation B and can find the floor in 3 drops. If it breaks we can drop the second egg at floors 90, 91 and 92. This means that if we know the breaking floor is 90 or above and we have two surviving eggs, we can find the lethal floor in 4 drops.

D - Start with a drop at floor 89. If it survives, we're in situation C and only need 4 more drops. If it doesn't, drop the second egg from floors 85 to 89.

Repeat until you reach 100 floors:

E - First drop at floor 84 + five drops to apply situation D or test floors 79 to 83.

F -First drop at floor 78 + six drops to apply situation E or test floors 72 to 77.

G - First drop at floor 71 + seven drops to apply situation F or test floors 64 to 70.

H - First drop at floor 63 + eight drops to apply situation G or test floors 55 to 62.

I - First drop at floor 55 + nine drops to apply situation H or test floors 46 to 54.

J - First drop at floor 45 + 10 drops to apply situation I or test floors 35 to 44.

K - First drop at floor 34 + 11 drops to apply situation J or test floors 23 to 33.

L - First drop at floor 22 + 12 drops to apply situation K or test floors 10 to 21.

M - First drop at floor 9 + 13 drops to apply situation L or test floors 1 to 8 (with some to spare).

There you have it. 14 drops are enough to find the lethal floor. To sum up the strategy: * drop the first egg from floors 9, 22, 34, 45, 55, 63, 71, 78, 84, 89, 93, 96, 98 and 99 or until it breaks. If it didn't break, the lethal floor is floor 100 and you're done. If it broke, proceed with the second egg. * drop the second egg from the floor above the last floor survived by the first egg (or floor 1 if the first egg didn't even survive the first drop) and go up one floor at a time until it breaks (e.g. if the first egg broke at floor 63, that means it survives floor 55, so drop the second egg at floor 56 and go up).

/r/AskReddit Thread Parent