(a) For the grammar given below, find out the Context Free Language. The grammar, G =…
Jump to turn (7)
- 1(a) For the grammar given below, find out the Context Free Language. The grammar
- 2For the grammar given below, find out the Context Free Language. The grammar, G
- 3Construct the context free grammar for the language having at least 2 a's.
- 4Design context-free grammar for the language {ai bj | i ≤ 2j}.
- 5Consider G whose productions P are: S → aB | bA A → aS | bAA | a B → bS |aBB | b
- 6Construct a PDA for the Language, L = {a^n b^m c^n , n ≥ 1, m ≥ 1}. Give ID Repr
- 7Convert the grammar S→ aCC C →aS | bS | a to a PDA that accepts the same languag
- User
(a) For the grammar given below, find out the Context Free Language.
The grammar, G = ({S}, {a, b}, S, P) with the productions:
i. S → aSa,
ii. S → bSb,
iii S → ε
b) Construct the context free grammar for the language having at least 2 a's.
- Assistant
(a) The Context-Free Language generated by the given grammar is L = {anbn | n ≥ 0} U {anb2n | n ≥ 0} U {bnan | n ≥ 0} U {b2nan | n ≥ 0} U {ε}
(b) The context-free grammar for the language having at least 2 a's is G' = ({S}, {a, b}, S, P') with the productions:
i. S → aS' | bS',
ii. S' → aS' | bS' | ε,
where S' is a new nonterminal symbol added to the existing grammar G.
- User