Skip to main content

Efficient Search Algorithms for the Restricted Longest Common Subsequence Problem

  • Conference paper
  • First Online:
Computational Science – ICCS 2024 (ICCS 2024)

Abstract

This paper deals with the restricted longest common subsequence (RLCS) problem, an extension of the well-studied longest common subsequence problem involving two sets of strings: the input strings and the restricted strings. This problem has applications in bioinformatics, particularly in identifying similarities and discovering mutual patterns and motifs among DNA, RNA, and protein molecules. We introduce a general search framework to tackle the RLCS problem. Based on this, we present an exact best-first search algorithm and a meta-heuristic Beam Search algorithm. To evaluate the effectiveness of these algorithms, we compare them with two exact algorithms and two approximate algorithms from the literature along with a greedy approach. Our experimental results show the superior performance of our proposed approaches. In particular, our exact approach outperforms the other exact methods in terms of significantly shorter computation times, often reaching an order of magnitude compared to the second-best approach. Moreover, it successfully solves all problem instances, which was not the case with the other approaches. In addition, Beam Search provides close-to-optimal solutions with remarkably short computation times.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Akeb, H., Hifi, M., M’Hallah, R.: A beam search algorithm for the circular packing problem. Comput. Oper. Res. 36(5), 1513–1528 (2009)

    Article  MathSciNet  Google Scholar 

  2. Ann, H.Y., Yang, C.B., Tseng, C.T.: Efficient polynomial-time algorithms for the constrained lcs problem with strings exclusion. J. Comb. Optim. 28(4), 800–813 (2014)

    Article  MathSciNet  Google Scholar 

  3. Apostolico, A., Guerra, C.: The longest common subsequence problem revisited. Algorithmica 2, 315–336 (1987)

    Article  MathSciNet  Google Scholar 

  4. Bergroth, L., Hakonen, H., Raita, T.: A survey of longest common subsequence algorithms. In: Proceedings Seventh International Symposium on String Processing and Information Retrieval. SPIRE 2000, pp. 39–48. IEEE (2000)

    Google Scholar 

  5. Blum, C., Blesa, M.J.: A hybrid evolutionary algorithm based on solution merging for the longest arc-preserving common subsequence problem. In: 2017 IEEE Congress on Evolutionary Computation (CEC), pp. 129–136. IEEE (2017)

    Google Scholar 

  6. Blum, C., Blesa, M.J., Lopez-Ibanez, M.: Beam search for the longest common subsequence problem. Comput. Oper. Res. 36(12), 3178–3186 (2009)

    Article  MathSciNet  Google Scholar 

  7. Carlson, J.M., Chakravarty, A., Gross, R.H.: Beam: a beam search algorithm for the identification of cis-regulatory elements in groups of genes. J. Comput. Biol. 13(3), 686–701 (2006)

    Article  MathSciNet  Google Scholar 

  8. Chen, Y.C., Chao, K.M.: On the generalized constrained longest common subsequence problems. J. Comb. Optim. 21(3), 383–392 (2011)

    Article  MathSciNet  Google Scholar 

  9. Deorowicz, S., Grabowski, S.: Subcubic algorithms for the sequence excluded LCS problem. In: Gruca, A.., Czachórski, T., Kozielski, S. (eds.) Man-Machine Interactions 3. AISC, vol. 242, pp. 503–510. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-02309-0_55

  10. Djukanovic, M., Berger, C., Raidl, G.R., Blum, C.: On solving a generalized constrained longest common subsequence problem. In: Olenev, N., Evtushenko, Y., Khachay, M., Malkova, V. (eds.) OPTIMA 2020. LNCS, vol. 12422, pp. 55–70. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-62867-3_5

  11. Djukanovic, M., Raidl, G.R., Blum, C.: A beam search for the longest common subsequence problem guided by a novel approximate expected length calculation. In: Nicosia, G., Pardalos, P., Umeton, R., Giuffrida, G., Sciacca, V. (eds.) LOD 2019. LNCS, vol. 11943, pp. 154–167. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-37599-7_14

  12. Djukanovic, M., Raidl, G.R., Blum, C.: Finding longest common subsequences: new anytime A\(^*\) search results. Appl. Soft Comput. 95, 106499 (2020)

    Google Scholar 

  13. Farhana, E., Rahman, M.S.: Constrained sequence analysis algorithms in computational biology. Inf. Sci. 295, 247–257 (2015)

    Article  MathSciNet  Google Scholar 

  14. Gotthilf, Z., Hermelin, D., Landau, G.M., Lewenstein, M.: Restricted LCS. In: Chavez, E., Lonardi, S. (eds.) SPIRE 2010. LNCS, vol. 6393, pp. 250–257. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-16321-0_26

  15. Hart, P.E., Nilsson, N.J., Raphael, B.: A formal basis for the heuristic determination of minimum cost paths. IEEE Trans. Syst. Sci. Cybernet. 4(2), 100–107 (1968)

    Article  Google Scholar 

  16. Hirschberg, D.S.: Algorithms for the longest common subsequence problem. J. ACM 24(4), 664–675 (1977)

    Article  MathSciNet  Google Scholar 

  17. Lin, G., Chen, Z.Z., Jiang, T., Wen, J.: The longest common subsequence problem for sequences with nested arc annotations. J. Comput. Syst. Sci. 65(3), 465–480 (2002)

    Article  MathSciNet  Google Scholar 

  18. Maier, D.: The Complexity of Some Problems on Sequences. Princeton University (1978)

    Google Scholar 

  19. Mousavi, S.R., Bahri, F., Tabataba, F.S.: An enhanced beam search algorithm for the shortest common supersequence problem. Eng. Appl. Artif. Intell. 25(3), 457–467 (2012)

    Article  Google Scholar 

  20. Sabuncuoglu, I., Bayiz, M.: Job shop scheduling with beam search. Eur. J. Oper. Res. 118(2), 390–412 (1999)

    Article  Google Scholar 

  21. Storer, J.A.: Data Compression: Methods and Theory. Computer Science Press, Inc. (1987)

    Google Scholar 

  22. Tsai, Y.T.: The constrained longest common subsequence problem. Inf. Process. Lett. 88(4), 173–176 (2003)

    Article  MathSciNet  Google Scholar 

  23. Wang, Q., Pan, M., Shang, Y., Korkin, D.: A fast heuristic search algorithm for finding the longest common subsequence of multiple strings. Proc. AAAI Conf. Artif. Intell. 24, 1287–1292 (2010)

    Google Scholar 

