Uniquely Represented Data Structures Advanced Algorithms & Data Structures Lecture Theme 10 Prof. Dr. Th. Ottmann Summer Semester 2006.

Slides:



Advertisements
Similar presentations
Planar point location -- example
Advertisements

Introduction to Computer Science 2 Lecture 7: Extended binary trees
1 IP-Lookup and Packet Classification Advanced Algorithms & Data Structures Lecture Theme 08 – Part I Prof. Dr. Th. Ottmann Summer Semester 2006.
Augmenting Data Structures Advanced Algorithms & Data Structures Lecture Theme 07 – Part I Prof. Dr. Th. Ottmann Summer Semester 2006.
Dynamic Planar Convex Hull Operations in Near- Logarithmic Amortized Time TIMOTHY M. CHAN.
1 Theory I Algorithm Design and Analysis (2 - Trees: traversal and analysis of standard search trees) Prof. Th. Ottmann.
Chapter 6: Transform and Conquer
More on Randomized Data Structures. Motivation for Randomized Data Structures We’ve seen many data structures with good average case performance on random.
1 Algorithmic Aspects of Searching in the Past Christine Kupich Institut für Informatik, Universität Freiburg Lecture 1: Persistent Data Structures Advanced.
Chapter 7 Data Structure Transformations Basheer Qolomany.
Multiversion Access Methods - Temporal Indexing. Basics A data structure is called : Ephemeral: updates create a new version and the old version cannot.
Relaxed Balancing Advanced Algorithms & Data Structures Lecture Theme 09 Prof. Dr. Th. Ottmann Summer Semester 2006.
WS Prof. Dr. Th. Ottmann Algorithmentheorie 16 – Persistenz und Vergesslichkeit.
© 2004 Goodrich, Tamassia Skip Lists1  S0S0 S1S1 S2S2 S3S3    2315.
Lists A list is a finite, ordered sequence of data items. Two Implementations –Arrays –Linked Lists.
Parallel Routing Bruce, Chiu-Wing Sham. Overview Background Routing in parallel computers Routing in hypercube network –Bit-fixing routing algorithm –Randomized.
Persistent Data Structures Computational Geometry, WS 2007/08 Lecture 12 Prof. Dr. Thomas Ottmann Khaireel A. Mohamed Algorithmen & Datenstrukturen, Institut.
Lower and Upper Bounds on Obtaining History Independence Niv Buchbinder and Erez Petrank Technion, Israel.
1 Algorithmic Aspects of Searching in the Past Thomas Ottmann Institut für Informatik, Universität Freiburg, Germany
1 Geometric Solutions for the IP-Lookup and Packet Classification Problem (Lecture 12: The IP-LookUp & Packet Classification Problem, Part II) Advanced.
Geometric Data Structures Computational Geometry, WS 2007/08 Lecture 13 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Searching with Structured Keys Objectives
Point Location Computational Geometry, WS 2007/08 Lecture 5 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für.
Unit 11a 1 Unit 11: Data Structures & Complexity H We discuss in this unit Graphs and trees Binary search trees Hashing functions Recursive sorting: quicksort,
Models of Parallel Computation Advanced Algorithms & Data Structures Lecture Theme 12 Prof. Dr. Th. Ottmann Summer Semester 2006.
Tirgul 6 B-Trees – Another kind of balanced trees Problem set 1 - some solutions.
Augmenting Data Structures Advanced Algorithms & Data Structures Lecture Theme 07 – Part II Prof. Dr. Th. Ottmann Summer Semester 2006.
Lecture 10: Search Structures and Hashing
Lecture 6: Point Location Computational Geometry Prof. Dr. Th. Ottmann 1 Point Location 1.Trapezoidal decomposition. 2.A search structure. 3.Randomized,
Lecture 11 : More Geometric Data Structures Computational Geometry Prof. Dr. Th. Ottmann 1 Geometric Data Structures 1.Rectangle Intersection 2.Segment.
Skip Lists1 Skip Lists William Pugh: ” Skip Lists: A Probabilistic Alternative to Balanced Trees ”, 1990  S0S0 S1S1 S2S2 S3S3 
E.G.M. PetrakisB-trees1 Multiway Search Tree (MST)  Generalization of BSTs  Suitable for disk  MST of order n:  Each node has n or fewer sub-trees.
Tirgul 6 B-Trees – Another kind of balanced trees.
15.082J/6.855J/ESD.78J September 14, 2010 Data Structures.
Splay Trees and B-Trees
CPSC 335 BTrees Dr. Marina Gavrilova Computer Science University of Calgary Canada.
Different Tree Data Structures for Different Problems
UNC Chapel Hill M. C. Lin Point Location Reading: Chapter 6 of the Textbook Driving Applications –Knowing Where You Are in GIS Related Applications –Triangulation.
Skip Lists Mrutyunjay. Introduction ▪ Linked Lists Benefits & Drawbacks: – Benefits: – Easy Insert and Deletes, implementations. – Drawbacks: – Hard to.
1 CPS216: Advanced Database Systems Notes 04: Operators for Data Access Shivnath Babu.
Trevor Brown – University of Toronto B-slack trees: Space efficient B-trees.
B + -Trees. Motivation An AVL tree with N nodes is an excellent data structure for searching, indexing, etc. The Big-Oh analysis shows that most operations.
B-Tree – Delete Delete 3. Delete 8. Delete
Lecture 11COMPSCI.220.FS.T Balancing an AVLTree Two mirror-symmetric pairs of cases to rebalance the tree if after the insertion of a new key to.
Skip Lists 二○一七年四月二十五日
1 Multi-Level Indexing and B-Trees. 2 Statement of the Problem When indexes grow too large they have to be stored on secondary storage. However, there.
Lecture 9COMPSCI.220.FS.T Lower Bound for Sorting Complexity Each algorithm that sorts by comparing only pairs of elements must use at least 
CS6045: Advanced Algorithms Sorting Algorithms. Heap Data Structure A heap (nearly complete binary tree) can be stored as an array A –Root of tree is.
Dynamic Dictionaries Primary Operations:  get(key) => search  put(key, element) => insert  remove(key) => delete Additional operations:  ascend()
2/19/2016 3:18 PMSkip Lists1  S0S0 S1S1 S2S2 S3S3    2315.
1 Chapter 6 Heapsort. 2 About this lecture Introduce Heap – Shape Property and Heap Property – Heap Operations Heapsort: Use Heap to Sort Fixing heap.
Chapter 11. Chapter Summary  Introduction to trees (11.1)  Application of trees (11.2)  Tree traversal (11.3)  Spanning trees (11.4)
Skip Lists S3   S2   S1   S0  
Skip Lists 5/10/2018 Presentation for use with the textbook Data Structures and Algorithms in Java, 6th edition, by M. T. Goodrich, R. Tamassia, and M.
Lecture 15 Nov 3, 2013 Height-balanced BST Recall:
CPS216: Data-intensive Computing Systems
External Methods Chapter 15 (continued)
Skip Lists S3 + - S2 + - S1 + - S0 + -
Accessing nearby copies of replicated objects
Dynamic Dictionaries Primary Operations: Additional operations:
Tree data structure.
Skip Lists.
Tree data structure.
Skip Lists S3 + - S2 + - S1 + - S0 + -
Skip Lists S3 + - S2 + - S1 + - S0 + -
Chapter 6: Transform and Conquer
Lecture 6: Counting triangles Dynamic graphs & sampling
OPIM 915 Fall 2010 Data Structures 23-38,
CSE 373 Data Structures Lecture 8
CS210- Lecture 20 July 19, 2005 Agenda Multiway Search Trees 2-4 Trees
Presentation transcript:

