Problem Description

A stick is broken randomly into 3 pieces.  What is the probability that the pieces can be assembled into a triangle? 

Background & Techniques

I ran across this problem in one of the early chapters of "Mathematical Recreations and Essays", Ball and Coxeter, Dover Publications, presented as a paradox.  They describe it this way: " It is possible to put the stick together into the shape of a triangle provided the length of the longest piece is less than the sum of the other two (Euclid - Book 1, Proposition 20), that is,  provided the length of the longest piece is less than 1/2 of the total length.  But the probability that a fragment of the stick shall be less than half of the stick  equals 1/2.  Thus the probability that a triangle can be constructed of  out the the three pieces into which the stick is broken would appear to be 1/2."

 Or, try my rationale:   Common sense says that the probability is 1/2 since when we make the first random cut, one piece is longer than 1/2 the total length and  the other piece less than or equal to 1/2 the total length.  When we randomly make the second cut, there is a 50-50 chance that we'll cut the piece that is more than half the length of the stick. In that case, a triangle can be formed no matter where we cut it . If we happen to cut the shorter  piece, then no triangle can be formed no matter where it is.  So the probability of forming a triangle is 1/2.

But common sense doesn't always guarantee a correct decision! 

This program runs batches of 100,000 trials and accumulates the number that would successfully create a triangle.   As you might suspect by now, the average number of successes is not 50%.   More a case of false reasoning than a real paradox, but an interesting exercise in any case.

I added an option to run single trials and display the resulting triangle if one is possible. 

Run a few trials and try to explain the result.  A separate "Explanation"  tab gives my reasoning. 

 I'll call this a Beginner's level program even though it exceeds our 50 lines of code limit - it has about 70 user written lines.   But there are two distinct parts  - The first part of the  code  generates random cuts and tests whether they would form a triangle about 30 lines. This is incorporated in the MakeTriangle function.   The Make 100,000 Trials button calls MakeTriangle 100,000 times and counts how many created valid triangles.

The graphics portion (40 lines of code) calls MakeTriangle to make the cuts, but then must actually determine the coordinates of the vertices in  order to draw the triangles.  A Triangle from 3 Lines  page over in the Math section derives the equations for calculating  the coordinates. 

Running/Exploring the Program 

Suggestions for Further Explorations

There is another variation of the problem that asks for the probability of forming a triangle if we make the cuts sequentially, i.e. make the first cut, then randomly select one of those pieces to make a second random cut.   Surprisingly, at least to me, the probabilities are not the same as the original problem.  

 

Original Date: August 6, 2004 

Modified: November 07, 2008

 

  [Feedback]   [Newsletters (subscribe/view)] [About me]
Copyright © 2000-2008, Gary Darby    All rights reserved.