Is language L context-free?

433 Views Asked by At

Is following language context-free? Alphabet: {a,b,c,d} L = {w | w is not in {aabbc,abc,add}}

I think it is:

{aabbc},{abc},{add} are all regular.

Because of closure properties(Union) R = {w | w is in {aabbc,abc,add}} is also regular. Because of closure of complement (L is complement of R) L is also regular.

So L is regular, and since all regular languages are context-free : L is context-free.

1

There are 1 best solutions below

0
On BEST ANSWER

You're right. In fact, every finite language is regular, and so is it's complement. They're context-free a fortiori.