/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} 14E Question: Convert the following ... [FREE SOLUTION] | 91Ó°ÊÓ

91Ó°ÊÓ

Question: Convert the following CFG into an equivalent CFG in Chomsky normal form, using the procedure given in Theorem 2.9.

A→BAB|B|εB→00|ε

Short Answer

Expert verified

S→BD|BB|AB|CC|BA|εA→BD|BB|AB|CC|BAB|CCC|0D→AB

Step by step solution

01

Define Chomsky Normal Form (CNF)

In theory of computation, context free grammar (CFG) generates the possible strings in a language. CFG is in Chomsky normal form (CNF) if the production rules in it are of the following forms:

A→BC

A→a

02

Add a new start symbol S

S→A

A→BAB | B | ε

B→00 | ε

03

Step 3: Remove ε-productions.

A →ε

B→εRemove,A→εS→A|εA→BAB|BB|BBR00|εRemoveB→εS→A|ε

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with 91Ó°ÊÓ!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Study anywhere. Anytime. Across all devices.