Table of Contents
Fetching ...

Efficiency of Self-Adjusting Heaps

Corwin Sinnamon, Robert E. Tarjan

TL;DR

This work resolves a long-standing question about self-adjusting heaps by showing that slim and smooth heaps achieve $O(\log n)$ time for delete-min, $O(\log\log n)$ for decrease-key, and $O(1)$ for other operations, with $n$ counting only items eventually deleted. The authors develop a canonical heap framework, introduce time-shifting lemmas, and conduct a nuanced, rank-based analysis across three self-adjusting heap families (multipass pairing, slim, smooth), obtaining tight or near-tight amortized bounds. A key innovation is bounding the total number of deletion links via charges tied to node-rank changes and a detailed accounting of left/right/central links, both in eager and lazy variants. The results significantly improve previous bounds and match lower bounds for slim and smooth heaps (Iacono and Özkan), while establishing near-optimal bounds for multipass pairing heaps and highlighting open gaps (notably for decrease-key in multipass pairing). Overall, the paper advances both the theory and practical understanding of self-adjusting heaps, connecting them to lower bounds and BST dualities, and outlining pathways for further tightening of these bounds.

Abstract

Since the invention of the pairing heap by Fredman, Sedgewick, Sleator, and Tarjan, it has been an open question whether this or any other simple "self-adjusting" heap supports decrease-key operations in $O(\log\log n)$ time, where $n$ is the number of heap items. Using powerful new techniques, we answer this question in the affirmative. We prove that both slim and smooth heaps, recently introduced self-adjusting heaps, support heap operations in the following amortized time bounds: $O(\log n)$ for delete-min and delete, $O(\log\log n)$ for decrease-key, and $O(1)$ for all other heap operations, including insert and meld, where $n$ is the number of heap items that are eventually deleted: Items inserted but never deleted do not count in the bounds. We also analyze the multipass pairing heap, a variant of pairing heaps. For this heap implementation, we obtain the same bounds except for decrease-key, for which our bound is $O(\log\log n \log\log\log n)$, where again items that are never deleted do not count in $n$. Our bounds significantly improve the best previously known bounds for all three data structures. For slim and smooth heaps our bounds are tight, since they match lower bounds of Iacono and Özkan.

Efficiency of Self-Adjusting Heaps

TL;DR

This work resolves a long-standing question about self-adjusting heaps by showing that slim and smooth heaps achieve time for delete-min, for decrease-key, and for other operations, with counting only items eventually deleted. The authors develop a canonical heap framework, introduce time-shifting lemmas, and conduct a nuanced, rank-based analysis across three self-adjusting heap families (multipass pairing, slim, smooth), obtaining tight or near-tight amortized bounds. A key innovation is bounding the total number of deletion links via charges tied to node-rank changes and a detailed accounting of left/right/central links, both in eager and lazy variants. The results significantly improve previous bounds and match lower bounds for slim and smooth heaps (Iacono and Özkan), while establishing near-optimal bounds for multipass pairing heaps and highlighting open gaps (notably for decrease-key in multipass pairing). Overall, the paper advances both the theory and practical understanding of self-adjusting heaps, connecting them to lower bounds and BST dualities, and outlining pathways for further tightening of these bounds.

Abstract

Since the invention of the pairing heap by Fredman, Sedgewick, Sleator, and Tarjan, it has been an open question whether this or any other simple "self-adjusting" heap supports decrease-key operations in time, where is the number of heap items. Using powerful new techniques, we answer this question in the affirmative. We prove that both slim and smooth heaps, recently introduced self-adjusting heaps, support heap operations in the following amortized time bounds: for delete-min and delete, for decrease-key, and for all other heap operations, including insert and meld, where is the number of heap items that are eventually deleted: Items inserted but never deleted do not count in the bounds. We also analyze the multipass pairing heap, a variant of pairing heaps. For this heap implementation, we obtain the same bounds except for decrease-key, for which our bound is , where again items that are never deleted do not count in . Our bounds significantly improve the best previously known bounds for all three data structures. For slim and smooth heaps our bounds are tight, since they match lower bounds of Iacono and Özkan.
Paper Structure (25 sections, 49 theorems, 11 equations, 6 figures, 1 table)

This paper contains 25 sections, 49 theorems, 11 equations, 6 figures, 1 table.

Key Result

Lemma 6.1

In any sequence of heap operations starting with no heaps, the quantity $\lg\lg n$ per k-link is at most $\lg\lg n$ per decrease-key plus $3$ per delete-min.

Figures (6)

  • Figure 1: Linking during delete-min, after the original root is deleted, for the pairing heap (a), multipass pairing heap (b), slim heap (c), and smooth heap (d). The circles represent nodes and the numbers indicate their keys. In (c) and (d), the state of the heap is shown after every two or three links. Smooth heaps do stable links (explained in this section), so the losers of links in (d) are positioned on the left or the right of the winner, according to their relative order before the link.
  • Figure 2: Linking in slim and smooth heaps. In a slim heap, the loser of a link becomes the leftmost child of the winner. In a smooth heap, the loser becomes the leftmost or rightmost child of the winner, depending on whether the link is left or right.
  • Figure 3: An example of a treap formed by leftmost locally maximum linking. Original subtrees of the roots linked are not shown. Symmetric order in the treap is left-to-right order on the root list before any linking.
  • Figure 4: Links crossing a boundary after a delete-min. The dashed links cross the dashed grey boundary and alternate between left and right links. The boundary pictured is the boundary of $v$.
  • Figure 5: An example of the treap formed by a delete-min. Squares denote heavy nodes, circles light nodes. Asterisks indicate anomalous links. Solid links are real, dashed links phantom. Each maximal path of real right links is circled.
  • ...and 1 more figures

Theorems & Definitions (90)

  • Remark 3.1
  • Lemma 6.1
  • proof
  • Lemma 6.2
  • proof
  • Lemma 7.1
  • proof
  • Lemma 7.2
  • proof
  • Corollary 7.3
  • ...and 80 more