ch8-23trees - Ch 8. Multi-way Search Trees: (The 2-3 Tree):...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
2001-2009 M. D. Evans All Rights Reserved 1 Ch 8. Multi-way Search Trees: (The 2-3 Tree): Ch 8.1 Introduction: Def : Multi-way search tree is a BST generalization in which for some m, each node has at most m children. Def : m is called the order of the tree. Ex: 3–ary tree = B tree of order 3 = 2-3 tree Def : B-tree of order m is a balanced mwst such that: 1. There are no empty subtrees above the leaves. 2. All leaves are on the same level. 3. Every node has at least m/2 and at most m children. 4. The root is either a leaf or has at least 2 children.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2001-2009 M. D. Evans All Rights Reserved 2 Def: 2-3 tree (B-tree of order 3) = k-ary tree: - All leaves on same level. - All internal nodes have 2 or 3 non-empty children. - # keys in each internal node = 1 less than # of child n of that node, & these keys are arranged in ‘search’ order. - The root: 2 or 3 children (unless a leaf). Ex:
Background image of page 2
2001-2009 M. D. Evans All Rights Reserved 3 8.2 The 2-3 Tree ADT: Operations: Attributes: createEmpty () root search (target) all items in tree insert (newItem) delete (item) retrieval (item) traversal ()
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2001-2009 M. D. Evans All Rights Reserved
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 17

ch8-23trees - Ch 8. Multi-way Search Trees: (The 2-3 Tree):...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online