Explain why showing DK, the decision version of the O/1 KNAPSACK problem, is NP-Complete is good enough to show that the O/1 KNAPSACK problem is NP -hard.

Total: 100 points)
1. Let X(1..n) and Y(1..n) contain two lists of n integers, each sorted in nondecreasing
order. Give the best (worst-case complexity) algorithm that you can think for finding
(a) the largest integer of all 2n combined elements.
(b) the second largest integer of all 2n combined elements.
(c) the median (or the nth smallest integer) of all 2n combined elements.
For instance, X = (4, 7, 8, 9, 12) and Y = (1, 2, 5, 9, 10), then median = 7, the nth
smallest, in the combined list (1, 2, 4, 5, 7, 8, 9, 9, 10, 12). [Hint: use the concept
similar to binary search]
Instance: A finite set of positive integers Z = { z1 , z2 , … , zn }.
Question: Is there a subset Z’ of Z such that
Sum of all numbers in Z’ = 2 x Sum of all numbers in Z-Z’
(a) Obtain the dynamic programming functional equation to solve the 1-to-2 PARTITION
(b) Give an algorithm to implement your functional equation.
(c) Give an example of 5 numbers with a total of 21 as an input instance for 1-to-2
PARTITION problem, and show how your algorithm works on this input instance.
(d) What is the complexity of your algorithm?
3. Decide True or False for each of the followings. You MUST briefly justify your
Instance: Set U of variables, collection C of clauses over U.
Question: Is there a satisfying truth assignment for C?
(a) If P NP, then no problem in NP can be solved in polynomial time deterministically.
(b) If a decision problem A is NP-complete, proving that A is reducible to B, in
polynomial time, is sufficient to show that B is NP-complete.
(c) It is known that SAT (Satisfiability) is NP-complete, and 3SAT (all clauses have size
3) is NP-complete. 1SAT (all clauses have size 1) is also NP-complete.2
4. Given that PARTITION problem (described below) is a NP-Complete problem, prove
that the SUM OF SUBSETS problem (described below) is NP-Complete by reducing
PARTITION problem to it.
Instance: A finite set of positive integers Z = { z1 , z2 , … , zn }.
Question: Is there a subset Z’ of Z such that
Sum of all numbers in Z’ = Sum of all numbers in Z-Z’
Instance: A finite set of positive integers A = { a1, a2, … , am } and M.
Question: Is there a subset A’ in A s.t. ai = M?
ai in A’
(a) Give a nondeterministic polynomial time algorithm for the SUM OF SUBSETS
(b) Define the transformation from the PARTITION problem to the SUM OF SUBSETS
(c) Explain that the transformation described in part (b) satisfies: if the partition problem
has a solution then the sum-of-subsets has a solution, and vice versa.
5. Prove that the 0/1 KNAPSACK problem is NP-Hard. (One way to prove this is to
prove the decision version of 0/1 KNAPSACK problem is NP-Complete. In this problem,
we use PARTITION problem as the source problem.)
(a) Give the decision version of the O/1 KNAPSACK problem, and name it as DK.
(b) Show that DK is NP-complete (by reducing PARTITION problem to DK).
(c) Explain why showing DK, the decision version of the O/1 KNAPSACK problem, is
NP-Complete is good enough to show that the O/1 KNAPSACK problem is NP -hard.
6. Optimization PS(3) Problem: Given a set of n program and three storage devices.
Let si be the amount of storage needed to store the ith program. Let L be the storage
capacity of each disk. Determine the maximum number of these n programs that can be
stores on the three disks (without splitting a program over the disks).
Use the Approximation PS Algorithm given in the class for the PS(3) problem given
above. Show that the following is true.
Let the approximation PS algorithm returns a number C, and let C* be the optimal
(maximum) number of programs that can be stores on the three disks.
(a) Show that the above approximation PS algorithm gives the performance ratio of
C* (C + 2) OR C* / C 1 + 2/C.
(b) Give an example that achieves the performance ratio of C* =

See also  .Compute the average gpa. Compute how many students have their gpa greater than the average gpa.

Custompaper.help is an academic writing platform that provides students and professionals with quality services to ease their assignment challenges. With a wide range of services, the platform has become one of the leading academic writing service providers in the market due to its reliability and affordability. Below, we shall discuss some of the services which Custompaper.help provides:

Essay Writing Service
The essay writing service provides customers with quality essays on any subject or topic they requested within a given deadline. The writers at custompaper are experts in their respective fields, and they ensure customer satisfaction by producing original content with thorough research involved backed up with strong evidence from reliable sources available online or offline. All essays come with free plagiarism reports as well as revisions if needed so that customers can trust that they are getting high-quality work for their money’s worth.

