Strict Fibonacci Heaps

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
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
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.
Fibonacci Heaps. Single Source All Destinations Shortest Paths
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.
ANALYSIS OF SOFT HEAP Varun Mishra April 16,2009.
1 Binomial heaps, Fibonacci heaps, and applications.
Strict Fibonacci Heaps Gerth Stølting Brodal Aarhus University George Lagogiannis Robert Endre Tarjan Agricultural University of Athens Princeton University.
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
„Policy-Based Benchmarking of Weak Heaps and Their Relatives“ Asger Bruun*, Stefan Edelkamp, Jyrki Katajainen*, Jens Rasmussen* *University of Copenhagen.
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.
1 Binomial Tree Binomial tree. n Recursive definition: B k-1 B0B0 BkBk B0B0 B1B1 B2B2 B3B3 B4B4.
Gerth stølting Brodal 1 Closing a Classical Data Structure Problem Gerth Stølting Brodal : Strict Fibonacci Heaps joint work with George Lagogiannis Robert.
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)
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.
Heaps (8.3) CSE 2011 Winter May 2018.
Data Structures Binomial Heaps Fibonacci Heaps Haim Kaplan & Uri Zwick
Topics covered (since exam 1):
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.
Binomial heaps, Fibonacci heaps, and applications
Source: Muangsin / Weiss
Bohyung Han CSE, POSTECH
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.
Topics covered (since exam 1):
A simpler implementation and analysis of Chazelle’s
© 2013 Goodrich, Tamassia, Goldwasser
ערמות בינומיות ופיבונצ'י
Fundamental Structures of Computer Science
Priority Queues (Chapter 6.6):
Balanced-Trees This presentation shows you the potential problem of unbalanced tree and show two way to fix it This lecture introduces heaps, which are.
Closing a Classical Data Structure Problem Gerth Stølting Brodal
Fibonacci Heaps Remove arbitrary is useful in (for example) correspondence structures.
Heaps © 2014 Goodrich, Tamassia, Goldwasser Heaps Heaps
Binary and Binomial Heaps
Binomial heaps, Fibonacci heaps, and applications
HEAPS.
Binomial heaps, Fibonacci heaps, and applications
Fibonacci Heaps.
Binomial heaps, Fibonacci heaps, and applications
Priority Queues (Chapter 6):
Priority Queues Supports the following operations. Insert element x.
Topics covered (since exam 1):
CS 6310 Advanced Data Structure Wei-Shian Wang
Fibonacci Heaps & Doubled-Ended Heap Structures
Heaps & Multi-way Search Trees
Priority Queues Binary Heaps
A Heap Is Efficiently Represented As An Array
Heaps Section 6.4, Pg. 309 (Section 9.1).
CS210- Lecture 13 June 28, 2005 Agenda Heaps Complete Binary Tree
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

The Problem — Priority Queues Insert(value, key) FindMin DeleteMin / Delete(&value) Meld(Q1,Q2) DecreaseKey(&value, Δ) (C,11) (M,36) (B,14) (X,86) 12 (A,27) (K,54) A 15 (D,24) (Z,29) (W,6) DecreaseKey = Delete+Insert Borůvka = problem to electrify the Czech Republic Jarnik = Prim(1957)s algorithm β(m,n) is for all pratical valures 3-4. Applications 15 1 8 12 9 16 25 11 3 13 22 5 14 10 6 2 17 4 19 t s Insert/DeleteMin 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) Fredman, Tarjan 1984 + DecreaseKey 15 1 8 12 9 16 25 11 3 13 22 5 14 10 6 2 17 4 19 MST only Fredman, Tarjan 1984 + DecreaseKey

Amortized complexity (Tarjan 1983) History Binomial queues Run-relaxed heaps Strict Fibonacci heaps Binary heaps Fibonacci heaps Williams 1964 Vuillemin 1978 Fredman Tarjan 1984 Driscoll et al. 1988 Brodal 1995 Brodal 1996 Lagogianis STOC 2012 Insert log n 1 FindMin Delete n Meld - DecreaseKey Run-relaxed heaps : SSSP MST real time applications, parallel algorithms worst-case guarantees important, single source shortest paths Since 90s people working on the problem incl Katajainen, Elm-Asry, Tarjan, Kaplan... trying to simplify solution Arrays Complicated Pointer Based Amortized complexity (Tarjan 1983)

Global partial control Technical History Min 8 7 4 6 86 17 11 16 27 27 12 6 13 24 42 54 36 86 Local control = consequence of wanting Meld to be O(1) Binary heaps Fibonacci heaps Binary heaps 1964 Binomial queues 1978 Fibonacci heaps 1984 Run-relaxed heaps 1988 Brodal 1995 1996 Strict Fibonacci heaps 2012 Heap-order Rigid structure Forest Linking Subtrees cut Cascades  Amortized DecreaseKey Global control Redundant counters Local control Local redundant counters Heap order violations Global partial control Pigenhole principle single tree

Ideas Meld smallest tree red + link 4 12 16 8 5 42 12 6 21 11 7 11 Invariants white nodes share one color record white children left of red root is red color white 15 14 23 15 14 23 color red Meld smallest tree red + link white root 2 Intuition Only maintain structure for white nodes Red non-root nodes never increase degree Delete: O(1) red nodes white 1 Definitions white node rank = #white children DecreaseKey: cut + mark parent (if white) Invariants i’th rightmost white child of a white node: rank + #marks ≥ i - 1 #marks + #white roots = O(log n) Theorem max rank O(log n)

Priority Queue Operations 2 FindMin = return root Insert = make single red node + Meld Delete = DecreaseKey to - + DeleteMin Meld = color smaller tree red + link + O(1) transformations DecreaseKey = cut + link with root + O(1) transformations DeleteMin = cut root + find new root + O(log n) link + O(log n) transformations root degree +1 root degree +1; white root (+1); marks (+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

One node mark reduction Two node mark reduction Transformations Root degree reduction Converts two red nodes to white; reduces the root degree by two; creates one new white root White root reduction Two white roots of rank r is replaced by one rank r+1; increases root degree by one x root z 0/0 1/0 y y x z below root r/0 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 below root y x ≥ 2 marks z y x r/1 r / m = rang / #marks

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

Thank You Williams Vuillemin Fredman Tarjan Driscoll et al. Binomial queues Binary heaps Fibonacci heaps Run-relaxed heaps Strict Fibonacci heaps Williams 1964 Vuillemin 1978 Fredman Tarjan 1984 Driscoll et al. 1988 Brodal 1995 Brodal 1996 Lagogianis STOC 2012 Insert log n 1 FindMin Delete n Meld - DecreaseKey Arrays Pointer Based Amortized Thank You