Assignment 3
Q1 [20 Points] Auction Optimization
Suppose there is a marketplace with S suppliers, C customers and G goods. Supplier i supplies at most Sik units of good k and asks for $Aik price per unit of good k. customer j demands at most Djk units of good k and bids $Bjk per unit of good k. Imagine that you are the auctioneer: you collect all the pricing and bidding information, then allocate supplies to customers. You would be making profit of an amount equal to the absolute difference between the bidding price $Bjk and the asking price $Aik for every unit of good k sold by supplier i to customer j.
(a) [10 Points] Provide an LP formulation to maximize your profit.
Copyright By PowCoder代写 加微信 powcoder
(b) [5 Points] Suppose supplier i and customer j are not at the same location and the available fleet capacity allows for transportation of at most Uij goods from supplier i to customer j. In addition you incur a cost of Cij per unit of any good transported from supplier i to customer j. Provide an LP formulation to maximize market clearing profit under these additional conditions.
(c) [5 Points] Suppose that the fleet capacities Uij of (b) are given in terms of kilograms and each good k weighs Wk kilograms. Modify your formulation to (b).
Q2 [20 Points] Minimizing Maximum Deviation
Linear programming is often used to solve statistical problems. We consider two examples here. We are given n data points (xi,yi) and wish to find a line of best fit y = ax+b for some coefficients a,b that best approximates the behaviour of the data points. The l∞ distance between a point (xi, yi) and a line y = ax + b is defined as the quantity |yi − axi − b|.
(a) [10 Points] Suppose we want to minimize the l∞ error for the line of best fit, defined as the maximum of l∞ distance over the set of data points. Give a linear program that will produce a line of best fit with minimum l∞ error.
(b) [10 Points] In the classification problem, you are given m data points of type 1 and n data points of type 2. We say that a line y = ax + b separates the points all data points of type 1 satisfy yi < axi + b and all data points of type 2 satisfy yi > axi + b. Give a linear program that will determines if there is a line that separates the points, and if one exists, maximizes the gap δ defined as max(e1,e2), where ei is the minimum l∞ distance between the line and points of type i. QUESTIONS BELOW HAVE BEEN MOVED TO A4, PLEASE DO NOT SUBMIT WITH A3
Q3 [20 Points] Nearly-SAT
Nearly-SAT is the problem described as follows:
Input: A CNF Formula F over n variables x1, . . . , xn and having m clauses
Output: “Yes” if there is an assignment of the variables x1,…,xn that satisfies exactly m−1 clauses, “No” otherwise
(a) [5 Points] Show that Nearly-SAT is in NP.
(b) [7 Points] Given a CNF formula F over the variables x1, . . . , xn and which has m clauses, construct a CNF formula F′ over the same set of variables and which has two additional clauses (so m + 2 in all) such that an assignment to the variables x1, . . . , xn that satisfies all m clauses of F satisfies precisely m + 1 clauses of F′.
(c) [8 Points] Use part (b) to give a polynomial time reduction from SAT to Nearly-SAT and show that Nearly-SAT is NP-hard.
Q4 [20 Points] Tile Covering
An architect is given a set of rectangular tiles ti, each with some length li and width wi (li ≥ wi). There is a wall with length l and width w, and the architect would like to see if there is a way to cover the wall with tiles so that each tile is placed horizontally or vertically, there are no overlaps between the tiles or gaps on the wall, and furthermore each tile is placed on the wall. Assume that all dimensions are given as rational numbers.
(a) [5 Points]The Architect problem is defined as the following decision problem: given the tiles and the dimensions of the wall, is there a way to cover the wall according to constraints? Show that the Architect problem is in NP.
(b) [15 Points] Show that the Architect problem is NP-Complete. You may assume that the following problem is NP-Complete:
Partition: Given a set of positive integers S that sum to n, is there a subset S1 ⊆ S that sums to n2?
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com