A subset of the free text Context Context Free?

I am stuck in solving this exercise and I donโ€™t know where to start:

Language B - Context Free; C is a subset of B: is C Context Free? Prove or disprove.

I tried using closure properties:

C = B - ((A * - C) โˆฉ B) [A * - the set of all words in the alphabet A]

and given that CF languages โ€‹โ€‹are not closed when complementing and intersecting, I would say that C is not forced to be CF. But I'm not sure this is a good proof.

Can anyone help?

+4
source share
1 answer

Here is a hint. A subset of a regular language is not necessarily regular: a*b* is regular, but a^nb^n is a subset of a*b* and is not regular. Can you imagine a parallel for context-free languages?

+4
source

All Articles