Earlier quoted context omitted.
"There are no tricks, gotchas or other devious ruses. Don’t rat-hole with issues related to terminal velocity, potential energy or wind resistance. This is a math puzzle plain and simple." Not within the rules!
"There are no tricks, gotchas or other devious ruses. Don’t rat-hole with issues related to terminal velocity, potential energy or wind resistance. This is a math puzzle plain and simple." Not out of the rules either (according to what you just posted). At some point you need to crush an egg. If the rules are implying that you can only do X and we are only looking for solution Y then why are we even talking about thi…
The Two Egg Problem
11–20 of 87 posts
Re: The Two Egg Problem
#12Re: The Two Egg Problem
#13We now have all the information to compute the optimal two egg solution.
While I prefer to read about algorithms and strategies in the fashion the author writes, I'm a bit sad that there's is no proof (or informal reasoning) why this is the optimal solution. Does anyone have a paper or some reasoning which will make me believe that this is the optimal solution?
Re: The Two Egg Problem
#14Re: The Two Egg Problem
#15What isn't explained, is why the solution that 'make(s) solutions to all possible answers the same depth' is also the solution that minimizes the average number of attempts needed for many (sets of) eggs. The motivation given is to reduce the worst case. That doesn't explain why there isn't perhaps a solution with a worse worst case, but a lower average number of drops.
Re: The Two Egg Problem
#16The blog author is very smart. However, he is not very clever. From my experience in the real world, I know that an unprotected egg will smash when dropped from one story, guaranteed. No need to go up 14 or 27 or even two stories. (I also know that it is possible to devise protective enclosures to keep an egg from breaking when dropped from 6 stories. The Society of Women Engineers often sponsors competitions. Been t…
"This is a math puzzle plain and simple."
You're being asked to accept that it's possible for an egg, or some other fragile object like, say, a baby, to survive a drop from the first or any other floor, and proceed to solve the math problem.
Re: The Two Egg Problem
#17Let f(y) be the number of drops required with y floors remaining. At a drop from floor x, either the egg breaks and you must test all floors from 1 to x-1, or else the egg does not break and you have reduced to a smaller sub-problem with y-x floors. So the number of drops required is 1 (for the current drop) plus the max of either x-1 or f(y-x). We simply minimize this value over all potential floors x from 1 to y.
Here is a solution in C++: https://gist.github.com/3156157
Re: The Two Egg Problem
#18> The question is: What strategy should you adopt to minimize the number egg drops it takes to find the solution? (And what is the worst case for the number of drops it will take?)
Then in the solution he says:
> Problems where the solution lays lower down the building are taking less drops than when the solution lays higher up. We need to come up with a strategy that makes things more uniform.
It is not explained why it has to be more uniform.
A more minor issue with this puzzle is that for the sake of thoroughness, the author should say is that the number of floors required to break the egg follows a uniform distribution (i.e., every floor is an equally likely candidate).
Re: The Two Egg Problem
#19Earlier quoted context omitted.
Yeah. I dropped an egg from the kitchen counter and it broke. Ergo, first floor it would break. Except of course, the article doesn't mention what the landing surface is, or whether it is what we think of as an egg, or some hypothetical super-egg. This would seem to be discounted by the "There are no tricks, gotchas or other devious ruses" clause, however. If the point of the article is to make it purely a mathematic…
All it would take to remove the real-world problem would be to change the object from an egg to a ball made of a material of unknown strength and toughness. Poor specifications lie at the root of many a programming problem.
The real thing I'm wondering is why are you making a big deal about this? You obviously have the mental capacity to come up with the concept that it's a special material, why can't you just pretend that's what it is and not make a big pedantic joke about it? What is added to this discussion by pointing out something we all know - that eggs break when you drop them from shoulder height.