liveBook · Manning

Node merge

As explained in Advanced Algorithms and Data Structures

A node merge combines an underfull tree node with one of its sibling nodes and updates their parent structure.

A node merge repairs a tree after deletion makes a node smaller than the minimum entry count by combining it with an adjacent sibling. The parent then replaces both children with their merged result, preserving the tree’s structural invariants. section 10.2.2 section 10.3.5

An implementation follows these operations:

  • Check that both nodes are leaves or both are internal nodes; merging unlike node types is rejected. section 10.3.5
  • Combine leaf point collections or internal child collections into a new node. section 10.3.5
  • Remove the original children from the parent and add the merged child in their place. section 10.3.5

Deletion in an SS-tree

A deletion can trigger cases involving borrowing and merging. After the merge, the tree remains valid, but a resulting bounding sphere may occupy most of its parent’s envelope and overlap sibling regions, potentially degrading balance and search performance. section 10.3.5

Figure 10.19 Deleting a point. This example shows, in order, cases 2(c), 2(b), and 1 described in this section.

Trace the deletion sequence through cases 2(c), 2(b), and 1, including the final merged-tree geometry. section 10.3.5

How Advanced Algorithms and Data Structures covers it

How deep it goes
Explains merge construction and parent replacement in pseudocode, but defers improved balancing to SS+-trees.
Examples
Uses an SS-tree deletion sequence showing borrowing, merging, and a resulting oversized overlapping bounding sphere.
What it assumes
Assumes tree nodes, leaves, siblings, parent-child structure, minimum occupancy, and bounding envelopes.
What you can do after
Build it from scratch by implementing type-safe node combination and replacing sibling children in the parent.
How it connects
Connects node merge with deletion, sibling borrowing, bounding envelopes, tree invariants, R-trees, and SS-trees.

This explainer was generated by Manning's knowledge graph from the text of Advanced Algorithms and Data Structures. The section links point to the parts of the book it draws on.