Uniquely Represented Data Structures Advanced Algorithms & Data Structures Lecture Theme 10 Prof. Dr. Th. Ottmann Summer Semester 2006

2 Motivation A structure storing a set of keys is called oblivious, if it is not possible to infer its generation history from its current shape. A structure is called persistent, if it supports access to multiple versions. Partially persistent: All versions can be accessed but only the newest version can be modified. Fully persistent: All versions can be accessed and modified. Confluently persistent: Two or more old versions can be combined into one new version.

3 Methods for making structures oblivious Unique representation of the structure: Set/size uniqueness: For each set of n keys there is exactly one structure which can store such a set. The storage is order unique, i.e. the nodes of the strucure are ordered and the keys are stored in ascending order in nodes with ascending numbers. Randomise the structure: Assure that the expectation for the occurrence of a structure storing a set M of keys is independent of the way how M was generated. Observation: The address-assingment of pointers has to be subject under a randomised regime!

4 Example of a randomised structure Z-stratified search tree On each stratum, randomly choose the distribution of trees from Z. Insertion? Deletion? … … …….... …..

5 Uniquely represented structures (a) Generation history determines structure (b) Set-uniqueness:Set determines structure 1, 3, 5, 7 5, 1, 3, 7 1, 3, 5,

6 Uniquely represented structures (c) Size-uniqueness:Size determines structure 1, 3, 5, 7 2, 4, 5, 8 Common structure Order-uniqueness: Fixed ordering of nodes determines where the keys are to be stored

