An all-substrings common subsequence algorithm
Contribuinte(s) |
UNIVERSIDADE DE SÃO PAULO |
---|---|
Data(s) |
20/10/2012
20/10/2012
2008
|
Resumo |
Given two strings A and B of lengths n(a) and n(b), n(a) <= n(b), respectively, the all-substrings longest common subsequence (ALCS) problem obtains, for every substring B` of B, the length of the longest string that is a subsequence of both A and B. The ALCS problem has many applications, such as finding approximate tandem repeats in strings, solving the circular alignment of two strings and finding the alignment of one string with several others that have a common substring. We present an algorithm to prepare the basic data structure for ALCS queries that takes O(n(a)n(b)) time and O(n(a) + n(b)) space. After this preparation, it is possible to build that allows any LCS length to be retrieved in constant time. Some trade-offs between the space required and a matrix of size O(n(b)(2)) the querying time are discussed. To our knowledge, this is the first algorithm in the literature for the ALCS problem. (C) 2007 Elsevier B.V. All rights reserved. |
Identificador |
DISCRETE APPLIED MATHEMATICS, v.156, n.7, p.1025-1035, 2008 0166-218X http://producao.usp.br/handle/BDPI/30412 10.1016/j.dam.2007.05.056 |
Idioma(s) |
eng |
Publicador |
ELSEVIER SCIENCE BV |
Relação |
Discrete Applied Mathematics |
Direitos |
restrictedAccess Copyright ELSEVIER SCIENCE BV |
Palavras-Chave | #all substring common subsequence problem #string processing #Mathematics, Applied |
Tipo |
article proceedings paper publishedVersion |