Ants on a metre stick
One hundred ants are placed at arbitrary points of a stick 1 metre long, each facing left or right, and they all walk at 1 cm per second. When two ants meet, both turn around instantly. An ant falls off when it reaches an end of the stick.
Over all starting positions and directions, what is the longest possible time, in seconds, before every ant has fallen off?
Fractions, decimals with at least 3 significant digits, and expressions such as sqrt(2)/2, e^-1 or pi/4.
When two ants meet and turn around, does it look any different from two ants walking through each other?
Forget which ant is which and follow the positions only.
h
s Shown after a correct answer. Revealing it first marks the problem as seen, not solved.
Idea. Two identical ants bouncing off each other look exactly like two ants passing through each other. So the set of positions behaves as if every ant walked straight, ignoring the others.
Step 1: the ghost picture. Swap the labels of two ants every time they meet. Then each label walks in a straight line at 1 cm per second without ever turning. The set of occupied positions is the same in both pictures at every moment.
Step 2: the bound. In the ghost picture, each label leaves the stick after at most 100 cm, that is 100 seconds. So after 100 seconds the stick is empty.
Step 3: it is reached. An ant starting at one end and facing inwards makes its label walk the whole metre: 100 seconds.
So the longest possible time is 100 seconds, however many ants there are.