Lune

FOCS2024Top-tier venue

Naively Sorting Evolving Data is Optimal and Robust

George Giakkoupis, Marcos Kiwi, Dimitrios Los

Abstract

We study comparison sorting in the evolving data model, introduced by Anagnostopoulos, Kumar, Mah-dian and Upfal (2011), where the true total order changes while the sorting algorithm is processing the input. More precisely, each comparison operation of the algorithm is followed by a sequence of evolution steps, where an evolution step perturbs the rank of a random item by a “small” random value. The goal is to maintain an ordering that remains close to the true order over time. Previous works have analyzed adaptations of classic sorting algorithms, assuming that an evolution step changes the rank of an item by just one, and that a fixed constant numberbbof evolution steps take place between two comparisons. In fact, the only previous result achieving optimal linear total deviation, by Besa Vial, Devanny, Eppstein, Goodrich and Johnson (2018a), applies just forb=1b=1. We analyze a very simple sorting algorithm suggested by Mahdian (2014), which samples a random pair of adjacent items in each step and swaps them if they are out of order. We show that the algorithm achieves and maintains, with high probability, optimal total deviation,O(n)O(n), and optimal maximum deviation,O(log⁡n)O(\log n), under very general model settings. Namely, the perturbation introduced by each evolution step is sampled from a general distribution of bounded moment generating function, and we just require that the average number of evolution steps between two sorting steps be bounded by an (arbitrary) constant, where the average is over a linear number of steps. The key ingredients of our proof are a novel potential function argument that inserts “gaps” in the list of items, and a general analysis framework which separates the analysis of sorting from that of the evolution steps, and is applicable to a variety of settings for which previous approaches do not apply. Our results settle conjectures and open problems in the three aforementioned works, and provide theoretical support that simple quadratic algorithms are optimal and robust for sorting evolving data, as empirically observed by Besa Vial, Devanny, Eppstein, Goodrich and Johnson (2018b).

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.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

Builds onCited byLeft to right by year; the more cited, the higher.

Builds on1

  1. Optimal Bounds for Noisy SortingYuzhou Gu, Yinzhan XuSTOC 2023 · 11 citations

Related papers

  1. Sorting and Selection in Rounds with Adversarial ComparisonsChristopher TrevisanSODA 2024
  2. Stochastic and Worst-Case Generalized Sorting RevisitedWilliam Kuszmaul, Shyam NarayananFOCS 2021 · 2 citations
  3. Sorting with PredictionsXingjian Bai, Christian CoesterNeurIPS 2023 · 29 citations
  4. Fast and Simple Sorting Using Partial InformationBernhard Haeupler, Richard Hladík, John Iacono, Václav Rozhon et al.SODA 2025 · 3 citations
  5. Improved Bounds for Fully Dynamic Matching via Ordered Ruzsa-Szemerédi GraphsSepehr Assadi, Sanjeev Khanna, Peter KissSODA 2025 · 2 citations
Dusk over the sea between two cliffs drawn in fine vertical lines