/*! 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} Q7E Show that NP聽is closed under un... [FREE SOLUTION] | 91影视

91影视

Show that NPis closed under union and concatenation.

Short Answer

Expert verified

Tis a poly-time non-deterministic decider for AB

Step by step solution

01

The class NP is closed under union & Concatenation

NP-class:NPis a class of languages that are decidable in nondeterministic polynomial time on a non 鈥 deterministic Turing machine.

02

To Union of diagram

Let AandBbe languages are decided by NP- machines TAand TB. Now we want to show that, there is a non 鈥 deterministic poly time decider TAB that decides union of AandBThe construction of TABis as follows:

TAB=On input S :

1. Run TAon S. IfTA acceptsS , then accept.

2. Else run TBon S. If acceptsS , then accept.

3. Else reject鈥

As the new TM TABcalls TAand TBeach once, it runs on O(TA+TB),

as both are NP is TAB

03

To Concatenation the languages

Let AandBbe languages are decided byNPmachines TAand TB. Now we want to show that, there is a non 鈥 deterministic poly time deciderTAB that decides concatenation ofAandB.The construction of TAB is as follows:

TAB=On input S:

1.SSplit into S1,S2 such that S=S1,S2.

2. Run the TBonS2 . IfTB is rejected, then reject.

3. Else accept.

Thus, Tis a poly-time non-deterministic decider for AB.

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.