Recently I've run across the Two eggs, 100 floors problem:You are given two eggs, and access to a 100-story building. Both eggs are identical. The aim is to find out the highest floor from which an egg will not break when dropped out of a window from that floor. If an egg is dropped and does not break, it is undamaged and can be dropped again. However, once an egg is broken, thats it for that egg.If an egg breaks when dropped from floor n, then it would also have broken from any floor above that. If an egg survives a fall, then it will survive any fall shorter than that.This page (http://datagenetics.com/blog/july22012/index.html) explains how to solve this puzzle very well, but I've run across an extension that asks for an algorithm for what floor to drop the first egg from.When considering this for the 2 eggs, 100 floors problem, I found that the first floor to throw the egg from (14) matched the minimum number of throws required to find the floor for which the egg doesn't break from when thrown.However, when extending this to 3 eggs, the total number of throws needed becomes 9, but that doesn't mean that the FIRST egg throw needs to be made from the 9th floor. Intuitively, it would need to be from a higher floor than 14.Thus, my question is not how do you minimize the number of throws as the original puzzle states. My question is: How do you determine what floor to drop the FIRST egg from when you have n eggs and k floors? Is it possible to find a generalized approach for that?
Eggs and Floors Puzzle - Alternate
algorithms;optimization;searching