8 ms·
That was a fun puzzle. I have another one that is math puzzle: > You are given two eggs, and access to a 100-storey tower. Both eggs are identical. The aim is
by kdheepak 4y ago
That was a fun puzzle. I have another one that is math puzzle:
> You are given two eggs, and access to a 100-storey tower. Both eggs are identical. The aim is to find out the highest floor from which an egg will not break when dropped out of a window from that floor. If an egg is dropped and does not break, it is undamaged and can be dropped again. However, once an egg is broken, that’s it for that egg.
> If an egg breaks when dropped from a floor, then it would also have broken from any floor above that. If an egg survives a fall, then it will survive any fall shorter than that.
> 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?)
I wrote up a solution for this (along with a generalized analytical solution) on my blog: https://blog.kdheepak.com/the-egg-tower-puzzle https://blog.kdheepak.com/the-egg-tower-puzzle
- moron4hire 4y ago
- danachow 4y agoLol. Someone needs some fresh air.
- jammaloo 4y agoOn August 22, 1994, David Donoghue threw an egg out of a helicopter onto a golf course in the UK, from a height of 213 meters (700 feet). He now has the record for the longest egg drop without breaking in the world (all without an outside structure for added protection!). https://www.scienceworld.ca/resource/egg-drop/ https://www.scienceworld.ca/resource/egg-drop/ Eggs are evolutionarily designed to survive falling out of nests and perches. You assume that the egg is dropping onto a hard surface, but there is no mention of that in the puzzle. That's even assuming it's a chicken egg, but other eggs may be more resilient. It may not even be a biological egg, but an artifically designed egg, that is resilient to drops onto harder surfaces.
- the_af 4y ago> Eggs are evolutionarily designed to survive falling out of nests and perches. I wonder about this. Realistically, what fate awaits the egg that dropped from the nest in the tree branch, even if it survives the fall?
- niccl 4y agoplus, there's a cost to the parent in making the egg shell arbitrarily drop-proof, so there's a balance of resources required to survive drop versus genetic benefit of surviving the drop
- Forgeties79 4y agoNature doesn’t chase the better option. It selects out the options that aren’t good enough to survive.
- kgwgk 4y agoNature doesn’t chase anything. Things happen. Arguably surviving may happen less often for the shock-proof egg than for the egg that is better in some alternative aspect (including quantity). (Maybe the hard egg has other advantages though. Could also be used to produce a better skeleton.)
- the_af 4y agoI would understand the selective advantage if it made the egg shell more resistant to accidental breaking within the nest. But for birds that nest in tree branches or perches, what advantage is there for an egg resisting a fall without breaking? That egg is lost anyway; for most bird and egg shapes, there's no way to bring it back to the nest.
- Forgeties79 4y ago> what advantage is there So this is a pretty common mistake people make when discussing evolution. It’s not about what is advantageous, it’s about what survives the selection process. A combination of odds that play out. Our eyes are not advantageous or chosen by evolution, our eyes were just acceptable enough for us to survive while other variations were not. There was no decision or work/progress towards an end goal. A creature developed along a certain line by chance, the situation in nature was such that they survived and passed on that trait, while others did not. Natural selection in action.
- hhda 4y agoI guess the issue is that you assumed the type of egg and jumped to a conclusion about the egg you assumed was used in the experiment. You also assumed the environment - who is to say that the environment is earth? Etc etc. The problem isn't with mathematicians.
- GuB-42 4y agoEggs can absolutely survive very far falls. You are making a lot of assumptions here. Like: - This is a typical bird's egg. Most insect eggs for instance can survive any fall. - This is a hard floor, not water, snow,... - There is nothing to protect the egg. - Floors are typical ~3m floors, not floors from a doll house. - The experiment is done on earth The point of maths is that it doesn't need to be grounded into the world. It is a "if A then B" machine. If A applies to a world then B will apply to that world too, and it will always be the case, it doesn't depend on experimental results. It is great because scientists, engineers, etc... only have to show (with their experiments and measurements) that A applies to our world, and maths automatically tell them that B applies too, no need for extra experiments and measurements, except for verification. So in this problem, if you use your "real world" experience with eggs, you only solve the problem for a limited set of preconditions. If you solve it properly, using maths, then it will work in any situation that matches the data of the problem, even for people of Pluto. Also, if you want to talk "real life", I am not sure a 100 story building exists (there is 101, but exactly 100?). And if that building exists, does it have windows you can drop an egg from at every floor?
- danachow 4y ago> I am not sure a 100 story building exists (there is 101, but exactly 100?) IIRC, the Hancock tower, briefly the 2nd tallest building in the world and then Chicago is 100 floors.
- oh_sigh 4y agoThe building is on the moon. Happy now? No of course you aren't.
- x-complexity 4y agoThe point of the thought experiment is to get the non-math-inclined thinking about how they would try to get to the desired result within a limited set of tries: Practical considerations are to be ignored specifically for this purpose. By going against the intentions of the thought experiment and blurting out "0 floors, eggs can't survive very far falls", the individual is deliberately trying to stamp out creativity & problem solving skills, as well as any attempts at getting others thinking about their approaches to the aforementioned problem. To them, the strict adherence to practical reality must be imposed 100% of the time, and there should be no time for playful thinking.
- e-master 4y agoThis reminded me of that joke about the physics experiment that assumes a perfectly spherical chicken in a vacuum :)
- Layke1123 4y agoI hate how you are downvoted for an accurate statement. I love math, but I've come to understand from a teacher's perspective how accurate your statement can be. I liked your insight.
- hamburglar 4y agoI’m not one of the downvoters but I suspect he’s being downvoted for an inability (or refusal) to think in hypotheticals for the sake of an interesting problem. It gives the impression of someone who so dislikes thought exercises or is too insecure about their ability to solve them that they prefer to ruin them with silly objections about practicality.
- Layke1123 4y agoNo, what I think he is highlighting is how people not interested in math approach a problem like this. I asked my girl friend this question on the way home from our Mother's Day dinner, and she had a very similar statement. It says something about how mathematicians could improve on their analogies, not whether he is interested in solving a math problem. I found it insightful even if it was not directly tied to the "correct" speech on Hacker News.
- thewakalix 4y agoThey're the same picture.
- 4ad 4y agoOne's disinterest or inability to do math has no bearing on the quality of a math problem.
- Layke1123 4y agoThat's not what this is about though. It's about sparking interest in math, and many on here are showing exactly why math people can me off putting for non math people.
- hamburglar 4y agoThank you. We won’t be needing the rest of the hour. HR might be in touch.
- PebblesRox 4y agoThe puzzle is a good example of pseudocontext: "Instead of giving students realistic situations that they could analyze, textbook authors began to fill books with make-believe contexts – contexts that students were meant to believe but for which they should not use any of their real-world knowledge."[0] I think for a math puzzle that people choose to do for fun, pseudocontext is fine. We can suspend our disbelief and engage with the math as it's intended to be engaged with. In a classroom setting, on the other hand, I think it's best to stay away from pseudocontext. Either make the context realistic, make it clearly fantastical, or just use math as the context without trying to dress it up in real-life details. Pseudocontext in a teaching environment is problematic because it requires learners to ignore the common-sense reasoning that they'd apply to a real-life problem and it reinforces the impression that math has nothing to do with the real world. In this case, we could call it a dragon egg and that would be enough I think to transform it into a fantasy context, since nobody has preexisting assumptions about how durable a dragon's egg might be. [0] https://blog.mrmeyer.com/2010/pseudocontext-saturdays-introduction/ https://blog.mrmeyer.com/2010/pseudocontext-saturdays-introd...
- cedilla 4y agoI'm not convinced by the pseudocontext critique. For one, I think the egg experiment is already sufficiently fantastical and its rules follow logically. Ignoring common sense reasoning is an important skill. We need rigorous answers where they are available, and the common sense answer is almost always very wrong. I still agree that school textbooks take this much too far in many cases, but this riddle is fine.
- SamBam 4y agoExcept that I think it penalizes the neuro-diverse mind that can't get over the fact that this puzzle doesn't make rational sense, and they get stuck on that, at the expense of doing the problem.
- jimmygrapes 4y agoThis was also my first thought, as an admitted deficient with any math beyond (and sometimes including) arithmetic. My second thought was: did you not consider that eggs differ from one another?
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]
- 613style 4y agoI was asked this one in a google phone interview in ~2009. I remember deriving that intervals of 10 floors were optimal in the two-egg 100-story case using some simple calculus and getting that far took me most of the hour. Your solution is super nice, but I hope you don't ask candidates to recreate it :P
- edflsafoiewq 4y agoThat's not optimal though, like the blog says. When doing the first egg, as you get up near the top you've already used up many drops, so the gaps need to get correspondingly smaller.
- 613style 4y agoMaybe that's why I don't work at google :)
- photochemsyn 4y agoWouldn't one normally just try to convert this to an unambiguous discrete problem, something like: Given: (1) the ordered sequence of whole numbers (1, 2, ... , 99, 100) and (2) an unknown value N that is a member of this sequence, (3) the following tests (a candidate is a guess at the value of N), and two separate threads to run tests: (A) if candidate <= N : true & thread continues (another candidate can be checked with that thread) (B) candidate > N : false & thread terminates (no more candidates can be checked with that thread) Determine the best strategy for finding N (minimize the number of tests while leaving at least one thread alive) Determine the worst case for the number of tests needed to find N using this optimal strategy.
- ctxc 4y agoI'm not too math-y, but this did capture my sense of wonder. However, it was short lived since now I know it takes "14 drops" maximum, but not the solution - "which floors should I use the 14 drops on though?" Maybe I'd be intrigued enough to try and follow the math if that was added in :)
- thewakalix 4y agoFirst the 14th floor, then the (14 + 13 =) 27th floor, and so on.
- vivegi 4y ago> The aim is to find out the highest floor from which an egg will not break when dropped out of a window from that floor. (emphasis added) The egg doesn't break when dropped out of the window (i.e., instantaneously). It potentially breaks when it hits the floor after a time delay t. So, the answer is 100 and 0 trials. ps: This is a joke. Don't take it too seriously.
- deleted 4y ago[deleted]