Suffix-prefix avoidance bound #
Let $A$ and $B$ be sets of words of length $n$ over an alphabet with $q$ letters. If no (nonempty) suffix of any word in $A$ coincides with a prefix of any word in $B$, then $$|A| \cdot |B| \leq \frac{q^{2n}}{en}.$$
References:
- X post by Dmitry Rybin
- [Maximal sets of strings with no prefix-suffix overlap] (https://mathoverflow.net/questions/508648/maximal-sets-of-strings-with-no-prefix-suffix-overlap) by Dmitry Rybin, MathOverflow (2026)
- An isoperimetric inequality for word overlap by Dmitrii Zakharov (2026)
Two sets of words $A, B$ over Fin q of length n are suffix-prefix avoiding if no
nonempty suffix of any word in $A$ equals any prefix of any word in $B$ of the same length.
Equations
- SuffixPrefixAvoidance.IsSuffixPrefixAvoiding A B = ∀ a ∈ A, ∀ b ∈ B, ∀ (k : Fin n), SuffixPrefixAvoidance.wordSuffix a k ≠ SuffixPrefixAvoidance.wordPrefix b k
Instances For
$A$ and $B$ are sets of words of length $n$ over alphabet with $q \geq 1$ letters. No suffix of a word in $A$ coincides with a prefix of a word in $B$. Then $|A| \cdot |B|$ is at most $\frac{q^{2n}}{en}$.
This problem is from Maximal sets of strings with no prefix-suffix overlap and was proved in An isoperimetric inequality for word overlap.
$A$ and $B$ are sets of words of length $n$ over alphabet with $q \geq 1$ letters. No suffix of a word in $A$ coincides with a prefix of a word in $B$. Then $|A| \cdot |B|$ is at most $\frac{q^{2n}}{n}$.