Author |
Topic: Dropping eggs from a building (Read 5079 times) |
|
ngoc_quynh
Newbie
Posts: 1
|
|
Dropping eggs from a building
« on: Sep 10th, 2012, 9:34pm » |
Quote Modify
|
You stand before a 100-story building with two eggs. Using only these two eggs, you must figure out the highest floor from which you can drop an egg such that the egg won't break when it hits the ground (we'll call this the "highest safe floor"). Every floor is equally likely to be the highest safe floor, including the top floor, and it's also just as likely that the egg will break from every floor. You can assume that if you drop an egg and it doesn't break, its shell is just as strong as it was before you dropped it. If you want to minimize the expected number of drops you have to perform, what strategy should you use for picking which floors to drop the eggs from? You should write a program to solve this problem.
|
|
IP Logged |
|
|
|
rmsgrey
Uberpuzzler
Gender:
Posts: 2873
|
|
Re: Dropping eggs from a building
« Reply #1 on: Sep 11th, 2012, 5:08am » |
Quote Modify
|
My homework sense is tingling! There are already at least three threads on this over in the hard forum (Search may help). Once you solve for the worst case (which the threads focus on), optimising the expected performance is simple enough...
|
|
IP Logged |
|
|
|
Gelinlik
Newbie
Posts: 1
|
|
Re: Dropping eggs from a building
« Reply #2 on: Sep 15th, 2012, 7:23am » |
Quote Modify
|
I would drop in first floor. Most probablt the eggshell will be broken. All the best
|
|
IP Logged |
|
|
|
benmartorano
Newbie
Posts: 48
|
|
Re: Dropping eggs from a building
« Reply #3 on: Oct 15th, 2012, 11:49pm » |
Quote Modify
|
Drop from the ground floor ... less walking up and down stairs
|
|
IP Logged |
|
|
|
Grimbal
wu::riddles Moderator Uberpuzzler
Gender:
Posts: 7527
|
|
Re: Dropping eggs from a building
« Reply #4 on: Oct 16th, 2012, 1:29am » |
Quote Modify
|
on Sep 10th, 2012, 9:34pm, ngoc_quynh wrote:If you want to minimize the expected number of drops you have to perform, what strategy should you use for picking which floors to drop the eggs from? You should write a program to solve this problem. |
| I'll go with Gelink and benmartorano. If you want to reduce the expected number of drops, you have to consider the prior distribution of egg hardness. Unless you are talking about frog or fish eggs, it is very likely that a drop from the ground floor already breaks the egg. This is unlike where you want to minimize the maximum number of drops. That problem was already discussed in this forum.
|
|
IP Logged |
|
|
|
benmartorano
Newbie
Posts: 48
|
|
Re: Dropping eggs from a building
« Reply #5 on: Oct 25th, 2012, 3:40pm » |
Quote Modify
|
ahhhhh yeah! I wasnt even considering other types of eggs
|
|
IP Logged |
|
|
|
Rivaa
Newbie
Posts: 6
|
|
Re: Dropping eggs from a building
« Reply #6 on: Dec 10th, 2012, 9:11pm » |
Quote Modify
|
According to me the highest safe floor would be top floor because i will cover the both eggs with unbreakable coating
|
|
IP Logged |
|
|
|
|