27

You can place any positive number of robot ants on a long rod and set each of them to move left or right starting at time $0$. You can set any positive speed for each ant. When 2 or more ants meet, they turn around. When an ant reaches the end it falls off.

Can you place and set the ants in such a way that none of them ever falls off?

justhalf
  • 6,014
  • 2
  • 31
  • 49
Eric
  • 6,488
  • 17
  • 58
  • I must be missing something, but it seems that the answer is trivially "no". This is because you always have the last ant near the end that cannot be saved. – Dmitry Kamenetsky May 27 '22 at 03:54
  • @DmitryKamenetsky "When 2 or more ants meet, they turn around". – Eric May 27 '22 at 04:24
  • Yes I get that. But at some point the last ant will head towards the end. Since he is the last ant there will be nothing to make him turn around and he will fall off. – Dmitry Kamenetsky May 27 '22 at 04:26
  • 9
    @DmitryKamenetsky The one to his left may catch up, so they both turn around. – Eric May 27 '22 at 04:36
  • At least 4 could be placed with each two having same speed. – Moti May 27 '22 at 05:07
  • Actually, since the rod length may be designed to the ant speeds, it seems the number could be infinite. Design a one side limit rod, so I would say there is no limit to the number, but it has to be even. – Moti May 27 '22 at 05:15
  • 1
    @Moti Why does it have to be even? – Eric May 27 '22 at 09:34
  • Solve it for the case that they can fall only on one end and then use symmetry. – Moti May 28 '22 at 16:13
  • @Moti why would doing symmetry preserve the property of the half configuration will only fall on one end? One ant going to the right is a configuration where it can only fall on one end. But the symmetry is still falling to either end. – justhalf May 29 '22 at 10:14
  • The FAST ants meet, when moving inward, at a point that is symmetric. You could cut your rod there to create a one-sided puzzle. – Moti May 30 '22 at 14:59

2 Answers2

31

Yes, you can. One possible arrangement comes with

4 ants

Placement:

Starting positions: -3, 0, 0, 3
Starting speeds: -1, -2, 2, 1

This way they'll all stay on the rod because:

The two "outer" ants turn around at ±6 and ±2, the "inner" ants turn around at a sequence of {±6, 0, ±2, 0}, so these 4 ants never fall out of the range [-6, 6].

JLee
  • 18,202
  • 2
  • 55
  • 172
iBug
  • 3,166
  • 11
  • 28
  • 1
    Elegant solution! – justhalf May 27 '22 at 10:21
  • More generally, any mirrored pattern of four ants where the outer ants are moving more slowly than the inner ants has a finite length. – Arcanist Lupus May 28 '22 at 05:58
  • @ArcanistLupus More generally, any mirrored pattern of an even number of ants, where the second-to-outer ants move more slowly than the outmost ants, is a solution. – iBug May 28 '22 at 06:05
  • 1
    @iBug That won't always work - for example, take the configuration in this answer and add two very slow ants far from the center traveling outward. – Carmeister May 28 '22 at 14:21
  • There are more solutions, all "symmetrical" around a center. Seems that for the specific solution, duplicating groups of two with same pattern and timely placed at the edge of the first four grouping will meet the requirement. Note that each two just to need to meet another two. – Moti Jun 12 '22 at 00:10
-3

Frame challenge answer: you can do it with an arbitrary number of ants, because

the puzzle does not specify the orientation of the rod relative to directions "left" and "right".

Therefore,

if you stand the rod on end so that "left" and "right" produce paths around its circumference then no ant traveling directly right or directly left will ever fall off.

In fact,

the rod does not even need to be perpendicular to the left / right direction. For a wide variety of rod shapes, there are inclination angles that afford leftward and rightward paths that are closed and do not leave the surface of the rod (without relying on the ends of the rod being traversed).

John Bollinger
  • 290
  • 1
  • 5
  • It really depends what we mean by "ant" in the first place. And what does it mean to "fall", are we talking earth gravity or moon gravity? – Lucas Mumbo May 29 '22 at 05:55