I'm currently having trouble understanding how to use a language to generate a grammar.
Using the language:
$$L=\{a^n b^m | n, m \geq 1\}$$ as an example:
I know (from my notes) that this language creates the grammar:
Grammar: G
Terminals: $a, b$
Non-terminal: $S, T$
Start symbol: $S$
Productions: $S \rightarrow Sb, S \rightarrow Tb, T \rightarrow Ta, T \rightarrow a$
But, i'm unsure how the grammar was actually determined (especially the productions) in the way that they are. I think I might have missed some information when researching but i'm unsure of what.
Could someone please point me in the right direction, or give me a brief explanation.
Thanks,
UPDATE
Given the following language:
$$ L_2 = \{a^n b^{2n} c^n | 1 \leq n \leq 10\} $$
I can conclude that this is a regular language because n is bounded so i want to create a left-linear or right-linear grammar for the language