- The paper introduces a novel unified bound heap that preprocesses DAGs in O(m) time and sorts items with O(log e(G)) comparisons, meeting information-theoretic lower bounds.
- The methodology employs a multi-level tree structure with leader selection and bulk promotions to unify working set and time-finger bounds for adaptive performance.
- The algorithm computes a topological order of a DAG and leverages the adaptive heap to avoid additional graph traversal, providing instance-optimal sorting under partial information.
Problem Overview and Prior Work
The work addresses Fredman's classic sorting under partial information (SUPI) problem: Given a set X of n items with an unknown linear order L, and a DAG G over X with edges certifying x<Ly, the challenge is to preprocess G to facilitate sorting X using as few comparisons as possible, quantified by the information-theoretic lower bound Ω(loge(G)) where e(G) is the count of linear extensions of n0.
Classical polynomial-time algorithms either incurred suboptimal comparison costs or preprocessing overheads:
- Early results (Fredman, Kahn-Kim) achieved optimal decision tree heights but required exponential-time preprocessing.
- Cardinal et al. provided an n1-preprocessing algorithm with n2 queries and time in the sorting phase.
- The fastest prior approach using van der Hoog and Rutschmann [HoogRutschmann24] reduced preprocessing to n3 (with n4) and optimal n5 queries/time for sorting, assuming the partial order is already transitively closed.
- Haeupler et al. obtained overall n6 time for a DAG input, but the sorting phase included an n7 term, hence not tight for sparse graphs.
The paper resolves the open question of achieving simultaneously optimal n8 preprocessing time and n9 sorting time (number of comparisons and computational time) for SUPI when L0 is given as a DAG.
The Unified Bound Heap Data Structure
At the core of the result is a new heap structure, which supports a novel unified access bound. For a sequence of L1 pushes and pops, where each item L2 is pushed at time L3 and popped at time L4 (if ever), the cost to pop L5 is:
L6
Push is L7 amortized, and the first pop is also L8.
This unifies and strictly strengthens previously studied working set and time-finger bounds in heaps [iacono_improved_2000, elmasry_priority_2012], yielding adaptivity sensitive to both recency and "closeness" in insertion/popping time.
A key technical achievement is the construction of this heap: a nontrivial event as previous work shows that more direct analogues (e.g., using rank in the heap) are impossible without violating other efficiency desiderata [elmasry_priority_2012]. The authors design a multi-level tree structure blending main and index trees, carefully maintaining depth invariants via leader selection and grouping, and using bulk promotions to manage subtree minima efficiently.
Lemma: Any data structure with this unified bound also inherits the working set property, yielding amortized L9 pop time where G0 is the number of pushes since G1's insertion.
The SUPI algorithm (UniTopSort) proceeds in two phases:
- Preprocessing: Compute a topological order of G2 in G3 time.
- Sorting: Iterate over G4 in topological order, pushing each item into the unified bound heap; repeatedly pop items to recover the sorted linear order.
Surprisingly, all graph structure beyond the topological order is only required for preprocessing, with the adaptive heap handling the sorting logic to achieve instance-optimal oracle query counts.
When G5 is so small that G6, i.e., G7 contains a long path (almost sorted), the authors employ a reduction eliminating the G8 additive term: partitioning out the path, sorting the remainder, and then merging in G9 total time. This yields the final result:
Theorem: For any DAG X0 on X1, X2 can be preprocessed in X3 time so that, given X4 extending X5, X6 can be sorted in X7 comparisons and time.
Comparison to Prior SUPI Algorithms
The approach contrasts sharply with prior X8-preprocessing, X9-sorting solutions [haeupler2024fast], which used a different heap strategy guided by dynamic sources—inserting items as they became available and traversing adjacency lists during sorting. The proposed method pushes all items eagerly, leveraging the unified heap adaptivity to avoid further x<Ly0 traversal after topological sorting, and incurs no dependence on x<Ly1 in the sorting phase.
Alternative methods (e.g., using finger search trees [van_der_hoog_simpler_2025], merge/Huffman sort decompositions [cardinal_sorting_2013, HoogRutschmann24]) do not exploit self-adjusting heap dynamics and are structurally incompatible with the discussed optimal x<Ly2 preprocessing and x<Ly3 sorting time guarantees for DAG inputs.
Broader Implications and Future Directions
This result establishes sharp bounds, closing decades-long gaps for SUPI and providing the first heap with the unified bound for adaptivity. The unified bound heap is likely of independent combinatorial and algorithmic interest, with implications for adaptive data structures, instance-optimal algorithms in other domains (e.g., shortest paths [Haeupler24]), and potentially for progress on unified bounds for BSTs (dynamic optimality).
Several open questions are suggested:
- Whether popular candidate structures like smooth heaps [kozma_smooth_2018] or pairing heaps match the unified bound.
- Whether analogous unified bounds can be achieved for BST models, supporting conjectures about splay trees [iacono_alternatives_nodate].
- Extensions to geometric and batch uncertainty models where SUPI-type reductions play a critical role (see, e.g., [van_der_hoog_preprocessing_2019, van_der_hoog_preprocessing_2022]), and whether the adaptive heap framework can accelerate preprocessing-bounded geometric computation after ambiguity is resolved.
Conclusion
The work provides a definitive solution to sorting under partial information for sparse DAGs, synthesizing a new heap structure with superior distribution-sensitive behavior and integrating it into an optimal SUPI algorithm with minimal preprocessing and information-theoretically minimal sorting cost. The techniques open prospects for new adaptive data structures and instance-optimal algorithms far beyond the SUPI setting.
Reference:
"Sorting under Partial Information with Optimal Preprocessing Time via Unified Bound Heaps" (2604.12653)