Download references

Acknowledgements

The research of M. Djukanović is partially supported by the Ministry for Scientific and Technological Development and Higher Education of the Republic of Srpska, B &H in the course of the bilateral research project between B &H and Slovenia entitled “Theoretical and computational aspects of some graph problems with the application to graph network information spreading” and the COST Action ROAR-NET under no. CA22137. A. Kartelj was supported by grant 451-03-47/2023-01/200104 funded by the Ministry of Science Technological Development and Innovations of the Republic of Serbia. J. Reixach and C. Blum are supported by grants TED2021-129319B-I00 and PID2022-136787NB-I00 funded by MCIN/AEI/10.13039/501100011033. The authors would like to thank the Compute Cluster Unit of the Institute of Logic and Computation at the Vienna University of Technology for providing computing resources for this research project.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Marko Djukanović .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Djukanović, M., Kartelj, A., Eftimov, T., Reixach, J., Blum, C. (2024). Efficient Search Algorithms for the Restricted Longest Common Subsequence Problem. In: Franco, L., de Mulatier, C., Paszynski, M., Krzhizhanovskaya, V.V., Dongarra, J.J., Sloot, P.M.A. (eds) Computational Science – ICCS 2024. ICCS 2024. Lecture Notes in Computer Science, vol 14836. Springer, Cham. https://doi.org/10.1007/978-3-031-63775-9_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-63775-9_5

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-63774-2

  • Online ISBN: 978-3-031-63775-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics