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

If we disallow ε- in CFGs, we can simplify the DK-test. In the simplified test, we only need to check that each of DK’s accept states has a single rule. Prove that a CFG without ε- passes the simplified DK-testiff it is a DCFG.

Short Answer

Expert verified

The DK-test fails, CFG is a deterministic context-free grammar.

Step by step solution

01

Explain DK-test.

The DK-Test is the procedure that determines whether the context-free grammar. For any CFG the DFA is constructed that identify he handles.

02

Prove that a CFG without ε-rules passes the simplified DK-test iff it is a DCFG. 

Consider in contradiction, that C is not a deterministic CFG. The valid ahb is considered, that has unforced handle h . It has a possibility that some string has another handle. Thus, ahb' can be rewritten as ahb where, b' is a terminal.

While, ah=ah , the reduce rule will be changed, because h and hare different handles. Thus, it does not satisfy the DK-test since it has two completed rules.

While ahah , assume that the proper prefix of ahis ah . Assume that s is an accepting state of the input in DK. The s accepts the states because h is the handle.

Hence, the transition must label b' because, b'' doesnot has null rule. It does not satisfy the DK-test.

Therefore, the DK-test fails, In contradiction to the assumption, CFG is a deterministic context-free grammar.

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

Study anywhere. Anytime. Across all devices.

Sign-up for free