Models - Context-Free Grammar Flashcards
Informally, what elements define a context-free grammar (CFG)?
Define a CFG
Define a context-free language (CFL)
What is the relationship between Regular languages and CFLs?
How can we prove that a language is not context-free?
Let L1 and L2 be two CFLs. is L1∩L2 a CFL?
What is CFL closed to? What is it not closed to?
CFL is closed to Union, concatenation and Kleen star.
CFL is not closed to intersection and complement.
Please give examples of languages in CFL.
Also wwrev is in CFL
Please give examples of languages not in CFL.
How would you go about solving this question?
First write out the first few word in the language. Then the grammar will (hopefully) come to you.
Notes:
1. Always try working with languages like Sigma-star
2. when listing the languages in CFL - don’t just write “REG” - list them!