Let KNAP = {a1#a2# . . . #an#C | ai and C are integers coded in binary, and there is a set I ⊆ {1, . . . , n} such that P…

Let KNAP = {a1#a2# . . . #an#C | ai and C are integers coded in binary, and there is a set I ⊆ {1, . . . , n} such that P i∈I ai = C}. Let UKNAP be the same, except that the integers are coded in unary, i.e., a is represented by 1a, the string comprised of a 1’s. UKNAP is in P but KNAP is NP-complete. Find and explain the flaw in each of the “proofs” below. Make your proofs/counterexamples crisp and explicit.

(a) For any string u in {1, #}* we can easily produce a string v in {0, 1, #}* such that u ∈ UKNAP ⇔ v ∈ KNAP. (E.g., if u = 11#1#11111 then v = 10#1#101.) Furthermore, the transformation can be done in time bounded by a polynomial in the length of u. Thus, P=NP.

Don't use plagiarized sources. Get Your Custom Essay on
Let KNAP = {a1#a2# . . . #an#C | ai and C are integers coded in binary, and there is a set I ⊆ {1, . . . , n} such that P…
Get an essay WRITTEN FOR YOU, Plagiarism free, and by an EXPERT!

(b)  For any string v in {0, 1, #}* we can easily produce a string u in {1, #}* such that v ∈ KNAP ⇔ u ∈ UKNAP. Furthermore, the transformation can be done in time bounded by a polynomial in the length of u. Thus, P=NP

(c) 1-of-3-SAT is another known NP-complete variant of the satisfiability problem: it is the set of Boolean formulas in conjunctive normal form with exactly 3 literals per clause such that the formula is satisfied by a truth assignment making exactly one literal in each clause true. Let f be a formula in conjunctive normal form with exactly 3 literals per clause (3CNF). Suppose it has clauses c1, . . . , cq and variables x1, . . . , xm, m ≤ 3q. Suppose “xi” occurs in clauses numbered i1, . . . , ij
and “BAR xi” occurs in clauses numbered i’1…i’j. Let ai = SUM from k=1 to j of ik, and BAR ai = SUM from k = 1 to j’ of i’k . Let s = SUM from i = 1 to q of i.
Generate the string: u = 1a1#1BAR a1# . . . #1am#1BAR am#1s
Now if f is satisfiable by an assignment that makes exactly one literal per clause true, i.e. if f is in 1-of-3-SAT, then u is in UKNAP: Pick ai or BAR ai depending on whether xi is true or false respectively in the 1-of-3 satisfying assignment. Every clause is satisfied by exactly one literal, so the sum of the chosen a, BAR a’s is
exactly s. Thus u ∈ UKNAP. Further the reduction can be done in time polynomial in the length of f; e.g., note that the numbers ai, BAR ai, and s are all of magnitude at most q, since each is the sum of at most q distinct numbers between 1 and q, so the length of u is O(q^3)) = O(|f|^3)).
Thus P=NP.

a) From the definition of NP-complete, KNAP is in NP as well as in NP-HARD.

Np-complete = set Np – set P.

KNAP is in P.   UKNAP is in NP.

b) Whether a problem/string is reduced/transformed on polynomial time, from P to NP, here    v to u ,

doest not matter with the definition of NP-hard. Here u is in NP and NP-hard.

Even-though v in P, is polynomial time reduced to u, u is in NP and NP-complete.

c) 3-SAT is in NP-complete. The length and sum does not matter with NP.

Order NOW For a 10% Discount!
Pages (550 words)
Approximate price: -

Why Work with Us

Top Quality and Well-Researched Papers

We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.

We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.

Free Unlimited Revisions

If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.

Prompt Delivery and 100% Money-Back-Guarantee

All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.

Original & Confidential

We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.

Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.

Try it now!

Calculate the price of your order

Total price:
\$0.00

How it works?

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Our Services

No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.

Essay Writing Service

No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.