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].
- A. Aggarwal and M. Klawe. 1990. Applications of generalized matrix searching to geometric algorithms. Discrete Appl. Math. 27, 1--2 (1990), 3--23. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 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 Scholar
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- R. E. Burkard, B. Klinz, and R. Rudolf. 1996. Perspectives of monge properties in optimization. Discrete Appl. Math. 70, 2 (1996), 95--161. Google ScholarDigital Library
- S. Cabello. 2012. Many distances in planar graphs. Algorithmica 62, 1--2 (2012), 361--381. Google ScholarDigital Library
- 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 ScholarDigital Library
- J. Chaudhuri, S. C. Nandy, and S. Das. 2003. Largest empty rectangle among a point set. J. Algorithms 46, 1 (2003), 54--78. Google ScholarDigital Library
- 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 ScholarDigital Library
- B. Chazelle and L. J. Guibas. 1986. Fractional cascading: I. A data structuring technique. Algorithmica 1, 1 (1986), 133--162.Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- M. de Berg, O. Cheong, M. van Kreveld, and M. Overmars. 2008. Computational Geometry: Algorithms and Applications (3rd ed.). Springer-Verlag, Berlin. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarCross Ref
- 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 ScholarDigital Library
- E. Feuerstein and A. Marchetti-Spaccamela. 1993. Dynamic algorithms for shortest paths in planar graphs. Theor. Comput. Sci. 116, 2 (1993), 359--371. Google ScholarDigital Library
- G. N. Frederickson. 1987. Fast algorithms for shortest paths in planar graphs, with applications. SIAM J. Comput. 16, 6 (1987), 1004--1022. Google ScholarDigital Library
- 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 Scholar
- 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 Scholar
- 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 ScholarDigital Library
- D. Harel and R. E. Tarjan. 1984. Fast algorithms for finding nearest common ancestors. SIAM J. Comput. 13, 2 (1984), 338--355. Google ScholarDigital Library
- 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 ScholarDigital Library
- A. J. Hoffman. 1963. On simple linear programming problems. In Proc. Symp. Pure Math. Vol. VII. Amer. Math. Soc., 317--327.Google ScholarCross Ref
- J. Hopcroft and R. Tarjan. 1974. Efficient planarity testing. J. ACM 21, 4 (1974), 549--568. Google ScholarDigital Library
- 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 ScholarDigital Library
- D. B. Johnson. 1977. Efficient algorithms for shortest paths in sparse networks. J. ACM 24, 1 (1977), 1--13. Google ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarCross Ref
- M. M. Klawe. 1992. Superlinear bounds for matrix searching problems. J. Algorithms 13, 1 (1992), 55--78. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- R. J. Lipton and R. E. Tarjan. 1980. Applications of a planar separator theorem. SIAM J. Comput. 9, 3 (1980), 615--627.Google ScholarDigital Library
- 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 Scholar
- 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 Scholar
- S. Mozes. 2013. Efficient Algorithms for Shortest-Path and Maximum-Flow Problems in Planar Graphs. Ph.D. Dissertation. Brown University, Providence, RI.Google Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarCross Ref
- 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 ScholarDigital Library
- Y. Nussbaum. 2011. Improved distance queries in planar graphs. In Proc. 11th Int. Symp. Algorithm. Data Struct. (WADS’11). 642--653. Google ScholarDigital Library
- M. Orlowski. 1990. A new algorithm for the largest empty rectangle problem. Algorithmica 5, 1 (1990), 65--73.Google ScholarCross Ref
- M. H. Overmars and J. van Leeuwen. 1981. Maintenance of configurations in the plane. J. Comput. Syst. Sci. 23, 2 (1981), 166--204.Google ScholarCross Ref
- 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 ScholarCross Ref
- M. Sharir and P. K. Agarwal. 1995. Davenport-Schinzel Sequences and Their Geometric Applications. Cambridge University Press, New York, NY. Google ScholarDigital Library
- 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 ScholarDigital Library
Index Terms
- Submatrix Maximum Queries in Monge Matrices and Partial Monge Matrices, and Their Applications
Recommendations
Submatrix Maximum Queries in Monge and Partial Monge Matrices Are Equivalent to Predecessor Search
We present an optimal data structure for submatrix maximum queries in n× n Monge matrices. Our result is a two-way reduction showing that the problem is equivalent to the classical predecessor problem in a universe of polynomial size. This gives a data ...
Submatrix maximum queries in Monge matrices and Monge partial matrices, and their applications
SODA '12: Proceedings of the twenty-third annual ACM-SIAM symposium on Discrete algorithmsWe describe a data structure for submatrix maximum queries in Monge matrices or Monge partial matrices, where a query specifies a contiguous submatrix of the given matrix, and its output is the maximum element of that submatrix. Our data structure for ...
(Near-)linear-time randomized algorithms for row minima in Monge partial matrices and related problems
SODA '21: Proceedings of the Thirty-Second Annual ACM-SIAM Symposium on Discrete AlgorithmsWe revisit classical problems about searching in totally monotone and Monge matrices, which have many applications in computational geometry and other areas. We present a number of new results, including the following:
• A randomized algorithm that ...
Comments