The language given is $L = \{w_1xw_2\mid w_1,w_2\in \{a,b\}^* \text{ and } x \in \{a,b\}\}$. Is this language regular or not?
Since there is no pattern, so it should be non-regular?
Kindly help!
The language given is $L = \{w_1xw_2\mid w_1,w_2\in \{a,b\}^* \text{ and } x \in \{a,b\}\}$. Is this language regular or not?
Since there is no pattern, so it should be non-regular?
Kindly help!
It's regular because your language is equal to (suppose $\Sigma=\{a,b\}$) $$L=\Sigma^*\Sigma\Sigma^*$$ $$=\Sigma^+.$$ So we can represent $L$ by regular expression: $$(a+b)^*(a+b)(a+b)^*$$ $$=(a+b)^+.$$
The language is regular and a possible regular expression for $L$ is $(a\mid b)^* (a \mid b) (a \mid b)^* = (a \mid b)^+$.