arrow
Return

Fast and Simple Sorting Using Partial Information

delete2026-05-05
delete0
PRE
AI
B
Bernhard Haeupler
H
Hladik, Richard *
I
Iacono, John
V
Václav Rozhoň
R
Robert E. Tarjan
T
Tetek, Jakub
DOI:10.1007/s00453-026-01387-3delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
We consider the problem of sorting n items, given the outcomes of m pre-existing comparisons. We present a simple and natural deterministic algorithm that runs in O(m+logT)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ extrm{O}(m+\log T)$$\end{document} time and does O(logT)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ extrm{O}(\log T)$$\end{document} comparisons, where T is the number of total orders consistent with the pre-existing comparisons. Our running time and comparison bounds are best possible up to constant factors, thus resolving a problem that has been studied intensely since 1976 (Fredman, Theoretical Computer Science). The best previous algorithm with a bound of O(logT)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ extrm{O}(\log T)$$\end{document} on the number of comparisons has a time bound of O(n2.5)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ extrm{O}(n<^>{2.5})$$\end{document} and is more complicated. Our algorithm combines three classic algorithms: topological sort, heapsort with the right kind of heap, and efficient search in a sorted list. It outputs the items in sorted order one by one. It can be modified to stop early, thereby solving the important and more general top-k sorting problem: Given k and the outcomes of some pre-existing comparisons, output the smallest k items in sorted order. The modified algorithm solves the top-k sorting problem in minimum time and comparisons, to within constant factors.
Keywords:
Sorting under partial information
Partial orders
Topological sort
Working-set heaps

Journal

A
Algorithmica
IF:
0.7
Papers:
56
Citations:
2.7K

Organization

U
University of Sofia
Scholars:
3.1K
Papers: 3.2K
Citations: 0
E
eth zürich
Scholars:
2.4K
Papers: 838
Citations: 1
S
swiss federal institutes of technology domain
Scholars:
9.0W
Papers: 8.0W
Citations: 163
U
universite libre de bruxelles
Scholars:
2.0W
Papers: 1.7W
Citations: 27
researcher View more organizations
Cited Papers

Cited Papers

The pairing heap: A new form of self-adjusting heap
err1986-11-01
err0
PREAI
errMichael L. Fredman; Robert Sedgewick; Daniel D. Sleator; Robert E. Tarjan
errShare
errSave
On the conductance of order Markov chains
err1991-01-01
err0
PREAI
errAlexander Karzanov; Leonid Khachiyan
errShare
errSave
errShare
errSave
Efficiency of Self-Adjusting Heaps
err2025-10-01
err0
PREAI
errSinnamon, Corwin; Tarjan, Robert e.
errShare
errSave
err
IF0
err
err0
PREAI
err
errShare
errSave
errShare
errSave
researcher View more