This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ENGRI 115 Engineering Applications of OR Final Solutions Fall 2007 Name:
1. (30 points) Linear Programming Consider the following LP depending on the parameter , which will be specified below. max x1 + x2 s.t. 3x1 + 2x2 2 x1 + 2x2 6 x1 0, x2 0. (a) Consider = 1 in this subproblem. i. (5) Draw a graphical representation of the problem, including the objective function. 111111111111111111111111 000000000000000000000000 1 0 111111111111111111111111 000000000000000000000000 1 0 111111111111111111111111 1 0 x 000000000000000000000000 1111111111111111111 0000000000000000000 111111111111111111111111 000000000000000000000000 1 0 11111111111111 00000000000000 1111111111111111111 0000000000000000000 111111111111111111111111 000000000000000000000000 1 0 11111111111111 00000000000000 1111111111111111111 0000000000000000000 111111111111111111111111 000000000000000000000000 1 0 11111111111111 00000000000000 1111111111111111111 0000000000000000000 111111111111111111111111 000000000000000000000000 1 0 11111111111111 00000000000000 1111111111111111111 0000000000000000000 111111111111111111111111 000000000000000000000000 1 0 11111111111111 00000000000000 1111111111111111111 0000000000000000000 111111111111111111111111 000000000000000000000000 1 0 11111111111111 00000000000000 1111111111111111111 0000000000000000000 111111111111111111111111 000000000000000000000000 1 0 11111111111111 00000000000000 1111111111111111111 0000000000000000000 111111111111111111111111 000000000000000000000000 1 0 1 0 11111111111111 00000000000000 1111111111111111111 0000000000000000000 111111111111111111111111 000000000000000000000000 1 0 11111111111111 00000000000000 1111111111111111111 0000000000000000000 111111111111111111111111 000000000000000000000000 1 0 11111111111111 00000000000000 1111111111111111111 0000000000000000000 111111111111111111111111 000000000000000000000000 1 0 11111111111111 00000000000000 111111111111111111111111 000000000000000000000000 1 0 11111111111111 00000000000000 111111111111111111111111 000000000000000000000000 1 0 11111111111111 00000000000000 111111111111111111111111 000000000000000000000000 1 0 11111111111111 00000000000000 111111111111111111111111 000000000000000000000000 1 0 11111111111111 00000000000000 111111111111111111111111 000000000000000000000000 1 0 111111111111111111111111 000000000000000000000000 1 0 111111111111111111111111 000000000000000000000000 1 0 111111111111111111111111 000000000000000000000000 1 0
2 5 1 1 5 x1 ii. (3) Determine the optimal solution (x , x ) of the LP graphically, and report 1 2 the corresponding optimal objective function value. SOLUTION: The optimal solution is (2, 4) with optimal objective function value 2. iii. (2) Is the optimal solution unique (i.e., is there no different optimal solution)? If not, give a different optimal solution. SOLUTION: Yes, the solution is unique. The objective function meets the feasible region in a single vertex. [Question 1  continued] (b) Consider = 2 in this subproblem. i. (5) Draw a graphical representation of the problem, including the objective function.
x2 5 1 111111111111111111111111 000000000000000000000000 111111111111111111111111 000000000000000000000000 111111111111111111111111 000000000000000000000000 1111111111111111111 0000000000000000000 111111111111111111111111 000000000000000000000000 1111111111111111111 0000000000000000000 111111111111111111111111 000000000000000000000000 1111111111111111111 0000000000000000000 111111111111111111111111 000000000000000000000000 1111111111111111111 0000000000000000000 111111111111111111111111 000000000000000000000000 1111111111111111111 0000000000000000000 111111111111111111111111 000000000000000000000000 1111111111111111111 0000000000000000000 1 0 111111111111111111111111 000000000000000000000000 1111111111111111111 0000000000000000000 111111111111111111111111 000000000000000000000000 1111111111111111111 0000000000000000000 111111111111111111111111 000000000000000000000000 1 0 1111111111111111111 0000000000000000000 111111111111111111111111 000000000000000000000000 1111111111111111111 0000000000000000000 111111111111111111111111 000000000000000000000000 1111111111111111111 0000000000000000000 111111111111111111111111 000000000000000000000000 111111111111111111111111 000000000000000000000000 111111111111111111111111 000000000000000000000000 111111111111111111111111 000000000000000000000000 111111111111111111111111 000000000000000000000000 111111111111111111111111 000000000000000000000000 111111111111111111111111 000000000000000000000000 111111111111111111111111 000000000000000000000000 111111111111111111111111 000000000000000000000000 x
1 5 1 ii. (3) Determine the optimal solution (x , x ) of the LP graphically, and report 2 1 the corresponding optimal objective function value. SOLUTION: One optimal solution is (2, 4) with optimal objective function value 6. iii. (2) Is the optimal solution unique (i.e., is there no different optimal solution)? If not, give a different optimal solution. SOLUTION: The solution is not unique. Another solution is (4, 5). [Question 1  continued] (c) The feasible region of the LP is unbounded. We want to discuss this in more detail. i. (6) Let S denote the set of feasible points of the LP. A nonzero vector d is a direction of unboundedness if for all x S and any c 0 we have x + cd S. Verify mathematically that the particular d = (x1 , x2 ) = (3, 1) is a direction of unboundedness (Hint: Consider each constraint separately, and show that it is fulfilled by x + cd with x S, c 0). SOLUTION: Consider each constraint. Since c, x and each component of d is nonnegative, we also have that x + cd is nonnegative. 3(x1 + 3c) + 2(x2 + c) = 3x1 + 2x2  7c 2, because x S and c 0. (x1 + 3c) + 2(x2 + c) = x1 + 2x2  c 6, because x S and c 0. ii. (2) Give one particular value for for which there is not finite optimal solution to the LP. Explain your answer. SOLUTION: If = 4 for example, we have the objective function value of (x1 + 3c) + 4(x2 + c) = x1 + 4x2 + c on the direction of unboundedness. This value goes to as c , thus the objective function is unbounded. iii. (2) Why is it possible that you have a direction of unboundedness, but at the same time you can have finite optimal solutions (as for = 1 and = 2)? SOLUTION: This all depends on the slope of the objective function. In case = 1 and = 2 we do not get higher values for the objective function when one considers feasible points along the direction of unboundedness. 2. (20 points) Maximum Weighted Matchings We want to solve the maximum weighted matching problem in a bipartite graph with the following edge costs cij : j cij 1 3 5 5 2 5 6 9 3 6 6 7 i 1 2 3 (a) (15) Solve this maximum weighted matching problem with the Hungarian method. Show all your work. (Hint: It should suffice to adjust the node cover weights only once). SOLUTION: After one step of the Hungarian method one can find the maximum matching with value 20 (corresponding to M = {(1, 3), (2, 1), (3, 2)}), and the minimum node cover. [Question 2  continued] (b) (5) The dual linear program of the previous maximum weighted matching problem is min s.t.
3 i=1 ui + ui + ui 3 j=1 vj cij , for i = 1, . . . , 3; j = 1, . . . , 3, 0, for i = 1, . . . , 3, 0, for j = 1, . . . , 3, vj vj where the cij is the entry from the ith row and jth column of the cost matrix on the previous page. Give an optimal solution to this dual linear program, and explain why your solution is optimal. You may not use the simplex method to find it. (Hint: You may want to use information from the execution of the Hungarian algorithm in the first part. Do the constraints of the LP look familiar?) SOLUTION: The constraints are exactly the ones that define a node cover (by definition). So, the LP asks for the minimum value of a node cover. This is actually what we obtain from the Hungarian method. So, u1 = 5, u2 = 5, u3 = 8, v1 = 0, v2 = 1, v3 = 1 is an optimal solution to the LP. 3. (20 points) Maximum Flow Problems It is Thursday noon, and you and your partner are working in the lab to compute the maxflow on a huge graph as part of your homework in an introductory optimization course in a prestigious Ivy University. However, it is getting late as the due time of the homework is 2.30pm. Your friend is a computer freak and actually hates "theory". He suggests that he will write a code to compute the max flow with no effort. It is already 1.45pm and your friend just finished the code and started to run it on the input graph. At 2.15 the code finishes computing and you print the solution in order to check if it has been computed correctly. Unfortunately, in the middle of printing the electricity goes off and you are able to print only a very partial list of the flow. The computer prints a list of the edges starting with edges going out of the origin (node 1) then edges going out of node 2 and so on. Question marks stand for parts in the print that are unreadable: Edge (1,2) (1,3) (1,4) (2,5) (3,4) (4,7) (5,6) (6,2) ? ? (7,3) ? ? Capacity 9 4 9 9 4 8 4 9 ? ? 9 ? ? Flow 4 4 4 4 4 8 4 0 ? ? 0 ? ? This means that you know the flow on all edges going out from nodes 1, 2, 3, 4 and 5, but not necessarily for nodes 6, 7. Also there might be many other nodes and edges that were not printed. In particular assume that the sink t does not show up in the printed list. Your friend is now panicked as it is just 15 minutes before the due time. You on the other hand like "theory". Looking at the partial print you tell your friend that he can relax, since you have computed the optimal (maximum) flow on the graph. Your friend, though appreciating you very much, doubts your last statement. (a) (10) Assuming that the code has computed a valid flow, give the value of the current flow. SOLUTION: The value of the current flow is 12, because that can be computed from the flow along all arcs leaving the source (node 1). [Question 3  continued] (b) (10) If you think that the current valid flow is indeed optimal, provide definite evidence for its optimality and compute a minimum cut. Otherwise indicate why the current flow may not be optimal (Hint: do not panic you know enough to figure out what is the right answer). SOLUTION: The current flow is maximal, because the cut capacity corresponding to S = {1, 2, 3, 4, 5} is also 12. 4. (10 points) Shortest Paths and Spanning Trees Suppose we have an undirected graph (including one node named v), and we compute both a minimum spanning tree and a shortest path tree out of v (the shortest path tree contains the shortest paths from v to all other nodes). We now add 5 to the cost of each edge in the graph, and recompute a minimum spanning tree, and recompute a shortest path tree out of v. (a) (5) It could actually happen that the shortest path tree changes. Give a small example where the shortest path tree is forced to change. SOLUTION: Consider a graph with nodes V = {1, 2, 3}, and set the edge costs to c12 = 1, c23 = 1, c13 = 3. So, the shortest path from node 1 to node 3 includes node 2 and has length 1 + 1 = 2. After adding 5 to all edge costs, the shortest path from 1 to 3 is 1  3 with total cost 8, the old path has new total cost 12. (b) (5) The change in the graph never forces the minimum spanning tree to change. Explain why this is the case. SOLUTION: Every spanning tree on n nodes has n  1 edges. So, the cost of the new tree is 5(n  1) + v, where v is the cost of the old tree. Since 5(n  1) is the cost we would add to any other spanning tree, we know that the new tree is indeed optimal. (Another solution: The relative order of the edges is still the same, so Prim's algorithm would not deviate.) 5. (20 points) Linear Programming Formulation Candy Kane Cosmetics (CKC) produces Leslie Perfume, which requires chemicals and labor. Two product processes are available: Process 1 transforms 1 unit of labor and 2 units of chemicals into 3 oz of perfume. Process 2 transforms 2 units of labor and 3 units of chemicals into 5 oz of perfume. It costs CKC $3 to purchase a unit of labor and $2 to purchase a unit of chemicals. Each year, up to 20, 000 units of labor and 35, 000 units of chemicals can be purchased. In the absence of advertising, CKC sells 1, 000 oz of perfume. To stimulate demand for Leslie, CKC can hire the lovely Jenny Nelson. Jenny is paid $100/hour. Each hour Jenny works for the company increases the demand for Leslie Perfume by 200 oz. Each ounce of Leslie Perfume sells for $5. Formulate a linear program that helps CKC to determine how to maximize profits. Make sure that you explain the meaning of the variables, constraints and objective function. Do not attempt to solve the LP! SOLUTION: Let x1 denote the number of times process 1 is carried out; x2 the number of times process 2 is carried out; and x3 should denote the hours for which Jenny is hired (all numbers are considered over a 1 year horizon). Then max 5(3x1 + 5x2 ) s.t. x1 2x1 3x1  3(x1 + 2x2 ) + 2x2 + 3x2 + 5x2  = 2(2x1 + 3x2 )  100x3 20, 000 (labor constraint) 35, 000 (chemicals constraint) 1, 000 + 200x3 (production=demand) x1 0, x2 0, x3 0. The first term in the objective function corresponds to the money earned by selling the perfume, the second, third and fourth term represent the costs of labor, chemicals and hiring of Jenny, respectively. 6. (Extra credit: 15 points) True or False Below you find a list of claims. Determine for each claim whether it is true or false, and explain your reasoning. In other words, give a counterexample if the claim is false, or a precise explanation why the claim is true. (a) (3) Let M be a maximum cardinality matching in a bipartite graph G. Then, G does not contain any exposed nodes (with respect to M ). SOLUTION: FALSE. A counterexample is given if V contains just a single node. Here M = is the maximal cardinality matching, but the single node is exposed. (By the way: The claim is true if and only if M is a perfect matching). (b) (4) Suppose we want to minimize an LP with the additional requirement that all variables should take on integer values (we called such a problem an integer program). The claim is that the optimal value obtained by minimizing the integer program is greater or equal to the optimal value obtained by minimizing the corresponding LP (which has the same constraints, only the variables are not required to be integer). SOLUTION: TRUE. The integer constraints are additional constraints. Thus, if S is the set of feasible solutions to the LP, and S is the set of feasible solutions to the integer program, then we have S S. Minimizing over a subset of S cannot decrease the value of the objective function. [Question 6  continued] (c) (8) Given a graph G = (V, E) with source s and sink t and capacities cij 0. Suppose the set {xij : (i, j) E} defines a feasible flow in G. We know that the flow value f (not to be confused with the cut capacity) can be computed as f=
jV \{s} xsj 
jV \{s} xjs . (In other words: The sum of the flow on all arcs leaving s, minus the sum of the flow on all arcs entering s, gives the total flow value.) Let r V be a node different from s and t. The claim is that f=
i{s,r},jV \{s,r} xij 
jV \{s,r},i{s,r} xji . (In other words: The sum of the flow on all arcs leaving s or r, minus the sum of the flow on all arcs entering s or r, gives also the total flow value.) SOLUTION: TRUE. We know that f=
jV \{s} xsj 
jV \{s} xjs . Since for r we have flow conservation we further have 0=
jV \{r} xrj 
jV \{r} xjr . Adding these two equations yields f = =
jV \{s} xsj  jV \{s} i{s,r},jV \{s,r} xij  xrj  jV \{s,r},i{s,r} xji . xjs +
jV \{r} jV \{r} xjr ...
View Full
Document
 Fall '05
 TROTTER

Click to edit the document details