cache- oblivious data structures and algorithms for undirected bfs and sssp

Download Cache- Oblivious Data  Structures  and  Algorithms for  Undirected  BFS and SSSP

Post on 24-Feb-2016

57 views

Category:

Documents

0 download

Embed Size (px)

DESCRIPTION

Cache- Oblivious Data Structures and Algorithms for Undirected BFS and SSSP Rolf Fagerberg University of Southern Denmark - Odense with G.S. Brodal, U. Meyer, N. Zeh. Range Minimum Queries (Part II). Gerth Stlting Brodal Aarhus University. - PowerPoint PPT Presentation

TRANSCRIPT

The Encoding Complexity of Two Dimensional Range Minimum Data Structures

Algorithm Engineering, September 2013Data Structures, February-March 2010Data Structures, February-March 2006Cache-Oblivious and Cache-Aware Algorithms, July 2004Data Structures, February-March 2002Experimental Algorithmics, September 2000 Data Structures, February-March 2000Data Structures, March 1998Data Structures, February-March 1996

Cache-Oblivious Data Structures and Algorithms for Undirected BFS and SSSP

Rolf Fagerberg University of Southern Denmark - Odense

with G.S. Brodal, U. Meyer, N. Zeh1Range Minimum Queries (Part II)Gerth Stlting BrodalAarhus University

Dagstuhl Seminar on Data Structures and Advanced Models of Computation on Big Data, February 23-28, 2014Join work with Andrej Brodnik and Pooya Davoodi (ESA 2013)21234n131342128271461115373139921274416

2328513447m3424124911i1i2j2j1CostSpace (bits)Query timePreprocessing timeModelsIndexing (input accessible)Encoding (input not accessible)RMQ(i1, i2, j1, j2) = (2,3) = position of minAssumptionm nThe ProblemIndexing Model(input accessible)Encoding Model(input not accessable)m nPreprocessing:Do nothing !

Very fast preprocessingVery space efficientQueries O(mn)

Tabulate the answer to all ~ m2n2 possible queriesPreprocessing & spaceO(m2n2log n) bitsQueries O(1)

Store rank of all elementsPreprocessing & spaceO(mnlog n) bitsQueries O(mn)

Some (Trivial) Results4Encoding m = 1 (Cartesian tree)352104116719148352104116719148j1j2RMQ(j1, j2) = NCA(j1, j2)To support RMQ queries we need...tree structure (111101001100110000100100)mapping between nodes and cells (inorder)n1min ?5Indexing Model(input accessible)Encoding Model(input not accessable)m = 11D2n+o(n) bits, O(1) time [FH07]n/c bits (c) time [BDS10]n/c bits, O(c) time [BDS10] 2n - O(log n) bits2n+o(n) bits, O(1) time [F10]1 < m < nO(mnlog n) bits, O(1) time [AY10]O(mn) bits, O(1) time [BDS10]mn/c bits (c) time [BDS10]O(clog2 c) time [BDS10]O(clog c(loglog c)2) time [BDLRR12](mnlog m) bits [BDS10]O(mnlog n) bits, O(1) time [BDS10]O(mnlog m) bits, ? time [BBD13]m = nsquared(mnlog n) bits [DLW09]O(mnlog n) bits, O(1) time [AY10]

Some (Less Trivial) ResultsFH07 = Fischer & Heun, ESCAPE 2007DLW09 = Demaine, Landau & Weiman ICALP 2009AY10 = Atallah, Yuan SODA 2010F10 = Fischer STACS 2010BDLRR12 = Brodal, Davoodi, Lewenstein, Raman, Rao ESA 20126New Results O(nm(log m+loglog n)) bitstree representationcomponent decomposition O(nmlog mlog* n)) bitsbootstrapping O(nmlog m) bitsrelative positions of rootsrefined component construction

7Tree Representation114139612852107121081196754321RequirementsCells leafsQuery Answer = rightmost leaf 11413961285210712108672121110987654321Trivial solutionSort leafs(mnlog n) bits8

Components = 3114139612852107121081196754321ConstructionConsider elements in decreasing orderFind connected components with size L-adjacency |C1| 4-3, |Ci| 2mRepresentation

O(mn + mn/log n + mnlog m + mnlog(m))

= log n O(mn(log m+loglog n))114139612852107114139612852107114139612852107114139612852107114139612852107114139612852107112108C175432C31196C2114139612852107114139612852107114139612852107114139612852107114139612852107114139612852107114139612852107114139612852107LL-adjacencySpanning tree structuresSpanning tree edgesComponentroot positionsLocal leaf ranks in components9Indexing Model(input accessible)Encoding Model(input not accessable)m = 11D2n+o(n) bits, O(1) time [FH07]n/c bits (c) time [BDS10]n/c bits, O(c) time [BDS10] 2n - O(log n) bits2n+o(n) bits, O(1) time [F10]1 < m < nO(mnlog n) bits, O(1) time [AY10]O(mn) bits, O(1) time [BDS10]mn/c bits (c) time [BDS10]O(clog2 c) time [BDS10]O(clog c(loglog c)2) time [BDLRR12](mnlog m) bits [BDS10]O(mnlog n) bits, O(1) time [BDS10]O(mnlog m) bits, ? time [BBD13]m = nsquared(mnlog n) bits [DLW09]O(mnlog n) bits, O(1) time [AY10]

Resultsbetter upper or lower bound ?FH07 = Fischer & Heun, ESCAPE 2007DLW09 = Demaine, Landau & Weiman ICALP 2009AY10 = Atallah, Yuan SODA 2010F10 = Fischer STACS 2010BDLRR12 = Brodal, Davoodi, Lewenstein, Raman, Rao ESA 2012101D Range Minimum Queues

O(n log n) wordsO(n) wordsFischer Kasper Nielsen, Mathieu Dehouck, Sarfraz Raza 2013Each curve correpsonds to one input size111D Range Minimum QueuesKasper Nielsen, Mathieu Dehouck, Sarfraz Raza 2013

Each curve correpsonds to one input size121D Range Minimum QueuesKasper Nielsen, Mathieu Dehouck, Sarfraz Raza 2013

Each curve correpsonds to one input size131D Range Minimum QueuesKasper Nielsen, Mathieu Dehouck, Sarfraz Raza 2013

Each curve correpsonds to one input size14