skip to main content
research-article
Public Access

Submatrix Maximum Queries in Monge Matrices and Partial Monge Matrices, and Their Applications

Published:06 March 2017Publication History
Skip Abstract Section

Abstract

We describe a data structure for submatrix maximum queries in Monge matrices or partial Monge matrices, where a query seeks the maximum element in a contiguous submatrix of the given matrix. The structure, for an n × n Monge matrix, takes O(nlog n) space and O(nlogn) preprocessing time, and answers queries in O(log2n) time. For partial Monge matrices, the space grows by α(n), the preprocessing grows by α(n)logn (α(n) is the inverse Ackermann function), and the query remains O(log2n). Our design exploits an interpretation of the column maxima in a Monge (partial Monge, respectively) matrix as an upper envelope of pseudo-lines (pseudo-segments, respectively).

We give two applications: (1) For a planar set of n points in an axis-parallel rectangle B, we build a data structure, in O(nα(n)log4n) time and O(nα(n)log3n) space, that returns, for a query point p, the largest-area empty axis-parallel rectangle contained in B and containing p, in O(log4n) time. This improves substantially the nearly quadratic storage and preprocessing obtained by Augustine et al. [2010]. (2) Given an n-node arbitrarily weighted planar digraph, with possibly negative edge weights, we build, in O(nlog2n/log logn) time, a linear-size data structure that supports edge-weight updates and graph-distance queries between arbitrary pairs of nodes in O(n2/3log5/3n) time per operation. This improves a previous algorithm of Fakcharoenphol and Rao [2006]. Our data structure has already been applied in a recent maximum flow algorithm for planar graphs in Borradaile et al. [2011].

