Longest Common Abelian Factors and Large Alphabets
Two strings X and Y are considered Abelian equal if the letters of X can be permuted to obtain Y (and vice versa). Recently, Alatabbi et al. (2015) considered the longest common Abelian factor problem in which we are asked to find the length of the longest Abelian-equal factor present in a given pair of strings. They provided an algorithm that uses \(O(\sigma n^2)\) time and \(O(\sigma n)\) space, where n is the length of the pair of strings and \(\sigma \) is the alphabet size. In this paper we describe an algorithm that uses \(O(n^2\log ^2n\log ^*n)\) time and \(O(n\log ^2n)\) space, significantly improving Alatabbi et al.’s result unless the alphabet is small. Our algorithm makes use of techniques for maintaining a dynamic set of strings under split, join, and equality testing (Melhorn et al., Algorithmica 17(2), 1997).
KeywordsSuffix Tree Extra Space Alphabet Size Factor Length Alphabet Symbol
- 1.Alatabbi, A., Iliopoulos, C.S., Langiu, A., Rahman, M.S.: Algorithms for longest common abelian factors, arXiv:1503.00049 (2015)
- 2.Amir, A., Chan, T.M., Lewenstein, M., Lewenstein, N.: On hardness of jumbled indexing. In: Esparza, J., Fraigniaud, P., Husfeldt, T., Koutsoupias, E. (eds.) ICALP 2014. LNCS, vol. 8572, pp. 114–125. Springer, Heidelberg (2014)Google Scholar
- 7.Kociumaka, T., Starikovskaya, T., Vildhøj, H.W.: Sublinear space algorithms for the longest common substring problem. In: Schulz, A.S., Wagner, D. (eds.) ESA 2014. LNCS, vol. 8737, pp. 605–617. Springer, Heidelberg (2014)Google Scholar