This preview shows pages 1–4. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Math 171A Homework 1 Solutions Instructor: Jiawang Nie January 24, 2012 1. Find the optimal solution to the following LP maximize x 1 + 4 x 2 + 3 x 3 subject to 2 x 1 + x 2 + x 3 ≤ 4 x 1 x 3 = 1 x 2 ≥ ,x 3 ≥ . Solution: The second equality constraint x 1 = x 3 + 1 allows us to convert the problem into a two dimensional optimization problem in the variables x 2 and x 3 . Bring it into the problem, we get the following equivalent problem: max 4( x 2 + x 3 ) + 1 , s.t. x 2 + 3 x 3 ≤ 2 , x 2 ≥ , x 3 ≥ . In this problem, there are two variables x 2 and x 3 , we draw a Figure and find the feasible region, see Figure 1. There are three corner points (0 , 0) , (0 , 2 3 ) , (2 , 0). Calculate the objective function value at these three corner points, we get the maximum function value at the point (2 , 0) with a value of 9, then x 1 = x 3 +1 = 1, i.e. the optimal solution of the original problem is x * = (1 , 2 , 0). Use Matlab to check the solution, the optimal solution x * = [1 2 0], which is the same as above. The matlab code as follows: f= [1; 4; 3]; A = [2 1 1; 0 1 0; 0 0 1]; b = [4; 0; 0]; Aeq = [1 0 1]; beq = 1; x = linprog(f,A,b,Aeq,beq) 2. Draw the feasible region defined by the following six constraints: x 1 + 2 x 2 ≤ 6 , x 1 x 2 ≥ 2 , x 2 ≤ 1 , x 1 x 2 ≤ 4 , x 1 ≥ , x 2 ≥ . Find all the corner points. 10.5 0.5 1 1.5 2 2.5 3 x2 = 0, x3 = 2/3 x2 =0,x3 =0 x2 = 2, x3 =0 Figure 1: Feasible Region of Question 1. Solution: There are six constraints, and draw the feasible region by plotting all the lines (replace inequality with equality) and test some point to find which side of the line the region is on. Doing this should show you which lines will intersect and at each of these intersections we find a corner point. The result, see Figure 2 . There are Five corner points: x 1 = (2 0), x 2 = (3 1), x 3 = (4 1), x 4 = ( 14 3 2 3 ), x 5 = (4 0) . 3. Convert the following LP into the standard form (minimize c T x subject to Ax ≥ b ) maximize 3 x 1 + 5 x 2 + 7 x 3 subject to 2 ≤ x 1 + x 2 ≤ 3 4 ≤ x 2 + x 3 ≤ 5 x 1 ≥ ,x 2 ≥ ,x 3 ≥ . Solution: Firstly, we need to convert maximizing objective function into a min imizing problem. Then convert all the constraints into constraints with a single inequality and make sure they point the correct way and list them all. The 2 1 2 3 4 5 6 C6 C3 C5 C4 C1 C2 Feasible Region Figure 2: Feasible Region of Question 2. standard form of this problem is minimize 3 x 1 5 x 2 7 x 3 subject to x 1 + x 2 ≥ 2 x 1 x 2 ≥  3 x 2 + x 3 ≥ 4 x 2 x 3 ≥  5 x 1 ≥ x 2 ≥ x 3 ≥ . Use the matrix form to rewrite above problem. Let c = [ 3 5 7] > , and A = 1 1 1 1 1 1 1 1 1 1 1 , b = 2 3 4 5 ....
View
Full
Document
This note was uploaded on 03/19/2012 for the course MATH 171a taught by Professor Staff during the Spring '08 term at UCSD.
 Spring '08
 staff
 Math

Click to edit the document details