English

A Polylogarithmic Competitive Algorithm for Stochastic Online Sorting and TSP

Data Structures and Algorithms 2025-10-02 v2

Abstract

In \emph{Online Sorting}, an array of nn initially empty cells is given. At each time step tt, an element xt[0,1]x_t \in [0,1] arrives and must be placed irrevocably into an empty cell without any knowledge of future arrivals. We aim to minimize the sum of absolute differences between pairs of elements placed in consecutive array cells, seeking an online placement strategy that results in a final array close to a sorted one. An interesting multidimensional generalization, a.k.a. the \emph{Online Travelling Salesperson Problem}, arises when the request sequence consists of points in the dd-dimensional unit cube and the objective is to minimize the sum of euclidean distances between points in consecutive cells. Motivated by the recent work of (Abrahamsen, Bercea, Beretta, Klausen and Kozma; ESA 2024), we consider the \emph{stochastic version} of Online Sorting (\textit{resp.} Online TSP), where each element (\textit{resp.} point) xtx_t is an i.i.d. sample from the uniform distribution on [0,1][0, 1] (\textit{resp.} [0,1]d[0,1]^d). By carefully decomposing the request sequence into a hierarchy of balls-into-bins instances, where the balls to bins ratio is large enough so that bin occupancy is sharply concentrated around its mean and small enough so that we can efficiently deal with the elements placed in the same bin, we obtain an online algorithm that approximates the optimal cost within a factor of O(log2n)O(\log^2 n) with high probability. Our result comprises an exponential improvement on the previously best known competitive ratio of O~(n1/4)\tilde{O}(n^{1/4}) for Stochastic Online Sorting due to (Abrahamsen et al.; ESA 2024) and O(n)O(\sqrt{n}) for (adversarial) Online TSP due to (Bertram, ESA 2025).

Keywords

Cite

@article{arxiv.2509.26073,
  title  = {A Polylogarithmic Competitive Algorithm for Stochastic Online Sorting and TSP},
  author = {Andreas Kalavas and Charalampos Platanos and Thanos Tolias},
  journal= {arXiv preprint arXiv:2509.26073},
  year   = {2025}
}

Comments

This work was intended as a replacement of arXiv:2508.12527 and any subsequent updates will appear there

R2 v1 2026-07-01T06:07:20.905Z