Computing Abelian regularities on RLE strings

Two strings x and y are said to be Abelian equivalent if x is a permutation of y, or vice versa. If a string z satisfies z = xy with x and y being Abelian equivalent, then z is said to be an Abelian square. If a string w can be factorized into a sequence v_1,...,v_s of strings such that v_1 ,..., v_{s-1} are all Abelian equivalent and vs is a substring of a permutation of v_1, then w is said to have a regular Abelian period (p,t) where p = |v_1| and t = |v_s|. If a substring w_1[i..i+l-1] of a string w_1 and a substring w_2[j..j+l-1] of another string w_2 are Abelian equivalent, then the substrings are said to be a common Abelian factor of w_1 and w_2 and if the length l is the maximum of such then the substrings are said to be a longest common Abelian factor of w_1 and w_2. We propose efficient algorithms which compute these Abelian regularities using the run length encoding (RLE) of strings. For a given string w of length n whose RLE is of size m, we propose algorithms which compute all Abelian squares occurring in w in O(mn) time, and all regular Abelian periods of w in O(mn) time. For two given strings w_1 and w_2 of total length n and of total RLE size m, we propose an algorithm which computes all longest common Abelian factors in O(m^2n) time.

[1]  William F. Smyth,et al.  Weak repetitions in strings , 1997 .

[2]  A. B. Cook Some unsolved problems. , 1952, Hospital management.

[3]  Szymon Grabowski A note on the longest common Abelian factor problem , 2015, ArXiv.

[4]  Simon J. Puglisi,et al.  Longest Common Abelian Factors and Large Alphabets , 2016, SPIRE.

[5]  Arnaud Lefebvre,et al.  Online Computation of Abelian Runs , 2015, LATA.

[6]  Wojciech Rytter,et al.  A note on efficient computation of all Abelian periods in a string , 2013, Inf. Process. Lett..

[7]  Wojciech Rytter,et al.  Fast algorithms for Abelian periods in words and greatest common divisor queries , 2017, J. Comput. Syst. Sci..

[8]  Arnaud Lefebvre,et al.  Algorithms for Computing Abelian Periods of Words , 2012, Discret. Appl. Math..

[9]  Lucian Ilie,et al.  Fine and Wilf's Theorem for Abelian Periods , 2006, Bull. EATCS.

[10]  Arnaud Lefebvre,et al.  A note on easy and efficient computation of full abelian periods of a word , 2016, Discret. Appl. Math..

[11]  Jakub Radoszewski,et al.  Subquadratic-Time Algorithms for Abelian Stringology Problems , 2015, MACIS.

[12]  Gad M. Landau,et al.  Algorithms for Jumbled Indexing, Jumbled Border and Jumbled Square on Run-Length Encoded Strings , 2014, SPIRE.

[13]  Costas S. Iliopoulos,et al.  Algorithms for Longest Common Abelian Factors , 2016, Int. J. Found. Comput. Sci..

[14]  Arnaud Lefebvre,et al.  Quasi-linear Time Computation of the Abelian Periods of a Word , 2012, Stringology.