,
Gerth Stølting Brodal
,
John Iacono
,
László Kozma
,
Debmalya Panigrahi
Creative Commons Attribution 4.0 International license
The online sorting problem is a natural online analog of classical sorting: n elements arrive one by one and must be placed irrevocably into an array of size n so as to minimize the sum of absolute differences between consecutive elements. Recent work by Aamand et al. [SODA 2023] and Abrahamsen et al. [ESA 2024] showed that the optimal competitive ratio for this problem is Θ(√n), even when randomization is allowed. Bertram [ESA 2025] extended this bound to the online traveling salesman problem (TSP), of which online sorting is a special case on the line metric. These polynomial bounds raise the question of whether additional information can lead to improved performance. In this paper, we initiate the study of online sorting and TSP in the framework of machine-learned predictions. We characterize the exact tradeoff between consistency and robustness for online sorting with predictions, and prove a surprising lower bound showing that robustness is not lossless in this setting. This phenomenon sets online sorting apart from most previously studied online problems with predictions. We extend our results to online TSP with predictions on general metric spaces, where the same consistency-robustness tradeoff persists. Finally, we present a sharp contrast in the case of online TSP on the uniform metric. While Abrahamsen et al. gave an O(log n)-competitive algorithm without predictions for the uniform metric, we show that predictions enable an algorithm that is simultaneously O(1)-consistent and O(log n)-robust. We further extend this result to the setting of multiple predictions.
@InProceedings{bercea_et_al:LIPIcs.ESA.2026.78,
author = {Bercea, Ioana O. and Brodal, Gerth St{\o}lting and Iacono, John and Kozma, L\'{a}szl\'{o} and Panigrahi, Debmalya},
title = {{Learning-Augmented Online Sorting and TSP}},
booktitle = {34th Annual European Symposium on Algorithms (ESA 2026)},
pages = {78:1--78:23},
series = {Leibniz International Proceedings in Informatics (LIPIcs)},
ISBN = {978-3-95977-445-1},
ISSN = {1868-8969},
year = {2026},
volume = {388},
editor = {Bille, Philip and Pettie, Seth and Storandt, Sabine},
publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
address = {Dagstuhl, Germany},
URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ESA.2026.78},
URN = {urn:nbn:de:0030-drops-272145},
doi = {10.4230/LIPIcs.ESA.2026.78},
annote = {Keywords: Online sorting, online traveling salesman problem, learned predictions}
}