Purely Functional Worst Case Constant Time Catenable Sorted Lists Gerth Stølting Brodal University of Aarhus Joint work with Christos Makris Kostas Tsichlas.

Slides:



Advertisements
Similar presentations
Turning Amortized to Worst-Case Data Structures: Techniques and Results Tsichlas Kostas.
Advertisements

Planar point location -- example
Lecture 9 : Balanced Search Trees Bong-Soo Sohn Assistant Professor School of Computer Science and Engineering Chung-Ang University.
An Optimal Dynamic Interval Stabbing-Max Data Structure? Pankaj K. Agarwal, Lars Arge and Ke Yi Department of Computer Science Duke University.
I/O-Algorithms Lars Arge Fall 2014 September 25, 2014.
1 Functional Data Structures Purely functional car cdr never modify only create new pairs only DAGs [C. Okasaki, Simple and efficient purely functional.
Dynamic Matchings in Convex Bipartite Graphs
Rank-Pairing Heaps Robert Tarjan, Princeton University & HP Labs Joint work with Bernhard Haeupler and Siddhartha Sen, ESA
1 Finger search trees. 2 Goal Keep sorted lists subject to the following operations: find(x,L) insert(x,L) delete(x,L) catenate(L1,L2) : Assumes that.
Time O(log d) Exponential-search(13) Finger Search Searching in a sorted array time O(log n) Binary-search(13)
CS202 - Fundamental Structures of Computer Science II
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.
I/O-Algorithms Lars Arge University of Aarhus February 21, 2005.
I/O-Algorithms Lars Arge Aarhus University February 27, 2007.
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.
Dynamic Planar Range Maxima Queries (presented at ICALP 2011) Gerth Stølting Brodal Aarhus University Kostas Tsakalidis LIAFA, Université Paris Diderot,
Advanced Data Structures
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.
I/O-Algorithms Lars Arge Aarhus University February 13, 2007.
1 Balanced Search Trees  several varieties  AVL trees  trees  Red-Black trees  B-Trees (used for searching secondary memory)  nodes are added.
CSC 213 Lecture 7: Binary, AVL, and Splay Trees. Binary Search Trees (§ 9.1) Binary search tree (BST) is a binary tree storing key- value pairs (entries):
I/O-Algorithms Lars Arge Aarhus University February 16, 2006.
Chapter 6: Transform and Conquer Trees, Red-Black Trees The Design and Analysis of Algorithms.
I/O-Algorithms Lars Arge University of Aarhus February 13, 2005.
I/O-Algorithms Lars Arge University of Aarhus March 1, 2005.
I/O-Algorithms Lars Arge Spring 2009 March 3, 2009.
1 Minimize average access time Items have weights: Item i has weight w i Let W =  w i be the total weight of the items Want the search to heavy items.
Fully Persistent B-Trees 23 rd Annual ACM-SIAM Symposium on Discrete Algorithms, Kyoto, Japan, January 18, 2012 Gerth Stølting Brodal Konstantinos Tsakalidis.
I/O-Algorithms Lars Arge Aarhus University February 14, 2008.
Comparison Based Dictionaries: Fault Tolerance versus I/O Efficiency Gerth Stølting Brodal Allan Grønlund Jørgensen Thomas Mølhave University of Aarhus.
CSE 326: Data Structures Lecture #13 Extendible Hashing and Splay Trees Alon Halevy Spring Quarter 2001.
Binary search trees Definition Binary search trees and dynamic set operations Balanced binary search trees –Tree rotations –Red-black trees Move to front.
B-Trees (continued) Analysis of worst-case and average number of disk accesses for an insert. Delete and analysis. Structure for B-tree node.
Balanced Search Trees CS 3110 Fall Some Search Structures Sorted Arrays –Advantages Search in O(log n) time (binary search) –Disadvantages Need.
Balanced Trees Balanced trees have height O(lg n).
New Balanced Search Trees Siddhartha Sen Princeton University Joint work with Bernhard Haeupler and Robert E. Tarjan.
Time O(log d) Exponential-search(13) Finger Search Searching in a sorted array time O(log n) Binary-search(13)
Trevor Brown – University of Toronto B-slack trees: Space efficient B-trees.
Weight balance trees (Nievergelt & Reingold 73)
Analysis of Red-Black Tree Because of the rules of the Red-Black tree, its height is at most 2log(N + 1). Meaning that it is a balanced tree Time Analysis:
Computer Algorithms Submitted by: Rishi Jethwa Suvarna Angal.
Path Minima on Dynamic Weighted Trees Pooya Davoodi Aarhus University Aarhus University, November 17, 2010 Joint work with Gerth Stølting Brodal and S.
Search Trees Chapter   . Outline  Binary Search Trees  AVL Trees  Splay Trees.
B-Tree – Delete Delete 3. Delete 8. Delete
1 Biased 2-b trees (Bent, Sleator, Tarjan 1980). 2 Goal Keep sorted lists subject to the following operations: find(x,L) insert(x,L) delete(x,L) catenate(L1,L2)
Four different data structures, each one best in a different setting. Simple Heap Balanced Heap Fibonacci Heap Incremental Heap Our results.
Université de Nantes Dynamic Trees and Log-lists Irena Rusu Université de Nantes, LINA
1 CSE 326: Data Structures Trees. 2 Today: Splay Trees Fast both in worst-case amortized analysis and in practice Are used in the kernel of NT for keep.
(2,4) Trees1 What are they? –They are search Trees (but not binary search trees) –They are also known as 2-4, trees.
Balanced Binary Search Trees
Kinetic Heaps K, Tarjan, and Tsioutsiouliklis. Broadcast Scheduling Parametric and Kinetic Heaps Broadcast Scheduling Using a Kinetic Heap The Computational.
Dynamic Dictionaries Primary Operations:  get(key) => search  put(key, element) => insert  remove(key) => delete Additional operations:  ascend()
(A Survey on) Priority Queues IanFest, University of Waterloo, Waterloo, Ontario, Canada, August 14-15, 2013 Gerth Stølting Brodal Aarhus Universty.
X1x1 x2x2 top-k y 3-sided x1x1 x2x2 External Memory Three-Sided Range Reporting and Top-k Queries with Sublogarithmic Updates Gerth Stølting Brodal Aarhus.
arxiv.org/abs/ y 3-sided x1 x2 x1 x2 top-k
3.1 Height-Balanced Trees 3.2 Weight-Balanced Trees
Self-Adjusting Data Structures
List Order Maintenance
Persistent Data Structures (Version Control)
Finger search trees.
Searching in Trees Gerth Stølting Brodal Aarhus University
Segment tree and Interval Tree
Data Structures Lecture 4 AVL and WAVL Trees Haim Kaplan and Uri Zwick
STACS arxiv.org/abs/ y 3-sided x1 x2 x1 x2 top-k
8th Workshop on Massive Data Algorithms, August 23, 2016
Red Black Trees (Guibas Sedgewick 78)
Goals Design decisions Design Insertion
Presentation transcript:

Purely Functional Worst Case Constant Time Catenable Sorted Lists Gerth Stølting Brodal University of Aarhus Joint work with Christos Makris Kostas Tsichlas University of Patras ESA’06, Zürich, Switzerland, September 13, 2006

2 Catenable Sorted Lists Insert(T,x) Delete(T,x) Search(T,x) Join(T 1,T 2 ) Split(T,x) T 1 = 2,5,7,8,10,11 T 2 = 13,17,19,34,58,79 Join(T 1,T 2 ) = 2,5,7,8,10,11,13,17,19,34,58,79 This talk

3 Catenable Sorted Lists: Search Trees (2,4-trees, red-black trees…) T1T1 T2T Search Link Rebalance

4 Catenable Sorted Lists: Search Trees (2,4-trees, red-black trees…) T1T1 T2T Search Link Rebalance Worst-case O(1) Worst-case O(log |T 1 |) Worst-case O(log |T 2 |) or amortized O(1) or O(loglog |T 2 |) or worst-case O(1) or amortized O(1)

5 Catenable Sorted Lists Search trees Kaplan Tarjan’96 This talk Searchlog n Insert/Deletelog n Joinlog n 1*loglog n s 1 Splitlog nlog n s - n = |T| n s = min(|T 1 |,|T 2 |) * amortized

6 O(1) Join and O(log n) Search The ideas….

7 Problem: Nodes of arbitrary degree Idea 1: Linking By Size T1T1 T2T2 height O(log n)

8 Idea 2: Represent Nodes by Weight-Balanced Trees Problem: Does not support linking by size in O(1) time O(log n)

9 Idea 3: Tree-Collections and Lazy Join Tree collection k trees k levels Weight- balanced tree

10 Idea 3 (cont.): Lazy Join Weight balanced trees with top-down rebalancing [Bent, Sleator, Tarjan 1985] Old tree collection New tree collection k trees k levels

11 Catenable Sorted Lists OperationWorst-case time SearchO(log n) JoinO(1)

12 Supporting Insertions: Buckets 2,4-tree O(log n)

13 Supporting Deletions: The ideas… Delete leaf Rebalance weight-balanced trees on root-to-leaf path Join O(1) weight-balanced trees in O(log n) time

14 Functional Catenable Sorte Lists Functional setting = no side effects allowed Data structures are automatically persistent Idea: Represent spines by functional catenable lists [Kaplan, Tarjan 1995]

15 Conclusion Search treesThis talk ♪ Searchlog n Insert/Deletelog n Joinlog n 1*1 Splitlog n- * amortized ♪ purely functional