Q1: 15 points Q2: 15 points Q3: 10 points Q4: 20 points Q5: 10 points Q6: 20 points Q7: 10 points Q8: 20 points Total: 120 points
Give an algorithm, with running time polynomial in n, that determines an order of the jobs that will achieve the optimal reward for all values of t. (You do not need to prove here that your order has this property, that is Question 2.) State and justify a polynomial bound on the running time.
Prove that no other order on the jobs can achieve a greater value than your order from Question 1, for any possible value of t. (Hint: You can show that any other order either achieves the same value as yours does, or can be altered to get a greater value for some t.)
True or false with justification: Let A be an algorithm that operates on a list of size n as follows. If n ≤ 1, then A takes only O(1) time. Otherwise A spends O(n) time to split the list into two pieces, each of which has size at most 2n/3. It then calls itself recursively on the two pieces. Then any such A has a running time that is polynomial in n.
Consider the special case of the BIN-PACKING problem where the size of each item is a positive integer and the bin size is a constant positive integer, called b. Given n items, we need to find the exact minimum number of bins needed to store them all. (The problem is no longer NP-complete in this special case, unless P = NP.) Describe an algorithm to solve this problem that has a running time that is polynomial in b if b is considered to be a constant. State and justify a polynomial bound on your running time.
True or false with justification: The SQUARE-TILING problem has as input a set of n2 tiles, each of which has one of n2 possible colors. (It is possible that not all the colors are used.) The output is a boolean saying whether the tiles can be put in an n by n square such that each tile is used exacctly once and such that no color appears more than once in any row or in any column. Then there is a polynomial-time reduction from SQUARE-TILING to HAMILTON-CIRCUIT.
The RECTANGLE problem is the following variation of BIN-PACKING. We are given a set of n jobs, each with a positive integer size. Let S be the sum of the n sizes. The problem is to determine whether there exist integers b and k such that b > 1, k > 1, bk = S, and the items can be divided into k sets each of which has total size b. (The name RECTANGLE comes from thinking of each job of size si as a 1 by si rectangle, and asking whether these rectangles can be packed into any single rectangle without wasted space, other than the trivial 1 by S solution.) Prove that the RECTANGLE problem is NP-complete.
True or false with justification: Let R be a resource to which I want access, and suppose that in any round of a protocol I have at least a 1/n chance of getting R. Further suppose that the events of success in each round are independent. Then my chance of succeeding at least once in the first n rounds is at least 1/2.
Now consider the variant of BIN-PACKING where the bin size is b (not necessarily an integer) and each item has size less than b/3. This version is still NP-complete, though we won't prove this here. Your problem is to give an algorithm that approximates the optimal packing into bins, and prove a bound on the quality of your approximation. In particular, prove that if your algorithm uses 3a+1 bins for some integer a, then the optimal algorithm uses at least 2a+1 bins.
Last modified 15 January 2007