/*! 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} Q59P If we disallow 蔚- in CFGs, we c... [FREE SOLUTION] | 91影视

91影视

If we disallow - in CFGs, we can simplify the DK-test. In the simplified test, we only need to check that each of DK鈥檚 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 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.