Tight Comparison Bounds for Stable Sorting with Predicted Repetitions and Bounded Lookahead
Abstract
With a strict comparator, verifying takes two comparisons. We study stable sorting under prefix deadlines: the order of the first records must be determined before any record beyond position is compared. An untrusted schedule predicts, for each later record, which of the first records shares its key. Even with correct predictions, schedules with equal label frequencies can require or comparisons. A packing quantity explains this gap: for each label , let be the largest number of its predicted positions pairwise more than apart. With at most wrong predictions and , the optimal worst-case comparison count is for every schedule and lookahead . The lower bound counts deadline-forced cycles in the comparison graph. The algorithm verifies all predicted equalities except for the largest key, whose records it only checks to be nondecreasing; one early new maximum cancels this saving. Without a schedule, a sorter can learn a repeated permutation from the keys; at zero lookahead, one new maximum raises its leading coefficient from to . If each key's successor is predicted from its previous occurrence with mistakes, lookahead suffices for comparisons when , while forces . On two 32,768-record inputs, our implementation is within 3 and 7 comparisons of the optimum.
Create a lesson
Metadata
- Comments
- 18 pages, 3 figures, 4 tables
Related papers
Tight Bounds for Distance-Unbiased Sorting
Shared title terminologycs.DSMats Bierwirth, Carola Doerr, Johannes Lengler
Tight Bounds for Distributed Norm Estimation
Shared title terminologycs.DSDavid P. Woodruff, Shenghao Xie, Samson Zhou
Tight bounds on the sensitivity of LZ77 under k edits
Shared title terminologycs.DSShunsuke Inenaga
Wilber's Funnel Bound Is Not Tight
Shared title terminologycs.DSYang Cao, Haoran Qi, Hanzhi Wang
Tight Lower Bounds for Value-Dynamic Retrieval
Shared title terminologycs.DSYang S. Hu, William Kuszmaul, Jingxun Liang et al.
Almost Tight Bounds for Tree Covers
Shared title terminologycs.DSAsaf Petruschka, Nir Petruschka, Elad Tzalik