Range Longest Increasing Subsequence and its Relatives: Beating Quadratic Barrier and Approaching Optimality (2404.04795v1)
Abstract: In this work, we present a plethora of results for the range longest increasing subsequence problem (Range-LIS) and its variants. The input to Range-LIS is a sequence $\mathcal{S}$ of $n$ real numbers and a collection $\mathcal{Q}$ of $m$ query ranges and for each query in $\mathcal{Q}$, the goal is to report the LIS of the sequence $\mathcal{S}$ restricted to that query. Our two main results are for the following generalizations of the Range-LIS problem: $\bullet$ 2D Range Queries: In this variant of the Range-LIS problem, each query is a pair of ranges, one of indices and the other of values, and we provide an algorithm with running time $\tilde{O}(mn{1/2}+ n{3/2} +k)$, where $k$ is the cumulative length of the $m$ output subsequences. This breaks the quadratic barrier of $\tilde{O}(mn)$ when $m=\Omega(\sqrt{n})$. Previously, the only known result breaking the quadratic barrier was of Tiskin [SODA'10] which could only handle 1D range queries (i.e., each query was a range of indices) and also just outputted the length of the LIS (instead of reporting the subsequence achieving that length). $\bullet$ Colored Sequences: In this variant of the Range-LIS problem, each element in $\mathcal{S}$ is colored and for each query in $\mathcal{Q}$, the goal is to report a monochromatic LIS contained in the sequence $\mathcal{S}$ restricted to that query. For 2D queries, we provide an algorithm for this colored version with running time $\tilde{O}(mn{2/3}+ n{5/3} +k)$. Moreover, for 1D queries, we provide an improved algorithm with running time $\tilde{O}(mn{1/2}+ n{3/2} +k)$. Thus, we again break the quadratic barrier of $\tilde{O}(mn)$. Additionally, we prove that assuming the well-known Combinatorial Boolean Matrix Multiplication Hypothesis, that the runtime for 1D queries is essentially tight for combinatorial algorithms.
- Orthogonal range reporting in three and higher dimensions. In Proceedings of Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 149–158, 2009.
- Ordered and unordered top-k range reporting in large data sets. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 390–400, 2011.
- Geometric range searching and its relatives. Advances in Discrete and Computational Geometry, pages 1–56, 1998.
- New graph decompositions and combinatorial boolean matrix multiplication algorithms. In STOC, 2024. To appear.
- Longest increasing subsequences in sliding windows. Theoretical Computer Science, 321(2-3):405–414, 2004.
- Basic local alignment search tool. Journal of molecular biology, 215(3):403–410, 1990.
- Range searching in categorical data: Colored range searching on grid. In Proceedings of European Symposium on Algorithms (ESA), pages 17–28, 2002.
- Approximate counting of inversions in a data stream. In Proceedings of ACM Symposium on Theory of Computing (STOC), pages 370–379, 2002.
- Estimating the longest increasing subsequence in nearly optimal time. In Proceedings of Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 708–719, 2022.
- Lars Arge. The buffer tree: A technique for designing batched external data structures. Algorithmica, 37(1):1–24, 2003.
- Popular conjectures imply strong lower bounds for dynamic problems. In 2014 IEEE 55th Annual Symposium on Foundations of Computer Science, pages 434–443. IEEE, 2014.
- Computational Geometry: Algorithms and Applications. Springer-Verlag, 3rd edition, 2008.
- Graph expansion and communication costs of fast matrix multiplication. Journal of the ACM (JACM), 59(6):1–23, 2013.
- Online sorted range reporting. In International Symposium on Algorithms and Computation (ISAAC), pages 173–182, 2009.
- Towards optimal range medians. Theoretical Computer Science, 412(24):2588–2601, 2011.
- New upper bounds for generalized intersection searching problems. In Proceedings of International Colloquium on Automata, Languages and Programming (ICALP), pages 464–474, 1995.
- Optimal planar orthogonal skyline counting queries. In Scandinavian Symposium and Workshops on Algorithm Theory (SWAT), pages 110–121, 2014.
- Linear-space data structures for range mode query in arrays. Theory of Computing Systems, 55(4):719–741, 2014.
- Fractional cascading: I. A data structuring technique. Algorithmica, 1(2):133–162, 1986.
- Fractional cascading: II. applications. Algorithmica, 1(2):163–191, 1986.
- Dynamic colored orthogonal range searching. In Proceedings of European Symposium on Algorithms (ESA), volume 204, pages 28:1–28:13, 2021.
- Further results on colored range searching. In International Symposium on Computational Geometry (SoCG), pages 28:1–28:15, 2020.
- Orthogonal range searching on the ram, revisited. In Proceedings of Symposium on Computational Geometry (SoCG), pages 1–10, 2011.
- Better data structures for colored orthogonal range reporting. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 627–636, 2020.
- On distance to monotonicity and longest increasing subsequence of a data stream. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 730–736, 2008.
- Michael L Fredman. On computing the length of longest increasing subsequences. Discrete Mathematics, 11(1):29–35, 1975.
- Lower bounds on streaming algorithms for approximating the length of the longest increasing subsequence. SIAM Journal on Computing, 39(8):3463–3479, 2010.
- Conditional lower bounds for variants of dynamic LIS. arXiv preprint arXiv:2102.11797, 2021.
- Fully dynamic approximation of LIS in polylogarithmic time. In Proceedings of ACM Symposium on Theory of Computing (STOC), pages 654–667, 2021.
- Estimating the sortedness of a data stream. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 318–327, 2007.
- Computational geometry: Generalized (or colored) intersection searching. In Handbook of Data Structures and Applications, CRC Press, 2nd edition, page 1042–1057, 2018.
- Further results on generalized intersection searching problems: Counting, reporting, and dynamization. Journal of Algorithms, 19(2):282–317, 1995.
- Unifying and strengthening hardness for dynamic problems via the online matrix-vector multiplication conjecture. In Proceedings of the forty-seventh annual ACM symposium on Theory of computing, pages 21–30, 2015.
- Independent range sampling. In Proceedings of ACM Symposium on Principles of Database Systems (PODS), pages 246–255, 2014.
- Generalized intersection searching problems. International Journal of Computational Geometry and Applications, 3(1):39–69, 1993.
- Trend motif: A graph mining approach for analysis of dynamic complex networks. In Proceedings of International Conference on Management of Data (ICDM), pages 541–546, 2007.
- Range mode and range median queries on lists and trees. Nordic Journal of Computing, 12(1):1–17, 2005.
- Top-k color queries for document retrieval. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 401–411, 2011.
- Space-efficient algorithms for longest increasing subsequence. In Proceedings of Symposium on Theoretical Aspects of Computer Science (STACS), 2018.
- Counting colors in boxes. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 785–794, 2007.
- Improved dynamic algorithms for longest increasing subsequence. In Proceedings of ACM Symposium on Theory of Computing (STOC), pages 640–653, 2021.
- Colored intersection searching via sparse rectangular matrix multiplication. In Proceedings of Symposium on Computational Geometry (SoCG), pages 52–60, 2006.
- Lillian Lee. Fast context-free grammar parsing requires fast boolean matrix multiplication. Journal of the ACM (JACM), 49(1):1–15, 2002.
- Finding longest increasing and common subsequences in streaming data. Journal of Combinatorial Optimization, 11:155–175, 2006.
- I/O-efficient data structures for colored range and prefix reporting. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 583–592, 2012.
- Approximate colored range and point enclosure queries. Journal of Discrete Algorithms, 6(3):420–432, 2008.
- Kasper Green Larsen and Freek van Walderveen. Near-optimal range reporting structures for categorical data. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 265–276, 2013.
- Longest increasing subsequence computation over streaming sequences. IEEE Transactions on Knowledge and Data Engineering (TKDE), 30(6):1036–1049, 2017.
- Colin L Mallows. Patience sorting. SIAM Review, 4(2):148–149, 1962.
- Colin L Mallows. Patience sorting. SIAM Review, 5(4):375, 1963.
- Dynamic algorithms for LIS and distance to monotonicity. In Proceedings of ACM Symposium on Theory of Computing (STOC), pages 671–684, 2020.
- S. Muthukrishnan. Efficient algorithms for document retrieval problems. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 657–666, 2002.
- Yakov Nekrich. Efficient range searching for categorical and plain data. ACM Transactions on Database Systems (TODS), 39(1):9, 2014.
- 4d range reporting in the pointer machine model in almost-optimal time. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1862–1876, 2023.
- Optimal color range reporting in one dimension. In Proceedings of European Symposium on Algorithms (ESA), pages 743–754, 2013.
- New sublinear algorithms and lower bounds for LIS estimation. In Proceedings of International Colloquium on Automata, Languages and Programming (ICALP), pages 100:1–100:20, 2021.
- Categorical range maxima queries. In Proceedings of ACM Symposium on Principles of Database Systems (PODS), pages 266–277, 2014.
- Saladi Rahul. Approximate range counting revisited. In 33rd International Symposium on Computational Geometry (SoCG), volume 77, pages 55:1–55:15, 2017.
- Saladi Rahul. Approximate range counting revisited. Journal of Computational Geometry, 12(1):40–69, 2021.
- Algorithms for range-skyline queries. In Proceedings of ACM Symposium on Advances in Geographic Information Systems (GIS), pages 526–529, 2012.
- Approximation algorithms for lcs and LIS with truly improved running times. In Proceedings of Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 1121–1145, 2019.
- On top-k range reporting in 2d space. In Proceedings of ACM Symposium on Principles of Database Systems (PODS), pages 265–275, 2015.
- Efficient top-k indexing via general reductions. In Proceedings of ACM Symposium on Principles of Database Systems (PODS), pages 277–288, 2016.
- A guide to designing top-k indexes. SIGMOD Record, 48(2):6–17, 2019.
- On dynamic shortest paths problems. Algorithmica, 61:389–401, 2011.
- Giorgio Satta. Tree-adjoining grammar parsing and boolean matrix multiplication. Computational linguistics, 20(2):173–191, 1994.
- Optimal and near-optimal algorithms for generalized intersection reporting on pointer machines. Information Processing Letters (IPL), 95(3):382–388, 2005.
- Michael Saks and C Seshadhri. Estimating the longest increasing sequence in polylogarithmic time. SIAM Journal of Computing, 46(2):774–823, 2017.
- Planar point location using persistent search trees. Communications of the ACM (CACM), 29(7):669–679, 1986.
- The communication and streaming complexity of computing the longest common and increasing subsequences. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 336–345, 2007.
- Yufei Tao. Algorithmic techniques for independent query sampling. In Proceedings of ACM Symposium on Principles of Database Systems (PODS), pages 129–138, 2022.
- Alexander Tiskin. Semi-local longest common subsequences in subquadratic time. Journal of Discrete Algorithms, 6(4):570–581, 2008.
- Alexandre Tiskin. Semi-local string comparison: Algorithmic techniques and applications. Math. Comput. Sci., 1(4):571–603, 2008.
- Alexander Tiskin. Fast distance multiplication of unit-monge matrices. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1287–1296, 2010.
- Searching for the closest-pair in a query translate. Journal of Computational Geometry, 11(2):26–61, 2020.
- New bounds for range closest-pair problems. Discrete & Computational Geometry, 68(1):1–49, 2022.
- Hongyu Zhang. Alignment of blast high-scoring segment pairs based on the longest increasing subsequence algorithm. Bioinformatics, 19(11):1391–1396, 2003.