# Context Free Grammar for $\{A^nB^nC^n | n \in \mathbb{N}\}$ [duplicate]

Is $L = \{A^n B^n C^n \mid n \in \mathbb{N}\}$ a context-free language, e.g. $AAAABBBBCCCC \in L$

If so, what's that context-free grammar that produces it?

• No, it is not... – MCH Jul 22 '13 at 0:01
• @MCH Where can I find a proof that it's not? – Nick Mpora Jul 22 '13 at 0:01
• As MCH notes, this language is not context-free, so there's no point looking for a CFG for it. This language is a standard example of a non-context-free language. To show that it isn't context-free, have a look at our reference question, which has all the basic tools, and some examples which are very similar to $L$. Conversely, to determine which class it is in fact in, you need to demonstrate an appropriate grammar or machine that generates it. (cont.) – Luke Mathieson Jul 22 '13 at 8:58
• Voting to close. Please check lecture notes on context-free languages, where you will find this example worked out using the pumping lemma. – Yuval Filmus Jul 22 '13 at 12:36
• – Wandering Logic Jul 22 '13 at 13:30