math171A_hw1_sol

math171A_hw1_sol - Math 171A Homework 1 Solutions...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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)...
View Full Document

Page1 / 5

math171A_hw1_sol - Math 171A Homework 1 Solutions...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online