Suppose that you have an $N$-story building and plenty of eggs. An egg breaks if it is dropped from floor $T$ or higher and does not break otherwise. Your goal is to devise a strategy to determine the value of $T$ given the following limitations on the number of eggs and tosses:
Version 0: $1$ egg, $\leq T$ tosses
Version 1: $\text{~}1$ $\text{lg}$$(N)$ eggs and $\text{~}1$ $\text{lg}(N)$ tosses. ($lg$ is log base 2)
Version 2: $\text{~}1$ $\text{lg}$$(T)$ eggs and $\text{~}2$ $\text{lg}$$(T)$ tosses
Version 3: $2$ eggs and $\text{~}$ $2\sqrt{N}$ tosses
Version 4: $2$ eggs and $\text{~}$ $\sqrt{2N}$ tosses
Version 5: $2$ eggs and $\leq$ $2\sqrt{2T}$ tosses
I think I have the answer for most of these but don't know how to do a few. Could you please check over my work and provide hints on how to approach the ones I don't know how to do?
For version 0, a simple iterative search starting from the 1st floor and working up to the $N$th floor in increments of 1 will work.
For version 1, a binary search across the floors $1$ to $N$ will work.
For version 2, I think you can iteratively double floors, visiting $1$, then $2$, then $4$, then $8$, etc. until the egg breaks at floor $2^k$. Then you can binary search across $2^{k-1}$ and $2^k$
For version 3, you can go iteratively go across floors with incrementing by $\sqrt{N}$: first visiting 0, then $\sqrt{N}$, then $2\sqrt{N}$, etc. Once the egg breaks at stage $k\sqrt{N}$, iterate across the range $(k-1)\sqrt{N}$ and $k\sqrt{N}$ one floor at a time.
For versions 4 and 5 I don't know how to start. Can someone please provide a hint?