Well it is not a program problem. Is there any hint for such quiz?
I am thinking about focusing on two random R1, R2, both of which is in range (0, 1). and supposing R2 > R1
and then fulfill two equation:
R1 + (1 - R2) > R2 - R1 // two sticks sum longer then the rest one
|R1 - (1 - R2)| < R2 - R1 // the difference of these two should be shorter the rest one
but I cannot move further…
The answer is 1/4.
Here is the explanation.
Let x is the length of the leftmost stick and y is the length of the rightmost stick.
Then the middle stick has length n-x-y, if the original stick’s length was n.
The possible values for x,y are those for which:
In the plane Oxy this is equivalent to say that the point (x,y) lies within the triangle with vertices (0, 0), (n, 0), (0, n).
Now these three numbers (x, y, n-x-y) form a triangle if all of the three are satisfied:
Again in the Oxy plane these are satisfied when the point (x,y) lies within the triangle with vertices (0, n/2), (n/2, n/2), (n/2, 0).
The area of this triangle is a quarter of the area of the (0, 0), (n, 0), (0, n) triangle, since it’s the ‘middle’ triangle (whose vertices are the midpoints) of the bigger one.
Here is a simple C# program to verify the answer: