Strict Fibonacci Heaps Gerth Stølting Brodal Aarhus University George Lagogiannis Robert Endre Tarjan Agricultural University of Athens Princeton University.

Slides:



Advertisements
Similar presentations
Fibonacci Heaps Especially desirable when the number of calls to Extract-Min & Delete is small (note that all other operations run in O(1) This arises.
Advertisements

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.
Advanced Data structure
Rank-Pairing Heaps Robert Tarjan, Princeton University & HP Labs Joint work with Bernhard Haeupler and Siddhartha Sen, ESA
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.
Priority Queues. Container of elements where each element has an associated key A key is an attribute that can identify rank or weight of an element Examples.
More sorting algorithms: Heap sort & Radix sort. Heap Data Structure and Heap Sort (Chapter 7.6)
Rank-Pairing Heaps Bernhard Haeupler, Siddhartha Sen, and Robert Tarjan, ESA
Fully Persistent B-Trees 23 rd Annual ACM-SIAM Symposium on Discrete Algorithms, Kyoto, Japan, January 18, 2012 Gerth Stølting Brodal Konstantinos Tsakalidis.
Nick Harvey & Kevin Zatloukal
Dijkstra/Prim 1 make-heap |V| insert |V| delete-min |E| decrease-key Priority Queues make-heap Operation insert find-min delete-min union decrease-key.
Instructors: C. Y. Tang and J. S. Roger Jang All the material are integrated from the textbook "Fundamentals of Data Structures in C" and some supplement.
Fibonacci Heaps. Single Source All Destinations Shortest Paths
1 Binary heaps binary tree that satisfy two properties –structural property (is a complete tree) –heap-ordering property (minimum item on top) Can have.
Source: Muangsin / Weiss1 Priority Queue (Heap) A kind of queue Dequeue gets element with the highest priority Priority is based on a comparable value.
5.9 Heaps of optimal complexity
Binomial Heaps Jyh-Shing Roger Jang ( 張智星 ) CSIE Dept, National Taiwan University.
Princeton University COS 423 Theory of Algorithms Spring 2002 Kevin Wayne Fibonacci Heaps These lecture slides are adapted from CLRS, Chapter 20.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Lecture 11 Tuesday, 12/4/01 Advanced Data Structures Chapters.
Princeton University COS 423 Theory of Algorithms Spring 2002 Kevin Wayne Binary and Binomial Heaps These lecture slides are adapted from CLRS, Chapters.
0 Course Outline n Introduction and Algorithm Analysis (Ch. 2) n Hash Tables: dictionary data structure (Ch. 5) n Heaps: priority queue data structures.
ANALYSIS OF SOFT HEAP Varun Mishra April 16,2009.
1 Binomial heaps, Fibonacci heaps, and applications.
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.
Algorithms and Data Structures Gerth Stølting Brodal Computer Science Day, Department of Computer Science, Aarhus University, May 25, 2012.
Binomial heaps, Fibonacci heaps, and applications
§8 Binomial Queues Haven’t we had enough about queues? What is a binomial queue for? Well, what is the average time for insertions with leftist or skew.
Chap 9 Priority Queues. Operations supported by priority queue The functions that have been supported: –SP1: Return an element with minmum priority –SP2:
Path Minima on Dynamic Weighted Trees Pooya Davoodi Aarhus University Aarhus University, November 17, 2010 Joint work with Gerth Stølting Brodal and S.
Algorithms and Data Structures Gerth Stølting Brodal Computer Science Day, Department of Computer Science, Aarhus University, May 25, 2012.
WEEK 3 Leftist Heaps CE222 Dr. Senem Kumova Metin CE222_Dr. Senem Kumova Metin.
Chapter 2: Basic Data Structures. Spring 2003CS 3152 Basic Data Structures Stacks Queues Vectors, Linked Lists Trees (Including Balanced Trees) Priority.
Chapter 19: Fibonacci Heap Many of the slides are from Prof. Leong Hon Wai’s resources at National University of Singapore.
Change Keys in heaps Fibonacci heap Zhao Xiaobin.
1 Binomial Tree Binomial tree. n Recursive definition: B k-1 B0B0 BkBk B0B0 B1B1 B2B2 B3B3 B4B4.
Four different data structures, each one best in a different setting. Simple Heap Balanced Heap Fibonacci Heap Incremental Heap Our results.
Data Structure II So Pak Yeung Outline Review  Array  Sorted Array  Linked List Binary Search Tree Heap Hash Table.
Gerth stølting Brodal 1 Closing a Classical Data Structure Problem Gerth Stølting Brodal : Strict Fibonacci Heaps joint work with George Lagogiannis Robert.
Data StructuresData Structures Priority Queue. Recall Queues FIFO:First-In, First-Out Some contexts where this seems right? Some contexts where some things.
Heaps & Priority Queues
1 Fat heaps (K & Tarjan 96). 2 Goal Want to achieve the performance of Fibonnaci heaps but on the worst case. Why ? Theoretical curiosity and some applications.
Two-tier relaxed heaps Presented by Claus Jensen Joint work with Amr Elmasry and Jyrki Katajainen Slides available at
CMSC 341 Binomial Queues and Fibonacci Heaps. Basic Heap Operations OpBinary Heap Leftist Heap Binomial Queue Fibonacci Heap insertO(lgN) deleteMinO(lgN)
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.
Fibonacci Heaps.
Fibonacci Heaps. Analysis FibonacciAnalysis.ppt Video  iew/cop5536sahni
1 Chapter 6 Heapsort. 2 About this lecture Introduce Heap – Shape Property and Heap Property – Heap Operations Heapsort: Use Heap to Sort Fixing heap.
1 Fibonacci heaps: idea List of multiway trees which are all heap-ordered. Definition: A tree is called heap-ordered if the key of each node is greater.
Fibonacci Heap Fibonacci heapshave better asymptotic time bounds than binary heaps for the INSERT, UNION, and DECREASE-KEY operations, and they.
Fibonacci Heaps. Fibonacci Binary insert O(1) O(log(n)) find O(1) N/A union O(1) N/A minimum O(1) O(1) decrease key O(1) O(log(n)) delete O(log(n) O(log(n))
Leftist Trees Linked binary tree.
Data Structures Binomial Heaps Fibonacci Heaps Haim Kaplan & Uri Zwick
Binomial heaps, Fibonacci heaps, and applications
Heaps 8/2/2018 Presentation for use with the textbook Data Structures and Algorithms in Java, 6th edition, by M. T. Goodrich, R. Tamassia, and M. H. Goldwasser,
Heaps Binomial Heaps Lazy Binomial Heaps 1.
Source: Muangsin / Weiss
Priority Queues MakeQueue create new empty queue
Fibonacci Heaps Remove arbitrary is useful in (for example) correspondence structures and may also be used to do an increase key in a min structure (remove.
A simpler implementation and analysis of Chazelle’s
ערמות בינומיות ופיבונצ'י
Closing a Classical Data Structure Problem Gerth Stølting Brodal
Strict Fibonacci Heaps
Heaps © 2014 Goodrich, Tamassia, Goldwasser Heaps Heaps
Binary and Binomial Heaps
Binomial heaps, Fibonacci heaps, and applications
HEAPS.
Fibonacci Heaps.
Binomial heaps, Fibonacci heaps, and applications
Priority Queues Supports the following operations. Insert element x.
CS 6310 Advanced Data Structure Wei-Shian Wang
Presentation transcript:

Strict Fibonacci Heaps Gerth Stølting Brodal Aarhus University George Lagogiannis Robert Endre Tarjan Agricultural University of Athens Princeton University & HP 44th Annual ACM Symposium on Theory of Computing, New Yorker Hotel, New York, May 22, 2012

2 (J,6) The Problem — Priority Queues (A,27) (C,11) (M,36) (B,14) (X,86)  I NSERT (value, key)  F IND M IN  D ELETE M IN / D ELETE (&value)  M ELD (Q 1,Q 2 )  D ECREASE K EY (&value, Δ) (K,54) (D,24) (Z,29)(W,6) Q1Q1 Q2Q2 12 A 15 Applications t s  Shortest Path Dijkstra (1956)  Minimum Spanning Tree Borůvka (1926) Jarník (1930) (n node, m edges) (m+n)∙log n m+n∙log n m∙β(m,n) MST only I NSERT /D ELETE M IN + D ECREASE K EY Fredman, Tarjan 1984

3 Williams 1964 Vuillemin 1978 Fredman Tarjan 1984 Driscoll et al Brodal 1995 Brodal 1996 Brodal Lagogianis Tarjan STOC 2012 Insertlog n FindMin Deletelog n n Meld-log n DecreaseKeylog n n11 11 History Amortized complexity (Tarjan 1983) Binary heaps Binomial queues Fibonacci heaps Run-relaxed heaps Arrays Complicated Strict Fibonacci heaps Pointer Based

4 Binary heaps 1964 Binomial queues 1978 Fibonacci heaps 1984 Run-relaxed heaps 1988 Brodal 1995 Brodal 1996 Strict Fibonacci heaps 2012 Heap-order Rigid structure Forest Linking Subtrees cut Cascades  Amortized D ECREASE K EY Global control Redundant counters Local control Redundant counters Local redundant counters Heap order violations Global partial control Pigenhole principle Technical History Binary heaps Min Bionomial queuesFibonacci heaps single tree

5 Ideas color WHITERED WHITE color Invariants 1. white nodes share one color record 2. white children left of red 3. root is red M ELD smallest tree red + link Intuition 1. Only maintain structure for white nodes 2. Red non-root nodes never increase degree 3. D ELETE : O(1) red nodes white Definitions 1. white node rank = #white children 2. D ECREASE K EY : cut + mark parent (if white) 1 Invariants 1. i’th rightmost white child of a white node: rank + #marks ≥ i #marks + #white roots = O(log n) Theorem max rank O(log n) white root 0

6 Priority Queue Operations  F IND M IN = return root  I NSERT = make single red node + M ELD  D ELETE = D ECREASE K EY to - + D ELETE M IN  M ELD = color smaller tree red + link + O(1) transformations  D ECREASE K EY = cut + link with root + O(1) transformations  D ELETE M IN = cut root + find new root + O(log n) link + O(log n) transformations root degree +1; white root (+1); marks (+1) root degree +1 root degree +O(log n); white root +O(log n) Invariant R = α ·log (3/2 · #white nodes + #red nodes) + β  degree unmarked white nodes ≤ R  degree red and marked white nodes ≤ R – 1

7 White root reduction Two white roots of rank r is replaced by one rank r+1; increases root degree by one One node mark reduction White node with ≥ 2 marks becomes a white root (unmarked); increases the root degree by one Two node mark reduction Two nodes of equal rank r with 1 mark become unmarked; one parent one more mark Root degree reduction Converts two red nodes to white; reduces the root degree by two; creates one new white root Transformations below root y x ≥ 2 marks z y x r/1 yx z below root r/0 x root z 0/0 1/0 xz root y y r / m = rang / #marks

8 singles color-record root size non-linkable-child Q-head heap record fix-list rank-list fix-list leftright transformable nodes with markswhite roots node marked rank-list pointers from unmarked white nodes with rank 1 and with white parent transformable incdec rank maximum rank white roots Representation ref-count active... Q-prev x left-child rank left right parent flag color record Q-next

9 Thank You Williams 1964 Vuillemin 1978 Fredman Tarjan 1984 Driscoll et al Brodal 1995 Brodal 1996 Brodal Lagogianis Tarjan STOC 2012 Insertlog n FindMin Deletelog n n Meld-log n DecreaseKeylog n n11 11 Binary heaps Binomial queues Fibonacci heaps Run-relaxed heaps Strict Fibonacci heaps Amortized Arrays Pointer Based