Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Let G be a CFG in Chomsky normal form that contains b variables.

Show that if G generates some string with a derivation having at least 2b

steps, L(G)is infinite.

Short Answer

Expert verified

The grammar G, be a context free grammar in Chomsky normal form that contains

b variables. Show that if G, generates some string with a derivation having at least

2bsteps, L(G) is infinite is proved.

Step by step solution

01

Chomsky normal form

A context-free grammar, G, is said to be in Chomsky normal form (first described by

Noam Chomsky) if all of its production rules are of the form,

ABC, or

Aa

02

Show that L(G) if infinite

The grammar G, be a context free grammar in Chomsky normal form that contains

b variables. Show that if G, generates some string with a derivation having at least

2bsteps, L(G) is infinite,

Because the grammar G, is a context free grammar in Chomsky normal form, any

derivation can only produce two non-terminals,

Hence an internal node in any parse tree using G, can only have two children.

This means that every parse tree of height k has a maximum of 2k -1.

If G, generates some string with a derivation having at least 2bsteps, the parse tree

of that string will have at least 2binternal nodes.

Based on the above argument, this parse tree has height is at least b+1 , so that

there exists a path from root to leaf containing b+1 variables.

By pigeonhole principle, there is one variable occurring at least twice.

So, here use the technique in the proof of the pumping lemma to construct infinitely

many strings which all are in L(G).

Hence, the grammar G, be a context free grammar in Chomsky normal form that

contains b variables. Show that if G, generates some string with a derivation having

at least 2bsteps, L(G) is infinite is proved.

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 Vaia!

One App. One Place for Learning.

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

Get started for free

Most popular questions from this chapter

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free