Topics covered (since exam 1):

Slides:



Advertisements
Similar presentations
Definitions and Bottom-Up Insertion
Advertisements

AA Trees another alternative to AVL trees. Balanced Binary Search Trees A Binary Search Tree (BST) of N nodes is balanced if height is in O(log N) A balanced.
1 B trees Nodes have more than 2 children Each internal node has between k and 2k children and between k-1 and 2k-1 keys A leaf has between k-1 and 2k-1.
1 Red-Black Trees. 2 Black-Height of the tree = 4.
1 Red-Black Trees. 2 Black-Height of the tree = 4.
Balanced Trees. Binary Search tree with a balance condition Why? For every node in the tree, the height of its left and right subtrees must differ by.
Splay Trees and B-Trees
1 Red-Black Trees. 2 Definition: A red-black tree is a binary search tree where: –Every node is either red or black. –Each NULL pointer is considered.
Indexing. Goals: Store large files Support multiple search keys Support efficient insert, delete, and range queries.
B-Tree. B-Trees a specialized multi-way tree designed especially for use on disk In a B-tree each node may contain a large number of keys. The number.
B-Trees and Red Black Trees. Binary Trees B Trees spread data all over – Fine for memory – Bad on disks.
1 Tree Indexing (1) Linear index is poor for insertion/deletion. Tree index can efficiently support all desired operations: –Insert/delete –Multiple search.
Review for Exam 2 Topics covered (since exam 1): –Splay Tree –K-D Trees –RB Tree –Priority Queue and Binary Heap –B-Tree For each of these data structures.
Review for Final Exam Non-cumulative, covers material since exam 2 Data structures covered: –Treaps –Hashing –Disjoint sets –Graphs For each of these data.
Exam 3 Review Data structures covered: –Hashing and Extensible hashing –Priority queues and binary heaps –Skip lists –B-Tree –Disjoint sets For each of.
Review for Exam 2 Topics covered: –Recursion and recursive functions –General rooted trees –Binary Search Trees (BST) –Splay Tree –RB Tree –K-D Trees For.
ITEC 2620M Introduction to Data Structures Instructor: Prof. Z. Yang Course Website: ec2620m.htm Office: TEL 3049.
SPLAY TREE The basic idea of the splay tree is that every time a node is accessed, it is pushed to the root by a series of tree rotations. This series.
1 Red-Black Trees. 2 A Red-Black Tree with NULLs shown Black-Height of the tree = 4.
Lecture 23 Red Black Tree Chapter 10 of textbook
CSE 326: Data Structures Trees
COMP261 Lecture 23 B Trees.
Definitions and Bottom-Up Insertion
AA Trees.
Binary search trees Definition
Red-Black Tree Neil Tang 02/07/2008
BCA-II Data Structure Using C
G64ADS Advanced Data Structures
Multiway Search Trees Data may not fit into main memory
Topics covered (since exam 1):
Red Black Trees
Lecture 16 Multiway Search Trees
Splay Trees.
AVL Tree.
Red-Black Trees Bottom-Up Deletion.
Review for Final Exam Non-cumulative, covers material since exam 2
Review for Final Exam Non-cumulative, covers material since exam 2
Slide Sources: CLRS “Intro. To Algorithms” book website
Red Black Trees.
Lecture 25 Splay Tree Chapter 10 of textbook
Review for Final Exam Non-cumulative, covers material since exam 2
CMSC 341 Lecture 10 B-Trees Based on slides from Dr. Katherine Gibson.
original list {67, 33,49, 21, 25, 94} pass { } {67 94}
Wednesday, April 18, 2018 Announcements… For Today…
B-Trees (continued) Analysis of worst-case and average number of disk accesses for an insert. Delete and analysis. Structure for B-tree node.
Slide Sources: CLRS “Intro. To Algorithms” book website
Topics covered (since exam 1):
Tree Rotations & Splay Trees
Red-Black Trees Bottom-Up Deletion.
B- Trees D. Frey with apologies to Tom Anastasio
B- Trees D. Frey with apologies to Tom Anastasio
Red-Black Trees.
SPLAY TREES.
Balanced BSTs "The voyage of discovery is not in seeking new landscapes but in having new eyes. " - Marcel Proust CLRS, pages 333, 337.
Red-Black Trees 1/16/2019 1:56 PM Splay Trees v z Splay Trees.
Topics covered (since exam 1, excluding PQ):
B- Trees D. Frey with apologies to Tom Anastasio
Red-Black Trees Bottom-Up Deletion.
CMSC 341 Splay Trees.
AVL-Trees.
Red-Black Trees.
Review for Final Exam Non-cumulative, covers material since exam 2
CSE 326: Data Structures Splay Trees
CMSC 341 Splay Trees.
Topics covered (since exam 1):
Red Black Trees.
CMSC 341 Splay Trees.
326 Lecture 9 Henry Kautz Winter Quarter 2002
Splay Trees Binary search trees.
Topic 10 Trees.
Presentation transcript:

Topics covered (since exam 1): Review for Exam 2 Topics covered (since exam 1): Splay Tree K-D Trees 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

Review for Exam 2 Splay tree Definition (a special BST: balanced in some sense) Rationale for splaying: amortized performance Splay operation (bottom up) 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?

K-D Trees Review for Exam 2 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

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 bh=k can have Bottom-up insertion and deletion

Review for Exam 2 B-Trees What is a B-tree Why need B-tree Special M-way search tree (what is a M-way tree) Internal and external nodes M and L (half full principle), especial requirement for root Why need B-tree Useful/advantageous only when external storage accesses required and why? 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