Problem 3
Can Context Free Grammars express languages that cannot be
expressed by regular expressions?
Here's a list of some of the languages we proved are not
regular, i.e. cannot be accepted by finite automata.
See if you can write context free grammars generating any of
them. Note: some are not possible!
- {anbn | n ≥ 0}
- {anbncn | n ≥ 0}
- The language of properly parenthesized lists of a's
- The language of palindromes over {a,b,c}
- The language of all strings of a's whose
length is prime