Question

Conversions to CNF: Textbook problems: 7.1.1 - 7.1.4 (p. 275) 7.1.1) Find a grammar equivalent to...

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 | ε

0 0
Add a comment Improve this question Transcribed image text
Answer #1

7.11. SABICA یہ ہے A Il useless. B BC AB сав)ь Remove Useless Production Now evrammer! SCA 2 Ata c b. - this is without any u7.13 5 → ASBE A → QA5) e B→ Sosial bb © Remove unit Productions, E-Null Productions By Al Ba AS a @ Eliminate useless ProductBaAS LAsa B ALAS All AA BAS A+S S ASB I s AS 5-→ SB 7 (NF Equivalent to crammer is :- s sble s! → AS A > Als la All → AN

Add a comment
Know the answer?
Add Answer to:
Conversions to CNF: Textbook problems: 7.1.1 - 7.1.4 (p. 275) 7.1.1) Find a grammar equivalent to...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 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...

    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...

    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...

    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 -...

    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...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT