I've a straight stick which has been broken into three random-length pieces.
What is the probability that the pieces can be put together to form a triangle?
If you can answer this at this point, please do.
If not, perhaps this will help: here are several methods to break the stick into the three random length pieces:
- I select, independently, and at random, two points from the points that range uniformly along the stick, then break the stick at these two points.
- I select one point, independently, and at random (again uniformly), and break the stick at this point. I then randomly (with even chances) select one of the two sticks and randomly select a point (again uniformly) along that stick, and break it at that point.
- I select one point, independently, and at random (again uniformly), and break the stick at this point. I then select the larger stick, and randomly select a point (again uniformly) along that stick, and break it at that point.
If this clarifies the problem, please show how this affects your work.
(In reply to
solution by Charlie)
As case 3 had the most complicated math, it is the one needing the best verification. The following is a simulation of case 3:
RANDOMIZE TIMER
DEFDBL A-Z
FOR trial = 1 TO 10000000
piece1 = RND(1)
IF piece1 > .5 THEN piece1 = 1 - piece1
piece2 = RND(1) * (1 - piece1)
piece3 = 1 - piece1 - piece2
IF piece1 + piece2 > piece3 AND piece1 + piece3 > piece2 THEN hit = hit + 1
ct = ct + 1
NEXT
PRINT USING "####### / ######## = #.######;"; hit; ct; hit / ct;
PRINT USING "#.######"; SQR(hit * (1 - hit / ct)) / ct
It found
3862532 / 10000000 = 0.386253;0.000154
That is, 3,862,532 hits out of 10,000,000 trials, for an average of .386253, with std error of the mean of .000154.
|
Posted by Charlie
on 2003-12-07 17:43:03 |