Lune

SODA2026Top-tier venue

Nearly Optimal Bounds for Stochastic Online Sorting

Yang Hu

2026Year
1Top-tier citations

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.

Questions to start from

Your agent calls

Luneget_paper_fulltext

Ask in Lune

Free to start. No credit card required.

lune papers fulltext ca005b36-ec6f-46d1-881f-d33069d376d0

Cited by top-tier papers1

Ask how each one uses it

Builds on3

Related papers

Dusk over the sea between two cliffs drawn in fine vertical lines