Imagine you snap a straight stick randomly at two different points. What is the probability that you can make a triangle with the remaining pieces?

You cannot make a triangle if one of the pieces is longer that the sum of the two other pieces.

So, if both points are in the same half of the stick, you cannot make a triangle with the three pieces.

There are two halves in the stick.

Let's suppose that your first point is in the first half. You have 50% chances of this. then, you are able to make a triangle only if your next point is in the second half, again a 50% chance. That gives you 50% x 50% = 25%.

Same probability with the first point in the second half and the second in the first half. 25% again.

So, in total, 25% + 25% = 50%.

You have a probability of 50% of being able to make a triangle with the remaining pieces.

QED

trafalgar (72)3 years agowhat if the first break is only about 10% into the first half, and the second break is right at the end of the second half? :)

paul.atreides (53)3 years agoWait a minute, I think the response depends on what your definition of a triangle is. A triangle is three connected lines. Unless the interviewer slides a stick and a bottle of Elmer's glue across the table then you are just dealing with three sticks pushed together and that, my friends, is not a triangle. Do I have any of my fellow brothers in Mensa here that can give me an Ahmen?

vcelier (74)3 years agoDamn! I am wrong! And a guy with the name of a defeat pointed my mistake! (I am French)

So, what I have just established is that the probability is less than 50%.

L = length of the stick.

If the first point is in the first half, at x between 0 L and 0.5 L, to be able to have a triangle, the second point need to be between 0.5 L and (0.5 + x) L.

I have the feeling that we need to integrate a function, but I an too old and tired for that.

nocturnal (48)3 years agoUnless the job is somehow related to snapping sticks or figuring out arcane algorithms, it doesn't fucking matter.

Unfortunately, as a software developer, I sometimes have to figure out arcane algorithms…

trafalgar (72)3 years agotook me a long time to get it

it's not an easy question

i can't remember the reasoning, but i remember the answer

you don't need calculus for it, but I'm sure if it's strong enough it can help

you can just reasoning it out in your mind, but it's not easy

i don't want to attempt it again

vcelier (74)3 years agoI cheated and found the answer googling "stick 3 part triangle" :

https://www.quora.com/A-rod-is-broken-into-three-parts-what-is-the-probability-that-the-three-parts-can-be-arranged-to-form-a-triangle

The answer is: 25%

trafalgar (72)3 years agohaha yes it is :)

took me a long time thinking it over to get it right

randomness (51)3 years agoYou can still make a triangle...it's just one side would have a longer/running edge beyond the outer limit of the triangle. Granted, it would be a small triangle, but as long as they don't expect each piece to connect exactly at the ends, I think it still qualifies. :-)

trafalgar (72)3 years agohaha :)

orangeshasta (52)3 years agohow thick is the stick tho, gotta think about slenderness ratios.... can only contact at the outter edge of the stick so the perimeter of the triangle would be the interior edges not the centerline.

vcelier (74)3 years agoLol! Let's not complicate things too much!

dlina-v-metrah (57)3 years agoBut a triangle can be made with two parts. Just will not have one wand :)