Given an alphabet $  = \{a, b, c\}$, I have the following grammar:$$ S -> aSb | aAb $$$$ A -> aaA | aBb $$$$ B -> Bbb | c $$Which method should I use to write the definition of the language?
How do I define a language from a grammar?
formal languages;formal grammars
This one is very simple because it has a very downward flow to it. For example, $S$ has non-terminals $S$ and $A$, and once you go to $A$, you can never get back to $S$.  So we use this fact to just work through incrementally.Our language started with $a^nXb^n$ for S where X is some other language, then we got to A and get $a^n(aa)^mXb^n$, then finally $a^n(aa)^{m+1}c(bb)^sb^{n+1}=a^{n+2m+1}cb^{n+2s+1}$ where $n,m,s \in \mathbb{N} \setminus{0}$