Algorithms and Data Structures Grouptildeweb.au.dk/au121/slides/fastvip14.pdf · Mikkel Engelbrecht...
Transcript of Algorithms and Data Structures Grouptildeweb.au.dk/au121/slides/fastvip14.pdf · Mikkel Engelbrecht...
Algorithms and Data Structures Group
Gerth Stølting Brodal
Faculty Meeting, Department of Computer Science, Aarhus University, October 3, 2014
VIP
Lars Arge (Professor)
Gerth Stølting Brodal (Lektor)
Peyman Afshani (Adjunkt)
Kasper Green Larsen (Adjunkt)
PostDocs
Allan Grønlund Jørgensen (HTF)
Wanbin Son
Zengfeng Huang
Constantinos Tsirogiannis (AUFF)
PhD students
Bryan Wilkinson
Edvin Berglin
Ingo van Duijn
Jakob Truelsen
Jesper Asbjørn Sindahl Nielsen
Jungwoo Yang
Morten Revsbæk
Sarfraz Raza
Mathias Rav
Konstantinos Mampentzidis
MSc students
Claus Jespersen
Mikkel Engelbrecht Hougaard
Bo Mortensen
Programmer Svend Christian Svendsen
Administration Trine Ji Holmgaard Jensen, Katrine Østerlund Rasmussen, Ellen Kjemtrup
Weekly visitors
Peder Klith Bøcher Brody Steven Sandel (Biodiversity Group)
Events Workshop on Massive Data Algorithmis (2009 -)
Symposium on Computational Geometry (2009)
European Symposium on Algorithms / ALGO 2016
MADALGO Summer Schools 2007, 2008, 2010 -
MADALGO retreat (October)
Research – Efficiency
O(n3)
O(n2)
O(nlog2 n)
O(nlog n)
O(nlog n
loglog n)
quartet distance between two trees
?
O(log n)
O(log n
loglog n)
O(loglog n)
O( loglog n)
O(1)
integer sorting, cost per element
?
Less practical ?
Deeper insights
Improved
asymptotics
More complicated ?
lower bound ?
algorithm engineering
?
Algorithms Research
Theory
Algorithm engineering
Applications
Peyman
Gerth
Lars
EcoInformatics BioInformatics
COWI, DES, EIVA, …
Kasper
Research – Models of Computation
RAM model memory access and other operations O(1), sometimes * is (1)
Pointer model disallow arrays, memory is a graph with O(1) out-degree
Functional model pointer model with no side-effects, implies persistence
Comparison model/decision trees simple lower bounds
Cell-probe model strong lower bounds, applies to RAM model
Bit-probe model fundamental lower bounds, special case of cell-probe
Implicit model O(1) working space, store information as input permutation
IO model focus on number of memory-disk transfers
Cache-oblivious model abstract model to model multiple memory layers
Streaming model limited working space, single or multiple scans of input
NEW
Integer Sorting Results
Bucket sort O(n+2w)
Radix sort; Hollerith 1887 O nw
log n
van Emde Boas 1975 Willard 1983
O n logw superlinear space expected
Kirkpatrick and Reicsh 1983 O n logw
log n
Merge sort: von Neumann 1945 O n log n comparison based optimal
Thorup and Han 2002 O n log (w/log n)
O n log log n expected
Andersson et al. 1998 O(n) expected, w ≥ Ω log2+εn
Belazzougui, Brodal, Nielsen 2014 O(n) expected, w ≥ Ω log2n ∙ log log n
Time per element
w log2 n·loglog n log2+ε n
O log log n
O(1)
log n
1
2
3
1
2
3
? (n words of w bits)
Threesomes, Degenerates, and Love Triangles
Allan Grønlund, Seth Pettie FOCS 2014
3SUM problem : Given real numbers x1,..., xn, does there exist xi + xj + xk = 0 ?
Conjecture : 3SUM requires time Θ(n2)
Theorem : 3SUM can be solved in time O(n2 / (log n/loglog n)2/3)
Theorem’ : 3SUM has decision tree complexity O(n3/2 log n)
3 2 -9 11 -7 5 9 10 -4 6
Planar Orthogonal Skyline Queries
Space (words)
Query
Reporting O(n)
O(nlglg n) O(nlgε n)
O(klgε n) O(klglg n + lg n/lglg n)
O(k + lg n/lglg n)
Counting O(n)
O(nlgO(1) n) O(lg n/lglg n) (lg n/lglg n)
Gerth Brodal, Kasper Larsen SWAT 2014
Half-Space Range Reporting
Peyman Afshani JCGA 2013
Query time Q(n) Space n
Q(n)
d
Memory Hierarchies
Processor L1 L2 A
R
M L3 Disk
bottleneck
increasing access times and memory sizes
CPU
IO Model
I/O model...but algorithms do not know B and M
Assume optimal cache replacement strategy
Optimal on all levels (under some assumptions)
Memory, size M
Block size B
Alok Aggarwal and Jeff Vitter. The Input/Output Complexity of Sorting and Related Problems. Communications of the ACM 31(9) 1988.
Matteo Frigo, Charles E. Leiserson, Harald Prokop, Sridhar Ramachandran. Cache-Oblivious Algorithms. ACM Transactions on Algorithms, 8(1), Article No. 4, 2012.
Disk
Cache-Oblivious Model
Cost = # block transfers
Scanning O(N/B) IOs, Sorting O(N/BlogM/B N/B) IOs
Computing Multiresolution Rasters
Input
n x n n2 x n2
n3 x n3
n4 x n4 n x n
Output
IO Model - O(Sort(n2)) IOs Lars Arge, Herman Haverkort and Constantinos Tsirogiannis. ACM SIGSPATIAL 2012. Cache Oblivious Model - O(Scan(n2)) IOs Lars Arge, Gerth Stølting Brodal, Jakob Truelsen, and Constantinos Tsirogiannis. ESA 2013.
x
n x n
average n2
2=
n
=1O(n2) Output size =
... 1x1
RAM algorithm O(n2) time
Terrain Research
3 2 4
7 5 8
7 1 9
3 2 4
7 5 8
7 1 9
3 2 4
7 5 8
7 1 9
3 2 4
7 5 8
7 1 9
Height matrix
Terrain model
Areas Flooded by 100 mm Rain
SoCG 2010 MADALGO prototype SCALGO prodct
Lars Arge, Morten Revsbæk, and Norbert Zeh SoCG 2010
Algorithms Research
Theory
Algorithm engineering
Applications
Peyman
Gerth
Lars
EcoInformatics BioInformatics
COWI, DES, EIVA, …
Kasper