Back to Search
Start Over
Optimal Regular Expressions for Palindromes of Given Length
- Publication Year :
- 2021
- Publisher :
- Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2021.
-
Abstract
- The language P_n (P̃_n, respectively) consists of all words that are palindromes of length 2n (2n-1, respectively) over a fixed binary alphabet. We construct a regular expression that specifies P_n (P̃_n, respectively) of alphabetic width 4⋅ 2ⁿ-4 (3⋅ 2ⁿ-4, respectively) and show that this is optimal, that is, the expression has minimum alphabetic width among all expressions that describe P_n (P̃_n, respectively). To this end we give optimal expressions for the first k palindromes in lexicographic order of odd and even length, proving that the optimal bound is 2n+4(k-1)-2 S₂(k-1) in case of odd length and 2n+3(k-1)-2 S₂(k-1)-1 for even length, respectively. Here S₂(n) refers to the Hamming weight function, which denotes the number of ones in the binary expansion of the number n.<br />LIPIcs, Vol. 202, 46th International Symposium on Mathematical Foundations of Computer Science (MFCS 2021), pages 52:1-52:15
Details
- Language :
- English
- Database :
- OpenAIRE
- Accession number :
- edsair.doi...........a10fedecfc4a52890fa82608bbcca98c
- Full Text :
- https://doi.org/10.4230/lipics.mfcs.2021.52