Improved online algorithms for the sorting buffer problem on line metrics

Iftah Gamzu, Danny Segev

Research output: Contribution to journalArticlepeer-review


An instance of the sorting buffer problem consists of a metric space and a server, equipped with a finite-capacity buffer capable of holding a limited number of requests. An additional ingredient of the input is an online sequence of requests, each of which is characterized by a destination in the given metric space; whenever a request arrives, it must be stored in the sorting buffer. At any point in time, a currently pending request can be served by drawing it out of the buffer and moving the server to its corresponding destination. The objective is to serve all input requests in a way that minimizes the total distance traveled by the server. In this article, we focus our attention on instances of the problem in which the underlying metric is either an evenly-spaced line metric or a continuous line metric. Our main findings can be briefly summarized as follows. (1) We present a deterministic O(log n)-competitive algorithm for n-point evenly-spaced line metrics. This result improves on a randomized O(log2 n)-competitive algorithm due to Khandekar and Pandit [2006b]. It also refutes their conjecture, stating that a deterministic strategy is unlikely to obtain a nontrivial competitive ratio. (2) We devise a deterministic O(log N log log N)-competitive algorithm for continuous line metrics, where N denotes the length of the input sequence. In this context, we introduce a novel discretization technique of independent interest. (3) We establish the first nontrivial lower bound for the evenly-spaced case, by proving that the competitive ratio of any deterministic algorithm is at least 2+ √3/√3 ≈ 2.154. This result settles, to some extent, an open question due to Khandekar and Pandit [2006b], who posed the task of attaining lower bounds on the achievable competitive ratio as a foundational objective for future research.

Original languageEnglish
Article number15
JournalACM Transactions on Algorithms
Issue number1
StatePublished - 1 Dec 2009
Externally publishedYes


  • Disk scheduling
  • Line metrics
  • Online algorithms
  • Sorting buffer

ASJC Scopus subject areas

  • Mathematics (miscellaneous)


Dive into the research topics of 'Improved online algorithms for the sorting buffer problem on line metrics'. Together they form a unique fingerprint.

Cite this