Ants on a Triangle Puzzle

This is a fun little puzzle I was sent the other day.

On a triangle, each corner has an ant. Each ant starts to move on an edge towards another corner, chosen at random. What is the chance that none of the ants collide?

Can you solve it? I will post my answer on Friday have posted my answer in the comments.

Photo by fdecomite



Share this post:

| More

Previous post:

Next post:



  • Leipaella

    1/4 is the right answer. All the ants must move to the same direction, so it is 1/2 that the second ant goes to right direction and 1/2 that the third.

    By multiplication we get 1/4. :P

  • Scott

    3 ants each with two possible corners yields 8 possibilities of which only 2 have then all going in the same direction. So I say 25%.

  • Ayush Agrawal

    Out of a total of eight possibilities ( 3 ants with 2 choices each ) .. Two result in no collisions , ie , all three ants go clockwise or anti clockwise .. Hence , 1/4 or 25% .

  • http://www.quackbabies.com Aaron

    There is a 50% chance. If the first ant moves clockwise, there is a 50% chance the second ant moves counterclockwise (and collides with the first ant). And I stepped on the third ant.

  • Christina

    In the drawing, though, it looks like the triangle has two sides… do we have to take into account that the ants could be on either the outside or the inside of the triangle?

  • David

    All ants must decide to go in the same direction, either clockwise of counter clockwise.

    Clockwise: 1/2 x 1/2 x 1/2 = 1/8
    Counter: 1/2 x 1/2 x 1/2 = 1/8

    The probability is then: 1/8 + 1/8 = 1/4 = 25%.

  • http://www.mindyourdecisions.com/blog/ Presh Talwalkar

    My Solution: The basic observation is that all ants have to move in the same direction–either clockwise or counter-clockwise.

    This can be deducted inductively: whichever direction ant 1 picks, ant 2 must pick the same direction to avoid a collision, and then ant 3 must do the same thing as well. Thus there are 2 ways they can avoid running into each other.

    As each ant can pick 2 different vertices, there are 2^3 = 8 total possible ways the ants can move.

    The probability is 2/8 = 0.25.

    An interesting extension is to ask what would happen to 4 ants on the vertices of a quadrilateral? Or more generally, if there are n ants on an n-gon.

    The general problem can be readily solved by the same logic as the triangle.

    Again, the ants can only avoid collision if they all move in the same direction–either clockwise or counter-clockwise. So there again are just 2 safe routes the ants can take.

    And again, each ant has the option of picking two different vertices. This means there are 2^n possibilities ways the ants could choose to travel.

    The probability that none of the ants will collide is 2/2^n = 1/2^(n-1).

    For a septagon, the probability that none of the ants will collide is just 1/128 = 0.0078125 is under one percent. The event becomes quite rare for larger polygons though not impossible.

  • http://www.mindyourdecisions.com/blog/ Presh Talwalkar

    And the picture is technically an impossible shape: it is called a Penrose triangle and I just used the image for fun, even though it it not related to the problem at hand.

  • Leipaella

    Presh Talwalkar:

    What about n-polygons, and ants can not only go to nearest corners, but to any corner. What is the chance that ants form 1 or more “circles”.

  • http://sites.google.com/site/cggc00/ Charles Moore

    Leipaella, it sounds like you’re talking about ants on a “fully-connected graph”. I.e. a set of n vertices in which there is a direct edge connecting every pair of vertices. If so, see my paper on this subject at http://sites.google.com/site/cggc00/. It begins with the “ants on a triangle” problem and then generalizes, first to four vertices, then five, then n. In the final section, it places the n-vertex problem in its larger mathematical context.

  • http://www.mindyourdecisions.com/blog/ Presh Talwalkar

    Thanks for the reference Charles–I enjoyed reading about the generalized problem!

  • Leipaella

    Thanks Charles. I was thinking about the k=2 case where ants can cross paths if they dont end up in the same place, because apparently I didnt read the question well enough. :D

    Thanks for the paper. :)

  • http://sites.google.com/site/cggc00/ Charles Moore

    You’re welcome. Glad you both liked the paper.





Previous post:

Next post:

Other posts you may enjoy reading: