arXiv:2610.20983cs.DSOct 2026

Manuscript Offprint

arXiv:2610.20983

Near-Linear Preprocessing for Range Weighted Longest Increasing Subsequence Queries

Keisuke Korogi

Abstract

We give a deterministic data structure for range weighted longest increasing subsequence (LIS) queries on nn values with positive weights. Preprocessing takes O(nlog⁡2n)O(n\log^2 n) time and space. Value queries take O(log⁡n)O(\log n) time, and an optimal subsequence of kk elements can be reported in O(k+log⁡n)O(k+\log n) time. This resolves an open question on truly subquadratic preprocessing with polylogarithmic query time. The key is a single-crossing property of envelopes for value-separated endpoint sets, enabling O(log⁡n)O(\log n)-time persistent merges. The bounds assume constant-time exact addition and comparison of weights.

1 Introduction

Let a0,…,an−1a_0, \ldots, a_{n-1} be a sequence with positive real weights w0,…,wn−1w_0, \ldots, w_{n-1}. A range weighted longest increasing subsequence query asks for the maximum total weight of a strictly increasing subsequence in an index interval [l,r)[l, r). A reporting query also returns an optimal subsequence.

For unweighted range LIS, Tiskin’s semi-local comparison techniques give O(nlog⁡2n)O(n \log^2 n) preprocessing and O(log⁡n)O(\log n) time to return the length [Tis15]; see also the formulation in [GGK25, Lemma B.14]. Gawrychowski, Gorbachev, and Kociumaka [GGK25, Theorem 1.3] support reporting in O(klog⁡αn)O(k \log^\alpha n) time after O(nlog⁡3−αn)O(n \log^{3-\alpha} n) preprocessing, for every α∈[0,1]\alpha \in [0,1]. Here kk is the output length. Their construction uses core-sparse Monge matrix multiplication, where the core records nonzero mixed second differences. The theorem and appendix numbers cited from [GGK25] refer to its full version.

For arbitrary positive weights, Gawrychowski et al. [GGK25, Appendix B.1] ask whether truly subquadratic preprocessing and polylogarithmic query time are possible. Their alignment-matrix construction remains correct, but the unweighted core-size guarantee no longer follows from their analysis. Karthik C. S. and Rahul [KR26, Section 7 of the full version] also ask for a truly subquadratic algorithm for weighted one-dimensional range LIS.