Research Paper Writing Service
This is another popular service offered by custom paper help wherein customers are assisted in conducting research papers according to their needs and requirements within specified deadlines. Writers at custom paper help have vast knowledge about various topics belonging to different disciplines such as Management, Arts & Humanities, History etc., allowing them to craft impeccable research papers every time regardless of the complexity or urgency level requested by customers. Additionally, all our research papers come along with proper citation formats which ensures customer’s safety when it comes to plagiarism issues while also helping them save time on formatting procedures thus improving overall efficiency even further!

See also  Compare between results in previous two sections (a and b), which algorithm give the better result and why?

Dissertation Writing Service
CustomPaperHelp also offers dissertation writing assistance for those who need it most – students preparing for graduation or professionals wanting to further refine their skills through higher education levels such as Master/PhD degrees etc, Our team of writers consists of experienced individuals having Master’s/PhD degrees themselves so you can rest assured that your dissertation will be handled expertly from the start till the end! Furthermore, we offer unlimited revisions until your complete satisfaction is achieved, along with regular checkups being done throughout the process just so everything goes according to course without any hiccups!

Editing And Proofreading Services
If you already have written an essay but want professional feedback before submitting it, then CustomPaperHelp also offers editing & proofreading services which helps in identifying & rectifying errors present in assignments like grammar mistakes, spelling mistakes, punctuation problems etc., thereby ensuring top-notch quality work, before submission takes place! We understand how important accuracy & consistency are when it comes to grading systems used at universities nowadays, so taking extra care during this phase becomes absolutely essential if good grades are desired afterward!

See also  The Galapagos islands have a great diversity of landscapes – from lush vegetation to nearly barren lava fields yet the Galapagos Finches survive on each island. How can this be explained?

Coursework Help
For those who find coursework difficult due to complications of being quite technical in nature; CustomPaperHelp extends its support here too, by providing quality solutions every single time – starting from understanding concepts properly up until composing flawless answers following university guidelines closely enough making sure no loopholes remain whatsoever! Whether it’s related math problem-solving algorithms or lengthy home assignments – our expert panel has got you covered from head-to-toe leaving no stone unturned during this very crucial stage since final grades depend largely upon the success rate achieved here successfully!

Assignment Help
Assignments form an integral part of getting better scores & ultimately, a degree itself (in case pursuing a masters/PhD) – something only possible if precision is made a priority right away; otherwise, chances of failure increase exponentially over a time period detrimentally affecting performance evaluation systems later down road drastically hence stressing timely importance completion prior commencement other operations associated same project altogether consistently meeting high standards expected each situation respectively! Here too, CustomPaperHelp presents comprehensive solution package exceeding expectations beyond point offering optimal values therein ensuring maximum satisfaction reached under circumstances prevailing accordingly without fail…proving once more why people trust us implicitly without second thought whatsoever!!

Calculate your paper price
Pages (550 words)
Approximate price: -

Why Choose Us

Quality Papers

We value our clients. For this reason, we ensure that each paper is written carefully as per the instructions provided by the client. Our editing team also checks all the papers to ensure that they have been completed as per the expectations.

Professional Academic Writers

Over the years, our Acme Homework has managed to secure the most qualified, reliable and experienced team of writers. The company has also ensured continued training and development of the team members to ensure that it keep up with the rising Academic Trends.

Affordable Prices

Our prices are fairly priced in such a way that ensures affordability. Additionally, you can get a free price quotation by clicking on the "Place Order" button.

On-Time delivery

We pay strict attention on deadlines. For this reason, we ensure that all papers are submitted earlier, even before the deadline indicated by the customer. For this reason, the client can go through the work and review everything.

100% Originality

At Custom Paper Help, all papers are plagiarism-free as they are written from scratch. We have taken strict measures to ensure that there is no similarity on all papers and that citations are included as per the standards set.

Customer Support 24/7

Our support team is readily available to provide any guidance/help on our platform at any time of the day/night. Feel free to contact us via the Chat window or support email: support@acmehomework.com.

Try it now!

Calculate the price of your order

We'll send you the first draft for approval by at
Total price:

How it works?

Follow these simple steps to get your paper done

Place your order

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

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

Custom Paper Help has stood as the world’s leading custom essay writing services providers. Once you enter all the details in the order form under the place order button, the rest is up to us.


Essay Writing Services

At Custom Paper Help, we prioritize on all aspects that bring about a good grade such as impeccable grammar, proper structure, zero-plagiarism and conformance to guidelines. Our experienced team of writers will help you completed your essays and other assignments.


Admission and Business Papers

Be assured that you’ll definitely get accepted to the Master’s level program at any university once you enter all the details in the order form. We won’t leave you here; we will also help you secure a good position in your aspired workplace by creating an outstanding resume or portfolio once you place an order.


Editing and Proofreading

Our skilled editing and writing team will help you restructure you paper, paraphrase, correct grammar and replace plagiarized sections on your paper just on time. The service is geared toward eliminating any mistakes and rather enhancing better quality.


Technical papers

We have writers in almost all fields including the most technical fields. You don’t have to worry about the complexity of your paper. Simply enter as much details as possible in the place order section.