Artem's blog

July 20, 2009

2 eggs and a K-floors building puzzle

Filed under: Mathematics — Tags: — Artem @ 2:48 AM

You have absolutely identical 2 eggs and empty K-story building. You can throw eggs from any floor and see if it was broken or not. If not, you can reuse it again momentarily. You need to identify the lowest floor, starting from which eggs is broken if thrown (”breaking floor”) in minimum possible steps in worst case.

Solution is here: the-problem-of-eggs-and-a-building.pdf

 

3 Comments »

  1. Artem,

    looks like simple binary search will give your log 2 (K) complicity which is much better than sqrt(K)?

    Comment by crypto5 — July 27, 2009 @ 12:43 PM

  2. Sorry, meant “complexity”.

    Comment by crypto5 — July 27, 2009 @ 12:46 PM

  3. crypto5, for log_2(K) complexity you will need log_2(K) eggs :)

    Comment by Artem — July 27, 2009 @ 8:35 PM

RSS feed for comments on this post. TrackBack URL

Leave a comment

 

You need to log in to vote

The blog owner requires users to be logged in to be able to vote for this post.

Alternatively, if you do not have an account yet you can create one here.

Powered by Vote It Up

Powered by WordPress