Roughly speaking, the Poincaré recurrence theorem states that, given infinite time, at some point an almost exact replica of a previous state of a system will be reached. This Demonstration has only two possible states in order to reduce computation time. You can cycle through the iterations to see the transition of elements (represented as disks) between the two states.

There is a maximum of 100,000 iterations and 15 elements to ensure that the calculations do not take more than a few seconds.