Update 1 Persistent Data Structures (Version Control) v0v0 v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 Ephemeral query v0v0 v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 Partial persistence.

Slides:



Advertisements
Similar presentations
List Order Maintenance
Advertisements

Planar point location -- example
Priority Queues  MakeQueuecreate new empty queue  Insert(Q,k,p)insert key k with priority p  Delete(Q,k)delete key k (given a pointer)  DeleteMin(Q)delete.
1 Persistent data structures. 2 Ephemeral: A modification destroys the version which we modify. Persistent: Modifications are nondestructive. Each modification.
1 Functional Data Structures Purely functional car cdr never modify only create new pairs only DAGs [C. Okasaki, Simple and efficient purely functional.
D. D. Sleator and R. E. Tarjan | AT&T Bell Laboratories Journal of the ACM | Volume 32 | Issue 3 | Pages | 1985 Presented By: James A. Fowler,
An Improved Succinct Dynamic k-Ary Tree Representation (work in progress) Diego Arroyuelo Department of Computer Science, Universidad de Chile.
Advanced Data Structures NTUA Spring 2007 B+-trees and External memory Hashing.
Msb(x) in O(1) steps using 5 multiplications Word size n = g∙g, g a power of 2 [M.L. Fredman, D.E. Willard, Surpassing the information-theoretic bound.
1 abstract containers hierarchical (1 to many) graph (many to many) first ith last sequence/linear (1 to 1) set.
Time O(log d) Exponential-search(13) Finger Search Searching in a sorted array time O(log n) Binary-search(13)
B+-trees. Model of Computation Data stored on disk(s) Minimum transfer unit: a page = b bytes or B records (or block) N records -> N/B = n pages I/O complexity:
Introduction to Trees. Tree example Consider this program structure diagram as itself a data structure. main readinprintprocess sortlookup.
1 Algorithmic Aspects of Searching in the Past Christine Kupich Institut für Informatik, Universität Freiburg Lecture 1: Persistent Data Structures Advanced.
1 Self-Adjusting Data Structures. 2 Lists [D.D. Sleator, R.E. Tarjan, Amortized Efficiency of List Update Rules, Proc. 16 th Annual ACM Symposium on Theory.
A Linear Time Algorithm for the k Maximum Sums Problem By Gerth S. Brodal and Allan G. Jørgensen.
Unified Access Bound 1 [M. B ă doiu, R. Cole, E.D. Demaine, J. Iacono, A unified access bound on comparison- based dynamic dictionaries, Theoretical Computer.
Multiversion Access Methods - Temporal Indexing. Basics A data structure is called : Ephemeral: updates create a new version and the old version cannot.
WS Prof. Dr. Th. Ottmann Algorithmentheorie 16 – Persistenz und Vergesslichkeit.
I/O-Algorithms Lars Arge University of Aarhus February 21, 2005.
Dynamic Planar Range Maxima Queries (presented at ICALP 2011) Gerth Stølting Brodal Aarhus University Kostas Tsakalidis University of Primorska, October.
I/O-Algorithms Lars Arge Spring 2011 March 8, 2011.
Update Persistent Data Structures (Version Control) v0v0 v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 Ephemeral query v0v0 v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 Partial persistence.
Chapter 15 B External Methods – B-Trees. © 2004 Pearson Addison-Wesley. All rights reserved 15 B-2 B-Trees To organize the index file as an external search.
Purely Functional Worst Case Constant Time Catenable Sorted Lists Gerth Stølting Brodal University of Aarhus Joint work with Christos Makris Kostas Tsichlas.
I/O-Algorithms Lars Arge Aarhus University February 13, 2007.
I/O-Algorithms Lars Arge Spring 2009 February 2, 2009.
I/O-Algorithms Lars Arge Aarhus University February 16, 2006.
I/O-Algorithms Lars Arge University of Aarhus February 13, 2005.
Persistent Data Structures Computational Geometry, WS 2007/08 Lecture 12 Prof. Dr. Thomas Ottmann Khaireel A. Mohamed Algorithmen & Datenstrukturen, Institut.
Temporal Indexing MVBT. Temporal Indexing Transaction time databases : update the last version, query all versions Queries: “Find all employees that worked.
I/O-Algorithms Lars Arge Spring 2009 March 3, 2009.
Temporal Databases. Outline Spatial Databases Indexing, Query processing Temporal Databases Spatio-temporal ….
Rank-Pairing Heaps Bernhard Haeupler, Siddhartha Sen, and Robert Tarjan, ESA
Course Review COMP171 Spring Hashing / Slide 2 Elementary Data Structures * Linked lists n Types: singular, doubly, circular n Operations: insert,
I/O-Algorithms Lars Arge Aarhus University March 5, 2008.
Fully Persistent B-Trees 23 rd Annual ACM-SIAM Symposium on Discrete Algorithms, Kyoto, Japan, January 18, 2012 Gerth Stølting Brodal Konstantinos Tsakalidis.
Point Location Computational Geometry, WS 2007/08 Lecture 5 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für.
Tirgul 6 B-Trees – Another kind of balanced trees Problem set 1 - some solutions.
1 Persistent data structures. 2 Ephemeral: A modification destroys the version which we modify. Persistent: Modifications are nondestructive. Each modification.
E.G.M. Petrakissearching1 Searching  Find an element in a collection in the main memory or on the disk  collection: (K 1,I 1 ),(K 2,I 2 )…(K N,I N )
1 abstract containers hierarchical (1 to many) graph (many to many) first ith last sequence/linear (1 to 1) set.
AALG, lecture 11, © Simonas Šaltenis, Range Searching in 2D Main goals of the lecture: to understand and to be able to analyze the kd-trees and.
Orthogonal Range Searching I Range Trees. Range Searching S = set of geometric objects Q = query object Report/Count objects in S that intersect Q Query.
CHAPTER 71 TREE. Binary Tree A binary tree T is a finite set of one or more nodes such that: (a) T is empty or (b) There is a specially designated node.
UNC Chapel Hill M. C. Lin Orthogonal Range Searching Reading: Chapter 5 of the Textbook Driving Applications –Querying a Database Related Application –Crystal.
Time O(log d) Exponential-search(13) Finger Search Searching in a sorted array time O(log n) Binary-search(13)
Starting at Binary Trees
Computer Science: A Structured Programming Approach Using C Trees Trees are used extensively in computer science to represent algebraic formulas;
IKI 10100: Data Structures & Algorithms Ruli Manurung (acknowledgments to Denny & Ade Azurat) 1 Fasilkom UI Ruli Manurung (Fasilkom UI)IKI10100: Lecture17.
Λίστα Εργασιών External Memory Data Structures Vitter, J. S. and Shriver, E. 1994a. Algorithms for parallel memory I: Two-level memories. Algorithmica.
Λίστα Εργασιών Data Structures for Tree Manipulation D. Harel and R.E. Tarjan. Fast Algorithms for finding nearest common ancestors. SIAM J. Computing,
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.
Computer Science and Software Engineering University of Wisconsin - Platteville 10. Binary Search Tree Yan Shi CS/SE 2630 Lecture Notes Partially adopted.
24 January Trees CSE 2011 Winter Trees Linear access time of linked lists is prohibitive  Does there exist any simple data structure for.
Temporal Databases. Outline Spatial Databases Indexing, Query processing Temporal Databases Spatio-temporal ….
Navigation Piles with Applications to Sorting, Priority Queues, and Priority Deques Jyrki Katajainen and Fabio Vitale Department of Computing, University.
Michal Balas1 I/O-efficient Point Location using Persistent B-Trees Lars Arge, Andrew Danner, and Sha-Mayn Teh Department of Computer Science, Duke University.
Confluently Persistent Tries Eric Price, MIT joint work with Erik Demaine, MIT Stefan Langerman, Université Libre de Bruxelles.
Presenters : Virag Kothari,Vandana Ayyalasomayajula Date: 04/21/2010.
Self-Adjusting Data Structures
Multiway Search Trees Data may not fit into main memory
List Order Maintenance
Persistent Data Structures (Version Control)
Temporal Indexing MVBT.
Tree.
Searching in Trees Gerth Stølting Brodal Aarhus University
External Methods Chapter 15 (continued)
KD Tree A binary search tree where every node is a
Priority Queues MakeQueue create new empty queue
Presentation transcript:

update 1 Persistent Data Structures (Version Control) v0v0 v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 Ephemeral query v0v0 v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 Partial persistence query only update & query v0v0 v1v1 v2v2 v3v3 v4v4 v6v6 Full persistence updates at leaves any version can be copied query all versions v5v5 v0v0 v1v1 v2v2 v3v3 Confluently persistence update/merge/query all versions v5v5 Purely functional car cdr never modify only create new pairs only DAGs Retroactive v0v0 v1v1 v2v2 v3v3 v4v4 update & query all versions updates in the past propragate version DAG version tree version list

2 Planar Point Location T1T1 T2T2 T3T3 T4T4 T5T5 T6T6 T7T7 update Partial persistent search trees O(n∙log n) preprocessing, O(log n) query

3 Path copying (trees) c a f d g c f e root pointer

Partial persistence  Version ID = time = 0,1,2,...  Fast node (any data structure) – record all updates in node (version,value) pairs – field updates O(1) – field queries  predecessor wrt version id (search tree/vEB)  Node copying (O(1) degree data structures) – Persistent node = collection of nodes, each valid for an interval of versions, with  extra updates,  = max indegree – pointers must have subinterval of the node pointing to; otherwise copy and insert pointers (cacading copying) NB: Needs to keep track of back-pointers 4 field 1 :(0,x) (3,y) field 2 :(0,a) (7,c) field 1 :(8,z) (10,w) field 2 :(8,c) (9,d) field 1 :(13,w) (q5,y) field 2 :(13,e) (14,c) [0,8[ [8,13[ [13,  [ field 1 :(0,x) (3,y) (7,z) field 2 :(0,a) (14,c) (16,b)

 Fat node – Updates (1,x) (6,y) (7,z) to a field – Queries = binary search among versions – Update (7,z): Insert 7 as leftmost child of 4; insert pairs for 7 and 5=succ(7)  Node splitting (≥2  ekstra fields) 5 Full persistence Version tree (numbers = version ids) Version list (order maintenance data structure) preorder traversal field:(1,x) (7,z) (5,x) (6,y) (2,x) increasing version field 1 : (1,a) (4,b) (3,a) (2,c) field 2 : (1,f) (7,g) (5,f) [0,  [ [4,3[ field 1 : (1,a) (4,b) field 2 : (1,f) (7,g) field 1 : (5,b) (3,a) (2,c) field 2 : (5,f) split version 5 [0,5[ [5,  [ [4,5[ [5,3[

[N. Sarnak, R.E. Tarjan, Planar point location using persistent search trees, Communications of the ACM, 29(7), , 1986]  Partial persistence, trees, O(1) access, amortized O(1) update [J.R. Driscoll, N. Sarnak, D.D. Sleator, R.E. Tarjan, Making Data Structures Persistent, Journal of Computer and System Sciences, 38(1), , 1989]  Partial & full persistence, O(1) degree data structures, O(1) access, amortized O(1) update [P.F. Dietz, R. Raman, Persistence, Amortization and Randomization. Proceedings 2nd Annual ACM-SIAM Symposium on Discrete Algorithms, 78-88, 1991] [G.S. Brodal, Partially Persistent Data Structures of Bounded Degree with Constant Update Time, Nordic Journal of Computing, volume 3(3), pages , 1996]  Partial persistence, O(1) degree data structures, O(1) access & updates update [P.F. Dietz, Fully Persistent Arrays. Proceedings 1st Workshop on Algorithms and Data Structures, LNCS 382, 67-74, 1989]  Full persistence, RAM structures, O(loglog n) access, O(loglog n) amortized expected updates 6 Persistence techniques

Comparison of persistence techniques  Copy data structure for each version – no query overhead, slow updates & wastes a lot of space  Record updates & keep current version – fast updates & queries to current version, space efficient, slow queries in the past  Path copying – applies to trees, no query overhead, space overhead = depth of update  Fat node – partial persistence: O(1) updates and space optimal, loglog n query overhead – full persistence: O(loglog n) expected amortized updates and space optimal, loglog n query overhead  Node copying/splitting – fast updates & queries (amortized updates for full persistence) – only works for pointer-based structures with O(1) degree 7