- 2072 Magh · 6 marks
B-tree of order 3 for 52, 46, 27, ...
Short answer
Insert sequentially; node overflows at 3 keys, splits. Final B-tree order 3: root [81], left internal [46] with leaves [27 35] [52 72]; right internal [108 115] with leaves [86 90] [110] [121].
Construct a B-tree of order 3 for given set of data: 52, 46, 27, 81, 90, 108, 72, 110, 35, 115, 121 and 86.
A B-tree of order 3 allows at most 3 children (2 keys) per node and at least 1 key in a non-root node. A key is inserted into its leaf; if the leaf then holds 3 keys it overflows, is split at the median, and the median moves up to the parent. The split may repeat up to the root.
Step-by-step construction
| Step | Insert | Tree after step | Action |
|---|---|---|---|
| 1 | 52 | [52] | fits in leaf |
| 2 | 46 | [46 52] | fits in leaf |
| 3 | 27 | [46]{[27], [52]} | leaf [27 46 52] overflows, split: 46 moves up; new root |
| 4 | 81 | [46]{[27], [52 81]} | fits in leaf |
| 5 | 90 | [46 81]{[27], [52], [90]} | leaf [52 81 90] overflows, split: 81 moves up |
| 6 | 108 | [46 81]{[27], [52], [90 108]} | fits in leaf |
| 7 | 72 | [46 81]{[27], [52 72], [90 108]} | fits in leaf |
| 8 | 110 | [81]{[46]{[27], [52 72]}, [108]{[90], [110]}} | leaf [90 108 110] overflows, split: 108 moves up; internal node [46 81 108] overflows, split: 81 moves up; new root |
| 9 | 35 | [81]{[46]{[27 35], [52 72]}, [108]{[90], [110]}} | fits in leaf |
| 10 | 115 | [81]{[46]{[27 35], [52 72]}, [108]{[90], [110 115]}} | fits in leaf |
| 11 | 121 | [81]{[46]{[27 35], [52 72]}, [108 115]{[90], [110], [121]}} | leaf [110 115 121] overflows, split: 115 moves up |
| 12 | 86 | [81]{[46]{[27 35], [52 72]}, [108 115]{[86 90], [110], [121]}} | fits in leaf |
Final B-tree of order 3
[81]
[46] [108 115]
[27 35] [52 72] [86 90] [110] [121]
All leaves are on the same level and every node respects the key limits.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- AVL tree for 52, 65, 72, 15, 11, 32, 20 · Data Structure and Algorithm, chapter 6
- B-tree of order 5 for letters C N G A H ... · Data Structure and Algorithm, chapter 6 · asked 2×
- AVL tree for 10, 20, 30, 35, 50, ... · Data Structure and Algorithm, chapter 6
- B-tree of order 5 for 82, 12, 22, ... · Data Structure and Algorithm, chapter 6 · asked 2×
- B-tree properties; order 5 for 3, 14, 7, ... · Data Structure and Algorithm, chapter 6 · asked 2×
- AVL tree for 24, 12, 8, 15, 35, ... · Data Structure and Algorithm, chapter 6
- Materials: 115 m² PCC floor, 110 m² plaster · Estimating and Costing, chapter 4 · asked 2×
- Francis design (90 m, 40 m³/s, 86%) · Hydropower Engineering, chapter 7
- Chebyshev order (3.2 kHz, 0.4 dB; 9.8 kHz, 52 dB) · Filter Design, chapter 2
- AM numerical: 750 kHz carrier, 110 V and 90 V amplitudes · Communication Systems, chapter 2