Here's a conjecture for regular expressions:
For regular expression $R$, let the length $|R|$ be the number of symbols in it, ignoring parentheses and operators. E.g. $|0 \cup 1| = |(0 \cup 1)^*| = 2$
Conjecture: If $|R| > 1$ and $L(R)$ contains every string of length $|R|$ or less, then $L(R) = \Sigma^*$.
That is, if $L(R)$ is 'dense' up to $R$'s length, then $R$ actually generates everything.
Some things that may be relevant:
- Only a small part of $R$ is needed to generate all strings. For example in binary, $R = (0 \cup 1)^* \cup S$ will work for any $S$.
- There needs to be a Kleene star in $R$ at some point. If there isn't, it will miss some string of size less than $|R|$.
It would be nice to see a proof or counterexample. Is there some case where it's obviously wrong that I missed? Has anyone seen this (or something similar) before?
symbols
or asoperations
? $\endgroup$