7 Set- and order-unique structures Lower bounds? Assumptions: A dictionary of size n is represented by a graph of n nodes. Node degree finite (fixed), Fixed order of the nodes, i-th node stores i-largest key. Operations allowed to change a graph: Creation | Removal of a node Pointer change Exchange of keys Theorem: For each set- and order-unique representation of a dictionary with n keys, at least one of the operations access, insertion, or deletion must require time  (n 1/3 ).

8 Uniquely represented dictionaries Problem: Find set-unique oder size-unique representations of the ADT „dictionary“ Known solutions: (1)set-unique, oder-unique Aragon/Seidel, FOCS 1989: Randomized Search Trees universal hash-function Update as for priority search trees! Search, insert, delete can be carried out in O(log n) expected time. (s, h(s)) priority s  X

9 The Jelly Fish (2) L. Snyder, 1976, set-unique, oder-unique Upper Bound: Jelly Fish, search insert delete in time O(  n). body:  n nodes  n tentacles of length  n each

10 Lower bound for tree-based structures set-unique, oder-unique Lower bound: For “ tree-based ” structures the following holds: Update-time · Search-time = Ω (n) Number of nodes n ≤ h  L + 1 L ≥ (n – 1)/h At least L-1 keys must have moved from leaves to internal nodes. Therefore, update requires time Ω(L). Delete x 1 Insert x n+1 > x n L leaves · x n x 1 h

11 Cons-structures (3) Sunder/Tarjan, STOC 1990, Upper bound: (Nearly) full, binary search trees Einzige erlaubte Operation für Updates: Search time O(log n) Einfügen Entfernen in Zeit O(  n) möglich · · · · L R x LR x Cons,,

12 Jump-lists (Half-dynamic) 2-level jump-list 2-level jump-liste of size n Search:O(i) = O( ) time Insertion: Deletion: O( ) time tail 0i2in (n-1)/i·i

13 Jump-lists: Dynamization 2-level-jump-list of size n search:O(i) = O(  n) time insert delete : O(  n) time Can be made fully dynamic: (i-1) 2 i2i2 n(i+1) 2 (i+2) 2

14 3-level jump-lists level 2 Search(x): locate x by following level-2-pointers identifying i 2 keys among which x may occur, level-1-pointers identifying i keys among which x may occur, level-0-pointers identifying x time: O(i) = O(n 1/3 ) 0i2ii 2 i 2 +i2·i 2

15 3-level jump-lists level 2 Update requires Changing of 2 pointers on level 0 Changing of i pointers on level 1 Changing of all i pointers onlevel 2 Update time O(i) = O(n 1/3 ) 0i2ii 2 i 2 +i2·i 2

16 c-level jump-lists Let Lower levels: level 0: all pointers of length 1:... level j: all pointers of legth i j-1 :... level c/2 :... Upper levels: level j: connect in a in list all nodes 1, 1·i j-1 +1, 2· i j-1 +1, 3· i j-1 +1,... level c:

17 c-level jump-lists Theorem: For each c ≥ 3, the c-level jump-list is a size and order-unique representation of dictionaries with the following characteristics: Space requirement O(c·n) Access time O(c·n 1/c ) Update time, if n is even, if n is odd

18 1 top-level tree with  n leaves All low-level trees for each sequence of  n consecutive keys Top-level tree direct search to the root of the currently active low-level trees Semi-dynamic structure: low-level-tree-size s+1 = top-level-tree-size Shared-search-trees Reduction of search time

19 Shared-search-trees Pointers at: Level 0: (p-2 0 ) p (p+ 2 0 ) Level 1: (p-2 1 ) p (p+ 2 1 ) … Level k-2: (p-2 k-2 ) p (p+ 2 k-2 ) 2(k-1) Pointers per node p, k = O(log n) Search time O(log n) SpaceO(n log n)

20 Insertion:Determine insertion position; Change all pointers jumping over the insertion position; Add 2 new pointers per level; Completely rebuild top-level tree.

21 Number of pointerchanges:level 0: 2 · level 1: 2 · … level k-2:2 · 2 k · (2 k-1 -1)+2(k-1) =

22 Shared search trees: Summary Theorem: Shared search trees are a size- und order-unique representation of dictionaries with the following characteristics: Space requirement: O(n log n) Search time: O(log n) Upadate time: O(  n ) Open problem: Is there a size- and order-unique representation of by graphs with bounded node degree, search time O(log n), and update time o(n) (e.g.. O(  n))?