Unions
Which of the following are equivalence relations? Equality Equivalent +/- error “has the same absolute value” The empty relation (nothing equivalent)
Which of the following are equivalence relations? Equality (yes) Equivalent +/- error (no) “has the same absolute value” (yes) The empty relation (nothing equivalent) (no)
Unions by size create on set containing numbers between 1 and 10 What does find 1 return? 1 2 3 4 5 6 7 8 9 10
Unions by size How will the tree look after Join(2, 4)? 1 2 3 4 5 6 7 8 9 10
Unions by size How will the tree look after Join(2, 4)? What about after Join(2, 6)? 2 1 3 4 5 6 7 8 9 10
Unions by size How will the tree look after Join(2, 6)? What about after Join(2, 8)? 2 1 3 4 5 6 7 8 9 10
Unions by size Why aren’t find and union O(1)? 2 1 3 4 5 6 7 8 9 10
Unions by size What happens after Union(3, 2)? 3 2 1 4 5 6 7 8 9 10
Unions by size What happens after Union(3, 2)? If we made all 2’s children point to 3, what would be the cost? 3 2 1 4 5 6 7 8 9 10
B-Trees Is the following a 3-5 B-Tree? If not, what would the correct tree be? (Assume leaves can have at most 3 keys) 7 8 9 11
B-Trees Not a 3-5 B-Tree Correction 7 8 9 11 8 9 11
B-Trees Is the following a 3-5 B-Tree? If not, what would be the correct tree? (Assume leaves can have at most 3 keys) 7 10 4 5 11 12 8 9
B-Trees What happens if we delete 11? 7 10 4 5 11 12 8 9
B-Trees What happens if we delete 11? 7 10 4 5 12 8 9
B-Trees What happens if we delete 11? 7 4 5 8 9 12