Inferring Strings from Full Abelian Periods

Strings u, v are said to be Abelian equivalent if u is a permutation of the characters appearing in v. A string w is said to have a full Abelian periodp if \(w = w_1 \cdots w_k\), where all \(w_i\)’s are of length p each and are all Abelian equivalent. This paper studies reverse-engineering problems on full Abelian periods. Given a positive integer n and a set D of divisors of n, we show how to compute in O(n) time the lexicographically smallest string of length n which has all elements of D as its full Abelian periods and has the minimum number of full Abelian periods not in D. Moreover, we give an algorithm to enumerate all such strings in amortized constant time per output after O(n)-time preprocessing. Also, we show how to enumerate the strings which have all elements of D as its full Abelian periods in amortized constant time per output after O(n)-time preprocessing.

[1]  Hideo Bannai,et al.  Inferring Strings from Lyndon Factorization , 2014, MFCS.

[2]  H. Wilf,et al.  Uniqueness theorems for periodic functions , 1965 .

[3]  Tadao Takaoka,et al.  An O(1) Time Algorithm for Generating Multiset Permutations , 1999, ISAAC.

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

[5]  Eric Rivals,et al.  Reverse engineering of compact suffix trees and links: A novel algorithm , 2014, J. Discrete Algorithms.

[6]  M. Lothaire,et al.  Combinatorics on words: Frontmatter , 1997 .

[7]  Hjalte Wedel Vildhøj,et al.  A suffix tree or not a suffix tree? , 2014, J. Discrete Algorithms.

[8]  Rohit Parikh,et al.  On Context-Free Languages , 1966, JACM.

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

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

[11]  Donald E. Knuth,et al.  Fast Pattern Matching in Strings , 1977, SIAM J. Comput..

[12]  Arnaud Lefebvre,et al.  Computing Abelian Periods in Words , 2011, Stringology.

[13]  Yury Lifshits,et al.  Processing Compressed Texts: A Tractability Border , 2007, CPM.

[14]  Aaron Williams,et al.  Loopless generation of multiset permutations using a constant number of variables by prefix shifts , 2009, SODA.

[15]  Wojciech Rytter,et al.  Fast Algorithms for Abelian Periods in Words and Greatest Common Divisor Queries , 2013, STACS.

[16]  Francine Blanchet-Sadri,et al.  Abelian periods, partial words, and an extension of a theorem of Fine and Wilf , 2013, RAIRO Theor. Informatics Appl..

[17]  Artur Jez,et al.  Validating the Knuth-Morris-Pratt Failure Function, Fast and Online , 2010, Theory of Computing Systems.

[18]  M. Lothaire Combinatorics on words: Bibliography , 1997 .