(a survey on) priority queues
DESCRIPTION
(A Survey on) Priority Queues. Gerth Stølting Brodal Aarhus Universty. IanFest , University of Waterloo, Waterloo, Ontario , Canada, August 14-15, 2013. Program. Ian Munro : A Constant Time Priority Queue Gerth Brodal : A Constant Time Priority Queue. Priority Queue. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: (A Survey on) Priority Queues](https://reader036.vdocuments.net/reader036/viewer/2022062323/56815ab2550346895dc861ca/html5/thumbnails/1.jpg)
(A Survey on) Priority Queues
IanFest, University of Waterloo, Waterloo, Ontario, Canada, August 14-15, 2013
Gerth Stølting BrodalAarhus Universty
![Page 2: (A Survey on) Priority Queues](https://reader036.vdocuments.net/reader036/viewer/2022062323/56815ab2550346895dc861ca/html5/thumbnails/2.jpg)
2
ProgramIan Munro : A Constant Time Priority QueueGerth Brodal : A Constant Time Priority Queue
![Page 3: (A Survey on) Priority Queues](https://reader036.vdocuments.net/reader036/viewer/2022062323/56815ab2550346895dc861ca/html5/thumbnails/3.jpg)
3
Priority Queue
InsertExtractMi
n
FindMinDeleteDecreaseKeyMeldExtractMax (double-ended priority queue)
![Page 4: (A Survey on) Priority Queues](https://reader036.vdocuments.net/reader036/viewer/2022062323/56815ab2550346895dc861ca/html5/thumbnails/4.jpg)
4Communications of the ACM (1962)
42 7 66 13
7 13
71
2 3
4 5 6 7,4 ,5 ,6 ,7
,5
,5
,7
7,5 7,5 13,742,4 7,5 66,613,71 2 3 4 5 6 7
13
42
![Page 5: (A Survey on) Priority Queues](https://reader036.vdocuments.net/reader036/viewer/2022062323/56815ab2550346895dc861ca/html5/thumbnails/5.jpg)
5
Com
mun
icati
ons
of th
e AC
M (1
964)
![Page 6: (A Survey on) Priority Queues](https://reader036.vdocuments.net/reader036/viewer/2022062323/56815ab2550346895dc861ca/html5/thumbnails/6.jpg)
6
1 2 3 4 5 6
Heap
3 66 42
5 7
2
2 5 7 3 66 42
• Simple• Implicit – single array of size n• Insert and ExtractMin O(log n) Willliams (1964)• Construction O(n) Floyd(1964)• Insert (loglog n) comparisons Gonnet, Munro (1986)• Select k smallest in O(k) time Frederickson (1993)
![Page 7: (A Survey on) Priority Queues](https://reader036.vdocuments.net/reader036/viewer/2022062323/56815ab2550346895dc861ca/html5/thumbnails/7.jpg)
7
Comparison Lower Bound
n x Insert + n x ExtractMin Sorting
Insert or ExtractMin (log n) comparisons
ComparisonsInsert ExtractMin
Heap O(log n) O(log n)Binary search O(log n) 0
Carlsson, Munro, Poblette (1988) O(1) O(log n)
![Page 8: (A Survey on) Priority Queues](https://reader036.vdocuments.net/reader036/viewer/2022062323/56815ab2550346895dc861ca/html5/thumbnails/8.jpg)
8
Priority Queues Directions of Research
Comparisonsvs
Bit-tricks
Single processorvs
Parallel
RAMvs
Hierarchical memory
Implicitvs
Space wasting
Insert-ExtractMin
vsDecreaseKey,
Meld,…
Weakvs
Strong
Ovs
Constants
Simplicityvs
Let’s-do-something-complicated
Worst-casevs
Amortized
Theoryvs
Implementation
Awarevs
Oblivious
![Page 9: (A Survey on) Priority Queues](https://reader036.vdocuments.net/reader036/viewer/2022062323/56815ab2550346895dc861ca/html5/thumbnails/9.jpg)
9
Open Problem
Strongly implicit priority queue
worst-caseO(1) Insert and O(log n) ExtractMin
supporting identical elementsO(1) swaps per operation
and cache oblivious optimal ?
Can only store n + array
between operations
![Page 10: (A Survey on) Priority Queues](https://reader036.vdocuments.net/reader036/viewer/2022062323/56815ab2550346895dc861ca/html5/thumbnails/10.jpg)
Insert ExtractMin
Implicit Swaps
Identical elements
Cache oblivious
Heaps log n log n Strong log n Yes
Carlsson, Munro, Poblette (1988) 1 log n Weak log n YesArge, Bender, Demaine, Holland-Minkley, Munro (2002) log n log n log n Yes Yes
Munro, Franceschini (2006) log n log n Strong 1Harvey, Zatloukal (2004) 1 log n Strong log n YesBrodal, Nielsen, Truelsen (2013) 1 log n Strong log n
Open 1xx
log nxx
Strong 1
x
Yes Yesx
(Some Random) Results
10
amortized bounds
Implicit dictionary O(n) Munro, Suwanda (1980)
O(log2 n) Munro (1986)O(log2 n/loglog n) Franceschini, Grossi, Munro, Pagli (2004)
![Page 11: (A Survey on) Priority Queues](https://reader036.vdocuments.net/reader036/viewer/2022062323/56815ab2550346895dc861ca/html5/thumbnails/11.jpg)
11
Some Observations
42 66 66 42
Bit = 1 Bit = 0
66 66
???
Pair encoding: Munro (1986)
2log n elements can encode a pointer
O(log n) time allows pointer manipulations
Strict implicit + O(1) insertions
Insertions ”close to oblivious”
![Page 12: (A Survey on) Priority Queues](https://reader036.vdocuments.net/reader036/viewer/2022062323/56815ab2550346895dc861ca/html5/thumbnails/12.jpg)
12
Strict Implicit Priority QueueO(1) Insert and O(log n) ExtractMin
• Forest, trees powers-of-2• Looser trees• Pair-encode bits at nodes• Insertions balance using LSB(n)
…work in progress Brodal, Nielsen, Truelsen (2013)
![Page 13: (A Survey on) Priority Queues](https://reader036.vdocuments.net/reader036/viewer/2022062323/56815ab2550346895dc861ca/html5/thumbnails/13.jpg)
Insert ExtractMin
Implicit Swaps
Identical elements
Cache oblivious
Heaps log n log n Strong log n Yes
Carlsson, Munro, Poblette (1988) 1 log n Weak log n YesArge, Bender, Demaine, Holland-Minkley, Munro (2002) log n log n log n Yes Yes
Munro, Franceschini (2006) log n log n Strong 1Harvey, Zatloukal (2004) 1 log n Strong log n YesBrodal, Nielsen, Truelsen (2013) 1 log n Strong log n
Open 1xx
log nxx
Strong 1
x
Yes Yesx
(Some Random) Results
13
amortized bounds
Implicit dictionary O(n) Munro, Suwanda (1980)
O(log2 n) Munro (1986)O(log2 n/loglog n) Franceschini, Grossi, Munro, Pagli(2004)
Thank You !