References

  1. A. Aggarwal and M. Klawe. 1990. Applications of generalized matrix searching to geometric algorithms. Discrete Appl. Math. 27, 1--2 (1990), 3--23. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. A. Aggarwal, M. Klawe, S. Moran, P. Shor, and R. Wilber. 1987. Geometric applications of a matrix-searching algorithm. Algorithmica 2, 1 (1987), 195--208.Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. A. Aggarwal and J. Park. 1988. Notes on searching in multidimensional monotone arrays. In Proc. 29th Annu. Symp. Found. Comput. Sci. (FOCS’88). 497--512. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. A. Aggarwal and S. Suri. 1987. Fast algorithms for computing the largest empty rectangle. In Proc. 3rd Annu. Symp. Comput. Geom. (SOCG’87). 278--290. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. L. Arge, F. van Walderveen, and N. Zeh. 2013. Multiway simple cycle separators and I/O-efficient algorithms for planar graphs. In Proc. 24th Annu. ACM-SIAM Symp. on Discrete Algorithms (SODA’13). 901--918. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. M. J. Atallah and G. N. Frederickson. 1986. A note on finding a maximum empty rectangle. Discrete Appl. Math. 13, 1 (1986), 87--91. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. J. Augustine, S. Das, A. Maheshwari, S. C. Nandy, S. Roy, and S. Sarvattomananda. 2010. Querying for the largest empty geometric object in a desired location. CoRR abs/1004.0558 (2010).Google ScholarGoogle Scholar
  8. H. S. Baird, S. E. Jones, and S. J. Fortune. 1990. Image segmentation by shape-directed covers. In Proc. 10th Int. Conf. on Pattern Recognit. (ICPR’90), Vol. 1. 820--825.Google ScholarGoogle Scholar
  9. M. A. Bender and M. Farach-Colton. 2000. The LCA problem revisited. In Proc. 4th Latin Amer. Symp. Theor. Inform. (LATIN’00). 88--94. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. R. P. Boland and J. Urrutia. 2001. Finding the largest axis-aligned rectangle in a polygon in O(n log n) time. In Proc. 13th Canad. Conf. Comput. Geom. (CCCG’01). 41--44. http://www.cccg.ca/proceedings/2001/rboland-876.ps.gz.Google ScholarGoogle Scholar
  11. G. Borradaile, P. N. Klein, S. Mozes, Y. Nussbaum, and C. Wulff-Nilsen. 2011. Multiple-source multiple-sink maximum flow in directed planar graphs in near-linear time. In Proc. 52nd Annu. Symp. Found. Comput. Sci. (FOCS’11). 170--179. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. G. S. Brodal, P. D., and S. S. Rao. 2010. On space efficient two dimensional range minimum data structures. In Proc. 18th Eur. Symp. Algorithms (ESA’10). 171--182. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. R. E. Burkard, B. Klinz, and R. Rudolf. 1996. Perspectives of monge properties in optimization. Discrete Appl. Math. 70, 2 (1996), 95--161. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. S. Cabello. 2012. Many distances in planar graphs. Algorithmica 62, 1--2 (2012), 361--381. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. S. Cabello, E. W. Chambers, and J. Erickson. 2013. Multiple-source shortest paths in embedded graphs. SIAM J. Comput. 42, 4 (2013), 1542--1571.Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. J. Chaudhuri, S. C. Nandy, and S. Das. 2003. Largest empty rectangle among a point set. J. Algorithms 46, 1 (2003), 54--78. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. B. Chazelle, R. L. Drysdale III, and D. T. Lee. 1986. Computing the largest empty rectangle. SIAM J. Comput. 15, 1 (1986), 300--315. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. B. Chazelle and L. J. Guibas. 1986. Fractional cascading: I. A data structuring technique. Algorithmica 1, 1 (1986), 133--162.Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. D. Z. Chen and J. Xu. 2000. Shortest path queries in planar graphs. In Proc. 32nd Annu. ACM Symp. Theory Comput. (STOC’00). 469--478. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. L. P. Chew and R. L. Dyrsdale III. 1985. Voronoi diagrams based on convex distance functions. In Proc. 1st Annu. Symp. Comput. Geom. (SOCG’85). 235--244. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. M. de Berg, O. Cheong, M. van Kreveld, and M. Overmars. 2008. Computational Geometry: Algorithms and Applications (3rd ed.). Springer-Verlag, Berlin. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. F. Dehne. 1990. Computing the largest empty rectangle on one-and two-dimensional processor arrays. J. Parallel. Distr. Comput. 9, 1 (1990), 63--68. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. H. Djidjev. 1997. Efficient algorithms for shortest path queries in planar digraphs. In Proc. 22nd Int. Workshop Graph Theor. Concept Comput. Sci. (WG’97), Vol. 1197. 151--165.Google ScholarGoogle ScholarCross RefCross Ref
  24. J. Fakcharoenphol and S. Rao. 2006. Planar graphs, negative weight edges, shortest paths, and near linear time. J. Comput. Syst. Sci. 72, 5 (2006), 868--889. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. E. Feuerstein and A. Marchetti-Spaccamela. 1993. Dynamic algorithms for shortest paths in planar graphs. Theor. Comput. Sci. 116, 2 (1993), 359--371. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. G. N. Frederickson. 1987. Fast algorithms for shortest paths in planar graphs, with applications. SIAM J. Comput. 16, 6 (1987), 1004--1022. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. P. Gawrychowski, S. Mozes, and O. Weimann. 2014. Improved submatrix maximum queries in Monge matrices. In Proc. 41st International Colloquium on Automata, Languages, and Programming (ICALP’14). 525--537.Google ScholarGoogle Scholar
  28. P. Gawrychowski, S. Mozes, and O. Weimann. 2015. Submatrix maximum queries in Monge matrices are equivalent to predecessor search. In Proc. 42nd International Colloquium on Automata, Languages, and Programming (ICALP’15). 580--592.Google ScholarGoogle Scholar
  29. G. Gutiérrez and J. R. Paramá. 2012. Finding the largest empty rectangle containing only a query point in large multidimensional databases. In Proc. of the 24th Int. Conf. Sci. Stat. Database Manag. (SSDBM’12). 316--333. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. D. Harel and R. E. Tarjan. 1984. Fast algorithms for finding nearest common ancestors. SIAM J. Comput. 13, 2 (1984), 338--355. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. J. Hershberger. 1989. Finding the upper envelope of n line segments in O(n log n) time. Inf. Process. Lett. 33, 4 (1989), 169--174. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. A. J. Hoffman. 1963. On simple linear programming problems. In Proc. Symp. Pure Math. Vol. VII. Amer. Math. Soc., 317--327.Google ScholarGoogle ScholarCross RefCross Ref
  33. J. Hopcroft and R. Tarjan. 1974. Efficient planarity testing. J. ACM 21, 4 (1974), 549--568. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. G. F. Italiano, Y. Nussbaum, P. Sankowski, and C. Wulff-Nilsen. 2011. Improved algorithms for min cut and max flow in undirected planar graphs. In Proc. 43rd Annu. ACM Symp. Theory Comput. (STOC’11). 313--322. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. D. B. Johnson. 1977. Efficient algorithms for shortest paths in sparse networks. J. ACM 24, 1 (1977), 1--13. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. T. Kaminker and M. Sharir. 2015. Finding the largest disk containing a query point in logarithmic time with linear storage. J. Comput. Geom. 6, 2 (2015), 3--18.Google ScholarGoogle Scholar
  37. H. Kaplan, S. Mozes, Y. Nussbaum, and M. Sharir. 2012. Submatrix maximum queries in monge matrices and monge partial matrices, and their applications. In Proc. 23rd Annu. ACM-SIAM Symp. on Discrete Algorithms (SODA’12). 338--355. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. H. Kaplan and M. Sharir. 2013. Finding the maximal empty disk containing a query point. Int. J. Comput. Geometry Appl. 23, 4--5 (2013), 335--356.Google ScholarGoogle ScholarCross RefCross Ref
  39. M. M. Klawe. 1992. Superlinear bounds for matrix searching problems. J. Algorithms 13, 1 (1992), 55--78. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. M. M. Klawe and D. J. Kleitman. 1990. An almost linear time algorithm for generalized matrix searching. SIAM J. Discrete Math. 3, 1 (1990), 81--97. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. P. N. Klein. 2005. Multiple-source shortest paths in planar graphs. In Proc. 16th Annu. ACM-SIAM Symp. on Discrete Algorithms (SODA’05). 146--155. http://portal.acm.org/citation.cfm?id=1070432.1070454 Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. P. N. Klein, S. Mozes, and C. Sommer. 2013. Structured recursive separator decompositions for planar graphs in linear time. In Proc. 45rd Annu. ACM Symp. Theory Comput. (STOC’13). 505--514. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. D. Leven and M. Sharir. 1987. Planning a purely translational motion for a convex object in two-dimensional space using generalized Voronoi diagrams. Discrete Comput. Geom. 2, 1 (1987), 9--31. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. R. J. Lipton and R. E. Tarjan. 1980. Applications of a planar separator theorem. SIAM J. Comput. 9, 3 (1980), 615--627.Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. M. McKenna, J. O’Rourke, and S. Suri. 1985. Finding the largest rectangle in an orthogonal polygon. In Proc. 23rd Allerton Conf. Commun. Control Comput. 486--495.Google ScholarGoogle Scholar
  46. G. Monge. 1781. Mémoire sur la théorie des déblais et des remblais. In Histoire de l’Académie Royale des Science. 666--704.Google ScholarGoogle Scholar
  47. S. Mozes. 2013. Efficient Algorithms for Shortest-Path and Maximum-Flow Problems in Planar Graphs. Ph.D. Dissertation. Brown University, Providence, RI.Google ScholarGoogle Scholar
  48. S. Mozes and C. Sommer. 2012. Exact distance oracles for planar graphs. In Proc. 23rd Annu. ACM-SIAM Symp. on Discrete Algorithms (SODA’12). 209--222. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. S. Mozes and C. Wulff-Nilsen. 2010. Shortest paths in planar graphs with real lengths in o(n log2n/log log n) time. In Proc. 18th Eur. Symp. Algorithms (ESA’10). 206--217. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. A. Naamad, D. T. Lee, and W.-L. Hsu. 1984. On the maximum empty rectangle problem. Discrete Appl. Math. 8, 3 (1984), 267--277.Google ScholarGoogle ScholarCross RefCross Ref
  51. S. C. Nandy, A. Sinha, and B. B. Bhattacharya. 1994. Location of the largest empty rectangle among arbitrary obstacles. In Proc. 14th Conf. Found. Softw. Technol. Theor. Comput. Sci. (FSTTCS’94). 159--170. Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. Y. Nussbaum. 2011. Improved distance queries in planar graphs. In Proc. 11th Int. Symp. Algorithm. Data Struct. (WADS’11). 642--653. Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. M. Orlowski. 1990. A new algorithm for the largest empty rectangle problem. Algorithmica 5, 1 (1990), 65--73.Google ScholarGoogle ScholarCross RefCross Ref
  54. M. H. Overmars and J. van Leeuwen. 1981. Maintenance of configurations in the plane. J. Comput. Syst. Sci. 23, 2 (1981), 166--204.Google ScholarGoogle ScholarCross RefCross Ref
  55. J. K. Park. 1991. A special case of the n-vertex traveling-salesman problem that can be solved in O(n) time. Inf. Process. Lett. 40, 5 (1991), 247--254.Google ScholarGoogle ScholarCross RefCross Ref
  56. M. Sharir and P. K. Agarwal. 1995. Davenport-Schinzel Sequences and Their Geometric Applications. Cambridge University Press, New York, NY. Google ScholarGoogle ScholarDigital LibraryDigital Library
  57. H. Yuan and M. J. Atallah. 2010. Data structures for range minimum queries in multidimensional arrays. In Proc. 21st Annu. ACM-SIAM Symp. on Discrete Algorithms (SODA’10). 150--160. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Submatrix Maximum Queries in Monge Matrices and Partial Monge Matrices, and Their Applications

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          • Published in

            cover image ACM Transactions on Algorithms
            ACM Transactions on Algorithms  Volume 13, Issue 2
            Special Issue on SODA'15 and Regular Papers
            April 2017
            316 pages
            ISSN:1549-6325
            EISSN:1549-6333
            DOI:10.1145/3040971
            Issue’s Table of Contents

            Copyright © 2017 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 6 March 2017
            • Accepted: 1 November 2016
            • Revised: 1 August 2016
            • Received: 1 December 2014
            Published in talg Volume 13, Issue 2

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article
            • Research
            • Refereed

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader