Efficient merged longest common subsequence algorithms for similar sequences
Abstract Given a pair of merging sequences A, B and a target sequence T, the merged longest common subsequence (MLCS) problem is to find out the longest common subsequence (LCS) between sequences E A B and T, where E A B is obtained from merging two subsequences of A and B. In this paper, we first propose an algorithm for solving the MLCS problem in O n S r L 1 L m time and O n S L m space, where r and L denote the lengths of T and MLCS, respectively, and m and n denote the shorter and longer lengths of A and B, respectively. From the time complexity, it is clear that our algorithm is very efficient when T and E A B are very similar. With slight modification, our algorithm can also solve another merged LCS problem variant, the block merged LCS (BMLCS) problem, in O n S r L 1 L d time and O n S L d space, where d denotes the larger number of blocks of A and B. Experimental results show that our algorithms are faster than other previously published MLCS and BMLCS algorithms for sequences with high similarities. The source codes and datasets for experiments can be found on our web site http:/par.cse.nsysu.edu.tw/~mlcs/ [20]
Theor. Comput. Sci.