Welcome Message

Hi, welcome to my website. This is a place where you can get all the questions, puzzles, algorithms asked in interviews and their solutions. Feel free to contact me if you have any queries / suggestions and please leave your valuable comments.. Thanks for visiting -Pragya.

August 25, 2009

Three ants puzzle

There are three ants at the three corners of a regular
triangle. Each ant starts moving on a straight line toward
another, randomly chosen corner. What is the probability
that none of the ants collide?
2 comments:

Anonymous said...

25%. From the ant's perspective each can go left or right. There are 8 poss combinations - LLL, LLR, LRL, RLL, LRR, RLR, RRL, and RRR. You can also work that out by raising 2 (the number of choices) to the power of 3 (the number of choosers) = 2 x 2 x 2 = 8. In only 2 of these cases (LLL and RRR will there be no collisions, so 2 / 8 = 0.25

Secret Squïrrel
March 9, 2008 6:34 AM
Neeraj said...

There are two directions tomove for each ant
Thus total 2x2x2 =8 movements in different directions
out of these only two result in non - collisions of any of the ant - either all clockwise or all counter clockwise
Thus rest 6 result in at leaat 1 collission.
Thus probablility of non collision = 2/8=1/4=0.25


Reference : http://puzzles4you.blogspot.com/2008/03/three-ants.html

No comments: