Exam 3 Review Data structures covered: –Hashing and Extensible hashing –Priority queues and binary heaps –Skip lists –B-Tree –Disjoint sets For each of.

Slides:



Advertisements
Similar presentations
CMSC 341 Binary Heaps Priority Queues. 8/3/2007 UMBC CSMC 341 PQueue 2 Priority Queues Priority: some property of an object that allows it to be prioritized.
Advertisements

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.
CS 315 March 24 Goals: Heap (Chapter 6) priority queue definition of a heap Algorithms for Insert DeleteMin percolate-down Build-heap.
More sorting algorithms: Heap sort & Radix sort. Heap Data Structure and Heap Sort (Chapter 7.6)
Course Review COMP171 Spring Hashing / Slide 2 Elementary Data Structures * Linked lists n Types: singular, doubly, circular n Operations: insert,
B-Trees Disk Storage What is a multiway tree? What is a B-tree?
CSE 373 Data Structures Lecture 12
Quick Review of material covered Apr 8 B+-Tree Overview and some definitions –balanced tree –multi-level –reorganizes itself on insertion and deletion.
COMP 171 Data Structures and Algorithms Tutorial 10 Hash Tables.
CSE 326: Data Structures Lecture #13 Extendible Hashing and Splay Trees Alon Halevy Spring Quarter 2001.
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.
Cpt S 223 – Advanced Data Structures Course Review Midterm Exam # 2
0 Course Outline n Introduction and Algorithm Analysis (Ch. 2) n Hash Tables: dictionary data structure (Ch. 5) n Heaps: priority queue data structures.
Spatial Indexing I Point Access Methods. Spatial Indexing Point Access Methods (PAMs) vs Spatial Access Methods (SAMs) PAM: index only point data Hierarchical.
Spatial Indexing I Point Access Methods. Spatial Indexing Point Access Methods (PAMs) vs Spatial Access Methods (SAMs) PAM: index only point data Hierarchical.
Indexing and Hashing (emphasis on B+ trees) By Huy Nguyen Cs157b TR Lee, Sin-Min.
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.
PRIORITY QUEUES (HEAPS). Queues are a standard mechanism for ordering tasks on a first-come, first-served basis However, some tasks may be more important.
Oct 29, 2001CSE 373, Autumn External Storage For large data sets, the computer will have to access the disk. Disk access can take 200,000 times longer.
Trevor Brown – University of Toronto B-slack trees: Space efficient B-trees.
The Binary Heap. Binary Heap Looks similar to a binary search tree BUT all the values stored in the subtree rooted at a node are greater than or equal.
Announcements Exam Friday. More Physical Storage Lecture 10.
1 CMSC 341 Extensible Hashing Chapter 5, Section 6 (pp. 200 – 203)
B-Trees and Red Black Trees. Binary Trees B Trees spread data all over – Fine for memory – Bad on disks.
12.1 Chapter 12: Indexing and Hashing Spring 2009 Sections , , Problems , 12.7, 12.8, 12.13, 12.15,
File Processing : Index and Hash 2015, Spring Pusan National University Ki-Joune Li.
CMSC 341 Binary Heaps Priority Queues. 2 Priority: some property of an object that allows it to be prioritized WRT other objects (of the same type) Priority.
CMSC 341 B- Trees D. Frey with apologies to Tom Anastasio.
1 Tree Indexing (1) Linear index is poor for insertion/deletion. Tree index can efficiently support all desired operations: –Insert/delete –Multiple search.
1 Searching Searching in a sorted linked list takes linear time in the worst and average case. Searching in a sorted array takes logarithmic time in the.
1 CPS216: Data-intensive Computing Systems Operators for Data Access (contd.) Shivnath Babu.
Review for Exam 1 Topics covered: –Asymptotic analysis –Lists and list implementations Stacks and queues –General trees, binary trees –BST For each of.
Elementary Data Organization. Outline  Data, Entity and Information  Primitive data types  Non primitive data Types  Data structure  Definition 
Data Structure II So Pak Yeung Outline Review  Array  Sorted Array  Linked List Binary Search Tree Heap Hash Table.
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.
8 January Heap Sort CSE 2011 Winter Heap Sort Consider a priority queue with n items implemented by means of a heap  the space used is.
CMSC 341 Binary Heaps Priority Queues. 2 Priority: some property of an object that allows it to be prioritized WRT other objects (of the same type) Priority.
Internal and External Sorting External Searching
Hashing Goal Perform inserts, deletes, and finds in constant average time Topics Hash table, hash function, collisions Collision handling Separate chaining.
 Saturday, April 20, 8:30-11:00am in B9201  Similar in style to written midterm exam  May include (a little) coding on paper  About 1.5 times as long.
