Is the language regular or contextfree?

32 Views Asked by At

Could you tell me if the language $$L=\{ w \in \{a,b,c\}^*: $$$$\text{there is at least one time the substring abc and none of the symbols a,b,c is repeated three times} \}$$ is regular or contextfree?

1

There are 1 best solutions below

1
On BEST ANSWER

Hint:

  • $D = (\Sigma^*abc\Sigma^*)$,
  • $A = \overline{(\Sigma^*aaa\Sigma^*)}$ or $A = \overline{(\Sigma^*a\Sigma^*a\Sigma^*a\Sigma^*)}$ depending on the interpretation,
  • $L = A \cap B \cap C \cap D$.

I hope this helps $\ddot\smile$