A fast and simple algorithm for computing the longest common subsequence of run-length encoded strings

被引:16
作者
Ann, Hsing-Yen [1 ]
Yang, Chang-Biau [1 ]
Tseng, Chiou-Ting [1 ]
Hor, Chiou-Yi [1 ]
机构
[1] Natl Sun Yat Sen Univ, Dept Comp Sci & Engn, Kaohsiung 80424, Taiwan
关键词
Design of algorithms; Longest common subsequence; Run-length encoding; Edit distance;
D O I
10.1016/j.ipl.2008.07.005
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Let X and Y be two strings of lengths n and m, respectively, and k and l, respectively. be the numbers of runs in their corresponding run-length encoded forms. We propose a simple algorithm for computing the longest common subsequence of two given strings X and Y in O(kl + min{p(1),p(2)}) time, where p1 and p2 denote the numbers of elements in the bottom and right boundaries of the matched blocks, respectively. It improves the previously known time bound O(min{nl, km}) and outperforms the time bounds O(kl log kl) or O((k + l + q) log (k + l + q)) for some cases, where q denotes the number of matched blocks. (C) 2008 Elsevier B.V. All rights reserved.
引用
收藏
页码:360 / 364
页数:5
相关论文
共 16 条
[1]   Matching for run-length encoded strings [J].
Apostolico, A ;
Landau, GM ;
Skiena, S .
JOURNAL OF COMPLEXITY, 1999, 15 (01) :4-16
[2]   Edit distance of run-length encoded strings [J].
Arbell, O ;
Landau, GM ;
Mitchell, JSB .
INFORMATION PROCESSING LETTERS, 2002, 83 (06) :307-314
[3]   The LCA problem revisited [J].
Bender, MA ;
Farach-Colton, M .
LATIN 2000: THEORETICAL INFORMATICS, 2000, 1776 :88-94
[4]   AN IMPROVED ALGORITHM FOR COMPUTING THE EDIT DISTANCE OF RUN-LENGTH CODED STRINGS [J].
BUNKE, H ;
CSIRIK, J .
INFORMATION PROCESSING LETTERS, 1995, 54 (02) :93-96
[5]   Longest common subsequence between run-length-encoded strings: a new algorithm with improved parallelism [J].
Freschi, V ;
Bogliolo, A .
INFORMATION PROCESSING LETTERS, 2004, 90 (04) :167-173
[6]   FAST ALGORITHMS FOR FINDING NEAREST COMMON ANCESTORS [J].
HAREL, D ;
TARJAN, RE .
SIAM JOURNAL ON COMPUTING, 1984, 13 (02) :338-355
[7]   ALGORITHMS FOR LONGEST COMMON SUBSEQUENCE PROBLEM [J].
HIRSCHBERG, DS .
JOURNAL OF THE ACM, 1977, 24 (04) :664-675
[8]   FAST ALGORITHM FOR COMPUTING LONGEST COMMON SUBSEQUENCES [J].
HUNT, JW ;
SZYMANSKI, TG .
COMMUNICATIONS OF THE ACM, 1977, 20 (05) :350-353
[9]  
Levenshtein V, 1965, PROBL INFORM TRANSM, V1, P8
[10]   Finding a longest common subsequence between a run-length-encoded string and an uncompressed string [J].
Liu, J. J. ;
Wang, Y. L. ;
Lee, R. C. T. .
JOURNAL OF COMPLEXITY, 2008, 24 (02) :173-184