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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
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)
Arslan, A.N., Eğecioğlu, Ö.: Algorithms for the constrained longest common subsequence problems. Int. J. Found. Comput. Sci. 16(06), 1099–1109 (2005)
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)
Deorowicz, S.: Fast algorithm for the constrained longest common subsequence problem. Theor. Appl. Inform. 19(2), 91–102 (2007)
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)
Hunt, J.W., Szymanski, T.G.: A fast algorithm for computing longest common subsequences. Commun. ACM 20(5), 350–353 (1977)
Kruskal, J.B.: An overview of sequence comparison: time warps, string edits, and macromolecules. SIAM Rev. 25(2), 201–237 (1983)
Nakatsu, N., Kambayashi, Y., Yajima, S.: A longest common subsequence algorithm suitable for similar text strings. Acta Inform. 18, 171–179 (1982)
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)
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)
Tsai, Y.T.: The constrained longest common subsequence problem. Inform. Process. Lett. 88, 173–176 (2003)
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)
Wagner, R., Fischer, M.: The string-to-string correction problem. J. ACM 21(1), 168–173 (1974)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Singapore Pte Ltd.
About this paper
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)