Solution :
if you have any doubts then you can ask in comment section . Thank you.
2. The following context-free grammar (CFG) has A-productions. S + XY | XYZ X + YXYZ | a | A Y + XZ | ZY | 6 | A Z YZ | XY | X | C Using the algorithm in Chapter 13, find another CFG that generates the same language except for the empty word, and that does not have any A-productions.
A CFG G, is specified by its productions below. Convert G to Chomsky Normal Form. S ® aSb | bSa | SS | lambda b) Use the CYK algorithm to determine whether or not the string abba is in L(G).
Remove the λ - productions from the grammar: S → aAb | BBa A → bb B → AA | λ
Eliminate all useless rules from the following CFG: S → abS | abA | abB A→ cd B→ aB C → dc
Eliminate a productions from the following grammar. Show your work. S → AaB | aaB A → à B → bbA 1a
CFG questions 1. True or false? Given G: S → aSbSÍ bSaS | λ, L(G) = EQUAL. 2. Provide a grammar for all words that are not palindromes. 3. Provide a grammar for L = { a,b' : is js 2 4. Provide a grammar for L = { aibak: i + j = k }. 5. Provide a grammar for L = { aba: i + k = j).
Consider the given CFG: S ⟶ a X a X a , X ⟶ a X | b X | Λ What is the language this CFG generates? a) a language with all strings of at least 3 a's b) a language with all strings of a's and b's c) a language with all strings that start and end with a's with at most 3 a's d) a language with all strings of at most 3 a's e) None of...
7.1.2 Below: Exercise 7.1.3: Repeat Exercise 7.1.2 for the following grammar: S040 1B1 BB a) Eliminate e-productions b) Eliminate any unit productions in the resulting grammar e) Eliminate any useless syunlbol in themesuling granmmar. d) Put the resulting grammar into Chomsky Normal Form Exercise 7.1.3: Repeat Exercise 7.1.2 for the following grammar: S040 1B1 BB a) Eliminate e-productions b) Eliminate any unit productions in the resulting grammar e) Eliminate any useless syunlbol in themesuling granmmar. d) Put the resulting grammar...
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)....
The following context-free grammar (CFG) generates palindromes. This CFG has the following rules: S → ε, S → a, S → b, ..., S → z, S → aSa, S → bSb, ..., S → zSz. On an example of a palindrome cattac, show, step-by-step, how this palindrome will be generated by this grammar.