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.
1. Let X(1..n) and Y(1..n) contain two lists of n integers, each sorted in nondecreasing order. Give the bestĀ 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Ā of all 2n combined elements. For instance, […]