Three ants on a triangle. Will they collide?
The three ants puzzle: an ant on each corner of a triangle picks a direction at random and walks along an edge. What is the probability that no two ants collide? A two-line answer, and a favourite quant screen because the wrong methods look so reasonable.
Three ants sit on the three corners of an equilateral triangle. At the same instant, each ant chooses one of the two edges leaving its corner, uniformly at random and independently of the others, and starts walking along it at the same constant speed. Ants that meet on an edge collide.
What is the probability that no two ants collide?
This is a warm-up at several trading firms precisely because it takes a minute and reveals a habit. Candidates who start computing pairwise collision probabilities, then worry about whether those events are independent, then reach for inclusion-exclusion, are showing a preference for machinery over structure. The problem has almost no machinery in it.
Before the hints: describe, in one sentence, the configurations in which nobody collides. Not the probability, just the shape of the safe outcomes. Once you can say that sentence, the number falls out by counting.
Stuck? Open hints one at a time
Each hint gives away one more layer. Stop the moment something clicks.
Hint 1 a nudge
Two ants collide exactly when they walk along the same edge toward each other. On a triangle, when does an ant's chosen edge have an ant coming the other way?
Hint 2 the key move
Label the directions clockwise and anticlockwise. If any two ants pick different directions, some edge has ants entering from both ends. So safety requires all three to agree. Count the agreeing outcomes out of the total.
The solution
Reveal the full solution
One in four.
Give every ant the same two labels for its choices: clockwise or anticlockwise around the triangle. There are 2 times 2 times 2 equals 8 equally likely outcomes. The ants avoid each other only when all three walk the same way around, either all clockwise or all anticlockwise, because in any other outcome some pair of neighbours has picked directions that put them on the same edge heading toward each other. Two safe outcomes out of eight: probability 2/8, which is 1/4.
The reason pairwise reasoning gets ugly is that collisions are not independent events. If ants A and B collide, that already constrains what C could have done to collide with either of them. Inclusion-exclusion can be made to work, but it is three times the effort for the same answer, and it invites arithmetic slips. Recasting "no collision" as "everyone agrees on orientation" turns the problem into counting two outcomes, and there is nothing left to get wrong.
What this puzzle is really testing
Whether you look for the complementary, global description of an event before decomposing it. "No collisions anywhere" sounds like a conjunction of many local conditions and is actually a single global one. The same move appears constantly in algorithm design: Kadane's algorithm works because "best subarray ending here" is a global invariant that replaces an explicit search over all pairs, and the converging pointers proof is an argument that a local rule never discards the global optimum.
Follow-ups to expect
The same puzzle on a square, then on an n-sided polygon: still only "all clockwise" or "all anticlockwise" are safe, so the probability is 2 divided by 2 to the power n, which is 1 over 2 to the power (n minus 1). On a square that is 1/8. A sharper variant puts the ants on the vertices of a cube, each choosing one of three edges: now the count is a genuine graph problem and the tidy formula disappears, which is exactly what the interviewer wants to watch you handle.