A samurai cuts a piece of bamboo

There is also a nice geometric-probability solution to the problem. For simplicity, let $L=1$, with $x$ and $y$ as you describe. The space of all possible values of $x$ and $y$ is the unit square $[0,1]\times[0,1]$, with each point being equally likely (as $x$ and $y$ are uniformly distributed). In order for the three pieces to form a triangle, each piece must have length less than $\frac{1}{2}$, so:

  • if $x<y$: $x<\frac{1}{2}$, $y-x<\frac{1}{2}$, and $1-y<\frac{1}{2}$;
  • or if $x>y$: $y<\frac{1}{2}$, $x-y<\frac{1}{2}$, and $1-x<\frac{1}{2}$.

Graphing these in the unit square gives the shaded region shown below.

graph of inequalities

This region is $\frac{1}{4}$ of the total area of the square, so the probability is $\frac{1}{4}$.


It's worth noting this similar but slightly different question, which arose from a mis-written Monte Carlo simulation of this problem.


That works, assuming randomly means each point is uniformly distributed on $[0,L]$.

A similar approach is to note that the density of $x$ and $y$ is each $\frac{1}{L}$ so the probability of a triangle is $$\int_{x=0}^{L/2}\int_{y=L/2}^{x+L/2}\frac{1}{L^2} dy\,dx + \int_{x=L/2}^{1}\int_{y=x-L/2}^{L/2}\frac{1}{L^2}dy\,dx = \int_{x=0}^{L/2}\frac{x}{L^2}dx + \int_{x=L/2}^{1}\frac{L-x}{L^2}dx = \frac{1}{4}$$