3 Ants and Triangle Puzzle

Three ants are sitting at the three corners of an equilateral triangle. Each ant starts randomly picks a direction and starts to move along the edge of the triangle. What is the probability that none of the ants collide? Now find the same for n vertex polygon with n ants.

solution :

Every Ant can move in 2 possible directions , Backward  ( B )  and Forward ( F ).
for 3 ants we have 2^(3) combination of moves,so the whole sample space consists of 8 choices.

F F B
F F F
F B B
F B F
B F B
B F F
B B B
B B F

here out 8 only 2 , namely BBB and FFF are no collision choices. 
so probability of not colliding is 2 /8 = 1/4=0.25

think in this way:

how can you avoid collision ?

The ants can only avoid a collision if they all decide to move in the same direction (either clockwise or anti-clockwise). If the ants do not pick the same direction, there will definitely be a collision.

1) all move in clockwise direction



2) move in anti-clockwise direction






Therefore  we have only 2 ways to avoid collision irrespective of shape and no of ant. 


how to find probability for n vertex polygon with n ants ?


As we know Every Ant can move in 2 possible directions , backward and forward .Therefore we have 2^(n) combination of moves.but only two will avoid collision (when all move in either clockwise or ant-clockwise direction )
hence probability of not colliding is 2/ 2^(n)
and probability of colliding is 1-2/ 2^(n)
example:pentagon 
pentagon has five vertices so n is 5
probability of not colliding = 2/ 2^(n)=2/2^(5)=2/32=1/16
probability of colliding = 1-2/ 2^(n)=1-2/2^(5)=1-2/32=1-1/16=15/16

Here another way to watch same problem...

As we know Each ant has the option to either move clockwise or anti-clockwise. There is a one in two chance that an ant decides to pick a particular direction. Using simple probability calculations, we can determine the probability of no collision.

P(No collision) = P(All ants go in a clockwise direction) + P( All ants go in an anti-clockwise direction)
P(No collision)= 0.5 * 0.5 * 0.5 + 0.5 * 0.5 * 0.5 = 0.25

let's generalize this for  n vertex polygon with n ants

P(No collision) = P(All ants go in a clockwise direction) + P( All ants go in an anti-clockwise direction)
P(No collision)=(0.5)^n + (0.5)^n
P(No collision)=2*(0.5)^n
P(No collision)=1-2*(0.5)^n

example:pentagon 
pentagon has five vertices so n is 5
probability of not colliding = 2*(0.5)^5=0.0625
probability of colliding = 1-2*(0.5)^5=0.9375

i know both are same and after simplifying them final formula is 1/2^(n-1) &1-1/2^(n-1) for No collision & collision resp.

0 comments: