Ants


This is a simulation of a math problem involving ants walking in a circular path. When ants collide they reverse directions. The circle they travel on is one unit in circumference. Ants travel at a speed of one unit of distance per unit time. The goal of the problem is to find the final position of the ants after one unit of time.

In the process of discovering the solution one will find that after one unit time every ant will occupy one of the initial positions occupied by the ants at the start of the simulation. The problem is then to solve for the permutation of the ants at the end of the simulation.