Consider the language $$L = \{ x \in \{0,1\}^* \mid |x| = 3 \}.$$
I think the above language is regular. A DFA can be used to determine the above language.
Am I correct? Is the above language regular?
If this language $L$ is regular, then it should satisfy the pumping lemma. Then there exist $w = xyz$, where $xy^nz \in L$ for all $n \ge 0$.
But on the other hand, if we pump more letters then the resulting string will not be in the language. The language $L$ only contains words of length 3.
The pumping lemma states that for every regular language there exists an integer $p$, such that string $w$ of length at least $p$ can be written as $w = xyz$ and $y$ can be pumped.
Here are my doubts.
- Is this language $L$ regular?
- If so, does it satisfy the pumping lemma?
- The pumping lemma states that every regular language has a pumping length $p \ge 1$. Does this language not have one?