My professor expects us to quickly tell if a given language is regular, context-free but not regular, or not context-free (in other words, without drawing a PDA, writing a context-free grammar, and using the pumping lemma for context-free languages).
I'm aware of tips that help us quickly tell what a regular language is at first sight,but not whether or not a language is context free.
Thank you.
Of course, there is no universal answer. But there are some general patterns that CF can or can not do that show up in different variants. Things CF can do (and REG not):
Typical things CF cannot do:
With these patterns in mind, you should be able to determine context-freeness of most common example languages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With