Regular expression for a language

43 Views Asked by At

I made a regular expression to match this language but I'm not sure it's right. Perhaps someone can show me where it deviates.

The language:

$L = {a^{n} c b^{m} (cc)^{p} : n \geq 1, m \leq 1, p\geq 0}$

The expression:

$r = a a^{*} c (\lambda + b) (c c)^{*}$

1

There are 1 best solutions below

0
On BEST ANSWER

Yes, that’s exactly right. If you allow the abbreviation $a^+$ for $aa^*$, you can use that instead.