A Space-Efficient Algorithm for Longest Common Almost Increasing Subsequence of Two Sequences

📅 2025-03-19
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This paper studies the Longest Common Almost-Increasing Subsequence (LCaIS) problem for two numerical sequences: given sequences A and B and a threshold δ, find the longest common subsequence S such that (s_i + delta > max{s_1, dots, s_{i-1}}) for all (i > 1). We propose the first space-efficient algorithm: a basic version runs in (O(nmell)) time and (O(n + mell)) space; an optimized variant achieves (O((n+m)log n + mathcal{M} log mathcal{M} + mathcal{C}ell)) time and (O(mathcal{M}(ell + log mathcal{M}))) space, where (mathcal{M}) is the number of matching pairs, (mathcal{C}) the number of compatible pairs, and (ell) the optimal solution length. Our key innovations integrate dynamic programming with matching-pair enumeration, compatibility-based pruning, and balanced-tree–augmented binary search—dramatically reducing time and space overhead on sparse inputs. Notably, we reduce the space complexity from the conventional (O(nm)) to near-linear, marking the first such improvement for LCaIS.

Technology Category

Application Category

📝 Abstract
Let $A$ and $B$ be two number sequences of length $n$ and $m$, respectively, where $mle n$. Given a positive number $delta$, a common almost increasing sequence $s_1ldots s_k$ is a common subsequence for both $A$ and $B$ such that for all $2le ile k$, $s_i+delta>max_{1le j<i} s_j$. The LCaIS problem seeks to find the longest common almost increasing subsequence (LCaIS) of $A$ and $B$. An LCaIS can be computed in $O(nmell)$ time and $O(nm)$ space [Ta, Shieh, Lu (TCS 2021)], where $ell$ is the length of the LCaIS of $A$ and $B$. In this paper we first give an $O(nmell)$-time and $O(n+mell)$-space algorithm to find LCaIS, which improves the space complexity. We then design an $O((n+m)log n +mathcal{M}log mathcal{M} + mathcal{C}ell)$-time and $O(mathcal{M}(ell+log mathcal{M}))$-space algorithm, which is faster when the number of matching pairs $mathcal{M}$ and the number of compatible matching pairs $mathcal{C}$ are in $o(nm/log m)$.
Problem

Research questions and friction points this paper is trying to address.

Find longest common almost increasing subsequence (LCaIS).
Improve space complexity of LCaIS algorithm.
Develop faster algorithm for specific parameter conditions.
Innovation

Methods, ideas, or system contributions that make the work stand out.

Improved space complexity for LCaIS algorithm
Enhanced time efficiency with matching pairs
Optimized algorithm for large sequence analysis
🔎 Similar Papers
No similar papers found.
M
Md Tanzeem Rahat
Department of Computer Science, American International University-Bangladesh, Bangladesh
M
Md. Manzurul Hasan
Department of Computer Science, American International University-Bangladesh, Bangladesh
Debajyoti Mondal
Debajyoti Mondal
Associate Professor of Computer Science, University of Saskatchewan, Canada
Computational GeometryGraph DrawingGraph AlgorithmsInformation Visualization