Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to main content

Optimal Query Time for Encoding Range Majority

  • Conference paper
  • First Online:
Algorithms and Data Structures (WADS 2017)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 10389))

Included in the following conference series:

Abstract

We revisit the range \(\tau \)-majority problem, which asks us to preprocess an array \(\mathsf {A}[1..n]\) for a fixed value of \(\tau \in (0,\frac{1}{2}]\), such that for any query range [ij] we can return a position in \(\mathsf {A}\) of each distinct \(\tau \)-majority element. A \(\tau \)-majority element is one that has relative frequency at least \(\tau \) in the range [ij]: i.e., frequency at least \(\tau (j-i+1)\). Belazzougui et al. [WADS 2013] presented a data structure that can answer such queries in \(\mathcal {O}(1/\tau )\) time, which is optimal, but the space can be as much as \(\Theta (n \lg n)\) bits. Recently, Navarro and Thankachan [Algorithmica 2016] showed that this problem could be solved using an \(\mathcal {O}(n \lg (1/\tau ))\) bit encoding, which is optimal in terms of space, but has suboptimal query time. In this paper, we close this gap and present a data structure that occupies \(\mathcal {O}(n \lg (1/\tau ))\) bits of space, and has \(\mathcal {O}(1/\tau )\) query time. We also show that this space bound is optimal, even for the much weaker query in which we must decide whether the query range contains at least one \(\tau \)-majority element.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. Belazzougui, D., Gagie, T., Munro, J.I., Navarro, G., Nekrich, Y.: Range majorities and minorities in arrays. CoRR abs/1606.04495 (2016)

    Google Scholar 

  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). doi:10.1007/978-3-642-40104-6_11

    Chapter  Google Scholar 

  3. Boyer, R.S., Moore, J.S.: MJRTY: A fast majority vote algorithm. In: Automated Reasoning: Essays in Honor of Woody Bledsoe, pp. 105–118. Automated Reasoning Series. Kluwer Academic Publishers (1991)

    Google Scholar 

  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 Comput. Syst. 55(4), 719–741 (2014)

    Article  MathSciNet  MATH  Google Scholar 

  5. Demaine, E.D., López-Ortiz, A., Munro, J.I.: Frequency estimation of internet packet streams with limited space. In: Möhring, R., Raman, R. (eds.) ESA 2002. LNCS, vol. 2461, pp. 348–360. Springer, Heidelberg (2002). doi:10.1007/3-540-45749-6_33

    Chapter  Google Scholar 

  6. Durocher, S., He, M., Munro, J.I., Nicholson, P.K., Skala, M.: Range majority in constant time and linear space. Inf. Comput. 222, 169–179 (2013)

    Article  MathSciNet  MATH  Google Scholar 

  7. Ferragina, P., Venturini, R.: A simple storage scheme for strings achieving entropy bounds. Theor. Comput. Sci. 372(1), 115–121 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  8. 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). doi:10.1007/978-3-642-24583-1_29

    Chapter  Google Scholar 

  9. Gawrychowski, P., Nicholson, P.K.: Optimal query time for encoding range majority (2017). CoRR arXiv:1704.06149

  10. González, R., Navarro, G.: Statistical encoding of succinct data structures. In: Lewenstein, M., Valiente, G. (eds.) CPM 2006. LNCS, vol. 4009, pp. 294–305. Springer, Heidelberg (2006). doi:10.1007/11780441_27

    Chapter  Google Scholar 

  11. Grossi, R., Gupta, A., Vitter, J.S.: High-order entropy-compressed text indexes. In: Proc. SODA 2003, pp. 841–850. ACM/SIAM (2003)

    Google Scholar 

  12. Karp, R.M., Shenker, S., Papadimitriou, C.H.: A simple algorithm for finding frequent elements in streams and bags. ACM Trans. Database Syst. 28, 51–55 (2003)

    Article  Google Scholar 

  13. Karpinski, M., Nekrich, Y.: Searching for frequent colors in rectangles. In: Proc. CCCG 2008 (2008)

    Google Scholar 

  14. Misra, J., Gries, D.: Finding repeated elements. Sci. Comput. Program. 2(2), 143–152 (1982)

    Article  MathSciNet  MATH  Google Scholar 

  15. Navarro, G., Thankachan, S.V.: Optimal encodings for range majority queries. Algorithmica 74(3), 1082–1098 (2016)

    Article  MathSciNet  MATH  Google Scholar 

  16. Patrascu, M.: Succincter. In: Proc. FOCS 2008, pp. 305–313. IEEE (2008)

    Google Scholar 

  17. Raman, R.: Encoding Data Structures. In: Rahman, M.S., Tomita, E. (eds.) WALCOM 2015. LNCS, vol. 8973, pp. 1–7. Springer, Cham (2015). doi:10.1007/978-3-319-15612-5_1

    Chapter  Google Scholar 

  18. Raman, R., Raman, V., Satti, S.R.: Succinct indexable dictionaries with applications to encoding k-ary trees, prefix sums and multisets. ACM Trans. Algorithms 3(4), 43 (2007)

    Article  MathSciNet  Google Scholar 

  19. Skala, M.: Array range queries. In: Brodnik, A., López-Ortiz, A., Raman, V., Viola, A. (eds.) Space-Efficient Data Structures, Streams, and Algorithms. LNCS, vol. 8066, pp. 333–350. Springer, Heidelberg (2013). doi:10.1007/978-3-642-40273-9_21

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Patrick K. Nicholson .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer International Publishing AG

About this paper

Cite this paper

Gawrychowski, P., Nicholson, P.K. (2017). Optimal Query Time for Encoding Range Majority. In: Ellen, F., Kolokolova, A., Sack, JR. (eds) Algorithms and Data Structures. WADS 2017. Lecture Notes in Computer Science(), vol 10389. Springer, Cham. https://doi.org/10.1007/978-3-319-62127-2_35

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-62127-2_35

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-62126-5

  • Online ISBN: 978-3-319-62127-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics