Maximum number of distinct and nonequivalent nonstandard squares in a word

The combinatorics of nonstandard squares in a word depends on how the equivalence of halves of the square is defined. We consider Abelian squares, parameterized squares, and order-preserving squares. The word uv is an Abelian (parameterized, order-preserving) square if u and v are equivalent in the Abelian (parameterized, order-preserving) sense. The maximum number of ordinary squares in a word is known to be asymptotically linear, but the exact bound is still investigated. We present several results on the maximum number of distinct squares for nonstandard factor equivalence relations. Let SQ Abel ( n , ź ) and SQ Abel ' ( n , ź ) denote the maximum number of Abelian squares in a word of length n over an alphabet of size ź which are distinct as words and which are nonequivalent in the Abelian sense, respectively. For ź ź 2 we prove that SQ Abel ( n , ź ) = ź ( n 2 ) , SQ Abel ' ( n , ź ) = ź ( n 3 / 2 ) and SQ Abel ' ( n , ź ) = O ( n 11 / 6 ) . We also give linear bounds for parameterized and order-preserving squares for alphabets of constant size: SQ param ( n , O ( 1 ) ) = ź ( n ) , SQ op ( n , O ( 1 ) ) = ź ( n ) . The upper bounds have quadratic dependence on the alphabet size for order-preserving squares and exponential dependence for parameterized squares. As a side result we construct infinite words over the smallest alphabet which avoid nontrivial order-preserving squares and nontrivial parameterized cubes (nontrivial parameterized squares cannot be avoided in an infinite word). A preliminary version of this paper was published at DLT 2014 24. In this full version we improve or extend the bounds on all three kinds of squares.

[1]  Narad Rampersad,et al.  Overlap-Free Words and Generalizations , 2007 .

[2]  Arnaud Lefebvre,et al.  Abelian Powers and Repetitions in Sturmian Words , 2015, Theor. Comput. Sci..

[3]  Francine Blanchet-Sadri,et al.  Squares in partial words , 2014, Theor. Comput. Sci..

[4]  S. Muthukrishnan,et al.  Non-standard stringology: algorithms and complexity , 1994, STOC '94.

[5]  Juhani Karhumäki,et al.  Problems in between words and abelian words: k-abelian avoidability , 2012, Theor. Comput. Sci..

[6]  Juhani Karhumäki,et al.  Combinatorics on words: a tutorial , 2003, Bull. EATCS.

[7]  Frantisek Franek,et al.  How many double squares can a string contain? , 2015, Discret. Appl. Math..

[8]  F. Michel Dekking,et al.  Strongly Non-Repetitive Sequences and Progression-Free Sets , 1979, J. Comb. Theory, Ser. A.

[9]  P. Pleasants Non-repetitive sequences , 1970, Mathematical Proceedings of the Cambridge Philosophical Society.

[10]  Wojciech Rytter,et al.  A linear time algorithm for consecutive permutation pattern matching , 2013, Inf. Process. Lett..

[11]  Veikko Keränen,et al.  Abelian Squares are Avoidable on 4 Letters , 1992, ICALP.

[12]  Wojciech Rytter,et al.  Order-Preserving Incomplete Suffix Trees and Order-Preserving Indexes , 2013, SPIRE.

[13]  Lucian Ilie,et al.  A note on the number of squares in a word , 2007, Theor. Comput. Sci..

[14]  Wojciech Rytter,et al.  Extracting powers and periods in a word from its runs structure , 2014, Theor. Comput. Sci..

[15]  Wojciech Rytter,et al.  Maximum number of distinct and nonequivalent nonstandard squares in a word , 2014, Theor. Comput. Sci..

[16]  Lucian Ilie,et al.  A simple proof that a word of length n has at most 2n distinct squares , 2005, J. Comb. Theory A.

[17]  Francine Blanchet-Sadri,et al.  Counting Distinct Squares in Partial Words , 2009, Acta Cybern..

[18]  Rudolf Fleischer,et al.  Order Preserving Matching , 2013, Theor. Comput. Sci..

[19]  Aviezri S. Fraenkel,et al.  How Many Squares Can a String Contain? , 1998, J. Comb. Theory, Ser. A.

[20]  S. Muthukrishnan,et al.  New Results and Open Problems Related to Non-Standard Stringology , 1995, CPM.

[21]  P. Erdos Some unsolved problems. , 1957 .

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

[23]  Imre Z. Ruzsa,et al.  Sums of Finite Sets , 1996 .

[24]  Terence Tao,et al.  BOUNDS ON ARITHMETIC PROJECTIONS, AND APPLICATIONS TO THE KAKEYA CONJECTURE , 1999 .

[25]  Wojciech Rytter,et al.  Order-preserving indexing , 2016, Theor. Comput. Sci..

[26]  Wojciech Rytter,et al.  The Maximum Number of Squares in a Tree , 2012, CPM.

[27]  Arnaud Lefebvre,et al.  Abelian Repetitions in Sturmian Words , 2012, Developments in Language Theory.

[28]  Filippo Mignosi,et al.  Words with the Maximum Number of Abelian Squares , 2015, WORDS.

[29]  Jens Stoye,et al.  Linear time algorithms for finding and representing all the tandem repeats in a string , 2004, J. Comput. Syst. Sci..

[30]  Wojciech Rytter,et al.  Repetitions in strings: Algorithms and combinatorics , 2009, Theor. Comput. Sci..

[31]  Brenda S. Baker Parameterized Pattern Matching: Algorithms and Applications , 1996, J. Comput. Syst. Sci..

[32]  E. Wright,et al.  An Introduction to the Theory of Numbers , 1939 .