Homework 9 Solutions

# Homework 9 Solutions - Math 171A: Mathematical Programming...

This preview shows pages 1–6. Sign up to view the full content.

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

View Full Document

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

View Full Document

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Math 171A: Mathematical Programming Instructor: Philip E. Gill Winter Quarter 2009 Homework Assignment #9 Due Friday March 13, 2009 The final will be held Wednesday, March 18 at 3pm. Starred exercises require the use of Matlab . Exercise 9.1. * For the following linear program, construct an equivalent standard-form problem in which the objective function is minimized and the constraints have the form Ax = b , x ≥ 0. Starting at the vertex where all slack variables are basic, solve the problem using the standard-form simplex method (Algorithm 5.1 in the Class Text). At every iteration, record (i) the values of the basic variables; (ii) the indices of the basic and nonbasic variables; (iii) the multiplier π and the reduced cost vector z N ; (iv) the search direction p B ; and (v) the step to the nearest constraint. maximize- 10 x 1 + 32 x 2 + 48 x 3 + 54 x 4 subject to 2 x 1 + 3 x 2 + 5 x 3 + x 4 ≤ 24 5 x 1 + 2 x 2 + x 3 + 3 x 4 ≤ 32 8 x 1 + 5 x 2 + 6 x 3 + 10 x 4 ≤ 64 3 x 1 + 6 x 2 + 9 x 3 + 12 x 4 ≤ 81 x 1 , x 2 , x 3 , x 4 ≥ . >> A A = 2 3 5 1 1 5 2 1 3 1 8 5 6 10 1 3 6 9 12 1 >> b b = 24 32 64 81 >> c’ ans = 10-32-48-54 >> basic basic = 5 6 7 8 >> nonbasic nonbasic = 1 2 3 4 2 Mathematics 171A >> B=A(:,basic) B = 1 1 1 1 >> xB=solve(B,b) xB = 24 32 64 81 >> % Note that we can start with this xB since b>=0. >> N=A(:,nonbasic) N = 2 3 5 1 5 2 1 3 8 5 6 10 3 6 9 12 >> cB=c(basic) cB = >> c_N=c(nonbasic) c_N = 10-32-48-54 >> pi=solve(B’,cB) pi = >> z_N=c_N-N’*pi z_N = 10-32-48-54 >> s=4 s = 4 >> nu_s=nonbasic(s) nu_s = 4 >> pB=solve(B,-A(:,nu_s)) pB = Homework #9 3-1-3-10-12 >> sigma=xB./(-pB) sigma = 24.0000 10.6667 6.4000 6.7500 >> [alpha,t]=min(sigma) alpha = 6.4000 t = 3 >> xB=xB+alpha*pB xB = 17.6000 12.8000 4.2000 >> xB(t)=alpha xB = 17.6000 12.8000 6.4000 4.2000 >> beta_t=basic(t) beta_t = 7 >> basic(t)=nu_s basic = 5 6 4 8 >> nonbasic(s)=beta_t nonbasic = 1 2 3 7 >> % One iteration is complete. >> B=A(:,basic) B = 1 1 1 3 10 12 1 >> N=A(:,nonbasic) N = 2 3 5 5 2 1 8 5 6 1 3 6 9 >> cB=c(basic) cB = 4 Mathematics 171A-54 >> c_N=c(nonbasic) c_N = 10-32-48 >> pi=solve(B’,cB) pi =-5.4000 >> z_N=c_N-N’*pi z_N = 53.2000-5.0000-15.6000 5.4000 >> s=3 s = 3 >> nu_s=nonbasic(s) nu_s = 3 >> pB=solve(B,-A(:,nu_s)) pB =-4.4000 0.8000-0.6000-1.8000 >> decreasing=[1 3 4] decreasing = 1 3 4 >> sigma=zeros(4,1); >> sigma(2)=inf; >> sigma(decreasing)=xB(decreasing)./(-pB(decreasing)); >> sigma sigma = 4.0000 Inf 10.6667 2.3333 >> [alpha,t]=min(sigma) alpha = 2.3333 t = 4 Homework #9 5 >> beta_t=basic(t) beta_t = 8 >> xB=xB+alpha*pB xB = 7.3333 14.6667 5.0000 >> xB(t)=alpha xB = 7.3333 14.6667 5.0000 2.3333 >> basic(t)=nu_s basic = 5 6 4 3 >> nonbasic(s)=beta_t nonbasic = 1 2 8 7 >> % Two iterations are complete.>> % Two iterations are complete....
View Full Document

## This note was uploaded on 10/23/2010 for the course MATH 171a taught by Professor Staff during the Winter '08 term at UCSD.

### Page1 / 12

Homework 9 Solutions - Math 171A: Mathematical Programming...

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

View Full Document
Ask a homework question - tutors are online