# Improved selection in totally monotone arrays

## Abstract

This paper's main result is an *O*((√m lg *m*)(*n* lg *n*)+m lg *n*)-time algorithm for computing the kth smallest entry in each row of an *m×n* totally monotone array. (A two-dimensional array *A* = {a[*i,j*]} is *totally monotone* if for all *i*_{1}<i_{2} and *j*_{1}<j_{2}, a[i_{1},j_{1}]<a[i_{1},j_{2}] implies a[i_{2},j_{1}<a[i_{2},j_{2}.) For large values of *k* (in particular, for *k*=[n/2]), this algorithm is significantly faster than the *O(k(m+n))*-time algorithm for the same problem due to Kravets and Park (1991). An immediate consequence of this result is an *O*(n^{3/2} lg^{2}n)-time algorithm for computing the kth nearest neighbor of each vertex of a convex *n*-gon. In addition to the main result, we also give an *O*(*n* lg *m*)-time algorithm for computing an approximate median in each row of an m×n totally monotone array; this approximate median is an entry whose rank in its row lies between [n/4] and [3n/4].

## Keywords

Time Algorithm Linear Time Algorithm Watson Research 29th Annual IEEE Symposium Median Entry## Preview

Unable to display preview. Download preview PDF.

## References

- [AALM90]A. Apostolico, M. J. Atallah, L. L. Larmore, and H. S. McFaddin. Efficient parallel algorithms for string editing and related problems.
*SIAM Journal on Computing*, 19(5):968–988, 1990.CrossRefGoogle Scholar - [AK91]M. J. Atallah and S. R. Kosaraju. An efficient parallel algorithm for the row minima of a totally monotone matrix. In
*Proceedings of the 2nd Annual ACM-SIAM Symposium on Discrete Algorithms*, pages 394–403, 1991. Submitted to*Journal of Algorithms*.Google Scholar - [AKL+89]M. J. Atallah, S. R. Kosaraju, L. L. Larmore, G. Miller, and S. Teng. Constructing trees in parallel. In
*Proceedings of the 1st Annual ACM Symposium on Parallel Algorithms and Architectures*, pages 421–431, 1989.Google Scholar - [AKM+87]A. Aggarwal, M. M. Klawe, S. Moran, P. Shor, and R. Wilber. Geometric applications of a matrix-searching algorithm.
*Algorithmica*, 2(2):195–208, 1987.CrossRefGoogle Scholar - [AKPS90]A. Aggarwal, D. Kravets, J. K. Park, and S. Sen. Parallel searching in generalized Monge arrays with applications. In
*Proceedings of the 2nd Annual ACM Symposium on Parallel Algorithms and Architectures*, pages 259–268, 1990.Google Scholar - [AP89a]A. Aggarwal and J. K. Park. Parallel searching in multidimensional monotone arrays. Research Report RC 14826, IBM T. J. Watson Research Center, August 1989. Submitted to
*Journal of Algorithms*. Portions of this paper appear in*Proceedings of the 29th Annual IEEE Symposium on Foundations of Computer Science*, pages 497–512, 1988.Google Scholar - [AP89b]A. Aggarwal and J. K. Park. Sequential searching in multidimensional monotone arrays. Research Report RC 15128, IBM T. J. Watson Research Center, November 1989. Submitted to
*Journal of Algorithms*. Portions of this paper appear in*Proceedings of the 29th Annual IEEE Symposium on Foundations of Computer Science*, pages 497–512, 1988.Google Scholar - [AP91]A. Aggarwal and J. K. Park. Improved algorithms for economic lot-size problems.
*Operations Research*, 1991. To appear. An earlier version of this paper appears as Research Report RC 15626, IBM T. J. Watson Research Center, March 1990.Google Scholar - [Ata90]M. J. Atallah. A faster parallel algorithm for a matrix searching problem. In G. Goos and J. Hartmanis, editors,
*Proceedings of the 2nd Scandinavian Workshop on Algorithm Theory*, pages 192–200, New York, NY, 1990. Springer-Verlag. Submitted to*Algorithmica*.Google Scholar - [BFP+73]M. Blum, R. W. Floyd, V. Pratt, R. L. Rivest, and R. E. Tarjan. Time bounds for selection.
*Journal of Computer and System Sciences*, 7(4):448–461, 1973.Google Scholar - [Epp90]D. Eppstein. Sequence comparison with mixed convex and concave costs.
*Journal of Algorithms*, 11(1):85–101, 1990.CrossRefGoogle Scholar - [GP90]Z. Galil and K. Park. A linear-time algorithm for concave one-dimensional dynamic programming.
*Information Processing Letters*, 33(6):309–311, 1990.CrossRefMathSciNetGoogle Scholar - [Hof63]A. J. Hoffman. On simple linear programming problems. In V. Klee, editor,
*Convexity: Proceedings of the Seventh Symposium in Pure Mathematics of the AMS*, volume 7 of*Proceedings of Symposia in Pure Mathematics*, pages 317–327. American Mathematical Society, Providence, RI, 1963.Google Scholar - [KK90]M. M. Klawe and D. J. Kleitman. An almost linear time algorithm for generalized matrix searching.
*SIAM Journal on Discrete Mathematics*, 3(1):81–97, 1990.CrossRefGoogle Scholar - [Kla89]M. M. Klawe. A simple linear time algorithm for concave one-dimensional dynamic programming. Technical Report 89-16, University of British Columbia, Vancouver, 1989.Google Scholar
- [KP91]D. Kravets and J. K. Park. Selection and sorting in totally monotone arrays.
*Mathematical Systems Theory*, 1991. To appear. An earlier version of this paper appears in*Proceedings of the 1st Annual ACM-SIAM Symposium on Discrete Algorithms*, pages 494–502, 1990.Google Scholar - [LS91]L. L. Larmore and B. Schieber. On-line dynamic programming with applications to the prediction of RNA secondary structure.
*Journal of Algorithms*, 1991. To appear. An earlier version of this paper appears in*Proceedings of the 1st Annual ACM-SIAM Symposium on Discrete Algorithms*, pages 503–512, 1990.Google Scholar - [Wil88]R. Wilber. The concave least-weight subsequence problem revisited.
*Journal of Algorithms*, 9(3):418–425, 1988.CrossRefGoogle Scholar