Dynamic Lower Bounds
Embed Size (px)
description
Transcript of Dynamic Lower Bounds
Lower Bounds for Succinct Data Structures
Dynamic Lower BoundsMihai Ptracu
What can binary trees do?maintain aggregates over a static structure
insert and delete nodes
split/concatenateMaintain a collection of lists under:split / concatenatelist(v) :return the head of vs listMaintain an array A[n] under:update(i, ): A[i] += sum(i): return A[0] + + A[i]Maintain a list L under:insert/delete nodesselect(k): return kth node in listWhat can binary trees do?partial sumstu=tq=O(lg n)
dynamic rank/select tu=tq=O(lg n/lglg n)
dynamic connectivity (in trees) tu=tq=O(lg n)Maintain a collection of lists under:split / concatenatelist(v) :return the head of vs listMaintain an array A[n] under:update(i, ): A[i] += sum(i): return A[0] + + A[i]Maintain a list L under:insert/delete nodesselect(k): return kth node in listLower Bounds[Fredman, Saks89]all 3 problemsif tu=lgO(1)n, then tq=(lg n/lglg n)[P., Demaine04]partial sums, dynamic connectivitymax{tu, tq} =(lg n)if one operation takes O(logBn), the other is (B lg n)
+++++++++++++updateLower Bounds[Fredman, Saks89]all 3 problemsif tu=lgO(1)n, then tq=(lg n/lglg n)[P., Demaine04]partial sums, dynamic connectivitymax{tu, tq} =(lg n)if one operation takes O(logBn), the other is (B lg n)
++++++++++++update+Fast update: tu = O(logBn)Slow query: tq = O(B logBn)
Lower Bounds[Fredman, Saks89]all 3 problemsif tu=lgO(1)n, then tq=(lg n/lglg n)[P., Demaine04]partial sums, dynamic connectivitymax{tu, tq} =(lg n)if one operation takes O(logBn), the other is (B lg n)
++++++++++++update+Slow update: tu = O(B logBn)Fast query: tq = O(logBn)
Lower Bounds[Fredman, Saks89]all 3 problemsIf tu=lgO(1)n, then tq=(lg n/lglg n)
[P., Demaine04]partial sums, dynamic connectivitymax{tu, tq} =(lg n)If one operation is O(logBn), the other is (B lg n)Tight to partial sumsWhen tutq, tight for dynamic connectivity
[P., Thorup10]dynamic connectivityIf tu=o(lg n), then tq n1-o(1)
Uses of binary trees partial sumsmax{tu, tq} = B logBnmin{tu, tq} = logBn
dynamic connectivitytu = o(lg n) tq linear scantu = B logBn tq = logBn
? dynamic rankingtu lg n tq = (lg n/lg tu)[Chan, P.10] tq = O(lg n/lglg n) , tu = O(lg0.5+n)Union-Findamortized: tu = tq = ()worst case + union only on roots: tu , tq = (lg n/lg tu)[Alstrup, Ben-Amram, Rauhe99]worst case + general union: tu , tq = O(lg n/lg tu)
Another application of our technique:For general union, if tu=o(lg n/lglg n), then tq n1-o(1)
Dont rush into a union. Take time to find your roots!Lower Bounds via Epochstimequeryepoch i: Bi updatesepoch i+1: Bi+1 updatesChoose B >> tu
Hard InstancetimequeryHard Instance (cont.)Let W = width of edges(W=n1-)Operations:update (setting one ) W union callsquery: color root and leaf with C colors (C=n) W union callstest consistency of coloring 2C find queriesC colorsC colorsThe Lower BoundW = width of edges = n1-; C = # colors = nOperations:update: W unionsquery: W unions + 2C queries
Theorem: Let B>>tu. The query needs to read (W) cells from each epoch, in expectation.
So W tu + C tq W lg n/lg tu.If tu=o(lg n/lglg n), then tq W/C = n1-2.Hardness for One EpochtimeO(Bi-1Wtu) cellsBiW updates?????????????Bi queriesCommunicationtime?????fix by public coinsBi updatesO(Bi-1Wtu) cells
Bi queriesfirst messageAlice:Bi permutations on [W] (1, 2,)Bob:for each i a coloring of input&output with C colorsGoal:test if all colorings are consistentCommunication (cont.)Alice:Bi permutations on [W] (1, 2,)Bob:for each i a coloring of input&output with C colorsGoal:test if all colorings are consistentLower bound: (BiW lg W) = highest possibleProof: Encoding. If input/output coloring of is consistent,there are only (W/C)W possibilities for .So communication lg(W!) W lg(W/C) = (W lg W)
16Communication (cont.)Alice:Bi permutations on [W] (1, 2,)Bob:for each i a coloring of input&output with C colorsGoal:test if all colorings are consistentLower bound: (BiW lg W) = highest possibleUpper bound: Alice & Bob simulate the data structureThe queries run O(BiW tq) cells probes.
We use O(lg n) bits per each
addresscontents17NondeterminismW = { cells written by epoch i}R = { cells read by the Bi queries }The prover sends:address and contents of WRcost: |WR|O(lg n) bitsseparator between W\R and R\Wcost: O(|W| + |R|) bits
Lower bound: (BiW lg W)Since |W|,|R|=BiW O(lg n/lglg n), separator is negligible.So |WR|= (BiW). QED.WRAn aside: DictionariesW = { cells written by epoch i}R = { cells read by the Bi queries }The prover sends:address and contents of WRcost: |WR|O(lg n) bitsseparator between W\R and R\Wcost: O(|W| + |R|) bitsWRStoring AU takes O(A lg(U/A)) bits.
But: if each xA has k bits of data,retrieval-only dictionary takes O(Ak) bitsE.g. via cuckoo hashing.Open problemsFor static data structures of size n lgO(1)n, have tq=(lg n/lglg n)If tu=lgO(1)n, should read (lg n/lglg n) cells per epochSo we hope to get max{tu,tq} = (lg2n/lg2lg n)Trouble (so far): separator too big OPEN: (lg2n/lg2lg n) even in the bit-probe model.tqtumax{tu,tq}=(lg n)tu=O(B logBn), tq=O(logBn)tqn1-o(1)Open problems[P. STOC10] Proposal for max{tu,tq} = (n)
tqtumax{tu,tq}=(lg n)tu=O(B logBn), tq=O(logBn)tqn1-o(1)How to get (n) Conjecture: if uX