# Numeracy #13: The Ant Triangle Puzzle

Question: Three ants are sitting at the three corners of an equilateral triangle. Each ant randomly picks a direction and starts to move along the edge of the triangle. What is the probability that none of the ants collide?  What is the probability that n ants sitting at n corners wont collide?

Assume that the ants travel at the same speed and there’s no pheromone communication going on. Try to solve the problem yourself or keep reading for the solution.

### Brute force solution

Even if we had zero knowledge of probability theory, we could still map out all the possible outcomes in this scenario. Each ant can either go right (R) or left (L).

Possible outcomes: RRR, RRL, RLR, RLL, LRR, LRL, LLR, and LLL

RRR and LLL are the only outcomes with no collisions.

P(no collision) = Outcomes with no collisions / Total possible outcomes
P(no collision) = 2 / 8
P(no collision) = 25%

### Cleaner solution

Since we know that each ant has a 50% chance of choosing either direction, the probability of them all deciding to go the same direction is given by:

P(all go right) = .50 * .50 * .50 = .125
P(all go left) = .50 * .50 * .50 = .125
P(no collision) = P(all go right) + P(all go left) = 25%

Alternatively, we could have figured out the number of possible outcomes mathematically. Each ant as 2 options and there are 3 ants:

Possible outcomes = 2 * 2 * 2 = 23 = 8
No collision outcomes = 2
P(no collision) = 2 / 8 = 25%

Alternatively, we could have solved for the probability that the ants choose the same direction. The first ant has a 100% chance to choose the right direction (they can go either way). The second ant has a 50% chance of choosing the same direction as the first ant. Same with the third ant:

P(no collision) = 1 * .50 * .50 = 25%

### General solution

Given two options for every ant (go left or go right), we know that the number of possible outcomes will always be the 2 raised to the power of the number of ants:

Possible outcomes = 2n

We also know that no matter how many ants there are, there will always only be 2 outcomes that result in no collisions – all go right or all go left:

P(no collision) = 2 / 2n

We can plug in any number of ants and get the solution. For example, with ten ants there would be a 0.19% chance of no collisions.