Computing a Longest Common Subsequence of two strings when one of them is Run Length Encoded
Main Article Content
Abstract
Given two strings, the longest common subsequence (LCS) problem computes a common subsequence that has the maximum length. In this paper, we present new and efficient algorithms for solving the LCS problem for two strings one of which is run length encoded (RLE). We first present an algorithm that runs in O(gN) time, where g is the length of the RLE string and N is the length of uncompressed string. Then based on the ideas of the above algorithm we present another algorithm that runs in O(Rlog(log g)+N) time, where R is the total number of ordered pairs of positions at which the two strings match. Our first algorithm matches the best algorithm in the literature for the same problem. On the other hand, for R < gN/ log(log)g, our second algorithm outperforms the best algorithms in the literature.
Article Details
How to Cite
Ahsan, S. B., Moosa, T. M., Rahman, M. S., & Shahriyar, S. (2011). Computing a Longest Common Subsequence of two strings when one of them is Run Length Encoded. INFOCOMP Journal of Computer Science, 10(3), 48–55. Retrieved from http://177.105.60.18/index.php/infocomp/article/view/337
Section
Articles
Upon receipt of accepted manuscripts, authors will be invited to complete a copyright license to publish the paper. At least the corresponding author must send the copyright form signed for publication. It is a condition of publication that authors grant an exclusive licence to the the INFOCOMP Journal of Computer Science. This ensures that requests from third parties to reproduce articles are handled efficiently and consistently and will also allow the article to be as widely disseminated as possible. In assigning the copyright license, authors may use their own material in other publications and ensure that the INFOCOMP Journal of Computer Science is acknowledged as the original publication place.