The longest common subsequence problem for small alphabets in the word RAM model

被引:0
作者
Campos, Rodrigo Alexander Castro [1 ]
机构
[1] Univ Autonoma Metropolitana, Dept Sistemas, San Pablo 420, Mexico City 02200, Mexico
关键词
Longest common subsequence; Small alphabet; Word RAM model; Sparse dynamic programming; ALGORITHM; LCS;
D O I
10.1016/j.ipl.2025.106579
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Given two strings of lengths m and n, with m <= n, the longest common subsequence problem consists of computing a common subsequence of maximum length by deleting symbols from both strings. While the O(mn) algorithm devised in 1974 is optimal in the most general setting, algorithms that depend on parameters other than m and n have been proposed since then. In the word RAM model, let w be the word size, s be the alphabet size, d be the number of dominant symbol matches between the strings, and p be the length of the longest common subsequence. Fast algorithms for this problem have complexities O(mn/ log n), O(mn/w), O(ns + min(p(n - p), pm)), O(n logs + d log log min(d, mn/d)), O(ns+min(ds, pm)), and O(ns+s!2s+d logs). In this work, we present an O(n(s+log & lowast; n)+ min(d logs, pm)) algorithm when s is an element of O(w), and also an O(n(s + log & lowast; n) + d) algorithm when s <= w which uses bitwise instructions that became recently available in modern processors.
引用
收藏
页数:6
相关论文
共 22 条
[1]   Tight Hardness Results for LCS and other Sequence Similarity Measures [J].
Abboud, Amir ;
Backurs, Arturs ;
Williams, Virginia Vassilevska .
2015 IEEE 56TH ANNUAL SYMPOSIUM ON FOUNDATIONS OF COMPUTER SCIENCE, 2015, :59-78
[2]   A BIT-STRING LONGEST-COMMON-SUBSEQUENCE ALGORITHM [J].
ALLISON, L ;
DIX, TI .
INFORMATION PROCESSING LETTERS, 1986, 23 (06) :305-310
[3]  
Alon N., 1987, Tech. Rep. TR 71/87
[5]  
Bentley J. L., 1976, Information Processing Letters, V5, P82, DOI 10.1016/0020-0190(76)90071-5
[6]   A survey of longest common subsequence algorithms [J].
Bergroth, L ;
Hakonen, H ;
Raita, T .
SPIRE 2000: SEVENTH INTERNATIONAL SYMPOSIUM ON STRING PROCESSING AND INFORMATION RETRIEVAL - PROCEEDINGS, 2000, :39-48
[7]   Fast and compact regular expression matching [J].
Bille, Philip ;
Farach-Colton, Martin .
THEORETICAL COMPUTER SCIENCE, 2008, 409 (03) :486-496
[8]  
Bringmann K, 2018, SODA'18: PROCEEDINGS OF THE TWENTY-NINTH ANNUAL ACM-SIAM SYMPOSIUM ON DISCRETE ALGORITHMS, P1216
[9]  
Chin Francis YL, 1991, J. Inf. Process., V13, P463
[10]   A fast and practical bit-vector algorithm for the Longest Common Subsequence problem [J].
Crochemore, M ;
Iliopoulos, CS ;
Pinzon, YJ ;
Reid, JF .
INFORMATION PROCESSING LETTERS, 2001, 80 (06) :279-285