Simpler Optimal Sorting from a Directed Acyclic Graph
Abstract
Fredman proposed in 1976 the following algorithmic problem: Given are a ground set , some partial order over , and some comparison oracle that specifies a linear order over that extends . A query to has as input distinct and outputs whether or vice versa. If we denote by the number of linear extensions of , then is a worst-case lower bound on the number of queries needed to output the sorted order of . Fredman did not specify in what form the partial order is given. Haeupler, Hlad\'ik, Iacono, Rozhon, Tarjan, and T\v{e}tek ('24) propose to assume as input a directed acyclic graph, , with edges and vertices. Denote by the partial order induced by . Algorithmic performance is measured in running time and the number of queries used, where they use time and queries to output in its sorted order. Their algorithm is worst-case optimal in terms of running time and queries, both. Their algorithm combines topological sorting with heapsort. Their analysis relies upon sophisticated counting arguments using entropy, recursively defined sets defined over the run of their algorithm, and vertices in the graph that they identify as bottlenecks for sorting. In this paper, we do away with sophistication. We show that when the input is a directed acyclic graph then the problem admits a simple solution using time and queries. Especially our proofs are much simpler as we avoid the usage of advanced charging arguments and data structures, and instead rely upon two brief observations.
Cite
@article{arxiv.2407.21591,
title = {Simpler Optimal Sorting from a Directed Acyclic Graph},
author = {Ivor van der Hoog and Eva Rotenberg and Daniel Rutschmann},
journal= {arXiv preprint arXiv:2407.21591},
year = {2026}
}