Nothing Special   »   [go: up one dir, main page]

skip to main content
research-article

Polynomial-time equivalences and refined algorithms for longest common subsequence variants

Published: 15 August 2024 Publication History

Abstract

The problem of computing the longest common subsequence of two sequences (LCS for short) is a classical and fundamental problem in computer science. In this article, we study four variants of LCS: the Repetition-Bounded Longest Common Subsequence problem (RBLCS), the Multiset-Restricted Common Subsequence problem (MRCS), the Two-Side-Filled Longest Common Subsequence problem (2FLCS), and the One-Side-Filled Longest Common Subsequence problem (1FLCS). Although the original LCS can be solved in polynomial time, all these four variants are known to be NP-hard. Recently, an exact, O ( 1 . 4422 5 n )-time, dynamic programming (DP) based algorithm for RBLCS was proposed, where the two input sequences have lengths n and p o l y ( n ). Here, we first establish that each of MRCS, 1FLCS, and 2FLCS is polynomially equivalent to RBLCS. Then, we design a refined DP-based algorithm for RBLCS that runs in O ( 1 . 4142 2 n ) time, which implies that MRCS, 1FLCS, and 2FLCS can also be solved in O ( 1 . 4142 2 n ) time. Finally, we give a polynomial-time 2-approximation algorithm for 2FLCS.

References

[1]
Adi Said Sadique, Braga Marília D.V., Fernandes Cristina G., Ferreira Carlos Eduardo, Martinez Fábio Viduani, Sagot Marie-France, Stefanes Marco Aurelio, Tjandraatmadja Christian, Wakabayashi Yoshiko, Repetition-free longest common subsequence, Electron. Notes Discret. Math. 30 (2008) 243–248.
[2]
Asahiro Yuichi, Jansson Jesper, Lin Guohui, Miyano Eiji, Ono Hirotaka, Utashima Tadatoshi, Exact algorithms for the repetition-bounded longest common subsequence problem, Theoret. Comput. Sci. 838 (2020) 238–249.
[3]
Asahiro Yuichi, Jansson Jesper, Lin Guohui, Miyano Eiji, Ono Hirotaka, Utashima Tadatoshi, Polynomial-time equivalences and refined algorithms for longest common subsequence variants, in: Bannai Hideo, Holub Jan (Eds.), 33rd Annual Symposium on Combinatorial Pattern Matching, in: LIPIcs, vol. 223, CPM 2022, June 27–29, 2022, Prague, Czech Republic, Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2022, pp. 15:1–15:17.
[4]
Bergroth Lasse, Hakonen Harri, Raita Timo, A survey of longest common subsequence algorithms, in: de la Fuente Pablo (Ed.), Seventh International Symposium on String Processing and Information Retrieval, SPIRE 2000, A Coruña, Spain, September 27–29, 2000, IEEE Computer Society, 2000, pp. 39–48.
[5]
Bulteau Laurent, Hüffner Falk, Komusiewicz Christian, Niedermeier Rolf, Multivariate algorithmics for NP-hard string problems: The algorithmics column by Gerhard J. Woeginger, Bull. EATCS 114 (2014).
[6]
Castelli Mauro, Dondi Riccardo, Mauri Giancarlo, Zoppis Italo, The longest filled common subsequence problem, in: Kärkkäinen Juha, Radoszewski Jakub, Rytter Wojciech (Eds.), 28th Annual Symposium on Combinatorial Pattern Matching, in: LIPIcs, vol. 78, CPM 2017, July 4-6, 2017, Warsaw, Poland, Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2017, pp. 14:1–14:13.
[7]
Castelli Mauro, Dondi Riccardo, Mauri Giancarlo, Zoppis Italo, Comparing incomplete sequences via longest common subsequence, Theoret. Comput. Sci. 796 (2019) 272–285.
[8]
Cormen Thomas H., Leiserson Charles E., Rivest Ronald L., Stein Clifford, Introduction to Algorithms, 4th Edition, MIT Press, 2022.
[9]
Hirschberg Daniel S., A linear space algorithm for computing maximal common subsequences, Commun. ACM 18 (6) (1975) 341–343.
[10]
Hirschberg Daniel S., Algorithms for the longest common subsequence problem, J. ACM 24 (4) (1977) 664–675.
[11]
Jiang Haitao, Zheng Chunfang, Sankoff David, Zhu Binhai, Scaffold filling under the breakpoint and related distances, IEEE ACM Trans. Comput. Biol. Bioinform. 9 (4) (2012) 1220–1229.
[12]
Lowrance Roy, Wagner Robert A., An extension of the string-to-string correction problem, J. ACM 22 (2) (1975) 177–183.
[13]
Mincu Radu Stefan, Popa Alexandru, Better heuristic algorithms for the repetition free LCS and other variants, in: Gagie Travis, Moffat Alistair, Navarro Gonzalo, Cuadros-Vargas Ernesto (Eds.), String Processing and Information Retrieval - 25th International Symposium, SPIRE 2018, Lima, Peru, October 9–11, 2018, Proceedings, in: Lecture Notes in Computer Science, vol. 11147, Springer, 2018, pp. 297–310.
[14]
Mincu Radu Stefan, Popa Alexandru, Heuristic algorithms for the longest filled common subsequence problem, in: 20th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing, SYNASC 2018, Timisoara, Romania, September 20–23, 2018, IEEE, 2018, pp. 449–453.
[15]
Muñoz Adriana, Zheng Chunfang, Zhu Qian, Albert Victor A., Rounsley Steve, Sankoff David, Scaffold filling, contig fusion and comparative gene order inference, BMC Bioinform. 11 (2010) 304.
[16]
Wagner Robert A., Fischer Michael J., The string-to-string correction problem, J. ACM 21 (1) (1974) 168–173.

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image Discrete Applied Mathematics
Discrete Applied Mathematics  Volume 353, Issue C
Aug 2024
227 pages

Publisher

Elsevier Science Publishers B. V.

Netherlands

Publication History

Published: 15 August 2024

Author Tags

  1. Longest common subsequence
  2. Repetition-bounded
  3. Multiset-restricted
  4. One-side-filled
  5. Two-side-filled
  6. Dynamic programming
  7. Exact algorithm
  8. Approximation algorithm

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 0
    Total Downloads
  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 17 Feb 2025

Other Metrics

Citations

View Options

View options

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media