Skip to main content

Encoding Nearest Larger Values

  • Conference paper
  • First Online:
Combinatorial Pattern Matching (CPM 2015)

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

Included in the following conference series:

Abstract

In nearest larger value (NLV) problems, we are given an array \(A[1..n]\) of numbers, and need to preprocess \(A\) to answer queries of the following form: given any index \(i \in [1,n]\), return a “nearest” index \(j\) such that \(A[j] > A[i]\). We consider the variant where the values in \(A\) are distinct, and we wish to return an index \(j\) such that \(A[j] > A[i]\) and \(|j-i|\) is minimized, the nondirectional NLV (NNLV) problem. We consider NNLV in the encoding model, where the array \(A\) is deleted after preprocessing, and note that NNLV encoding problem has an unexpectedly rich structure: the effective entropy (optimal space usage) of the problem depends crucially on details in the definition of the problem. Using a new path-compressed representation of binary trees, that may have other applications, we encode NNLV in \(1.9n + o(n)\) bits, and answer queries in \(O(1)\) time.

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

Access this chapter

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 EPUB and 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

Notes

  1. 1.

    For the unidirectional NLV the bound is tight even when all values are distinct.

  2. 2.

    https://oeis.org/.

References

  1. Asano, T., Bereg, S., Kirkpatrick, D.: Finding nearest larger neighbors. In: Albers, S., Alt, H., Näher, S. (eds.) Efficient Algorithms. LNCS, vol. 5760, pp. 249–260. Springer, Heidelberg (2009). http://dx.doi.org/10.1007/978-3-642-03456-5_17

    Chapter  Google Scholar 

  2. Asano, T., Kirkpatrick, D.: Time-space tradeoffs for all-nearest-larger-neighbors problems. In: Dehne, F., Solis-Oba, R., Sack, J.-R. (eds.) WADS 2013. LNCS, vol. 8037, pp. 61–72. Springer, Heidelberg (2013). http://dx.doi.org/10.1007/978-3-642-40104-6_6

    Chapter  Google Scholar 

  3. Berkman, O., Schieber, B., Vishkin, U.: Optimal doubly logarithmic parallel algorithms based on finding all nearest smaller values. J. Algorithms 14(3), 344–370 (1993). http://dx.doi.org/10.1006/jagm.1993.1018

    Article  MATH  MathSciNet  Google Scholar 

  4. Davoodi, P., Navarro, G., Raman, R., Rao, S.: Encoding range minima and range top-2 queries. Philos. Trans. R. Soc. A 372(2016), 1471–2962 (2014)

    Article  MathSciNet  Google Scholar 

  5. Farzan, A., Munro, J.J.: A uniform paradigm to succinctly encode various families of trees. Algorithmica 68(1), 16–40 (2014). http://dx.doi.org/10.1007/s00453-012-9664-0

    Article  MATH  MathSciNet  Google Scholar 

  6. Fischer, J.: Combined data structure for previous- and next-smaller-values. Theor. Comput. Sci. 412(22), 2451–2456 (2011). http://dx.doi.org/10.1016/j.tcs.2011.01.036

    Article  MATH  Google Scholar 

  7. Fischer, J., Heun, V.: Space-efficient preprocessing schemes for range minimum queries on static arrays. SIAM J. Comput. 40(2), 465–492 (2011)

    Article  MATH  MathSciNet  Google Scholar 

  8. Fischer, J., Mäkinen, V., Navarro, G.: Faster entropy-bounded compressed suffix trees. Theor. Comput. Sci. 410(51), 5354–5364 (2009)

    Article  MATH  Google Scholar 

  9. Golin, M., Iacono, J., Krizanc, D., Raman, R., Rao, S.S.: Encoding 2d range maximum queries. In: Asano, T., Nakano, S., Okamoto, Y., Watanabe, O. (eds.) ISAAC 2011. LNCS, vol. 7074, pp. 180–189. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  10. Jayapaul, V., Jo, S., Raman, V., Satti, S.R.: Space efficient data structures for nearest larger neighbor. In: Proceedings of IWOCA 2014 (2014, to appear)

    Google Scholar 

  11. Jo, S., Raman, R., Rao Satti, S.: Compact encodings and indexes for the nearest larger neighbor problem. In: Rahman, M.S., Tomita, E. (eds.) WALCOM 2015. LNCS, vol. 8973, pp. 53–64. Springer, Heidelberg (2015). http://dx.doi.org/10.1007/978-3-319-15612-5_6

    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

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Nicholson, P.K., Raman, R. (2015). Encoding Nearest Larger Values. In: Cicalese, F., Porat, E., Vaccaro, U. (eds) Combinatorial Pattern Matching. CPM 2015. Lecture Notes in Computer Science(), vol 9133. Springer, Cham. https://doi.org/10.1007/978-3-319-19929-0_33

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-19929-0_33

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-19928-3

  • Online ISBN: 978-3-319-19929-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics