1 / 23

Time-Space Trade-Offs for 2D Range Minimum Queries

Time-Space Trade-Offs for 2D Range Minimum Queries. Gerth Stølting Brodal Aarhus University. Join work with Pooya Davoodi and S. Srinivasa Rao. Dagstuhl Seminar on Data Structures , February 28 - March 5, 2010. The 2D Range Minimum Problem. j ’.

saima
Download Presentation

Time-Space Trade-Offs for 2D Range Minimum Queries

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Time-SpaceTrade-Offs for 2D Range Minimum Queries GerthStølting Brodal Aarhus University JoinworkwithPooyaDavoodi and S. SrinivasaRao Dagstuhl Seminar on Data Structures, February 28 - March 5, 2010

  2. The 2D Range Minimum Problem j’ Preprocess an m x n-matrix of sizeN = n ∙ m, m ≤ n, to efficiently support range minimum queries RMQ([i1, i2]x[j1, j2]) = (i’, j’) Ai’, j’ = min{ Ai’’, j’’ | (i’’, j’’ )[i1,i2] x [j1,j2] }, (i’, j’ )[i1,i2]x[j1,j2] i’ Minimum

  3. Models j’ Encoding model • Queriescanaccessdata structure but not input matrix Indexingmodel • Queriescanaccessdata structureand readinput matrix i’ Minimum

  4. Some Trivial Examples... j’ i’ Minimum

  5. Results

  6. 1D Range Minimum Queries Fischer and Heun (2007) NEW (matching upper bound) Fischer (Latin 2010)

  7. 2D Range Minimum Queries NEW NEW NEW Proof Demain et al. (2009)

  8. 1D

  9. LowerBound (1D, Encoding) • For each input array consider the Cartesiantree • Eachbinarytree is a possibleCartesiantree • RMQ queriescanreconstruct the Cartesiantree • # Cartesiantrees is • # bits ≥ = 2n - Θ(log n)

  10. Upper Bound (1D, Encoding) • For an input array consider the Cartesiantree • Succintrepresentationusing4n+o(n) bits and O(1) query time (Sadakane 2007) • Improved to 2n+o(n) (Fischer 2010)

  11. Upper Bounds (1D, Indexing) C • BuildencodingO(N/c) bit structure for block minimums • RMQ = query to encodingstructure + 3c elements, i.e. query time O(c) block minimums (implicit)

  12. LowerBounds (1D, Indexing) ThmSpace N/cbits impliesΩ(c)query time • ConsiderN/Cqueries for cN/cdifferent {0,1} inputs withexactlyonezero in eachblock • cN/c / 2N/c inputs sharesome data structure • Everyquery is a decision tree of height≤d N/c q1 q2 qN/c

  13. LowerBounds (1D, Indexing) cont. • Combinequeries to decision treeidentifying input • Prunenon-reachable branches # zeroesonanypath ≤ N/c • query time d = Ω(c) N/c q1 q2 qN/c • N

  14. 2D

  15. Upper Bounds (2D, Indexing) O(1) time usingO(N)words Atallah and Yuan (SODA 2010) • Usingtwo-levels of recursion, tabulating micro-blocks of size loglogmxloglogn O(1) time usingO(N) bits

  16. Upper Bounds (2D, Indexing) cont. • Thm O(N/c ∙ log c) bits and O(c logc)query time • Buildlog cindexingstructures for compressed matrices for blocksizes2i x c/2i, eachusingO(N/c) bits and canlocateO(1)blockswith minimum key in O(1) time • Query: O(1) blocks for eachblocksize in time O(c) + elements not covered by blocks in time O(c log c)

  17. LowerBounds (2D, Indexing) C • As for 1D consider {0,1} matrices and partition the array intoblocks of c elements eachcontainingexactlyonezero • As for 1D an algorithmbeingable to identify the zero in eachblockusingN/c bits willrequiretime Ω(c)

  18. Upper Bounds (2D, Encoding) • Translate input matrix into rank matrix usingO(N log N) bits • Applyindexstructure to rank matrix usingO(N) bits achievingO(1)query time input matrix rank matrix

  19. NEW Proof LowerBound (2D, Encoding)Demaine et al. 2009 • Define a set of matrices where the RMQ answersdifferamong all matrices • Bits required is at least log = Ω(N log m)

  20. Conclusion

  21. 1D Range Minimum Queries Fischer and Heun (2007) NEW (matching upper bound) Fischer (Latin 2010)

  22. 2D Range Minimum Queries NEW ? NEW ? NEW Proof Demain et al. (2009)

  23. Tau ∙ Jërë-jëf ∙ Tashakkur ∙ S.aHHa ∙ Sag olun Giihtu ∙ Djakujo ∙ Dâkujemvám ∙ Thank you Tesekkürederim ∙ To-siä ∙ Merci ∙ Tashakur Taing ∙ Dankon ∙ Efharisto´ ∙ Shukriya ∙ Kiitos Dhanyabad ∙ Rakhmat ∙ Trugarez ∙ Asante Köszönöm ∙ Blagodarya ∙ Dziekuje ∙ Eskerrikasko Grazie ∙ Tak ∙ Bayarlaa ∙ Miigwech ∙ Dank u Spasibo ∙ Dêkujivám ∙ Ngiyabonga ∙ Dziakuj Obrigado ∙ Gracias ∙ A dank aych ∙ Salamat Takk ∙ Arigatou ∙ Tack ∙ Tänan ∙ Aciu Korp kun kah ∙ Multumesk ∙ Terimakasih ∙ Danke Rahmat ∙ Gratias ∙ Mahalo ∙ Dhanyavaad Paldies ∙ Faleminderit ∙ Diolch ∙ Hvala Kam-sa-ham-ni-da ∙ Xìexìe ∙ Mèrcie ∙ Dankie ThankYou

More Related