Problem

Source: APMO 2009 Q.5

Tags: algorithm, number theory, relatively prime, combinatorics



Larry and Rob are two robots travelling in one car from Argovia to Zillis. Both robots have control over the steering and steer according to the following algorithm: Larry makes a 90 degrees left turn after every $ \ell$ kilometer driving from start, Rob makes a 90 degrees right turn after every $ r$ kilometer driving from start, where $ \ell$ and $ r$ are relatively prime positive integers. In the event of both turns occurring simultaneously, the car will keep going without changing direction. Assume that the ground is flat and the car can move in any direction. Let the car start from Argovia facing towards Zillis. For which choices of the pair ($ \ell$, $ r$) is the car guaranteed to reach Zillis, regardless of how far it is from Argovia?