Review for Exam 2 - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

Review for Exam 2

Description:

RB Tree. B-Tree. For each of these data structures. Basic idea of data ... min and max # of nodes a RB tree with bh=k can have. Bottom-up insertion and deletion ... – PowerPoint PPT presentation

Number of Views:32
Avg rating:3.0/5.0
Slides: 8
Provided by: yunp
Category:
Tags: exam | rb | review

less

Transcript and Presenter's Notes

Title: Review for Exam 2


1
Review for Exam 2
  • Topics covered (since exam 1, excluding PQ)
  • General rooted trees
  • Binary Search Trees (BST)
  • K-D Trees
  • Splay Tree
  • RB Tree
  • B-Tree
  • For each of these data structures
  • Basic idea of data structure and operations
  • Be able to work out small example problems
  • Prove related theorems
  • Asymptotic time performance
  • Advantages and limitations
  • comparison

2
Review for Exam 2
  • General rooted tree
  • Definition
  • Internal and external nodes
  • Height and depth, path length
  • Tree storage methods and their nodes
  • Binary trees
  • Full, complete and perfect binary trees and their
    properties
  • 4 different orders of tree traversals

3
Review for Exam 2
  • BST
  • Definition
  • Basic operations and their implementations
  • find,
  • findMin,
  • findMax
  • insert,
  • remove,
  • makeEmpty
  • Time performance of these operations
  • Problems with unbalanced BST (degeneration)

4
Review for Exam 2
  • K-D Trees
  • What K-D trees are used for
  • Multiple keys
  • How K-D trees differ from the ordinary BST
  • levels
  • Be able to do insert and range query/print

5
Review for Exam 2
  • Splay tree
  • Definition (a special BST balanced in some
    sense)
  • Rationale for splaying (data locality)
  • Splay operation
  • Root
  • without grandparent
  • with grandparent zig-zag and zig-zig
  • When to splay (after each operation)
  • What to splay with find/insert/delete operations
  • Amortized time performance analysis what does
    O(m log n) mean?

6
Review for Exam 2
  • RB tree
  • Definition a BST satisfying 5 conditions
  • Every node is either red or black.
  • Root is black
  • Each NULL pointer is considered to be a black
    node
  • If a node is red, then both of its children are
    black.
  • Every path from a node to a NULL contains the
    same number of black nodes.
  • Theorems leading to O(log n) worst case time
    performance
  • Black height
  • min and max of nodes a RB tree with bhk can
    have
  • Bottom-up insertion and deletion

7
Review for Exam 2
  • B-Trees
  • What is a B-tree
  • Special M-way search tree (what is a M-way tree)
  • Interior and exterior nodes
  • M and L (half full principle), especial
    requirement for root
  • Why need B-tree
  • Useful/advantageous only when external storage
    accesses required
  • Why so?
  • Height O(logM N), so are performances for
    find/insert/remove
  • B-tree operations
  • search
  • insert (only insert to nonempty leaf, split,
    split propagation)
  • Remove (borrow, merge, merge propagation, update
    ancestors keys )
  • B-tree design (determining M and L based on the
    size of key, data element, and disk block)
Write a Comment
User Comments (0)
About PowerShow.com