tag:blogger.com,1999:blog-4086852356742110078.post7124200454349357696..comments2018-05-26T12:58:47.071+01:00Comments on Let the reader understand: The Eggy Mattress PuzzleJames Heatherhttp://www.blogger.com/profile/07349569483391057467noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-4086852356742110078.post-89430392489301383752013-07-10T12:47:20.911+01:002013-07-10T12:47:20.911+01:00The more serious problem is that eggs reach termin...The more serious problem is that eggs reach terminal velocity after about five floors.<br /><br />If you want to make the problem realistic, it's easily done. You're standing on the moon, outside a 120-storey building...<br /><br />(If you're on the moon, you might not even need the mattress.)James Heatherhttps://www.blogger.com/profile/07349569483391057467noreply@blogger.comtag:blogger.com,1999:blog-4086852356742110078.post-592438896822809332013-07-10T12:44:38.548+01:002013-07-10T12:44:38.548+01:0020 is not bad, but you can do better. You're r...20 is not bad, but you can do better. You're right that it's quadratic.James Heatherhttps://www.blogger.com/profile/07349569483391057467noreply@blogger.comtag:blogger.com,1999:blog-4086852356742110078.post-90328609641371485222013-07-10T10:58:08.104+01:002013-07-10T10:58:08.104+01:00On the other hand, if you mean real eggs and mattr...On the other hand, if you mean real eggs and mattresses, and not theoretical puzzle-eggs and puzzle-mattresses, I would temper my algorithm to ignore floors above 4, because real eggs would smash from floor 1 or 2, let alone 5. That algorithm requires 3 drops in the worst case, however many eggs or floors.Phil Hhttps://www.blogger.com/profile/01941670161404784895noreply@blogger.comtag:blogger.com,1999:blog-4086852356742110078.post-51063813356468149842013-07-10T10:36:06.139+01:002013-07-10T10:36:06.139+01:00Erg, edit fail. 'for some maximum floor count ...Erg, edit fail. 'for some maximum floor count n', 20 is worst case for 120 floors.Phil Hhttps://www.blogger.com/profile/01941670161404784895noreply@blogger.comtag:blogger.com,1999:blog-4086852356742110078.post-26427123043703194272013-07-10T10:32:59.675+01:002013-07-10T10:32:59.675+01:00I have an algorithm whose worst case scales as O(...I have an algorithm whose worst case scales as O(sqrt(n)) for some maximum floor , with a worst case of 20 drops. It is in fact O(n^(1/m)), for m eggs, and requires approximately 2 * n^(1/m) drops. I think. Phil Hhttps://www.blogger.com/profile/01941670161404784895noreply@blogger.com