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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
For the unidirectional NLV the bound is tight even when all values are distinct.
- 2.
References
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
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
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
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)
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
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
Fischer, J., Heun, V.: Space-efficient preprocessing schemes for range minimum queries on static arrays. SIAM J. Comput. 40(2), 465–492 (2011)
Fischer, J., Mäkinen, V., Navarro, G.: Faster entropy-bounded compressed suffix trees. Theor. Comput. Sci. 410(51), 5354–5364 (2009)
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)
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)
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
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights 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)