-1

With two eggs and a building with 100 floors, what is the optimal strategy for finding the lowest floor at which an egg will break when dropped? Followup: What if the number of floors of the building is unknown?

This is from https://gurmeet.net/puzzles/two-eggs-and-a-building/index.html

My approach: The first part, I solved it. But for the followup question, I feel there isn't really a good strategy unless we say avg max height of buildings is (1+50)/2 = 25 approx and then apply same technique as suggested but then it is not definitely guaranteed. So, what should the approach be?

Charlie
  • 325

1 Answers1

1

Assumption: It seems that having an unknown number of floors can be restated as having an infinite number of floors, but starting at some finite floor, the egg will break. (Otherwise, if we say had $n$ floors, what would a strategy that takes its first drop at floor $2n$ mean? By assuming there are an infinite number of floors, we don't run into this issue since we can now drop from floor $2n$.)

If S is a deterministic strategy, and we define $S(l)$ to be the number of egg drops required where $l$ is the lowest floor at which an egg will break when dropped. It is clear that for any $S$ that $\sup_{l \in \mathbb{N}}S(l) = \infty$. So, there is no optimal strategy in this sense.