Alpha And The Rebuild

A scapegoat tree rebuilds the subtree at xx whenever max⁡(∣Tleft∣,∣Tright∣)>α⋅∣Tx∣\max(|T_{left}|, |T_{right}|) > \alpha \cdot |T_x|, with α\alpha around 0.70.7. Rebuilding costs Θ(∣Tx∣)\Theta(|T_x|). How is insert still O(log⁡n)O(\log n)?

A

A node can only become a scapegoat after Ω(∣Tx∣)\Omega(|T_x|) insertions have pushed it out of balance, and each insertion deposits O(1)O(1) credit along its search path. Insert is O(1)O(1) amortized.

B

A node can only become a scapegoat after Ω(∣Tx∣)\Omega(|T_x|) insertions have pushed it out of balance, and each insertion deposits O(log⁡n)O(\log n) credit along its search path. Insert is O(log⁡n)O(\log n) amortized.

C

A node can become a scapegoat after O(log⁡∣Tx∣)O(\log |T_x|) insertions have pushed it out of balance, and each insertion deposits O(log⁡n)O(\log n) credit along its search path. Insert is O(log⁡n)O(\log n) amortized.

D

A node can only become a scapegoat after Ω(∣Tx∣)\Omega(|T_x|) insertions have pushed it out of balance, and each rebuild is spread over the next ∣Tx∣|T_x| operations. Insert is O(log⁡n)O(\log n) worst case.