arXiv ScienceSearch

arXiv · 2404.04795

Range Longest Increasing Subsequence and its Relatives

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 RLIS is a sequence $S$ of $n$ real numbers and a collection $Q$ of $m$ query ranges, and for each query in $Q$, the goal is to report the LIS of the sequence $S$ restricted to that query. Our two main results are for the following generalizations of the RLIS problem. 2D range queries: In this variant of the RLIS problem, each query is a pair of ranges, one of indices and the other of values, and we provide a randomized algorithm with running time $\tilde{O}(m n^{1/2} + n^{3/2}) + O(k)$, where $k$ is the cumulative length of the $m$ output subsequences. This improves on the elementary $O(mn)$-time algorithm when $m$ is at least $n^{1/2}$. Previously, the only known result breaking the quadratic barrier was due to 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). Colored sequences: In this variant of the RLIS problem, each element in $S$ is colored, and for each query in $Q$, the goal is to report a monochromatic LIS contained in the sequence $S$ restricted to that query. For 2D queries, we provide a randomized algorithm for this colored version with running time $\tilde{O}(m n^{2/3} + n^{5/3}) + O(k)$. Moreover, for 1D queries, we provide an improved algorithm with running time $\tilde{O}(m n^{1/2} + n^{3/2}) + O(k)$. Thus, we again improve on the elementary $O(mn)$-time algorithm. Additionally, assuming the well-known Combinatorial Boolean Matrix Multiplication Hypothesis, we prove that the running time for 1D queries is essentially tight for combinatorial algorithms.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Karthik C. S., Saladi Rahul. 2024-04-07. Range Longest Increasing Subsequence and its Relatives. https://arxiv.org/abs/2404.04795

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Quasi-Monte Carlo Beyond Hardy-Krause II: $(1 + \varepsilon)n$ Samples Suffice

Numerical integration studies how well one can estimate the integral of a function $f$ over $[0,1)^d$ using $n$ sample points. The two classical methods, Monte Carlo (MC) and quasi-Monte Carlo (QMC), have complementary strengths and weaknesses, and a fundamental question is to design an approach that combines the benefits of both. Recently, building on the transference principle in discrepancy theory, Bansal and Jiang~\cite{BJ25a} gave a randomized QMC method that bridges MC and QMC guarantees using only i.i.d.\ samples. Their method also goes beyond the classical Koksma--Hlawka inequality: it achieves integration error $\widetilde{O}_d(\sigma_{\mathsf{SO}}(f)/n)$, where the smoothed-out variation $\sigma_{\mathsf{SO}}(f)$ can be substantially smaller than the Hardy--Krause variation that governs the classical bound. However, their algorithm requires $n^2$ i.i.d.\ samples as input, and this quadratic blowup is inherent to any method based on the transference principle. In this work, we bypass the quadratic blowup: for any constant $\varepsilon > 0$, we show that $(1+\varepsilon)n$ i.i.d.\ samples suffice to both obtain the beyond-Hardy--Krause guarantee of~\cite{BJ25a}, resolving an open problem posed there, and to produce low-discrepancy point sequences. Our algorithms are variants of the online Haar-thinning method of Dwivedi, Feldheim, Gurel-Gurevich, and Ramdas~\cite{DFG+19}.

cs.DS

Single-Exponential Algorithms and a Polynomial Kernel for Strong Connectivity Augmentation

Strong Connectivity Augmentation (SCA) asks whether a directed acyclic graph can be made strongly connected by adding at most $k$ prescribed links whose total weight is within a given budget. Klinkby, Misra, and Saurabh (SODA 2021) gave an $O^*(2^{O(k\log k)})$-time algorithm and asked whether the problem admits a single-exponential parameterized algorithm and a polynomial kernel. We answer both questions affirmatively: SCA can be solved in $O^*(9^k)$ time and admits a polynomial kernel with $O(k^4)$ vertices and $O(k^{16})$ bits. For unweighted SCA, we obtain $O^*(4^k)$ time and a kernel with $O(k^3)$ vertices. Our algorithms are based on a particularly simple reduction to Strongly Connected Spanning Subgraph with two edge costs.

cs.DS