Article ID | Journal | Published Year | Pages | File Type |
---|---|---|---|---|
427573 | Information Processing Letters | 2013 | 6 Pages |
The problem of finding a longest weakly increasing common subsequence (LCWIS) of two sequences is a variant of the popular longest common subsequence (LCS) problem. While there are no known methods to find LCS in truly sub-quadratic time, there are faster algorithms to compute LCWIS if the alphabet size is small enough. We present a linear-time algorithm finding LCWIS over 3-letter alphabet. Up to now, the fastest known algorithm was O(min{m+nlogn,mloglogm}), where m≥nm≥n denote lengths of the sequences.
► We search for longest common subsequence of two sequences that is sorted, i.e. weakly increasing. ► An algorithm of linear time complexity for sequences over 3-letter alphabet is presented, improving previously known O(nloglogn) algorithm. ► Our algorithm uses simple list-like data structures instead of complex van Emde-Boas queues.