Calvin has three distinct eggs, one of which is made of rubber and thus cannot break; unfortunately, he doesn’t know which egg is the rubber one .
Further, in some 100-story building there exists a floor such that all normal eggs dropped from below that floor will not break, while those dropped from at or above that floor will break and cannot be dropped again.
What is the minimum number of times Calvin must drop an egg to determine the floor satisfying this property?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Relevant wiki: Egg Dropping
So the strategy to obtain 2 4 :
drop one egg, until it breaks, from floors 12, 12+12, 12+12+11, 12 + 12 + 11 + 11, . . . , 12 + 12 +· · ·+ 8 + 8. If it never breaks, then the egg was fake and thus it reduces to the 100-floor, two-egg problem. If it breaks on some floor, then drop both eggs on each floor from the bottom up until an egg breaks. Its easy to calculate that this strategy will use either 23 or 24 drops in all of the cases. Now, given any optimal strategy, we can modify it into another optimal strategy so that the strategy consists of iteratively dropping only one egg. Therefore, it suffices to find an increasing sequence of floors 1 ≤ a 1 < a 2 < ⋅ ⋅ ⋅ < a n − 1 < 1 0 0 ≤ a n that is optimal.
If the egg never breaks then we have made n drops, so we will finish in n + 1 4 drops. If an egg drops on floor a k, then we will necessarily need 2(a k − 1 − a_k−1) more drops. Thus, we want to minimize max{ n + 1 4 , 1 + 2 ( a 1 − 1 ) , 2 + 2 ( a 2 − a 1 − 1 ) , . . . , n + 2 ( a n − a n − 1 − 1 ) }.
By the averaging principle, we have
m a x ( 1 + 2 ( a 1 − 1 ) , 2 + 2 ( a 2 − a 1 − 1 ) , . . . , n + 2 ( a n − a n − 1 − 1 ) ) ≥ n n ( n + 1 ) / 2 + 2 ( a n − n ) ≥ n n ( n + 1 ) / 2 + 2 ( 1 0 0 − n ) ) . When n ≤ 9 , this is ≥ 2 4 . When n ≥ 1 1 , n + 1 4 > 2 4 . Therefore, n = 10, which already means the maximum is at least 24.
Solution Courtesy : CMIMC.