CSC 2300 Data Structures & Algorithms March 13, 2007 Chapter 6. Priority Queues.
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.
8/3/2007CMSC 341 BTrees1 CMSC 341 B- Trees D. Frey with apologies to Tom Anastasio.
ITEC 2620M Introduction to Data Structures Instructor: Prof. Z. Yang Course Website: ec2620m.htm Office: TEL 3049.
Nov 2, 2001CSE 373, Autumn Hash Table example marking deleted items + choice of table size.
CS422 Principles of Database Systems Indexes Chengyu Sun California State University, Los Angeles.
CS422 Principles of Database Systems Indexes
Multiway Search Trees Data may not fit into main memory
Topics covered (since exam 1):
Hashing Exercises.
Review for Final Exam Non-cumulative, covers material since exam 2
Review for Final Exam Non-cumulative, covers material since exam 2
Review for Final Exam Non-cumulative, covers material since exam 2
Review for Midterm Neil Tang 03/04/2010
Topics covered (since exam 1):
Topics covered (since exam 1):
CMSC 341 Lecture 14 Priority Queues & Heaps
Topics covered (since exam 1, excluding PQ):
(2,4) Trees 2/15/2019 (2,4) Trees (2,4) Trees.
Definition Applications Implementations Heap Comparison
CSE 373: Data Structures and Algorithms
Review for Final Exam Non-cumulative, covers material since exam 2
CSE 373 Data Structures and Algorithms
CSE 373: Data Structures and Algorithms
CMSC 341 Extensible Hashing.
Topics covered (since exam 1):
CS 6310 Advanced Data Structure Wei-Shian Wang
17CS1102 DATA STRUCTURES © 2018 KLEF – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED.
Presentation transcript:

Exam 3 Review Data structures covered: –Hashing and Extensible hashing –Priority queues and binary heaps –Skip lists –B-Tree –Disjoint sets For each of these data structures –Basic idea of data structure and operations –Be able to work out small example problems –Prove related theorems –Advantages and limitations –Asymptotic time performance –Comparison Review questions are available on the web.

–Hash table, table size. –Hashing functions Properties making a good hashing function Examples of division and multiplication hashing functions –Collision management Separate chaining Open addressing (different probing techniques, clustering) –Worst case time performance: O(1) for find/insert/delete if is small and hashing function is good Hashing

–Why need extensible hashing Useful/advantageous only when hash table size is too large to store in memory (external storage accesses required) –Basics for extensible hashing Hash keys to long integers (binary): implicitly very large table size Leaf: stores actual records (in disk), all records share the same leading d L digits. Directory: –Every entry has D digits –Each entry points to one leaf, with d L <= D Extensible Hashing

–Operations Find, Remove (lazy remove) Insert –Only insert to nonempty leaf, –Split if leaf full, extend directory –Duplicates (collisions) –Compare with regular hash table (especially with separate chaining). Extensible Hashing

–Definition of binary heap (CBT with al partial order) –Heap operations (implemented with array) findMin, deleteMin, insert percolateUp (for insertion), percolateDown (for deletion) Heap construction, Heap sort –Time performance of all operations –Leftist tree and leftist heap Why we need this? Definition Meld operations and applications PQ and Heap

Skip Lists –What is a skip list Nodes with different size (different # of forward references or skip pointers) Node size distribution according to the associated probability p –Nodes with different size do not have to follow a rigid pattern –What is the expected # of nodes with exactly i pointers? –How to determine the size of the head node (log 1/p N) –Why need skip lists Expected time performance O(lg N) for find/insert/remove Probabilistically determining node size facilitate insert/remove operations Advantages over sorted arrays, sorted list, BST, balanced BST

–Skip list operations find insert (how to determine the size of the new node) arrange pointers in insert and remove operations (backLook node in findInsertPoint) –Performance Expected time performance O(lg N) for find/insert/remove (very small prob. of poor performance when N is large) Expected # of pointers per node: 1/(1 - p)

–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(log M 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) B-tree design (determining M and L based on the size of key, data element, and disk block) B-Trees

–Equivalence relation and equivalence class (definitions and examples) –Disjoint sets and up-tree representation representative of each set direction of pointers –Union-find operations basic union and find operation path compression (for find) and union by weight heuristics time performance when the two heuristics are used: O(m lg* n) for m operations (what does lg* n mean) O(1) amortized time for each operation Disjoint Sets