I asked this question on the CS exchange, and some have mentioned that this is more of a math problem than a CS problem. Thus, I will proceed to ask it here:
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, that’s 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?
I've had some comments explain that the algorithm on the link included can be extended to include where to throw the first egg from. I need help explaining how that can be done.