Conversions to CNF:
Textbook problems: 7.1.1 - 7.1.4 (p. 275)
7.1.1) Find a grammar equivalent to the following, but with no
useless symbols:
S → AB | CA
A → a
B → BC | AB
C → aB | b
7.1.2) Begin with the following grammar, then eliminate
ε-productions, eliminate unit productions, eliminate useless
symbols, then put the grammar into CNF.
S → ASB | ε
A → aAS | a
B → SbS | A | bb
7.1.3) As in 7.1.2, convert the following grammar to CNF:
S → 0A0 | 1B1 | BB
A → C
B → S | A
C → S | ε
7.1.4) Put this grammar into CNF:
S → AAA | B
A → aA | B
B → ε
From a previous exam, put this into CNF:
S → BA | bSa
A → B | aB
B → A | ε
Conversions to CNF: Textbook problems: 7.1.1 - 7.1.4 (p. 275) 7.1.1) Find a grammar equivalent to...
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...
Convert the following grammar into Chomsky Normal Form (CNF): S → aS | A | bS A → aA | bBa | aAa B → bb | bBb Note: you need to first simplify the grammar ( remove any λ - productions, unit productions, and useless productions), and then convert the simplified grammar to CNF. Convert the following grammar into Chomsky Normal Form (CNF): SaSAS A → AbBa| aAa B+bb | bBb Note: you need to first simplify the grammar...
In each of the following, find a Chomsky Normal Form (CNF) grammar equivalent to the given context-free grammar (CFG). 1. SaA Sab A+ ab | BA ASD BaS b 2. SAIC A → AaB AaC | B | a B Bb Cb (→ cclc 3. S → SabA; AAA bc | Bc; B → Aab | BS a
2. To find a Chomsky normal form for the following grammar (10 points) STR T - aTbab R RIA first note that we don't need to add a new production S' Sto the grammar because s does not appear on the right hand side of any productions in the grammar. Next, since we have a A-production in the grammar R - A, so we use the technique in question #6 to remove the production. Afterward the grammar becomes SLT TR...