Egg Dropping Puzzle

You are given two eggs and a 100-story building. Your task is to determine the highest floor from which you can drop an egg without it breaking. There are a few important constraints:

  1. If an egg is dropped from a floor above a certain threshold, it will break.
  2. If it is dropped from that threshold floor or any floor below, it will not break.
  3. You want to minimize the number of drops needed to find this threshold floor, using the two eggs.

Objective:
Determine the minimum number of drops required to identify the highest safe floor from which you can drop an egg without it breaking.

Solution

This puzzle requires a strategy that minimizes the worst-case number of drops, considering that you have only two eggs. The key is to balance the risk of breaking an egg with the need to test floors efficiently.

Step-by-Step Solution for Egg Dropping Puzzle:

Step 1: Establish a Strategic Dropping Pattern

The optimal strategy involves a systematic approach to dropping the first egg so that, in the worst case, the second egg has a minimal number of floors to test.

  • Start by dropping the first egg from the 14th floor.
    • If it breaks, test floors 1 through 13 sequentially with the second egg.
    • If it doesn’t break, move to the next floor using a decreasing interval.

Step 2: Continue with Decreasing Intervals

After the first drop from the 14th floor, continue dropping the first egg with intervals that decrease by one floor each time:

  • Drop the first egg from the 27th floor (14 + 13).
  • If it doesn’t break, drop it from the 39th floor (27 + 12).
  • Continue this pattern: 50th floor, 60th floor, 69th floor, 77th floor, 84th floor, 90th floor, 95th floor, 99th floor.

This pattern ensures that if the first egg breaks, the remaining floors to be tested with the second egg are minimized.

Step 3: Worst-Case Scenario

The worst-case scenario occurs when the first egg breaks on the last drop. At each step, the interval decreases by one, so if the first egg breaks on the 99th floor, the second egg will need to test only up to 13 floors (87th through 99th floors).

Step 4: Calculate the Minimum Number of Drops

This method ensures that in the worst-case scenario, you will make a maximum of 14 drops (10 with the first egg and up to 4 with the second egg).

Final Answer

The minimum number of drops required to determine the highest safe floor with two eggs is 14 in the worst case.

tools

Puzzles

Related Articles