SPUG: Stick Riddle
Sanford Morton
smorton at pobox.com
Wed Jan 1 20:55:22 CST 2003
Choose two points (x,y) on the unit interval [0,1]:
0-------x----------y----1
Typically, it would be assumed that these points are independent and
identically distributed with uniform probablity on [0,1]. (Imagine the
stick is placed in a darkened room which you enter blindfolded with a
machete, and whack around until you hear the stick break twice--or you
lose a body part.)
Now fold the interval at the chosen points.
0.......x__________y....1
| |
| |
| |
|
In this picture, it looks like the segments will form a nice triangle.
There are two cases in which a triangle could not be formed:
-- if both points are on the same half of the stick, then the longer
end segment will exceed the sum of the other two segments. Since the
points are i.i.d. unif[0,1] both points will be either above or
below the midpoint 50% of the time. (Most easily visualized on a unit
square.)
-- If the points are on opposite halves of the stick but are too far
apart (> 1/2) then the middle segment will be longer than the sum
of the two end segments. On the unit square, you can see that |x-y|
> 1/2 occurs 25% of the time.
y
1 |----------------------|
|.......... |
|....... |
|..... |
|... |
1/2|. .|
| ...|
| ......|
| .........|
| ............|
|----------------------|- x
1/2 1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org
More information about the spug-list
mailing list