



QUESTION 3 Convert the context Free Grammar below to Chomsky Normal Form. Use the tech- nique...
Convert the context free grammar to an equivalent grammar in Chomsky normal form: (show your work) S → AxAyA | BC A → BB | a B → bd | ε C → SC | c
Convert the following context free grammar G to Chomsky normal form. G:S → AB A → aAb|B2 B → BA2
1)Convert the following context free grammar to Chomsky Normal Form S → a X | Yb X → S | λ Y → b Y | λ 2)Some languages distinguish between uppercase and lowercase in identifiers. What are the pros and cons of this design decision? 3)Use the pumping lemma to prove that the following languages are not regular. (The alphabet is Σ = {a, b}.) a) L = {an b1 ak: k >= n+ l} b) L = {ww:...
Build a Context-Free Grammar in Chomsky Normal Form that implements the following language features: (a) an integer-based data type, (b) a value-type variable declaration of an integer data type, and (c) an assignment expression that allows for two integer-based variables to be added together. Examples: (a) define an integer data type (b) int a; (c) a = 2 + 3;
2. Let w 100101 and G be the context-free grammar whose productions are given below (Note that G is in Chomsky Normal Form) 2. SKY 7. K ->YC 8. K 1 3, C CY 4. C1 Draw a parse tree for w. a. b. Test membership of w in L(G) using CYK algorithm (CYK algorithm is discussed in Section 7.4.4 of the textbook). Write down your solution step by step by giving proper explanations. c. Which nonterminals in G can...
Question 2 (20%) Convert the following CFG into an equivalent CFG in Chomsky normal form using the procedure discussed in the textbook. Show every step in the conversion. A → ABC A → a | ε B → b C → c