$$
L = \{w \mid w \text{ does not contain } 000\}
$$
$$
L_2 = \{w \mid xwy \in L \text{ for some } x,y \in (0+1)^*\}
$$
Is $L_2$ regular? I am thinking regular language is closed under concatenation, but it seems that this language should be irregular. And I have no idea how to prove this, how do I apply pumping lemma or is there a counter example?
2026-03-29 23:35:40.1774827340
Regularity of a language
33 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
$L_2$ is regular, because $L_2 = L_1$ (and $L_1$ is regular).
($L_2 \subseteq L_1$) If $w\in L_2$, then there are $x,y$ such that $xwy\in L_1$, so $xwy$ does not contain $000$. But then $w$ can't contain $000$, so $w\in L_1$.
($L_1 \subseteq L_2$) If $w\in L_1$, then does not contain $000$, so if $x=y=\varepsilon$, then $xwy = w \in L_1$, thus $w\in L_2$.