Lune

SODA2026Top-tier venue

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 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.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Nearly Tight Bounds for the Online Sorting Problem cites Online Sorting and Translational Packing of Convex Polygons
  • Nearly Optimal List Labeling cites Online List Labeling: Breaking the log2n Barrier
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. Nearly Tight Bounds for the Online Sorting ProblemYossi Azar, Debmalya Panigrahi, Or VardiSODA 2026

Builds on3

  1. Online List Labeling: Breaking the log2n BarrierMichael A. Bender, Alex Conway, Martin Farach-Colton, Hanna Komlós et al.FOCS 2022 · 10 citations
  2. Online Sorting and Translational Packing of Convex PolygonsAnders Aamand, Mikkel Abrahamsen, Lorenzo Beretta, Linda KleistSODA 2023 · 4 citations
  3. Nearly Optimal List LabelingMichael A. Bender, Alex Conway, Martín Farach-Colton, Hanna Komlós et al.FOCS 2024 · 1 citation

Related papers

  1. Competitive Analysis with a Sample and the Secretary ProblemHaim Kaplan, David Naori, Danny RazSODA 2020 · 26 citations
  2. Online Algorithms for the Santa Claus ProblemMax Springer, MohammadTaghi Hajiaghayi, Debmalya Panigrahi, Mohammad Reza KhaniNeurIPS 2022 · 16 citations
  3. Online Stochastic Matching with Unknown Arrival Order: Beating 0.5 against the Online OptimumEnze Sun, Zhihao Gavin Tang, Yifan WangSTOC 2025 · 1 citation
  4. Minimizing the Sum of Age of Information and Transmission Cost under Stochastic Arrival ModelKumar Saurav, Rahul VazeINFOCOM 2021 · 21 citations
  5. An Improved Algorithm for Online Min-Sum Set CoverMarcin Bienkowski, Marcin MuchaAAAI 2023 · 2 citations
Dusk over the sea between two cliffs drawn in fine vertical lines