SPUG: Stick Riddle

Jeremy Calvert jeremycalvert2000 at yahoo.com
Wed Jan 1 19:56:30 CST 2003

This was a fun one.  I looked at your script, and I
have to agree with Brian that you make a false
assumption when you first split the stick, then split
the longer of the two remaining pieces.  This
increases your odds of getting a triangle.

I get that the odds are 25% using the following

Assume the stick is 1 unit long, and that x and y are
numbers between 0 and 1 indicating the location of the
break.  Also assume that x >= y.  I assert these
assumptions don't affect the outcome of the stick

Now consider the crude drawing included.  The breaking
of the stick corresponds to some point in the
xy-plane.  Furthermore, this point is in the region
defined by x >= y, y >= 0, and x <= 1.  To determine
the probability that the sticks make a triangle, we
need only identify which sub-regions correspond to
triangl-able sticks and which don't.  The length of
the sticks are y, x-y, and 1-x.  In the picture the
red regions corrspond to values of x and y which don't
yeild triangles.  There are 3 of them, each
corresponding to one of the sides being longer than
.5, meaning it's longer than the sum of the other two
sides' lengths.  The green region is where the breaks
do yeild a triangle, which is a triangle with 1/4 the
area of the total "state space", hence 25%

On a side note, I think the mistake in the perl script
and the increased odd of having getting a triangl
exemplifies the advantage of changing your choice of
door after a goat is revealed in the infamous Monty
Hall problem (see
http://barryispuzzled.com/zmonty.htm),  but I'm not


--- Brian Hatch <spug at ifokr.org> wrote:
> > In his college course, he came up with the answer
> of 50% probability. I 
> > wrote the attached Perl script to simulate this,
> and constently get 38%, 
> > assuming the second split is done on the larger
> piece.
> Don't make assumptions.  Instead, use rand to
> generate two numbers
> between 0 and 100, and have those be the 'break
> points'.  You then
> determine the length of the three pieces from that. 
> See if that
> gives you more accurate* results.
> * for differing values of 'accurate'.
> --
> Brian Hatch                  Inside every old person
>    Systems and                is a young person
> wondering
>    Security Engineer          what the hell
> happened.
> http://www.ifokr.org/bri/
> Every message PGP signed

> ATTACHMENT part 2 application/pgp-signature 

Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stick.jpg
Type: image/jpeg
Size: 10857 bytes
Desc: stick.jpg
Url : http://mail.pm.org/archives/spug-list/attachments/20030101/1cd112df/stick.jpg

More information about the spug-list mailing list