Abstract
LetA be a matrix with real entries and letj(i) be the index of the leftmost column containing the maximum value in rowi ofA.A is said to bemonotone ifi 1 >i 2 implies thatj(i 1) ≥J(i 2).A istotally monotone if all of its submatrices are monotone. We show that finding the maximum entry in each row of an arbitraryn xm monotone matrix requires Θ(m logn) time, whereas if the matrix is totally monotone the time is Θ(m) whenm≥n and is Θ(m(1 + log(n/m))) whenm<n. The problem of finding the maximum value within each row of a totally monotone matrix arises in several geometric algorithms such as the all-farthest-neighbors problem for the vertices of a convex polygon. Previously only the property of monotonicity, not total monotonicity, had been used within these algorithms. We use the Θ(m) bound on finding the maxima of wide totally monotone matrices to speed up these algorithms by a factor of logn.
Similar content being viewed by others
References
A. Aggarwal and R. C. Melville, Fast computation of the modality of polygons,Proceedings of the Conference on Information Sciences and Systems, The Johns Hopkins University. Also appears inJ. Algorithms,7 (1986), 369–381.
A. Aggarwal, J. S. Chang, and C. K. Yap, Minimum area circumscribing polygons, Technical Report, Courant Institute of Mathematical Sciences, New York University, 1985. Also to appear inVisual Comput. (1986).
D. Avis, G. T. Toussaint, and B. K. Bhattacharya, On the multimodality of distance in convex polygons,Comput. Math. Appl.,8 (1982), 153–156.
J. E. Boyce, D. P. Dobkin, R. L. Drysdale, and L. J. Guibas, Finding extremal polygons,SIAM J. Comput.,14 (1985), 134–147.
B. M. Chazelle, R. L. Drysdale, and D. T. Lee, Computing the largest empty rectangle,SIAM J. Comput.,15 (1986), 300–315.
D. Dolev, K. Karplus, A. Siegel, A. Strong, and J. D. Ullman, Optimal wiring between rectangles,Proceedings of the 13th Annual ACM Symposium on the Theory of Computing, Milwaukee, WI, 1981, pp. 312–317.
D. T. Lee and F. P. Preparata, The all-nearest-neighbor problem for convex polygons,Inform. Process. Lett.,7 (1978), 189–192.
M. McKenna, J. O'Rourke, and S. Suri, Finding the largest rectangle in an orthogonal polygon, Technical Report, The Johns Hopkins University, 1985. Also appears inProceedings of the Allerton Conference on Control, Communications, and Computing, Allerton, IL, 1985.
M. H. Overmars and J. van Leeuwen, Maintenance of configurations in the plane,J. Comput. System Sci.,23 (1981), 166–204.
F. P. Preparata, Minimum spanning circle, inSteps in Computational Geometry (F. P. Preparata, ed.), University of Illinois Press, Urbana, 1977, pp. 3–5.
M. I. Shamos, Geometric complexity,Proceedings of the Seventh Annual Symposium on Theory of Computing, Albuquerque, NM, 1975, pp. 224–233.
M. I. Shamos and D. Hoey, Closest-point problems,Proceedings of the 16th Annual IEEE Symposium on Foundations of Computer Science, Berkeley, CA, 1975, pp. 151–162.
A. Siegel and D. Dolev, The separation for general single-layer wiring barriers,Proceedings of the CMU Conference on VLSI Systems and Computations, Pittsburgh, PA, 1981, pp. 143–152.
M. Tompa, An optimal solution to a wire routing problem,J. Comput. System Sci.,23 (1981), 127–150.
G. T. Toussaint, Complexity, convexity and unimodality,Proceedings of the Second World Conference on Mathematics, Las Palmas, Spain, 1982.
G. T. Toussaint, The symmetric all-furtherst-neighbor problem,Comput. Math Appl,9 (1983), 747–754.
G. T. Toussaint and B. K. Bhattacharya, On geometric algorithms that use the furthest-neighbor pair of a finite planar set, Technical Report, School of Computer Science, McGill University, 1981.
Author information
Authors and Affiliations
Additional information
Communicated by Bernard Chazelle.
On leave from the Technion, Haifa, Israel.
Rights and permissions
About this article
Cite this article
Aggarwal, A., Klawe, M.M., Moran, S. et al. Geometric applications of a matrix-searching algorithm. Algorithmica 2, 195–208 (1987). https://doi.org/10.1007/BF01840359
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF01840359