The Ant Problem

Question: 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?

Answer: So let’s think this through. 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. 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) = 0.5 * 0.5 * 0.5 + 0.5 * 0.5 * 0.5 = 0.25

Liked this post? Please Digg or Stumble it.


Get a free subscription to Oracle magazine published by Oracle Corp.
 Powered by Max Banner Ads 

Related posts:

  1. Probability of a Car Passing By
  2. Chasing Dogs
  3. Pick a Random Byte
  4. 10 Famous Microsoft Interview Puzzles
  5. Boys and Girls
1 Comment

One Response

  1. Dan says:

    another way to find the answer:

    lets assume all three ants are looking towards the center. They will not collide if all of them are moving towards left or towards right. Even if one of the ants starts to move to the other direction there will be a collision. There are the following eight optio
    RRR
    LLL
    RLL
    RLR
    RRL
    LRL
    LRR
    LLR

    The ants will not collide in case of LLL and RRR so the probability of not colliding is:
    2/8 = 0.25

Leave a Reply

Using Gravatars in the comments - get your own and be recognized!

XHTML: These are some of the tags you can use: <a href=""> <b> <blockquote> <code> <em> <i> <strike> <strong>