URI:
   DIR Return Create A Forum - Home
       ---------------------------------------------------------
       techsuns
  HTML https://techsuns.createaforum.com
       ---------------------------------------------------------
       *****************************************************
   DIR Return to: Puzzles && Algorithms
       *****************************************************
       #Post#: 77--------------------------------------------------
       Ant Problem asked in Microsoft Interview
       By: kpr29 Date: September 8, 2012, 3:53 am
       ---------------------------------------------------------
       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?
       #Post#: 79--------------------------------------------------
       Re: Ant Problem asked in Microsoft Interview
       By: dinesh Date: September 24, 2012, 12:13 am
       ---------------------------------------------------------
       @kp - isn't it 2/8?
       #Post#: 97--------------------------------------------------
       Re: Ant Problem asked in Microsoft Interview
       By: kranthipls Date: November 18, 2012, 3:09 am
       ---------------------------------------------------------
       @Dinesh: How??????????????????
       #Post#: 106--------------------------------------------------
       Re: Ant Problem asked in Microsoft Interview
       By: kpr29 Date: November 18, 2012, 11:19 pm
       ---------------------------------------------------------
       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
       @Majeti: If u got 2/8 by above logic................. hats off
       to u..............
       *****************************************************