"What to Do With Two Lanes?": Optimal Physical Sorting of Mobile Vehicles

Dmitry Rabinovich, Michael AmirarXiv 2021

Abstract

Given a collection of red and blue mobile agents located on two grid rows, we seek to move all the blue agents to the far left side and all the red agents to the far right side, thus physically sorting them according to color. The agents all start on the bottom row. They move simultaneously at discrete time steps and must not collide. Our goal is to design a centralized algorithm that controls the agents so as to sort them in the least number of time steps. We derive an exact lower bound on the amount of time any algorithm requires to sort a given initial configuration of agents. We find an instance optimal algorithm that provably matches this lower bound, attaining the best possible sorting time for any initial configuration. Surprisingly, we find that whenever the leftmost agent is red and the rightmost agent is blue, a straightforward decentralized and local sensing-based algorithm is at most 1 time step slower than the centralized instance-optimal algorithm.

Introduction: The Physical Sorting Challenge

Imagine a fleet of autonomous vehicles on a two-lane freeway. Some need to exit on the left, others on the right. Initially, they are all bunched up in a single lane in a random order. To get to their respective exits, they must "sort" themselves by color (direction) without colliding. This is a classic problem in physical sorting. Unlike sorting bits in a computer's memory, physical agents occupy space. They cannot move through each other, and their movements are constrained by the geometry of the environment—in this case, a 2xM grid.

Initial configuration (a) and a partially sorted state (b) of red and blue agents on a two-lane grid.

The challenge is to find a "makespan-optimal" algorithm: a set of instructions that moves every agent to its destination in the fewest possible discrete time steps.

Methods: Identifying the Bottlenecks

The researchers approached the problem by first defining a mathematical lower bound—the absolute minimum time any algorithm would need to sort a given configuration. They identified "critical agents"—specific individuals whose starting positions and surrounding traffic make them the bottleneck for the entire group.

The paper introduces two primary algorithms:

  1. Algorithm 5.1 (Centralized): Designed for "normal" configurations where the leftmost agent is red (moving right) and the rightmost is blue (moving left). It calculates which color has the most "critical" agents and keeps them on the bottom row while moving the other color to the top row to act as a passing lane.
  2. Algorithm 6.1 (General): An extension that handles "non-normal" configurations by splitting agents into sub-groups and using an "alternating row split" strategy for agents that don't necessarily need to pass anyone to reach their goal.
A time-series (t=0 to t=4) showing the optimal sorting of agents using the top row as a passing lane.

Key Insights: The "Plus One" Phenomenon

A major discovery in this work is that the lower bound isn't just about the distance an agent needs to travel. Sometimes, a "plus 1" time step (denoted as $\mathcal{V}$) is unavoidable if critical agents of both colors exist or if an agent is immediately blocked by another.

One of the most surprising findings is the efficiency of decentralized strategies. A "trivial" local strategy—where blue agents simply move to the top row and everyone moves toward their goal whenever a space opens up—is at most one time step slower than the centralized optimal algorithm. This suggests that for many real-world traffic scenarios, complex global coordination might not be strictly necessary to achieve near-optimal throughput.

Results and Theoretical Connections

The paper proves that the exact lower bound for sorting is $f_{max} + \mathcal{V}$, where $f_{max}$ is a function of the agent's "front" (empty spaces/opposing agents ahead) and "back" (same-colored agents behind). Their general algorithm (6.1) is proven to be instance-optimal, meaning it achieves this lower bound for every possible starting configuration.

Furthermore, the work links this robotics problem to the Totally Asymmetric Simple Exclusion Process (TASEP) from statistical mechanics. TASEP is a model used to study traffic flow and biological translation. The researchers provide a new corollary that calculates the exact time for a "traffic jam" to clear in a TASEP model, bridging the gap between discrete algorithmic sorting and continuous physical flow models.

Conclusion and Future Directions

While this research solves the two-lane case, it opens several doors for future study. Real-world traffic involves more than two lanes, where agents have more degrees of freedom to bypass each other. Additionally, future models could incorporate multiple destinations (more than two colors), variable vehicle velocities (acceleration and top speeds), and arbitrary starting positions across all available lanes.

Summary updated

BibTeX
@misc{rabinovich2021what,
  author = {Dmitry Rabinovich and Michael Amir},
  title = {{"What to Do With Two Lanes?": Optimal Physical Sorting of Mobile Vehicles}},
  year = {2021},
  eprint = {2111.06284},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2111.06284},
}
Figure