A d d -step approach to the maximum number of distinct squares and runs in strings
Fraenkel and Simpson conjectured in 1998 that the number of distinct squares in a string is at most its length. Kolpakov and Kucherov conjectured in 1999 that the number of runs in a string is also at most its length. Since then, both conjectures attracted the attention of many researchers and many results have been presented, including asymptotic lower bounds for both, asymptotic upper bounds for runs, and universal upper bounds for distinct squares in terms of the length. In this survey we point to the combined role played by the length and the number of distinct symbols of the string in both problems. Let us denote ?d(n) ? d ( n ) , respectively ?d(n) ? d ( n ) , the maximum number of distinct primitively rooted squares, respectively runs, over all strings of length n n containing exactly d d distinct symbols. We study both functions ?d(n) ? d ( n ) and ?d(n) ? d ( n ) and revisit earlier results and conjectures with the (d,n) ( d , n ) -parameterized approach. The parameterized approach reveals regularities for both ?d(n) ? d ( n ) and ?d(n) ? d ( n ) which have been computationally verified for all known values. In addition, the approach provides a computationally efficient framework. We were able to determine all previously known ?2(n) ? 2 ( n ) values for n?60 n ? 60 in a matter of hours, confirming the results reported by Kolpakov and Kucherov, and were able to extend the computations up to n=74 n = 74 . Similarly, we were able to extend the computations up to n=70 n = 70 for ?2(n) ? 2 ( n ) . We point out that ?2(33)<?3(33) ? 2 ( 33 ) < ? 3 ( 33 ) ; that is, among all strings of length 33, no binary string achieves the maximum number of distinct primitively rooted squares, and that ?2(n)?2n?85 ? 2 ( n ) ? 2 n ? 85 for n?70 n ? 70 . The computations also reveal the existence of unexpected binary run-maximal string of length 66 66 containing a quadruple of identical symbols aaaa a a a a .
distinct squares runs strings n ) (d n) ( d n) ( d n) ( d n) ( d n) ( d n ) -parameterization (d n ) (d n ) ( d d d -step approach d d d d d