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 条
[11]   SPARSE DYNAMIC-PROGRAMMING .1. LINEAR COST-FUNCTIONS [J].
EPPSTEIN, D ;
GALIL, Z ;
GIANCARLO, R ;
ITALIANO, GF .
JOURNAL OF THE ACM, 1992, 39 (03) :519-545
[12]  
Fischer J, 2007, LECT NOTES COMPUT SC, V4614, P459
[13]  
FREDMAN ML, 1990, PROCEEDINGS OF THE TWENTY SECOND ANNUAL ACM SYMPOSIUM ON THEORY OF COMPUTING, P1, DOI 10.1145/100216.100217
[15]   ALGORITHMS FOR LONGEST COMMON SUBSEQUENCE PROBLEM [J].
HIRSCHBERG, DS .
JOURNAL OF THE ACM, 1977, 24 (04) :664-675
[16]   FAST ALGORITHM FOR COMPUTING LONGEST COMMON SUBSEQUENCES [J].
HUNT, JW ;
SZYMANSKI, TG .
COMMUNICATIONS OF THE ACM, 1977, 20 (05) :350-353
[17]   Mining Bit-Parallel LCS-length Algorithms [J].
Hyyro, Heikki .
STRING PROCESSING AND INFORMATION RETRIEVAL (SPIRE 2017), 2017, 10508 :214-220
[18]  
Intel Corporation, 2023, The Intel 64 and IA-32 Architectures Software Developer's Manual, V2
[19]   A FASTER ALGORITHM COMPUTING STRING EDIT DISTANCES [J].
MASEK, WJ ;
PATERSON, MS .
JOURNAL OF COMPUTER AND SYSTEM SCIENCES, 1980, 20 (01) :18-31
[20]   Simple and fast linear space computation of longest common subsequences [J].
Rick, C .
INFORMATION PROCESSING LETTERS, 2000, 75 (06) :275-281