Abstract
We consider the longest common subsequence (LCS) problem with the restriction that the common subsequence is required to consist of at least k length substrings. First, we show an O(mn) time algorithm for the problem which gives a better worst-case running time than existing algorithms, where m and n are lengths of the input strings. Furthermore, we mainly consider the LCS in at least k length order-isomorphic substrings problem. We show that the problem can also be solved in O(mn) worst-case time by an easy-to-implement algorithm.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Since the problem is motivated by the order-preserving matching problem, we abbreviate it to the op-LCS\(_{k^{+}}\) problem.
- 2.
- 3.
Hasan et al. [11] assume that characters in a string are distinct. If the assumption is false, use Lemma 4 in [4] in order to verify the order-isomorphism, that is, modify line 10 of Algorithm 4 in [11] and line 7 and 12 in Algorithm 1. Note that \( Prev \) and \( Next \) are denoted as \( LMax \) and \( LMin \) in [4], respectively, with slight differences.
References
Bender, M.A., Farach-Colton, M.: The LCA problem revisited. In: Gonnet, G.H., Viola, A. (eds.) LATIN 2000. LNCS, vol. 1776, pp. 88–94. Springer, Heidelberg (2000). doi:10.1007/10719839_9
Benson, G., Levy, A., Maimoni, S., Noifeld, D., Shalom, B.: LCSk: a refined similarity measure. Theor. Comput. Sci. 638, 11–26 (2016)
Bouvel, M., Rossin, D., Vialette, S.: Longest common separable pattern among permutations. In: Ma, B., Zhang, K. (eds.) CPM 2007. LNCS, vol. 4580, pp. 316–327. Springer, Heidelberg (2007). doi:10.1007/978-3-540-73437-6_32
Cho, S., Na, J.C., Park, K., Sim, J.S.: A fast algorithm for order-preserving pattern matching. Inf. Process. Lett. 115(2), 397–402 (2015)
Cole, R., Hariharan, R.: Dynamic LCA queries on trees. SIAM J. Comput. 34(4), 894–923 (2005)
Crochemore, M., Iliopoulos, C.S., Kociumaka, T., Kubica, M., Langiu, A., Pissis, S.P., Radoszewski, J., Rytter, W., Waleń, T.: Order-preserving indexing. Theor. Comput. Sci. 638, 122–135 (2016)
Deorowicz, S., Grabowski, S.: Efficient algorithms for the longest common subsequence in \(k\)-length substrings. Inf. Process. Lett. 114(11), 634–638 (2014)
Fischer, J.: Inducing the LCP-array. In: Dehne, F., Iacono, J., Sack, J.-R. (eds.) WADS 2011. LNCS, vol. 6844, pp. 374–385. Springer, Heidelberg (2011). doi:10.1007/978-3-642-22300-6_32
Fischer, J., Heun, V.: Space-efficient preprocessing schemes for range minimum queries on static arrays. SIAM J. Comput. 40(2), 465–492 (2011)
Gusfield, D.: Algorithms on Strings, Trees, and Sequences: Computer Science and Computational Biology. Cambridge University Press, New York (1997)
Hasan, M.M., Islam, A., Rahman, M.S., Rahman, M.: Order preserving pattern matching revisited. Pattern Recogn. Lett. 55, 15–21 (2015)
Khan, R., Ahmad, M., Zakarya, M.: Longest common subsequence based algorithm for measuring similarity between time series: a new approach. World Appl. Sci. J. 24(9), 1192–1198 (2013)
Kim, J., Eades, P., Fleischer, R., Hong, S.H., Iliopoulos, C.S., Park, K., Puglisi, S.J., Tokuyama, T.: Order-preserving matching. Theor. Comput. Sci. 525(13), 68–79 (2014)
Kubica, M., Kulczynski, T., Radoszewski, J., Rytter, W., Walen, T.: A linear time algorithm for consecutive permutation pattern matching. Inf. Process. Lett. 113(12), 430–433 (2013)
Pavetić, F., Žužić, G., Šikić, M.: \(LCSk\)++: practical similarity metric for long strings (2014). CoRR 1407.2407
Sović, I., Šikić, M., Wilm, A., Fenlon, S.N., Chen, S., Nagarajan, N.: Fast and sensitive mapping of nanopore sequencing reads with GraphMap. Nat. Commun. 7, Article No. 11307 (2016). doi:10.1038/ncomms11307
Acknowledgements
This work was funded by ImPACT Program of Council for Science, Technology and Innovation (Cabinet Office, Government of Japan), Tohoku University Division for Interdisciplinary Advance Research and Education, and JSPS KAKENHI Grant Numbers JP24106010, JP16H02783, JP26280003.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2017 Springer International Publishing AG
About this paper
Cite this paper
Ueki, Y. et al. (2017). Longest Common Subsequence in at Least k Length Order-Isomorphic Substrings. In: Steffen, B., Baier, C., van den Brand, M., Eder, J., Hinchey, M., Margaria, T. (eds) SOFSEM 2017: Theory and Practice of Computer Science. SOFSEM 2017. Lecture Notes in Computer Science(), vol 10139. Springer, Cham. https://doi.org/10.1007/978-3-319-51963-0_28
Download citation
DOI: https://doi.org/10.1007/978-3-319-51963-0_28
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-51962-3
Online ISBN: 978-3-319-51963-0
eBook Packages: Computer ScienceComputer Science (R0)