Skip to main content

A Diagonal-Based Algorithm for the Constrained Longest Common Subsequence Problem

  • Conference paper
  • First Online:
New Trends in Computer Technologies and Applications (ICS 2018)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 1013))

Included in the following conference series:

  • 1304 Accesses

Abstract

Given two sequences A and B of lengths m and n, respectively, and another constrained sequence C with length r, the constrained longest common subsequence (CLCS) problem is to find the longest common subsequence (LCS) of A and B with the constraint that C is contained as a subsequence in the answer. Based on the diagonal concept for finding the LCS length, proposed by Nakatsu et al., this paper proposes an algorithm for obtaining the CLCS length efficiently in O\((rL(m-L))\) time and O(mr) space, where L denotes the CLCS length. According to the experimental result, the proposed algorithm outperforms the previously CLCS algorithms.

This research work was partially supported by the Ministry of Science and Technology of Taiwan under contract MOST 104-2221-E-110-018-MY3.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 89.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 119.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Ann, H.Y., Yang, C.B., Tseng, C.T., Hor, C.Y.: Fast algorithms for computing the constrained LCS of run-length encoded strings. Theor. Comput. Sci. 432, 1–9 (2012)

    Article  MathSciNet  Google Scholar 

  2. Arslan, A.N., Eğecioğlu, Ö.: Algorithms for the constrained longest common subsequence problems. Int. J. Found. Comput. Sci. 16(06), 1099–1109 (2005)

    Article  MathSciNet  Google Scholar 

  3. Chin, F.Y.L., Santis, A.D., Ferrara, A.L., Ho, N.L., Kim, S.K.: A simple algorithm for the constrained sequence problems. Inform. Process. Lett. 90(4), 175–179 (2004)

    Article  MathSciNet  Google Scholar 

  4. Deorowicz, S.: Fast algorithm for the constrained longest common subsequence problem. Theor. Appl. Inform. 19(2), 91–102 (2007)

    Google Scholar 

  5. Ho, W.C., Huang, K.S., Yang, C.B.: A fast algorithm for the constrained longest common subsequence problem with small alphabet. In: Proceedings of the 34th Workshop on Combinatorial Mathematics and Computation Theory, Taichung, Taiwan, pp. 13–25 (2017)

    Google Scholar 

  6. Hunt, J.W., Szymanski, T.G.: A fast algorithm for computing longest common subsequences. Commun. ACM 20(5), 350–353 (1977)

    Article  MathSciNet  Google Scholar 

  7. Kruskal, J.B.: An overview of sequence comparison: time warps, string edits, and macromolecules. SIAM Rev. 25(2), 201–237 (1983)

    Article  MathSciNet  Google Scholar 

  8. Nakatsu, N., Kambayashi, Y., Yajima, S.: A longest common subsequence algorithm suitable for similar text strings. Acta Inform. 18, 171–179 (1982)

    Article  MathSciNet  Google Scholar 

  9. Peng, C.L.: An approach for solving the constrained longest common subsequence problem. Master’s Thesis, Department of Computer Science and Engineering, National Sun Yat-Sen University, Kaohsiung, Taiwan (2003)

    Google Scholar 

  10. Peng, Y.H., Yang, C.B., Huang, K.S., Tseng, K.T.: An algorithm and applications to sequence alignment with weighted constraints. Int. J. Found. Comput. Sci. 21, 51–59 (2010)

    Article  MathSciNet  Google Scholar 

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

    Article  MathSciNet  Google Scholar 

  12. Tseng, K.T., Chan, D.S., Yang, C.B., Lo, S.F.: Efficient merged longest common subsequence algorithms for similar sequences. Theor. Comput. Sci. 708, 75–90 (2018)

    Article  MathSciNet  Google Scholar 

  13. Wagner, R., Fischer, M.: The string-to-string correction problem. J. ACM 21(1), 168–173 (1974)

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Chang-Biau Yang .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Hung, SH., Yang, CB., Huang, KS. (2019). A Diagonal-Based Algorithm for the Constrained Longest Common Subsequence Problem. In: Chang, CY., Lin, CC., Lin, HH. (eds) New Trends in Computer Technologies and Applications. ICS 2018. Communications in Computer and Information Science, vol 1013. Springer, Singapore. https://doi.org/10.1007/978-981-13-9190-3_45

Download citation

  • DOI: https://doi.org/10.1007/978-981-13-9190-3_45

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-13-9189-7

  • Online ISBN: 978-981-13-9190-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics