Random-Order Models

Anupam Gupta, Sahil Singla

Abstract: Beyond the Worst-Case Analysis of Algorithms - January 2021

The survey covers a wide range of problems, from the classic Secretary Problem to complex maximization and network design tasks.

Introduction: The Pessimism of Worst-Case Analysis

In traditional online algorithm analysis, we often assume an all-powerful adversary who chooses both the items in a dataset and the specific order in which they arrive. This approach frequently leads to "impossibility results," where the competitive ratio—the performance gap between an online algorithm and an offline optimal solution—is unacceptably large.

This paper, a preprint for the book Beyond the Worst-Case Analysis of Algorithms, provides a comprehensive survey of Random-Order Models (RO models). The RO model addresses the inherent pessimism of worst-case analysis by assuming that while an adversary may choose the input set, "nature" shuffles the arrival order. This subtle shift allows algorithms to "learn" about the dataset from early arrivals and use that information to make significantly better decisions later.

Core Algorithmic Frameworks

The RO model allows for the design of algorithms that are far more efficient and robust than their worst-case counterparts. The paper categorizes several frameworks used to exploit random ordering:

  • Wait-and-Pick (Thresholding): This is the classic strategy for the "Secretary Problem." The algorithm observes a fraction of the input (e.g., the first $1/e$, approx. 37%) to set a quality threshold and then selects the first item that exceeds it.
  • Order-Oblivious vs. Order-Adaptive Algorithms: Order-oblivious algorithms use a random sample to estimate parameters, while order-adaptive algorithms continuously update their thresholds or internal models as more items arrive, allowing for tighter competitive ratios.
  • Dual Learning for Linear Programs: For complex packing problems like the Online Knapsack, algorithms can learn "shadow prices" (optimal dual variables) on the fly to decide which items to accept.
  • Solve-Ignoring-Past-Decisions: In matching problems, the algorithm periodically re-solves the optimal solution for the items seen so far and attempts to match the current arrival based on that updated optimum.

Key Insights: The Power of Shuffling

A key insight in RO analysis is the Scaling Property: any small, random subsequence of the input is likely a representative sample of the whole. This allows for concentration-of-measure arguments (such as Chernoff bounds) to prove that learned thresholds are likely accurate.

Furthermore, the RO model is more general than the Independent and Identically Distributed (i.i.d.) model. An algorithm that works for RO arrivals automatically works for i.i.d. arrivals, but RO algorithms are more robust because they do not require prior knowledge of the underlying distribution. Randomly shuffling an adversarial input set drastically reduces the power of the adversary, preventing "ascending chain" traps where an algorithm is forced to pick mediocre items early for fear of missing out.

Performance Gains Across Domains

The survey highlights significant improvements in competitive ratios when moving from worst-case to RO models:

  • The Secretary Problem: Confirms the classic $1/e$ (37%) success probability as the best possible.
  • Multiple-Secretary: For picking $k$ items, the competitive ratio improves to $1 - O(\\sqrt{\\log k / k})$, approaching 1 as $k$ grows.
  • Bin Packing: While the worst-case ratio for the "Best Fit" algorithm is 1.7, the RO model improves this to $1.5 + o(1)$.
  • Facility Location: Achieves a constant $O(1)$ competitive ratio in the RO model, compared to a much worse $\\Theta(\\frac{\\log n}{\\log \\log n})$ in the worst case.
  • Steiner Tree: Interestingly, the RO model does not offer significant gains here; the lower bound remains logarithmic, similar to the worst-case scenario.

Limitations and Future Directions

Despite its advantages, the RO model has limitations. Most RO algorithms are fragile to "Byzantine" noise; if an adversary can change the position of even a single item (e.g., placing a high-value item at the very beginning), many learning-based strategies fail. Developing "best-of-both-worlds" algorithms that are robust to slight order-corruption is an active area of research.

Additionally, the Matroid Secretary Problem remains a major open question: can we achieve a constant competitive ratio for any matroid in the RO model? Currently, the best general result is $O(\\log \\log \\text{rank})$. Finally, while theoretically optimal, some RO algorithms require complex anticipatory steps that may be difficult to implement in high-speed online systems.

Summary updated

BibTeX
@inproceedings{gupta2020random,
  author = {Anupam Gupta and Sahil Singla},
  title = {{Random-Order Models}},
  booktitle = {Beyond the Worst-Case Analysis of Algorithms},
  year = {2020},
  url = {https://openreview.net/forum?id=zO-50I07_Sk},
}
Figure