About Me

My photo
Northglenn, Colorado, United States
I'm primarily a BI Developer on the Microsoft stack. I do sometimes touch upon other Microsoft stacks ( web development, application development, and sql server development).

Sunday, February 12, 2006

The 3 ants on a triangle problem.

The question:

There are 3 ants at 3 corners of a triangle, they randomly start moving towards another corner. What is the probability that they don't collide?

Now, if I just simply look at the problem, I see that the three ants can simply go clockwise, or counterclockwise together. On the third possibility one ant could go clockwise, another counter clockwise, and the third ant wouldn't matter which way it went. This would be the collision making the answer 2/3, but this is wrong.

So lets take another look at it:

Lets name the ants A, B, C respectively, and to make it easier let 0 represent the ant goes clockwise, and 1 represent the ant goes counter-clockwise. We would end up with these possibilities:

0,0,0 = No Collision
0,0,1 = Collision
0,1,0 = Collision
0,1,1 = Collision
1,0,0 = Collision
1,0,1 = Collision
1,1,0 = Collision
1,1,1 = No Collision

This makes the correct answer of 2/8 = 1/4

Another way of looking at this is via the combinatorics way:
Each of the 3 ants has 2 possibilities, making it 2C1 for each ant. This comes out to 2*2*2 = 8 possibilities, now knowing that there are only 2 good outcomes this makes it 2/8 = 1/4.

No comments: