Ants on a Triangle — Puzzle for Interview rounds

Question :

There are three ants on a triangle, one at each corner.
At a given moment in time, they all set off for a corner at random.
What is the probability that they don’t collide?

Solution :

Let the three ants are a, b, c.
There are two cases when they will not collide, the one is when they all move clockwise and the other is when they all move anticlockwise.
They will collide if any two ants move towards each other, at the same time the third ant can move in clockwise or in anticlockwise. so for each pair there are 2 such cases. And there are 3 pairs possible (a,b), (b,c) and (c,a). So total 3*2 = 6 cases when they will collide.
So probability that they will not collide is 2/(2+6) i.e. 1/4

Thanks for Reading

Placewit grows the best engineers by providing an interactive classroom experience and by helping them develop their skills and get placed in amazing companies.

Learn more at Placewit. Follow us on Instagram and Facebook for daily learning.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store