Question

When is the grammar said to be in Chomsky Normal Form (CNF). Convert the given grammar...

When is the grammar said to be in Chomsky Normal Form (CNF). Convert the
given grammar to CNF by showing step by step.
{ S->VP
VP->Verb
VP-> Verb VP
NP->N NP PP
Verb->climb|lift|read
N-> Tom | apple}

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

In formal language theory, a grammar is said to be in chomsky normal form (CNF) if all its rules are in the following form:

A -> BC

A -> a

S -> e

Where A,B and C are non terminal symbols , letter 'a' has a constant value , S is the start symbol and e is an empty string.

Every grammar in CNF is context free and every context free grammar can be converted into an equivalent one which has a size not greater than original grammar's size square.

To convert a given grammar into CNF there are following steps:-

  • Eliminate start symbole S from right hand side of given grammar and create new production as:

S0 -> S, where S0 is new start symbol

  • If given grammar contains null, unit or useless productions eliminate them.

  • Eliminate constants from right side if ther exist with other constant or non termonal symbols.

  • If right side of grammar has more than two non terminals eliminate them.


answered by: ANURANJAN SARSAM
Add a comment
Answer #2

In formal language theory, a grammar is said to be in chomsky normal form (CNF) if all its rules are in the following form:

A -> BC

A -> a

S -> e

Where A,B and C are non terminal symbols , letter 'a' has a constant value , S is the start symbol and e is an empty string.

Every grammar in CNF is context free and every context free grammar can be converted into an equivalent one which has a size not greater than original grammar's size square.

To convert a given grammar into CNF there are following steps:-

  • Eliminate start symbole S from right hand side of given grammar and create new production as:

S0 -> S, where S0 is new start symbol

  • If given grammar contains null, unit or useless productions eliminate them.
  • Eliminate constants from right side if ther exist with other constant or non termonal symbols.
  • If right side of grammar has more than two non terminals eliminate them.
Add a comment
Know the answer?
Add Answer to:
When is the grammar said to be in Chomsky Normal Form (CNF). Convert the given grammar...
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
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