Drop egg problem
From 100th floor
Given two eggs and an 100-floor building, on and above a certain floor F, if we drop eggs, they will break, and below that certain floor, eggs will stay completely intact. In the worst case, how many experiments should we conduct at least, such that we can find that certain floor? Design such a way.
The key to this problem is to understand the problem. What does it mean by “in the worst case” and “at least” in the same sentence? Imagine F is 1,2,3…100, we can use a way to find F no matter what number F is, within N times.
If for the first time, we drop the first egg in the Xth floor and the egg breaks, then we need to drop the second egg from the 1st floor. In the worst scenario, we need to conduct X-1 more experiments to find that F=X-1. Here N=X.
If for the first time, we drop the first egg in the Xth floor and the egg doesn’t break, then we need to drop the first egg again in the Yth floor. Since we will take N times to find F in the worst scenario and we have dropped the first egg twice, we need to drop the second egg N-2 times. So between Xth and Yth there are N-2 floors. In the same way we can conclude that there are N-3,N-4… floors between each time we drop the first egg if it doesn’t break in the previous floor. Therefore, N+N-1+N-2+…+1=100, N=13.6=14.