Extremal words with many distinct scattered palindromes
Let \(\operatorname{SP}(w)\) count distinct nonempty palindromic subsequences of a word \(w\) of length \(n\) using exactly \(q\ge n/2\) different letters. Put \(r=n-q\) and \(k=2q-n\). The established maximum is \((k+2)2^r-2\). Equality holds exactly for the nested form \[a_1\cdots a_r\,b_1\cdots b_k\,a_r\cdots a_1, \] or, when \(k=0\) and \(r\ge2\), for \(a_1\cdots a_{r-2}\,bcbc\,a_{r-2}\cdots a_1\). Differently named letters are distinct and empty blocks are omitted. Deleting a singleton keeps the repeat budget \(r\) fixed. Equality requires every eligible subset of positions to produce a distinct palindrome centered at that singleton, forcing nesting around the singleton block. At \(n=2q\), a gap comparison permits the alternating core as the sole other form. With no fixed alphabet size, the same characterization gives all extremizers. At odd length \(2m+1\) there are \(m\) nested pairs and one singleton. At positive even length \(2m\), either \(q=m\) with no singletons or \(q=m+1\) with two singletons is allowed, using the forms above. The empty word is the sole length-zero case. Mahalingam and Pandoh, §6, final classification question
Authors
- Zixuan He
Institutions
- University of Glasgow (GB)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-30
- DOI
- https://doi.org/10.5281/zenodo.24668707
- Primary Topic
- semigroups and automata theory
- Type
- preprint