Nearly Optimal Bounds for Stochastic Online Sorting
Yang Hu
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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext ca005b36-ec6f-46d1-881f-d33069d376d0Cited by top-tier papers1
Ask how each one uses itBuilds 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
