Answers are grounded in this paper and cite their sources.
Online sorting asks how to place n sequentially arriving elements in an array to minimize the sum of absolute differences between consecutive elements. Fully-dynamic sorting further extends the problem to allow both element insertions and deletions. Without recourse, these problems face strong lower bounds on the competitive ratio: Ω(√n) for online sorting and $Ω(n)$ for fully-dynamic sorting. In sharp contrast, we show that allowing only poly-logarithmic recourse yields at least exponential improvements in the competitive ratio for both problems:(1) Our main algorithmic result is a deterministic fully-dynamic sorting algorithm that is O(log² n)-competitive and has O(log⁴ n) amortized recourse per update. We complement this with a lower bound showing that any deterministic algorithm with any O(polylog(n)) competitive ratio has amortized recourse at least Ω(√log n).(2) For the insertion-only setting, we establish a family of approximation--recourse tradeoffs, including O(loglog n) competitive ratio with O(loglog n) amortized recourse. Given the lower bound in the fully-dynamic case, this result shows that the insertion-only problem yields exponentially better bounds than the fully-dynamic one.(3) Finally, we show that the stronger approximation-recourse tradeoff for the insertion-only case extends to the fully-dynamic setting when the array has (1+ε)n space.
No takes yet. Share an insight, caveat, or question.
Azar et al. (2026) studied this question.
Synapse has enriched 8 closely related papers on similar clinical questions. Consider them for comparative context: