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:
51
Citations:
2.7K

Organization

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