Professional Documents
Culture Documents
Lec 47
Lec 47
4 9
15 20
1 3 5 6 8 10 13 16 17 30 40
Insert 14.
Insert 2.
Insert 18.
Worst-Case Disk Accesses
2 4 15 20
1 3 5 6 9 16 17 30 40
2 4 15 20
1 3 5 6 9 16 17 30 40
2 4 15 20
1 3 5 6 9 17 30 40
2 4 15 30
1 3 5 6 9 20 40
2 4 15
1 3 5 6 9 30 40
2 4 15
1 3 5 6 9 40
2 5 15
1 4 6 9 40
2 15
1 4 5 9 40
1 4 5 9 15
2 8
1 4 5 9 15
2 8
1 4 5 9 15
• Height reduces by 1.
Delete A Pair
• Deletion from interior node is transformed into
a deletion from a leaf node.
• Deficient leaf triggers bottom-up borrowing
and node combining pass.
• Deficient node is combined with an adjacent
sibling who has exactly ceil(m/2) – 1 pairs.
• After combining, the node has [ceil(m/2) – 2]
(original pairs) + [ceil(m/2) – 1] (sibling pairs)
+ 1 (from parent) <= m –1 pairs.
Disk Accesses
7 12
4 9
15 20
3 5 6 8 10 13 16 17 30 40
Minimum.
Borrow.
Combine.
Worst-Case Disk Accesses
m a 0 p1 a1 p2 a 2 … pm a m