1

Show if $L = \{a^mb^nc^n \mid m,n \geq 0\} \cup \{b,c\}^*$ is regular or not.

My attempt:

I think the Pumping lemma won't work in that constellation, so I'm working with "The intersection of regular languages is regular".

Assuming $L$ is regular. I already know that $S=\{ab^* c^*\}$ is regular. I'll now look at the intersection $L \cap S$.

$$(\{a^mb^nc^n \mid m,n \geq 0\}\cap \{ab^* c^*\}) \cup (\{b,c\}^*\cap \{ab^* c^*\})$$ $$\{ab^nc^n \mid n \geq 0\} \cup \emptyset = \{ab^nc^n \mid n \geq 0\}$$

Which is not regular according to Pumping lemma. Is this idea correct?

Quotenbanane
  • 167
  • 7

2 Answers2

0

Pumping lemma works easily. Somewhere it says "if the language is regular then for every string in the language..." Just check the pumping lemma for strings that start with exactly one a.

gnasher729
  • 32,238
  • 36
  • 56
0

There are stronger versions of the pumping lemma that do apply directly to your language. For example, Wikipedia describes the following pumping lemma:

If $L$ is regular then there is a constant $p$ such that any word $uwv \in L$, where $|w| \geq p$, can be decomposed as $uxyzv$ so that (i) $|xy| \leq p$, (ii) $y \neq \epsilon$, (iii) $uxy^tzv \in L$ for all $t \geq 0$.

Using this, let us prove that your language is not regular. Let $p$ be the constant promised by the lemma. Take the word $ab^pc^p$, where $u = a$, $w = b^p$, $v = c^p$. According to the lemma, we can decompose $w = xyz$ in such a way that $y \neq \epsilon$ and $uxy^tzv \in L$ for all $t \geq 0$. However, if $y = b^q$ then $uxy^0zv = ab^{p-q}c^p \notin L$, since $q \neq \epsilon$.

There should be an even stronger pumping lemma along the lines of Ogden's lemma, which is a strong analog of the pumping lemma for context-free languages. You can formulate and prove it, if you wish.

Yuval Filmus
  • 280,205
  • 27
  • 317
  • 514