TL;DR
Online algorithms usually live in one of two worlds: a paranoid nightmare where an adversary hand-picks the exact worst sequence of inputs, or a sunny utopia where everything arrives in a completely random order. This paper builds a realistic bridge between the two—the Online with a Random Sample (ORS) model—where just a small, random fraction of the input arrives randomly at the very start before an adversary takes over the rest. Even with the algorithm forced to make live, irrevocable decisions from step one, that tiny random prefix provides surprising leverage, rescuing classic optimization problems from worst-case doom.
What Problem Does This Paper Address?
In online computation, data arrives piece by piece, and you have to make permanent decisions on the fly without knowing the future. To grade these algorithms, computer scientists compare their performance to an all-knowing offline optimal solution—a metric called the competitive ratio.
Traditionally, we assume an adversary designs both the data and its arrival order to trip us up. This worst-case mindset often yields overly bleak guarantees (for instance, in the classic "secretary problem," where you want to hire the single best candidate out of $n$ applicants, an adversarial order gives you a competitive ratio of zero). Assuming a Random-Order (RO) arrival fixes this, bumping your odds up to $1/e$ ($\approx 37\%$), but pure randomness rarely reflects messy reality.
Previously, researchers proposed the Adversarial Order with a Sample (AOS) model, which hands the algorithm a random $p$-fraction of the data upfront, offline, as "free" training data before the real game begins on the remaining elements.
The authors ask a sharper, more realistic question: What if you don't get an offline freebie? In real-world ad auctions, job schedulers, or fraud detection, early traffic might naturally represent the broader population before budgets run low or attackers adapt and turn the stream adversarial. Yet, you still have to make live decisions on that early traffic, and you are judged on your performance across the entire dataset. That is the ORS model.
Methods
In the ORS model, an adversary picks $n$ items. Nature grabs a random sample $S$ of size $pn$ and feeds it to the algorithm in a uniformly random order. Watching how the algorithm reacts, the adversary then arranges the remaining $(1-p)n$ items in the worst possible order.
The authors design and analyze algorithms for three canonical problems in this setting:
- The Secretary Problem: They adapt the classic "wait-and-pick" strategy. The algorithm observes and rejects the first $k = \lfloor pne^{-p} \rfloor$ items (strictly inside the random sample) to set a high-water mark, then picks the very first subsequent item that beats it. To prove no cleverer algorithm could beat this, they construct a novel primal-dual Linear Programming (LP) framework.
- The $(k, 1)$-Secretary Problem: Here, you can pick up to $k$ items, aiming to maximize the single best item in your chosen set. Inspired by existing continuous LP approaches, the authors divide the random sample into $k$ time intervals with gradually increasing selection budgets. They use dynamic programming to compute exact selection probabilities and numerically optimize the time thresholds using the Nelder–Mead method.
- Online Facility Location: Points arrive in a metric space, and you must pay either to open a new facility or connect points to existing ones. During the random-sample prefix, the authors run Meyerson’s classic randomized algorithm—but in a distorted, $1/p$-scaled metric space (making the algorithm $1/p$ times more hesitant to open facilities early on). Once the adversarial phase begins, it switches to standard Meyerson’s algorithm, warm-started with the facilities already opened.
Datasets
Not discussed in the paper. As a theoretical computer science paper, there are no empirical datasets; instead, the authors run numerical optimizations (with $n$ up to $10,000$) to compute exact theoretical bounds and time thresholds for the $(k,1)$-secretary problem.
Key Insights and Ideas
- A tiny random prefix goes a long way: Performance improvements are concave with respect to the sample fraction $p$. You don't need half the stream to be random to get half the benefits; the steepest gains happen at very small sample sizes.
- Online randomness can beat offline previews: Surprisingly, ORS and the offline-sample AOS model are mathematically incomparable—neither is strictly easier. For instance, in the secretary problem, actually playing the random-order prefix online in ORS yields a strictly better competitive ratio ($pe^{-p}$) for all $p$ than getting that exact same sample handed to you offline in AOS (where items in the sample cannot be selected)!
- Precious samples demand patience: In the $(k,1)$-secretary numerical experiments, when the random sample $p$ is small, the algorithm spends a much larger proportion of that sample purely observing and rejecting items to calibrate its standards before committing to choices.
Key Results
- Secretary Problem: Achieved an asymptotically optimal competitive ratio of $pe^{-p} - O(1/n)$, smoothly interpolating between adversarial ($0$ at $p=0$) and random-order ($1/e$ at $p=1$).
- $(k, 1)$-Secretary Problem: Derived a concrete competitive ratio lower bound. At $k=4$, having just $30\%$ of the input arrive randomly ($p=0.3$) captures over $77\%$ of the full random-order guarantee ($0.633$ vs. $0.823$). At $p=1$ (with $n=10,000$), their discrete bounds match known asymptotic optimal constants across $k \in \{1, \dots, 6\}$ within a gap of $7.9 \times 10^{-5}$.
- Facility Location: Achieved an $O(\log(1/p))$-competitive algorithm, cleanly bridging the $O(1)$ random-order bound and the $\Omega(\log n / \log \log n)$ adversarial lower bound.
Limitations and Future Work
- Missing Upper Bound: While the authors conjecture their $(k,1)$-secretary algorithm is optimal for any $p$, they only prove a lower bound on its performance; extending primal-dual LP techniques to prove matching optimality remains an open problem.
- Known Parameters: The algorithms assume advance knowledge of the total input length $n$ and the sample fraction $p$.
- Strict Two-Phase Structure: The ORS model assumes all random arrivals happen cleanly at the beginning. Investigating more general interleavings of random and adversarial arrivals—without losing the strong competitive guarantees—is left for future exploration.
Summary updated