Nearly Optimal Bounds for Stochastic Online Sorting
Abstract
In the online sorting problem, we have an array A of n cells, and receive a stream of n items x1, . . . , xn ∈ [0, 1]. When an item arrives, we need to immediately and irrevocably place it into an empty cell. The goal is to minimize the sum of absolute differences between adjacent items, which is called the cost of the algorithm. It has been shown by Aamand, Abrahamsen, Beretta, and Kleist (SODA 2023) that when the stream x1, . . . , xn is generated adversarially, the optimal cost bound for any deterministic algorithm is Θ( √ n). In this paper, we study the stochastic version of online sorting, where the input items x1, . . . , xn are sampled uniformly at random. Despite the intuition that the stochastic version should yield much better cost bounds, the previous best algorithm for stochastic online sorting by Abrahamsen, Bercea, Beretta, Klausen and Kozma (ESA 2024) only achieves O(n 1/4 ) cost, which seems far from optimal. We show that stochastic online sorting indeed allows for much more efficient algorithms, by presenting an algorithm that achieves expected cost log n • 2 O(log * n) . We also prove a cost lower bound of Ω(log n), thus show that our algorithm is nearly optimal.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
1 top-tier paper has cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
Cited by top-tier papers1
Builds on3
- Online List Labeling: Breaking the log2n BarrierMichael A. Bender, Alex Conway, Martin Farach-Colton, Hanna Komlós et al.FOCS 2022 · 10 citations
- Online Sorting and Translational Packing of Convex PolygonsAnders Aamand, Mikkel Abrahamsen, Lorenzo Beretta, Linda KleistSODA 2023 · 4 citations
- Nearly Optimal List LabelingMichael A. Bender, Alex Conway, Martín Farach-Colton, Hanna Komlós et al.FOCS 2024 · 1 citation
Related papers
- Competitive Analysis with a Sample and the Secretary ProblemHaim Kaplan, David Naori, Danny RazSODA 2020 · 26 citations
- Online Algorithms for the Santa Claus ProblemMax Springer, MohammadTaghi Hajiaghayi, Debmalya Panigrahi, Mohammad Reza KhaniNeurIPS 2022 · 16 citations
- Online Stochastic Matching with Unknown Arrival Order: Beating 0.5 against the Online OptimumEnze Sun, Zhihao Gavin Tang, Yifan WangSTOC 2025 · 1 citation
- Minimizing the Sum of Age of Information and Transmission Cost under Stochastic Arrival ModelKumar Saurav, Rahul VazeINFOCOM 2021 · 21 citations
- An Improved Algorithm for Online Min-Sum Set CoverMarcin Bienkowski, Marcin MuchaAAAI 2023 · 2 citations
