paper

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

arXiv:2503.15442

Abstract

Let and be two number sequences of length and , respectively, where . Given a positive number , a common almost increasing sequence is a common subsequence for both and such that for all , . The LCaIS problem seeks to find the longest common almost increasing subsequence (LCaIS) of and . An LCaIS can be computed in time and space [Ta, Shieh, Lu (TCS 2021)], where is the length of the LCaIS of and . In this paper we first give an -time and -space algorithm to find LCaIS, which improves the space complexity. We then design an -time and -space algorithm, which is faster when the number of matching pairs and the number of compatible matching pairs are in .

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