Abstract
Given a string T with length n whose characters are drawn from an ordered alphabet of size \(\sigma \), its longest Lyndon subsequence is a longest subsequence of T that is a Lyndon word. We propose algorithms for finding such a subsequence in \(\mathcal {O}(n^3)\) time with \(\mathcal {O}(n)\) space, or online in \(\mathcal {O}(n^3 \sigma )\) space and time. Our first result can be extended to find the longest common Lyndon subsequence of two strings of length n in \(\mathcal {O}(n^4 \sigma )\) time using \(\mathcal {O}(n^3)\) space.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Bannai, H., I, T., Inenaga, S., Nakashima, Y., Takeda, M., Tsuruta, K.: The “runs” theorem. SIAM J. Comput. 46(5), 1501–1514 (2017)
de Beauregard Robinson, G.: On the representations of the symmetric group. Am. J. Math. 60(3), 745–760 (1938)
Bender, M.A., Farach-Colton, M., Pemmasani, G., Skiena, S., Sumazin, P.: Lowest common ancestors in trees and directed acyclic graphs. J. Algorithms 57(2), 75–94 (2005)
Biedl, T.C., et al.: Rollercoasters: long sequences without short runs. SIAM J. Discret. Math. 33(2), 845–861 (2019)
Chen, K.T., Fox, R.H., Lyndon, R.C.: Free differential calculus, IV. The quotient groups of the lower central series. Ann. Math. Second Ser. 68(1), 81–95 (1958). https://www.jstor.org/stable/1970044. Mathematics Department, Princeton University
Chowdhury, S.R., Hasan, M.M., Iqbal, S., Rahman, M.S.: Computing a longest common palindromic subsequence. Fundam. Inform. 129(4), 329–340 (2014)
Cole, R., Hariharan, R.: Dynamic LCA queries on trees. SIAM J. Comput. 34(4), 894–923 (2005)
Dietz, P.F.: Finding level-ancestors in dynamic trees. In: Dehne, F., Sack, J.R., Santoro, N. (eds.) Algorithms and Data Structures. WADS 1991. LNCS, vol. 519, pp. 32–40. Springer, Heidelberg (1991). https://doi.org/10.1007/BFb0028247. ISBN 978-3-540-47566-8
Duval, J.: Factorizing words over an ordered alphabet. J. Algorithms 4(4), 363–381 (1983)
Elmasry, A.: The longest almost-increasing subsequence. Inf. Process. Lett. 110(16), 655–658 (2010)
Fujita, K., Nakashima, Y., Inenaga, S., Bannai, H., Takeda, M.: Longest common rollercoasters. In: Lecroq, T., Touzet, H. (eds.) SPIRE 2021. LNCS, vol. 12944, pp. 21–32. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-86692-1_3
Gawrychowski, P., Manea, F., Serafin, R.: Fast and longest rollercoasters. In: Proceedings of STACS. LIPIcs, vol. 126, pp. 30:1–30:17 (2019)
Glen, A., Simpson, J., Smyth, W.F.: Counting Lyndon factors. Electron. J. Comb. 24(3), P3.28 (2017)
Grossi, R., Gupta, A., Vitter, J.S.: High-order entropy-compressed text indexes. In: Proceedings of SODA, pp. 841–850 (2003)
He, X., Xu, Y.: The longest commonly positioned increasing subsequences problem. J. Comb. Optim. 35(2), 331–340 (2017). https://doi.org/10.1007/s10878-017-0170-9
Hirakawa, R., Nakashima, Y., Inenaga, S., Takeda, M.: Counting Lyndon subsequences. In: Proceedings of PSC, pp. 53–60 (2021)
Hirschberg, D.S.: Algorithms for the longest common subsequence problem. J. ACM 24(4), 664–675 (1977)
Inenaga, S., Hyyrö, H.: A hardness result and new algorithm for the longest common palindromic subsequence problem. Inf. Process. Lett. 129, 11–15 (2018)
Kiyomi, M., Horiyama, T., Otachi, Y.: Longest common subsequence in sublinear space. Inf. Process. Lett. 168, 106084 (2021)
Knuth, D.: Permutations, matrices, and generalized Young tableaux. Pac. J. Math. 34, 709–727 (1970)
Kosche, M., Koß, T., Manea, F., Siemer, S.: Absent subsequences in words. In: Bell, P.C., Totzke, P., Potapov, I. (eds.) RP 2021. LNCS, vol. 13035, pp. 115–131. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-89716-1_8
Kosowski, A.: An efficient algorithm for the longest tandem scattered subsequence problem. In: Apostolico, A., Melucci, M. (eds.) SPIRE 2004. LNCS, vol. 3246, pp. 93–100. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-30213-1_13
Kutz, M., Brodal, G.S., Kaligosi, K., Katriel, I.: Faster algorithms for computing longest common increasing subsequences. J. Discrete Algorithms 9(4), 314–325 (2011)
Lyndon, R.C.: On Burnside’s problem. Trans. Am. Math. Soc. 77(2), 202–215 (1954)
Schensted, C.: Longest increasing and decreasing subsequences. Can. J. Math. 13, 179–191 (1961)
Ta, T.T., Shieh, Y., Lu, C.L.: Computing a longest common almost-increasing subsequence of two sequences. Theor. Comput. Sci. 854, 44–51 (2021)
Wagner, R.A., Fischer, M.J.: The string-to-string correction problem. J. ACM 21(1), 168–173 (1974)
Acknowledgments
This work was supported by JSPS KAKENHI Grant Numbers JP20H04141 (HB), JP19K20213 (TI), JP21K17701 and JP21H05847 (DK). TK was supported by NSF 1652303, 1909046, and HDR TRIPODS 1934846 grants, and an Alfred P. Sloan Fellowship.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 Springer Nature Switzerland AG
About this paper
Cite this paper
Bannai, H., I, T., Kociumaka, T., Köppl, D., Puglisi, S.J. (2022). Computing Longest (Common) Lyndon Subsequences. In: Bazgan, C., Fernau, H. (eds) Combinatorial Algorithms. IWOCA 2022. Lecture Notes in Computer Science, vol 13270. Springer, Cham. https://doi.org/10.1007/978-3-031-06678-8_10
Download citation
DOI: https://doi.org/10.1007/978-3-031-06678-8_10
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-06677-1
Online ISBN: 978-3-031-06678-8
eBook Packages: Computer ScienceComputer Science (R0)