Example 6: Construct the language generated from the given grammar
G1 = ({S, A, B}, {a, b}, {S}, {P})
P: S → AB
B → aBb | λ
A → aA | λ
Solutions:
From this production B → aBb | λ , we can get and A → aA | λ will give you a*.
From B → aBb | λ here we get
From A → aA | λ here we get A → a*
If we apply both A and B at starting production S then,
[Replace A by a* and B by ]
This range m ≥ n because if