The problem of finding the longest common subsequence (LCS) of two given strings A and B is a well-studied problem. The Constrained longest common subsequence (C-LCS) for three strings A, B and C is the longest common subsequence of A and B that contains C as a subsequence. The fastest algorithm solving the C-LCS problem has a time complexity of O(mnk) where m, n and k are the lengths of A, B and C respectively. We propose to consider the approximate version of the LCS and the Constrained LCS. For LCS we propose a simple linear time approximation algorithm that yields an approximation ratio of 1/(|Σ|). For C-LCS we obtain the first two approximation algorithms. Our first algorithm has an approximation factor of 1/((min(m,n))~(1/2)) with an O(mn) running time, while the second algorithm yields a 1/((min(m,n)|Σ|)~(1/2)) approximation factor within a running time of O(m + n).
展开▼