Table of Contents
Fetching ...

Efficient top-down updates in AVL trees

Vincent Jugé

TL;DR

This work proposes an algorithm that answers two major open questions about rebalancing operations about rebalancing operations: can these operations be performed top-down (with a fixed look-ahead), and can they use an amortised constant number of write operations per update?

Abstract

Since AVL trees were invented in 1962, two major open questions about rebalancing operations, which found positive answers in other balanced binary search trees, were left open: can these operations be performed top-down (with a fixed look-ahead), and can they use an amortised constant number of write operations per update? We propose an algorithm that answers both questions positively.

Efficient top-down updates in AVL trees

TL;DR

This work proposes an algorithm that answers two major open questions about rebalancing operations about rebalancing operations: can these operations be performed top-down (with a fixed look-ahead), and can they use an amortised constant number of write operations per update?

Abstract

Since AVL trees were invented in 1962, two major open questions about rebalancing operations, which found positive answers in other balanced binary search trees, were left open: can these operations be performed top-down (with a fixed look-ahead), and can they use an amortised constant number of write operations per update? We propose an algorithm that answers both questions positively.

Paper Structure

This paper contains 20 sections, 6 figures, 1 table.

Figures (6)

  • Figure 1: Eliminating or propagating upward a (thick, red-painted) zero-edge of rank $\sfr$ when $\delta_{11} = 1$ and $\delta_2 = 2$ (row 1), or $\delta_{11} = \delta_2 = 2$ (row 2, left), or $\delta_2 = 1$ (row 2, right). Each black octagon labelled $i$ represents the root of the sub-tree $\calT^i$; each white circle labelled $i$ represents the cut ancestor $a^i$. After the cut rebalancing operation has taken place, the rank of a node $a^i$ is defined as the smallest integer larger than the ranks of its children. Below each node $z$ is written the rank difference $\sfr - \sfr(z)$; when two rank differences $\delta$ and $\delta'$ are possible, we just write $\delta:\delta'$.
  • Figure 2: Eliminating or increasing the rank of a (thick, red-painted) four-node when $\delta_{11} = 2$ and $\delta_2 = 3$ (row 1), or $\delta_{11} = \delta_2 = 3$ (row 2, left), or $\delta_1 = \delta_2 = 2$ (row 2, right).
  • Figure 3: Applying operations $\sfC\sfR_1$ (row 1, left), $\sfC\sfR_2$ (row 1, right), $\sfC\sfR_3$ (row 2), $\sfC\sfR_4$ (row 4) and $\sfC\sfR_5$ (row 5) on $3$- and $4$-cuts of a tree of rank $\sfr$. Each green (resp., blue, red) area contains at least one node of rank $\sfr-2$ (resp., $\sfr-3$, $\sfr-4$).
  • Figure 4: Applying operation $\sfC\sfR_6$ to the $4$-cut of a tree of rank $\sfr$, in case $\sfs(0) = \sfs(2) = 1$ and $\sfs(1) = 2$.
  • Figure 5: Making $y$ descend from a (blue-painted) del-safe node in case (iii.c) (row 1, left); in case (v.b) (row 1, right); in case (iv), when $\sfr(\calU^3) = \sfr-5$ (row 2, left) or $\sfr(\calU^3) = \sfr-4$ (row 2, right) or $y$ descends from $\calT^2$ or $\calT^3$ (row 3, left); in case (vii) (row 3, right) ; or transforming $\calT$ into a tree with ordered profile $(2,5,5,5,5,2)$ (row 3, centre) in case (vi). Each red area contains a node of rank $\sfh-4$.
  • ...and 1 more figures