please show full work and answer!
please show full work and answer! 1. (20 points) Given the following Grammar G, S->ASB A...
1. (20 points) Given the following Grammar G, S->ASB A -> aAS | a | λ B -> SbS | A|bb (a) Identify and remove the λ-productions. (b) Identify and remove unit-productions from the result of (a). (c) Convert it to Chomsky Normal Form. 1. (20 points) Given the following Grammar G, S->ASB A -> AS | a 1a B -> Sbs | Albb (a) Identify and remove the -productions. (b) Identify and remove unit-productions from the result of (a)....
Given the following Grammar G, S->ASB A-> AS a B-> Sbs Albb (a) Identify and remove the A-productions. (b) Identify and remove unit-productions from the result of (a). (c) Convert it to Chomsky Normal Form.
Given the following Grammar G, S->ASB A-> AS a B-> Sbs Albb Identify and remove the -productions. Identify and remove unit-productions Convert it to Chomsky Normal Form.
Given the following Grammar G, S->ASB A -> AAS | a B -> Sbs | A|bb (a) Identify and remove the A-productions. (b) Identify and remove unit-productions from the result of (a). (c) Convert it to Chomsky Normal Form.
S->ASB A-> AS a B -> Sbs Albb (a) Identify and remove the l-productions. (b) Identify and remove unit-productions from the result of (a). (c) Convert it to Chomsky Normal Form.
Consider a grammar: S --> | as SS SSb Sbs, Where T={a,b} V={S}. a. Show that the grammar is ambiguous. b. What is the language generated by this grammar?
6.(20) Let G=(V, S, R, S) be a grammar with V = {Q, R, T}; { = {q, r,ts}; and the set of rules: SQ Qq RqT R~rrt Qor T>t | ST a. (5) Convert G to a PDA using the method we described. b. (15) Convert G to Chomsky normal form.
Consider a grammar: S --> | aS | SS SSb | Sbs, Where T={a,b} V={S }. Show that the grammar is ambiguous. What is the language generated by this grammar?
Let G = (V, S, R, S) be a grammar with V = {Q, R, T}; { = {q, r,ts}; and the set of rules: SQ Q→ RqT RrrT QQr T>t | StT b. (15) Convert G to Chomsky normal form.
) Construct a context-free grammar for the language L={ ab”ab”a | n> > 1}.