Dynamic programming algorithms for the mosaic longest common subsequence problem

  • Authors:
  • Kuo-Si Huang;Chang-Biau Yang;Kuo-Tsung Tseng;Yung-Hsing Peng;Hsing-Yen Ann

  • Affiliations:
  • Department of Computer Science and Engineering, National Sun Yat-sen University, Kaohsiung 80424, Taiwan;Department of Computer Science and Engineering, National Sun Yat-sen University, Kaohsiung 80424, Taiwan;Department of Computer Science and Engineering, National Sun Yat-sen University, Kaohsiung 80424, Taiwan;Department of Computer Science and Engineering, National Sun Yat-sen University, Kaohsiung 80424, Taiwan;Department of Computer Science and Engineering, National Sun Yat-sen University, Kaohsiung 80424, Taiwan

  • Venue:
  • Information Processing Letters
  • Year:
  • 2007

Quantified Score

Hi-index 0.89

Visualization

Abstract

The longest common subsequence (LCS) problem can be used to measure the relationship between sequences. In general, the inputs of the LCS problem are two sequences. For finding the relationship between one sequence and a set of sequences, we cannot apply the traditional LCS algorithms immediately. In this paper, we define the mosaic LCS (MLCS) problem of finding a mosaic sequence C, composed of repeatable k sequences in source sequence set S, such that the LCS of C and the target sequence T is maximal. Based on the concept of break points in sequence T, we first propose a divide-and-conquer algorithm with O(n^2m|S|+n^3logk) time for solving this problem, where n and m are the length of T and the maximal length of sequences in S, respectively. Furthermore, an improved algorithm with O(n(m+k)|S|) time is proposed by applying an efficient preprocessing for the MLCS problem.