you have two identical eggs. standing in front of a 100 floor building, you wonder what is the maximum number of floors from which the egg can be dropped without breaking it. what is the minimum number of tries needed to find out the solution?
Answers
you have two identical eggs. standing in front of a 100 floor building, you wonder what is the maximum number of floors from which the egg can be dropped without breaking it. what is the minimum number of tries needed to find out the solution?
Answer:
14 is the minimum number of tries required to obtain the solution.
Step-by-step explanation:
Solution 1:
With only one egg, determine the maximum number of floors the egg may survive. As a result, the maximum number of tries is 100, which occurs when the egg survives even on the 100th floor. Let's begin on the second level. If the egg cracks, we can return to the first floor and attempt again with the second egg. If it doesn't break, we can try again on the fourth floor - in multiples of two. We knew it survived floor x-2 if it ever breaks, says on floor x. With the second egg, we're left with only floor x-1 to try.
Solution 2:
We can raise the number of floors by one less than the preceding increment instead of taking equal intervals. Let's take a look at floor 14 as an example. If it fails, we'll need another 13 tries to discover a solution. If it doesn't work, we'll attempt floor 27 (14 + 13). If it breaks, we'll need another 12 tries to figure out what's wrong. So the total number of tries would be 14 if the first two tries were added to the additional 12 tries. We can try 39 (27 + 12) and so on if it doesn't break. With 14 as the starting floor, we can get to floor 105 (14 + 13 + 12 +... + 1) in less than 14 tries.
As a result, 14 is the smallest number of trials required to obtain the solution.