Advertisement

Linear-Space Data Structures for Range Frequency Queries on Arrays and Trees

  • Stephane Durocher
  • Rahul Shah
  • Matthew Skala
  • Sharma V. Thankachan
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8087)

Abstract

We present O(n)-space data structures to support various range frequency queries on a given array A[0:n − 1] or tree T with n nodes. Given a query consisting of an arbitrary pair of pre-order rank indices (i,j), our data structures return a least frequent element, mode, or α-minority of the multiset of elements in the unique path with endpoints at indices i and j in A or T. We describe a data structure that supports range least frequent element queries on arrays in \(O(\sqrt{n / w})\) time, improving the \(\Theta(\sqrt{n})\) worst-case time required by the data structure of Chan et al. (SWAT 2012), where w ∈ Ω(logn) is the word size in bits. We describe a data structure that supports range mode queries on trees in \(O(\log\log n \sqrt{n / w})\) time, improving the \(\Theta(\sqrt{n} \log n)\) worst-case time required by the data structure of Krizanc et al. (ISAAC 2003). Finally, we describe a data structure that supports range α-minority queries on trees in O(α − 1 loglogn) time, where α ∈ [0,1] is specified at query time.

Keywords

Range Query Query Time Path Query Frequent Element Marked Node 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Belazzougui, D., Botelho, F.C., Dietzfelbinger, M.: Hash, displace, and compress. In: Fiat, A., Sanders, P. (eds.) ESA 2009. LNCS, vol. 5757, pp. 682–693. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  2. 2.
    Belazzougui, D., Gagie, T., Navarro, G.: Better space bounds for parameterized range majority and minority. In: Dehne, F., Solis-Oba, R., Sack, J.-R. (eds.) WADS 2013. LNCS, vol. 8037, pp. 121–132. Springer, Heidelberg (2013)Google Scholar
  3. 3.
    Chan, T.M., Durocher, S., Larsen, K.G., Morrison, J., Wilkinson, B.T.: Linear-space data structures for range mode query in arrays. In: Proc. STACS, vol. 14, pp. 291–301 (2012)Google Scholar
  4. 4.
    Chan, T.M., Durocher, S., Larsen, K.G., Morrison, J., Wilkinson, B.T.: Linear-space data structures for range mode query in arrays. Theory Comp. Sys. (2013)Google Scholar
  5. 5.
    Chan, T.M., Durocher, S., Skala, M., Wilkinson, B.T.: Linear-space data structures for range minority query in arrays. In: Fomin, F.V., Kaski, P. (eds.) SWAT 2012. LNCS, vol. 7357, pp. 295–306. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  6. 6.
    Chazelle, B.: Filtering search: A new approach to query-answering. SIAM J. Comp. 15(3), 703–724 (1986)MathSciNetCrossRefMATHGoogle Scholar
  7. 7.
    Durocher, S., He, M., Munro, J.I., Nicholson, P.K., Skala, M.: Range majority in constant time and linear space. In: Aceto, L., Henzinger, M., Sgall, J. (eds.) ICALP 2011, Part I. LNCS, vol. 6755, pp. 244–255. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  8. 8.
    Durocher, S., He, M., Munro, J.I., Nicholson, P.K., Skala, M.: Range majority in constant time and linear space. Inf. & Comp. 222, 169–179 (2013)MathSciNetCrossRefMATHGoogle Scholar
  9. 9.
    Gagie, T., He, M., Munro, J.I., Nicholson, P.K.: Finding frequent elements in compressed 2D arrays and strings. In: Grossi, R., Sebastiani, F., Silvestri, F. (eds.) SPIRE 2011. LNCS, vol. 7024, pp. 295–300. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  10. 10.
    Hagerup, T., Tholey, T.: Efficient minimal perfect hashing in nearly minimal space. In: Ferreira, A., Reichel, H. (eds.) STACS 2001. LNCS, vol. 2010, pp. 317–326. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  11. 11.
    Krizanc, D., Morin, P., Smid, M.: Range mode and range median queries on lists and trees. In: Ibaraki, T., Katoh, N., Ono, H. (eds.) ISAAC 2003. LNCS, vol. 2906, pp. 517–526. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  12. 12.
    Krizanc, D., Morin, P., Smid, M.: Range mode and range median queries on lists and trees. Nordic J. Computing 12, 1–17 (2005)MathSciNetMATHGoogle Scholar
  13. 13.
    Sadakane, K., Navarro, G.: Fully-functional succinct trees. In: Proc. ACM-SIAM SODA, pp. 134–149 (2010)Google Scholar
  14. 14.
    Schmidt, J.P., Siegel, A.: The spatial complexity of oblivious k-probe hash functions. SIAM J. Comput. 19(5), 775–786 (1990)MathSciNetCrossRefMATHGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Stephane Durocher
    • 1
  • Rahul Shah
    • 2
  • Matthew Skala
    • 1
  • Sharma V. Thankachan
    • 2
  1. 1.University of ManitobaWinnipegCanada
  2. 2.Louisiana State UniversityBaton RougeUSA

Personalised recommendations