You have two identical eggs, and are given the task of figuring out the highest floor of a 100-story building from which an egg can be dropped safely (meaning that it doesn't break). You have no prior information about this matter, so for all you know a fall from the first floor might break the egg, but then again, it might be strong enough to survive a 100-story drop.
You need to conduct experiments by dropping the eggs from various levels in the building to solve the problem. You are allowed to break both eggs as long as you come up with an answer.
Find a strategy to minimize the maximum number of drops you would have to do. What is this number? (For example if your strategy is dropping an egg from first, then second, then third floors, and so on until it breaks, the maximum number of drops is 100.)
on first drop at floor x, breakage determines
x-1 drops. if no breakage, drops are yet unknown because you still have 2 eggs
for each possibility to involve equal number
of drops, the required drops if breakage at
a certain floor should be 1 less than the required drops of the previous floor breakage.
this is because there is a one drop delta
between them.
the additional requisite is that this process
should end at greater than 100 before the
required, drops reaches zero. otherwise the
case of no breakages would be open and there
would be no termination.
14,27,39,50.. > 100
err.. as i said not too good today