27
$\begingroup$

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?

$\endgroup$
10
  • $\begingroup$ 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. $\endgroup$ Commented May 27, 2022 at 3:54
  • $\begingroup$ @DmitryKamenetsky "When 2 or more ants meet, they turn around". $\endgroup$
    – Eric
    Commented May 27, 2022 at 4:24
  • $\begingroup$ 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. $\endgroup$ Commented May 27, 2022 at 4:26
  • 9
    $\begingroup$ @DmitryKamenetsky The one to his left may catch up, so they both turn around. $\endgroup$
    – Eric
    Commented May 27, 2022 at 4:36
  • 1
    $\begingroup$ @Moti Why does it have to be even? $\endgroup$
    – Eric
    Commented May 27, 2022 at 9:34

2 Answers 2

31
$\begingroup$

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].

$\endgroup$
5
  • 1
    $\begingroup$ Elegant solution! $\endgroup$
    – justhalf
    Commented May 27, 2022 at 10:21
  • $\begingroup$ More generally, any mirrored pattern of four ants where the outer ants are moving more slowly than the inner ants has a finite length. $\endgroup$ Commented May 28, 2022 at 5:58
  • $\begingroup$ @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. $\endgroup$
    – iBug
    Commented May 28, 2022 at 6:05
  • 1
    $\begingroup$ @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. $\endgroup$
    – Carmeister
    Commented May 28, 2022 at 14:21
  • $\begingroup$ 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. $\endgroup$
    – Moti
    Commented Jun 12, 2022 at 0:10
-3
$\begingroup$

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).

$\endgroup$
1
  • $\begingroup$ 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? $\endgroup$ Commented May 29, 2022 at 5:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.