You have been given three eggs and your job is to figure out how high an egg can fall from a 120 story building before it breaks. The eggs might break from the first floor, or might even survive a drop from the 120th floor, you have no prior information about it. Except all three eggs are know to be of exactly same strength.
What's the most efficient way to drop the eggs i.e. reducing the number of times you need to drop eggs and still able to determine the answer? You are allowed to break all three eggs, as long as you identify the correct floor afterwards.
After you've solved the above problem, generalize. Define the "break floor" as the lowest floor in a building from which an egg would break if dropped. given an n story building and a supply of m eggs, find the strategy which minimizes (in the worst case) the number of experimental drops required to determine the break floor.
Question
ujjagrawal
You have been given three eggs and your job is to figure out how high an egg can fall from a 120 story building before it breaks. The eggs might break from the first floor, or might even survive a drop from the 120th floor, you have no prior information about it. Except all three eggs are know to be of exactly same strength.
What's the most efficient way to drop the eggs i.e. reducing the number of times you need to drop eggs and still able to determine the answer? You are allowed to break all three eggs, as long as you identify the correct floor afterwards.
After you've solved the above problem, generalize. Define the "break floor" as the lowest floor in a building from which an egg would break if dropped. given an n story building and a supply of m eggs, find the strategy which minimizes (in the worst case) the number of experimental drops required to determine the break floor.
Edited by ujjagrawalLink to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.