User:Songyunc/rich word

A word of length $$n$$ is (palindromic) rich if it has exactly $$n+1$$ distinct palindromic factors. For example, the English word "Tennessee" is rich, as its palindromes are {$$\epsilon$$, T, e, n, s, nn, ss, ee, enne, esse}. Droubay, Justin, and Pirillo prove that any finite word of length $$n$$ contains at most $$n+1$$ distinct palindromes. The term "rich" reflects the fact that a word has the maximum number of palindromic factors.

Properties
Let $$u$$ be a non-empty factor of a finite or infinite word $$w$$. $$u$$ is unioccurrent in $$w$$ if $$u$$ has exactly one occurrence in $$w$$. Otherwise, if $$u$$ has more than one occurrence in $$w$$, then there exists a factor $$r$$ of $$w$$ having exactly two distinct occurrences of $$u$$, one as a prefix and one as a suffix. Such a factor $$r$$ is called a complete return to $$u$$ in $$w$$. For example, $$aabcbaa$$ is a complete return to $$aa$$ in the rich word: $$aabcbaaba$$.

If $$w$$ is rich, then :


 * 1) it has exactly one unioccurrent palindromic suffix ;
 * 2) all of its factors are rich;
 * 3) its reversal $$\bar{w}$$ is also rich;
 * 4) each factor of $$w$$ is uniquely determined by its longest palindromic prefix and its longest palindromic suffix ;
 * 5) there exist letters $$x, z \in \Sigma$$ such that $$wx$$ and $$zw$$ are rich, where $$\Sigma$$ is the alphabet.

If $$w$$ and $$w'$$ are rich with the same set of palindromic factors, then they are abelianly equivalent, i.e., $$|w|_x = |w'|_x$$ for all letters $$x$$.

Rich finite words
For any finite or infinite word $$w$$, the following conditions are equivalent :


 * 1) $$w$$ is rich;
 * 2) every factor $$u$$ of $$w$$ contains exactly $$|u|+1$$ distinct palindromes;
 * 3) for each factor $$u$$ of $$w$$, every prefix (respectively suffix) of $$u$$ has a unioccurrent palindromic suffix (respectively prefix);
 * 4) every prefix of $$w$$ has a unioccurrent palindromic suffix;
 * 5) for each palindromic factor $$p$$ of $$w$$, every complete return to $$p$$ in $$w$$ is a palindrome;
 * 6) each non-palindromic factor $$u$$ of $$w$$ is uniquely determined by a pair $$(p,q)$$ of distinct palindromes such that $$p$$ and $$q$$ are not factors of each other and $$p$$ (respectively $$q$$) is the longest palindromic prefix (respectively suffix) of $$u$$.

Periodic rich infinite words
For any finite word w, the following conditions are equivalent :


 * 1) $$w^\omega$$ is rich;
 * 2) $$w^2$$ is rich;
 * 3) $$w$$ is a product of two palindromes and all of the conjugates of $$w$$ (including itself) are rich.

For example, $$(aabbaabab)^\omega$$ and $$(aabbaabab)^2$$ are rich. $$aabbaabab$$ is the product of $$aabbaa$$ and $$bab$$.

Note that, for condition 3, the hypothesis that all of the conjugates of $$w$$ are rich is not sufficient: $$abc$$ is rich, but $$(abc)^\omega$$ is not rich. The hypothesis that $$w$$ is rich and a product of two palindromes is not sufficient: $$w = ba^2 bab^2aba^2 b$$ is a rich palindrome, but its conjugate $$T(w) = a ^2 bab^2aba^2 b ^2$$ is not rich.

Palindromic closure
The palindromic closure of a word $$w$$, denoted by $$w^+$$, is the unique shortest palindrome beginning with $$w$$. For example, $$(race)^{+} = race\ car$$, and $$(party)^+ = party\ trap$$.

Palindromic closure preserves richness . If a word $$w$$ is rich, its palindromic closure $$w^+$$ is also rich. For example, $$aba$$ is rich, then $$(aba)^+ = ababa$$ is also rich.

It one way of extending a rich word into a longer one. Infinite rich words can be generated by iteratively applying palindromic closure.

The number of rich words
All binary words of length 7 or shorter are rich. The shortest non-rich binary words are of length 8 and there are four of them: $$00101100$$, $$00110100$$, $$11010011$$, $$11001011$$. Let $$R_k(n)$$ be the number of rich words of length $$n$$ over a $$k$$-letter alphabet. The following table enumerates $$R_n(k)$$ for the first few values of $$k$$ and small $$n$$: Guo, Shallit and Shur give the lower bound on the number of binary rich words, namely $$R_n(2) \ge \frac{C^\sqrt{n}}{p(n)}$$, where $$p(n)$$ is a polynomial and the constant $$C \approx 37$$.

Calculation performed by Rubinchik provides the upper bound $$R_n(2) \le c1.605^n$$ for some constant $$c$$.

Rukavicka proves $$R_n(k)$$ has a subexponential growth on any alphabet, that is, $$\lim_{n\to\infty}\sqrt[n]{R_n(k)} = 1$$.