Theoretical Computer Science ( IF 0.747 ) Pub Date : 2020-11-20 , DOI: 10.1016/j.tcs.2020.11.035
Toan Thang Ta; Yi-Kung Shieh; Chin Lung Lu

Given a positive constant c, a sequence $S=〈{s}_{1},{s}_{2},\dots ,{s}_{k}〉$ of k numbers is said to be almost increasing if and only if ${s}_{i}>\underset{1\le j for all $1. A longest common almost-increasing subsequence (LCaIS) between two input sequences is a longest common subsequence that is also an almost increasing sequence. We found out that the existing algorithm proposed by Moosa et al. [1] to find an LCaIS of two sequences without repeated elements gives an incorrect result for some instances. In this work, we present a dynamic programming algorithm that can correctly compute an LCaIS between any two sequences with repeated elements in $O\left(nml\right)$ time and $O\left(nm\right)$ space, where n and m are the lengths of two input sequences and l is the length of the output LCaIS.

down
wechat
bug