Abstract
This paper addresses two versions of a fundamental problem, referred to as the All-Nearest-Larger-Neighbors (ANLN) problem, defined as follows: given a one-dimensional array A of n real-valued keys, find, for each array element A[i], the index of a nearest array element, if one exists, whose key is strictly larger than A[i].
We develop algorithms for one- and two-sided versions of the ANLN problem that run in O(n log b n) time, using Θ(b) work-space, for all b = O(n), exhibiting a full time-space tradeoff that subsumes all known (memory-restricted) special cases. In addition, a non-trivial lower bound is developed for the time complexity of solving both versions on a pointer machine with limited work-space. This lower bound matches the time complexity of our algorithms, when restricted to constant space.
The fundamental nature of ANLN problems make them intrinsically interesting to study. They also capture the essence of a variety of other familiar problems, such as determining the forest structure associated with a given string of nested parentheses, and triangulating monotone polygons. For both of these, we describe reductions to versions of the ANLN problem, achieving the same time-space tradeoffs.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Asano, T., Bereg, S., Kirkpatrick, D.: Finding Nearest Larger Neighbors: A Case Study in Algorithm Design and Analysis. In: Albers, S., Alt, H., Näher, S. (eds.) Efficient Algorithms. LNCS, vol. 5760, pp. 249–260. Springer, Heidelberg (2009)
Asano, T., Buchin, K., Buchin, M., Korman, M., Mulzer, W., Rota, G., Schultz, A.: Memory-constrained algorithms for simple polygons. In: 28th European Workshop on Computational Geometry (EuroCG), Booklet of Abstracts, pp. 49–52 (2012)
Asano, T., Mulzer, W., Rote, G., Wang, Y.: Constant-work-space algorithms for geometric problems. Journal of Computational Geometry 2(1), 46–68 (2011)
Barba, L., Korman, M., Langerman, S., Sadakane, K., Silveira, R.I.: Space-time trade-offs for stack-based algorithms. Proc. STACS, pp. 281–292 (2013)
Bose, P., Morin, P.: An improved algorithm for subdivision traversal without extra storage. International Journal of Computational Geometry & Applications 12(4), 297–308 (2002)
Garey, M.R., Johnson, D.S., Preparata, F.P., Tarjan, R.E.: Triangulating a simple polygon. Information Processing Letters 7(4), 175–179 (1978)
Munro, J.I., Raman, V.: Selection from read-only memory and sorting with minimum data movement. Theoretical Computer Science 165, 311–323 (1996)
Munro, J.I., Paterson, M.S.: Selection and sorting with limited storage. Theoretical Computer Science 12, 315–323 (1980)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Asano, T., Kirkpatrick, D. (2013). Time-Space Tradeoffs for All-Nearest-Larger-Neighbors Problems. In: Dehne, F., Solis-Oba, R., Sack, JR. (eds) Algorithms and Data Structures. WADS 2013. Lecture Notes in Computer Science, vol 8037. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-40104-6_6
Download citation
DOI: https://doi.org/10.1007/978-3-642-40104-6_6
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-40103-9
Online ISBN: 978-3-642-40104-6
eBook Packages: Computer ScienceComputer Science (R0)