CS614. Advanced Algorithms. L19 Quiz.
CS614. Advanced Algorithms.
L19 Quiz
Problem 1. Bin Packing
Consider the bin-packing problem:
Input: n items with sizes a1⋯an respectively, a positive integer B (bin capacity) and a positive integer k (number of bins). Question: Is there a partition of the set {1⋯n} into sets S1,…,Sk such that for each i∈{1⋯k} we have that ∑j∈Siaj≤B?
Show that Bin Packing is NP-complete.
Problem 2. BOX-DEPTH
Consider the following problem, called BOX-DEPTH: Given a set of n axisaligned rectangles in the plane, how big is the largest subset of these rectangles that contain a common point?
Describe a polynomial-time reduction from BOX-DEPTH to MAXCLIQUE.
Describe and analyze a polynomial-time algorithm for BOX-DEPTH. [Hint: O(n3) time should be easy, but O(nlogn) time is possible.]
Why don’t these two results imply that P=NP?