3 ms·
> E(# of drops) = E(# of drops for 1st) + E(# of drops for 2nd) In the general case, I don't think this is true. I think you're relying on the idea that all i
by thaumasiotes 14y ago
> E(# of drops) = E(# of drops for 1st) + E(# of drops for 2nd)
In the general case, I don't think this is true. I think you're relying on the idea that all intervals are equally large. But I'm not definite here.
> E(# of drops for 2nd) = 1/2 the difference between two drops of the 1st egg
Sure, but this depends in a nasty way on your schedule for dropping the first egg.
> E(# of drops of 1st) = 1/2 the number of intervals
This is definitely wrong. Say my schedule for dropping the first egg is [1, 2, 3, 100]. On your analysis, the expected number of drops the first egg will take to break is 1.5. If we assume that the egg's breaking threshold is uniformly distributed over floors 1-100, the actual expectation for drops-to-break-the-egg is 3.94.
> 100 = the number of intervals × the difference
True for the average difference, but this is pretty explicit about assuming that the size of an interval is constant.
- lotharbot 14y ago>> "E(# of drops) = E(# of drops for 1st) + E(# of drops for 2nd)" > "In the general case, I don't think this is true. I think you're relying on the idea that all intervals are equally large." Pretty much. More explicitly, the grandparent is relying on the assumption that E(egg2) is independent of what happens to egg1, which is only true if the interval sizes are the same. In the article's solution, E(egg2) is dependent upon which interval egg2 is dropped in -- if egg1 breaks on the first drop, E(egg2)=7 (the center of the 1-13 interval) but if egg1 breaks on floor 100, E(egg2)=0 since we already know floor 99 is safe. To calculate E(egg1 + egg2) we need to compute something resembling a weighted average. A quick-and-dirty excel chart gives me an expectation of 9.97, whereas intervals of size 10 give an expectation of 10.5 (first egg gets 1-10 drops for an expectation of 5.5; second gets 1-9 drops for an expectation of 5.0 as the tenth drop would be a repeat.)