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 .

生成讲解博客的中文版本

生成AI智能校验的中文版本