Simplex Method Examples

21
Discrete Math B: Chapter 4, Linear Programming: The Simplex Method 1 |Chapter 4: Linear Programming! he Simplex MethodHHf U Day 1: (text pgl69-176) In chapter 3, we solved linear programming problems graphically. Since we can only easily graph with two variables (x and y), this approach is not practical for problems where there are more than two variables involved. To solve linear programming problems in three or more variables, we will use something called "The Simplex Method." 4.1 Slack Variables and the Pivot Getting Started: Variables: Use Xi, x2, x3(... instead of x, y, z,... Problems look like: Maximize z- 3x,+2x2+x3 A Standard Maximum Problem 4.1 Setup! 4.2 Solving! 2x, + x2 + x3 <150 Subject to 2x, + 2x2 + 8x3 < 200 2x, + 3x2 + x3 < 320 1. z is to be maximized 2. All variables, x1,x2,x3,...>0 3. All constraints are "less than or equal to" (i.e. < 4. 3/4.4 Look Different with x, > 0, x2 > 0, x3 > 0 To Use Simplex Method: Convert constraints (linear inequalities) into linear equations using SLACK VARIABLES. Example 1: Convert each inequality into an equation by adding a slack variable. Slack variables: si, s2, s3, etc. b) x, + 3x2 + 2.5X3 <100 a) 2X,+4.5X2<8 For example: If x,+x2<10 then x, +x2 +x, = 10 X, + JXI<-2.5)<3 * Sj-i ZX, tS, = g x, > 0 and "takes up any slack"

description

Examples for Operational Research - Simplex Method minimum findingGenerating Simplex TablesZadaci za Optimalno upravljanje korištenjem simplex metoda za dobijanje minimuma funkcije.

Transcript of Simplex Method Examples

Discrete Math B: Chapter 4, Linear Programming: The Simplex Method 1

|Chapter 4: Linear Programming!he Simplex MethodHHfU

Day 1:

(text pgl69-176)In chapter 3, we solved linear programming problems graphically. Since we can only easily graph with two

variables (x and y), this approach is not practical for problems where there are more than two variablesinvolved. To solve linear programming problems in three or more variables, we will use something called "TheSimplex Method."

4.1Slack Variables and the Pivot

Getting Started:

Variables: Use Xi, x2, x3(... instead of x, y, z,...

Problems look like:Maximize z- 3x,+2x2+x3

A Standard Maximum Problem4.1Setup!

4.2 Solving! 2x, + x2 + x3 <150

Subject to 2x, + 2x2 + 8x3 < 200

2x, +3x2 + x3 < 320

1. z is to be maximized

2. All variables, x1,x2,x3,...>03. All constraints are "less than or equal to" (i.e. <

4.3/4.4Look Different

with x, >0,x2 >0, x3 >0

To Use Simplex Method:

Convert constraints (linear inequalities) into linear equations using SLACK VARIABLES.

Example 1: Convert each inequality into an equation by adding a slack

variable.Slack variables:

si, s2, s3, etc.

b) x, +3x2 +2.5X3 <100a) 2X,+4.5X2<8For example:

If x,+x2<10

then x, +x2 +x, =10 X, + JXI<-2.5)<3 * Sj-iZX, tS,= g

x, >0 and "takes up any slack"

Discrete Math B: Chapter 4, Linear Programming: The Simplex Method 2

Example 2:a) Determine the number of slack variables needed

b) Name them

c) Use slack variables to convert each constraint into a linear equation

Maximize z — 3x]+2x2+x3

2x, +x2+x3 <150

Subject to 2x, +lx2 +8x3 < 200

2xt +3x2 + x3 < 320(one per constraint)oi) 3

VT) Si, S3

?)1

•2x1 2y 2. i- #x3 + S2. - 200

i- By 3. i- )c3 + S3 = 32o

with x, >0,x2 >0,x3 >0

n

rewr|TE the objective function so all the variables are on the left and the constants are on the right.

z-3x, +2x2 +X3 2 -3*,- -*3*0VPirvstlofi*-

ih. ctlpKo.order

|ÿ~*3y t -2-Xi 3 ?b — o

5230 WRITE the modified constraints (frSm step 1) and the objective function (from step 2) as an

augmented matrix. This is called the "simplex tableau."

There should be a row for each constraint.

The last row is the objective function.

EVERY variable used gets a column.

5, S*. S30 o

X Xz.

15o0I1% l

2. Z S 05

a 3

r*>CoKSfrafnb o o Zoo

0 o 1 o 32O

O O O \ Ocÿ>)ediÿ~p “2 “l

Discrete Math B: Chapter 4, Linear Programming: The Simplex Method 3

Example: Introduce slack variables as necessary, then write the initial simplex tableau for each linearprogramming problem.

lOv, -X-2. -X3 f Sr '3?

I3*i ¥-7x3 * S2- - 2-°5

I4-VC, +- Vi. '2*3 4- S3 - 3H:5

“lx, -3xz - *3 4- it - o

Ex 3) Find x, >0, x2 >0, andx3 >0 such that

10x, -x2 -x3 <138

13x, +6X2+7X3 < 205

14x, +x2 -2x3 <345

and z=7x, +3x2 +x3 is maximized.

X3 s, 62.*1 NL*.o I3So-I o10 I

20 5ot o(p 713 o

345OooH I -2

c;o 1o o-3 -1-7

Ex. 4) Find x, >0 and x2 >0 such that

2x, +12x2 <20

4x, +x2 <50

and z=8x, +5x2 is maximized.

2x 1 + — 10

4xt 4* y 2. t-Sa. - 5o

- Sx 2. it - o

X| S,I

2, 13 I 0 0 20

5ol o o

'6 0 0) l \ 0“8

Discrete Math B: Chapter 4, Linear Programming: The Simplex Method 4

Example 5: A businesswoman can travel to city A, city B, or city C. It is 122 miles to city A, 237 miles to city

B, and 307 miles to city C. She can travel up to 3000 miles. Dining and other expenses are $95 in city A, $130 in

city B, and $180 in city C. Her expense account allows her to spend $2000. A trip to city A will generate $800 in

sales, while a trip to city B will generate $1300 and a trip to city C will generate $1800. How many trips should

she make to each city to maximize sales? Write the initial simplex tableau.

U4 X, = #|rips Ci+V A

* trip*

~ Boool 2 2 X| <-Z2>7 X z v- Son x } + S,

°\5X, +- V36 X2 * 3

“Soo*, -I3cd

-2.00©

~ o

C8A

5a.*3 X X 2_ X 3X -j,•\-rfps Xo

2.0 0 £3

O2-31 1

130 iSrO °3O7 f $oOt>237 \7-2-

o1

ISO45 13 0

€Yp- Ol-<£0O -1300

1X00 MAX§00 1500

Xv *3ÿ°

IZ2-X, VZ37Xz+ 307X3 * 3°°°

v- 130/j. v ISOXj - %0°°

MAX 2." "Sooxi 4. \3<oc>x.z. lÿoC)X34.1Day1Homework

Pg 175 #1-8, 19-24, 26

Day 2:

|4.1Slack Variables and the Pivot (continued)!

When you are looking at a simplex tableau, you may be able to spot basic variables.

A basic variable is a variable that only has all zeros except one number in its column in the tableau.

x] x2 X, s, s2 z

3 0 15 1012

2 2 0 0 1 0 12What are the basic variables in this simplex tableau?

Vz } £• -2 0 0 1 0 1 16)

TT |jjdSic bftS'O

bÿ5iC

Discrete Math B: Chapter 4, Linear Programming: The Simplex Method 5

One basic feasible solution can be found by finding the value of any basic variables and then setting all

remaining variables equal to zero.

Example 6: Read a solution from the given simplex tableau.

t £X, X3

2 0 /Ijh -2 0

0 0 10 0

0 0 0

S1 S2 S3 zxiX, x2 X, x, s2 z

m3 0 5 1 0/122 (T) 0 0 1 002

0

0 0 -300b)a)

no 2o i0 8 0 2-2 0 0 1 0 1 16

5ÿ-2-

2.--13

sr-b

IOX 3ÿ30

Sz'2-

i X3- 3 S3-0

2X2212.

*6= 12

sÿo

Sz-o

Tz =4(p

H\-oy22s-

X3~'I2t --13

Unfortunately, solutions read off of the initial simplex tableau are seldom optimal.

We are going to alter our matrix using some restricted row operations using one of the entries in the tableau as

a pivot. The goal is to make all other elements in the column with the pivot equal to zero.,O0

Remember from Ch 2:(Wf use rH’S one Kert.

1. interchange two rows

2. multiply the elements in a row by a nonzero constant O0

3. add a multiple of one row to the elements of a multiple of any other row.I-IT mwhi. bt| A negv use f»We+

Example 7: Pivot once as indicated in each simplex tableau. Read the solutiomfrom the result.ÿS 2_ 'Zb-*%. Y*. 5r * iiX, x2 x3 5, s2 z

7.0o1 1 -316 4 10 0

2 m 1 0 1 0

-556 o

12.12a) ! oZ Z o

l05 c> 3(Po-1 -6 -2 0 0 1

(woievc)

-3K2.+ R1 3FL2- + 12-3 R3S

SfOXr°

1 YiT-fc\ V-&

o 301 0

U 4 %

“l -Ip "2- CB -2» o “3 © -

00 5(A- <p

(. 4 »3 1 3 (9I 0S 0

-5 0 1 1 -5 0 2-e*

2*7,* 12

t - 3

Discrete Math B: Chapter 4, Linear Programming: The Simplex Method 6

Si s* %f\ *3 S !X, x2 x3 S, s2 s3 z

M 1

1 2 8 0 1 0 0

o o o lso25o

\nc>

2- 1 l 1110 0 0 150

3 J 5 -I 2 oo <5200b)

\-I2. O oo2 3 1 0 0 1 0 320

H5oo o z3lo - l-3 -2 -1 0 0 0 1 0

YjarW-i

~\K\ +2R.1-*P-Z 3Ri v X.R4 -=>P-4 Sr 0 I

Sz--li50

•v-r0

o 45oo Z O

U 3 3 "3 o o

-It, -4 -Zoo

o -\ \ 3 o o z 45

o o t> -lSo2oo 4P0

-2 -l -I -l1 H Ilf o

2. o 6 250O i 15“*l

•S3 -\4£>2y,-=lSo

y, =i5

Sz.~ IZ*

-P.\

2-2z5-\ -i o o o -iso

o l O 32.0-2. -\

2 3 V o

2 0 -! O \ O \*\00

*** St s* *X, Yz V3 S 1x, x2 x3 .s, s2 s3 z

o -so

3 -2 O

404 5 4 1 0 0 0 30 -2, o 2

"tp © \\

3 3ÿ

3

2-50 2 5 0 1 0 0

3 [3] 2 0 0 1 0

15 O

o IClo10

3? 1-1 -9 -3 0 0 0 1 0 % O 3) Ooc)

XjSiÿRK-

~5K3 V3P4 -*> l? I3Yz“ 10

33»=M9

S,= 13.3

2>SZ~

-zpo t'3P-a 3p.z

O -2-0 -20

o o M5-l<? -4 o

O <0 15 0 3o o -S 0 “50

3 6 o a <ro-15 -15 -10

\2. i<3 \2

-2 o 25It o 3~<e °30-50 *+0o Z"3

3R3tlZ4 P-H

o 3 o 3o4 *\ U

~\ -4 -3

o

\ oo o<J4.1Day 2 Homework

pg 175 # 9-12, 13-16 \ 3oe> O3o<*

iVi-0Wzÿ3.3

- D

5,-13.3 o

*5ÿ30

Discrete Math B: Chapter 4, Linear Programming: The Simplex Method 7

Day 3:

(text pgl77-190)4.2 Maximization Problems

Day 1: Learn to set up a linear programming problem with many variables and create a "simplex tableau.”

Day 2: Learn to identify basic variables, read feasible solutions from a tableau, and "pivot" to manipulate your

data.

Today - Learn to identify which variable to use as the pivot so your feasible solution gives the maximum value of

the objective function.

Simplex Method Maximization Problems

Step 1: Set up simplex tableau using slack variables (Lesson 4.1, day 1)

Step 2: Locate Pivot Value

• Look for most negative indicator in last row.

• For the values in this column, divide the far right column by each value to find a "test ratio."

• The value with the smallest non-negative "test ratio" is your pivot. ANSWERCoETFlCiertT

Step 3: Pivot to find a new tableau. (Lesson 4.1, day 2)

Step 4: Repeat Steps 2 & 3 if necessary Goal: no negative indicators in the bottom row.

Repeat steps 2 & 3 until all numbers on the bottom row are positive.

Step 5: Read the solution (Lesson 4.1, day 2)

i1Example 1:

v, Vi- v*

o U> 3 lb ~ 1

ic 4 n

X, *2 *3 s, s2 z

1 10 0Soo

Soo

0- loo 1001

0 l O

El 4 7 0 0 500

f [oOOO fcr P-3an‘U\ o 17-10 y

-120 -40 -60 0 0 1 0smalVeyVVHHO t sr- so a)y [-5o

MAX’ <o(>oo

nÿcthveS 2-- (3

yjoRiÿ

•*> P-3

11.6 4% %4 0

-\ 1.0 - 40 -bo o Q

O II I (dOOO

-R2 + '0R\ -*>(ffiOb

o -i o -Soo

IO 111 o o Jooo

\% »-lo -4 -1

\o io l o

a, io -1 o 5fl£>0 lo o

Discrete Math B: Chapter 4, Linear Programming: The Simplex Method 8

Wc/tMc

-I Rl + RZ

*•2. -1 —l — » a o ° -ISO

•2. X V <5 t o O 2.00

Example 2:

Maximize z =3x1+2x2+x3subject to 2Xj + x2 + x3 <150

2X3 +2X2 +8X3 < 200

2x1+3x2 +X3 <320

Xj >0, x2 >0, x3 >0

o l ~7 —l i a a 50

~\R\ R.2,ÿ12.3

o © o -\5o

o I o 32Q

- x - i -v -v•X •*> t

withO

o 7- o l <=> t 'TO

2X* vXz+Yÿ+S, -150

2>XI + YJ+S3-32.0-3x,

3f2.\ * 2R4-ÿ p-4

-(p -H -X °G -I l b ° ° 2- 4So

00° *+5 o

<v o 2. o

- [ £.2- f 121 -> p,l

I - 1 <? o -S£>o o ° ISO

o -t -t I

x i l ly5 s, Sj. 5} a

© X & -6 2 -i °e> 1 60

\5ol o o\ o

1 O o2 * °1 o O

zoo\t»b -2RX + K.2

1 O 3ZOZ 3UpO _2 O O -lOO

o t © noo -l -it 7.

© X © -iOO ° l-3 -x. -l oo O -It \ -7-1 o 1Cr

Rtt- K4 -4 R.4Si s, 2T Vi s i

o Soo t 1 -l

o \ 5 o £> X 4So\ o

O l 5ooo\ 115» Z \

o CD 7

O Z O

so o o <?• x l d> x sc o$0 o o

no1 oo?s2.x, - loo

Xi“ So•+30xo o\ 30 -i

f Yt''So

* * ,Si S} z\

S3- 70

r* *Vi *3 s Zi= S-ool%«

Z -1 <5 0 1002_ 0) "fc

0 1 1-1

0 0 -'H

ISO0I

10\ o-Vl

/VMY iMW/M' Z50

S|*°

Sr'°Si-1°

\ 0 2. 5000 0 * *• 'Yp5o

Y3v£)

Discrete Math B: Chapter 4, Linear Programming: The Simplex Method 9

-R| +•10(2.2, R2.

" HO - <ko -l o o ~ 5(cO

teo to o \o a 72-Q

Example 3:

Maximize z=24x1+36x2subject to 40xj +80x2 <560

6X1+8X2<72x2 >0, x2 >0

o -l to o Me 0XO

tei t- 2ÿR33r.z

3too l-2-£i <>| CJ

- M-5-o ~lXO O O 2.0

with

o 50M0+- SrOXÿ+S, =5t0

6 Vi -M tS2“7l

~2.4X, -3(ÿX2. +

o

-IXO » o X.O Soÿt

-2P-X + R( 12.1

*« V AJi =£ -to O Z- -XO O -3XO

4o S-c* l o o Sfeon 40 fUT) l

6> 857e0o o

O So i -xo o2.40*1 o l O 12-

7L- Lf Rx R2,2-M -?>fc o \o <0

t \ 2-0 O — te (tO O

"\XCD O °J4(p0

© zo SotoXa. S, Sj.

0 3 te020o(coo o

>4 40 %o l

TX5] o -1 jo o

c>0 b 4p 6

9 KPC ZO X 1 - I te O

Xi~ *Z.O fc - boo o

- Jzo 0 o Zo s<?40f

%OVZ-ZMO

Xa.ÿ3f—+ *X, *z S

Sx £)

o VO 3 -zo o 2-40o -\ 10 0 l(cO <ÿ/VXlM.U M,- 300

S!~ O

S2--0

3 tiO 7-0 lo 0C>0oO

4.2 HWK Day 1: pg 186-187 #1, 2, 4, 5, 7, 8

Discrete Math B: Chapter 4, Linear Programming: The Simplex Method10

Day 4:

(Continued)4.2 Maximization Problems

Example 4: Solve using the Simplex Method

Kool T-Dogg is ready to hit the road and go on tour. He has a posse consisting of 150 dancers, 90 back-up

singers, and 150 different musicians and due to union regulations each performer can only appear once during

the tour. A small club tour requires1dancer,1back-up singer and 2 musicians for each show while a larger

arena tour requires 5 dancers, 2 back-up singer and1musician each night. If a club concert nets T-Dogg $175 anight while an arena show nets him $400 a night, how many of each show should he schedule so that his income

is a maximum and what is that maximum income? © Sx S3© 5.arena.cUb 1 5 6oo30 o1ltx*1Hr MOo ool 2. 1505 odanwu-s

SfnxynAMusician*

l o1 O*2.\S»2.I -H5 -H0O O O o1a<£-=10

150

MA-y

't12.

MoodJ-2R1

~IR1

Ke.vtL-

© MayMse: nsx, t-Hocyÿ

y, + Syz S \so

y 1 rzy*--**0

2-Xi f Yt

x, ,

S3 5.SjzS VU50o o5, l

O -7-150

ISOO o5ISGo u>oo5 oo°[ 0WiVh iek.C

to~<\*> o *0

© y, 4- 5yx Si ~ 160

V« +- 1XZ + S2. - TO

2X, fÿVS3“ ISO

-HSXj-HooXj.Vfcÿo+ SP.4

roevt: p*y.)

1*r if- * S, •&S x-Vx S

30 o

\ 50

150

32“ So 2-S 0 o o5 -53x,=\60

y,-5oo ' S

5 0o-2-0(£)

5 -1* * °Vi.--20

oO

t°So club+oWS 1

Q_O ci.re.TtAS I

INCCK\£ -

o so H-ne o

s>s3-=

Discrete Math B: Chapter 4, Linear Programming: The Simplex Method

11

Example 5: Solve using the Simplex MethodThe Cut-Right Knife Company sells sets of kitchen knives. The Basic Set consists of 2 utility knives and1chefsknife. The Regular Set consists of 2 utility knives and1chef's knife and1bread knife. The Deluxe Set consists of

3 utility knives,1chefs knife, and1bread knife. Their profit is $30 on a Basic Set, $40 on a Regular Set, and $60on a Deluxe Set. The factory has on hand 800 utility knives, 400 chefs knives, and 200 bread knives. Assuming

all sets are sold, how many of set should be sold to maximize the profit. What is the maximum profit?

6) [>. X* *3 S, 9, a I nq,\tk>z 2 2 3 1 o o o |*» 1 * 1 ° 1

O l Q Q \ O UOO

0 lef seH

V % - Set

deluxe o o Hoo

-3.0°£ XJ. oo a o \'HO -to

2 2 :3 e>

e 2-00

tpO fAA*

CW4> I t

-R3t

icoRÿt RH-ÿR-H

W&4 o 1 l

4o

nSj Sa. S* =£0) Mfljimie-e iox,+40Xztt0Xj

Such

Y, Y*. y3Z.66

200

2.00

o -3 a

l -1 o1

tot? 124 o

o 0 o I4-2xat3ÿ3-?oc>t- y21

Yz t

iI ol o olX 0

O o l * J 2, OC> Oo"30 20 0

(vdovk-fU f R.2.X. )YJ_>*J>O

*© T

Sa. *3 &Yt Vt Y* S ,2YI4 2-X** 3*3+ S, -Sbo

X i t X2 4 + Sjÿ - Hoo

Y*- f Xj-f- 53

“3OYÿ

c? +1 © 0 200

I O “1 2. { 0 I200<5 r 2o o

a -1

oO l o 0

16 0 15 \ t#>oo0 5 0

tÿ7£>0

-200

£.~-\6ooc>

-K j-200

x,ÿ 10© 752A.CLXIIVU-OH -s- 15, oO to

I 0 0 t>«.sfc

Qj jrgCyvJL&LA-

<iziW£

Si- l»o

Yz-0 Sj-o

X3=2ooS( D

V V

s4-s

2064.2 HWK, Day 2 pg 186-187 #11, 12, 21, 22a,

YsJCfclc 10 11 c,?3

-7. Rl *•SR-T. p. '2- -3 £3 -HG.I -> R.1

O -3 o © -3 o — &>6bo o -300

_a-©—-45-€ÿ

-2- ~ 10 -X O x \ o o3 ©a.0-3 <3 2X>d>5£ 0to 2, -1 ©

5 t 50o ©3 -n-o -fc3t-E.23Pl

o-l -1 o o

t 1 o l

-| O - 2.00

© O *+£> o“V 1R t * 5 PL 3 -3 R3l0 o a 7,00a -Io - t 5 o

0 O 150

<3 o-V - 5 -t

«* °p.3 + K4 -3 £4©5to& le> © 4>0 O © U> 6 0

- 3o -46 -IBO o c o [

1 1jOOÿ<=> 0 y v 0-t o<1 o o

a0-3© %t> 0 1(0 \f 12.4-ÿ M

-fc.1 + 2-R9.

1 C5 — t C3 30 -Z.OOa. o o o 2. -2. o 400

<3 t CJ — l 7. to 2-ÿ)0

»0 12,0004oo <io 0 o 0

' \*\S “40O o-2.

e>0 o

\ MJ>OOyo o o°IS 0

V5~ p-t AT EL4 ELLf.

15 O —4 5 0 3&0 &

6 L> t> l 1 Z.OO&

°?0 -15- 3© 2.©

O- ( -t- 3 1 —=> *2- V ©o

5 o \ 5 o i 5 l0 l5o©<->o ~ 1 5 o

o 45o

- 5-3 oXc

o3 15 * o

- 5 O o 3 00o i 5 5

312.2 V P.3 -=>

Otÿ-15 O o-4So

u> o o•S4 o - 1 oo

5-15 BO ISOO o

q>5- pL2. v 4 £•+

44 S o o |t|/x5o\

3 3 <P, 6»o '2% 5 -l°loo

a a2.40 o- 2_%S

44 5 o 3 5°/T-So5 0o<0

Discrete Math B: Chapter 4, Linear Programming: The Simplex Method12

Day 5:

|4.3 Minimization Problems & Duality!(text pg 191-202)

New Matrix Term:

The transpose of a matrix A is found by exchanging the rows and columns. The transpose of an m x n matrix A is

written AT, is an n xm matrix.

[i 2]Notice the 1st row becomes the 1st column and the 2nd row

becomes the 2nd column.1 3 5

2 4 6A = AT = 3 4

5 6

Example 1: Find the transpose of the given matrix.

1 8 5 3"5 6 0 2

2 0 7 7

"2 5"-4 1

a) b)

l 5 1

S 0

5 o l

3 t 1

2. -4

5 l

Getting Started:

If we are going to minimize an objective function, we have to approach the problem a little differently.

Minimize w-Sy]+l6y2 A Standard Minimum Form

1. The objective function is to be minimized

2. All variables >0

3. All constraints are "greater than or equal to"(i.e. >)

y,+5y2>9

2yl+2y2 >10Subject to

with >0,y2 >0

Notice:

We use "w" instead of "z" for the objective function and we use "y" as our variable instead of x.

This is just to remind us we are doing a minimization problem, which needs to be approached differently.

Discrete Math B: Chapter 4, Linear Programming: The Simplex Method13

Minimize w =8y)+16y2There is a relationship between maximum and minimum problems.

JI+5ÿ2>9

2y] +2y2 >10Step 1: (For the problem at right)

Without considering slack variables, write the constraints and theobjective function (as is, not with negative coefficients) as an

augmented matrix.

Subject to

with _y]>0,-y2>0

Cansttmts

I 5 9

2 2 10

Objective function •—* W 8 16 0

Step 2: Find the transpose of the matrix.

Use this to rewrite as a maximization problem.

The maximization problem is called the "DUAL"

*1 2 8

5 2 16

MayiMI teS

£ - +•

Su-VÿecV" Vo •

Yt6v.,rZy-z.ÿllp

vjqtHn y,> of

y O

Constants»

Objective function - •£ 9 10

Graphically, what's going on (think chapter 3)

MaxtiwimProblemMinimumProblemft

(0,4)'4

(2.3)(ft 5

K' |

(f 0)

-+=“4—+—1-1—F (O.O) *12 40 ft(9,0)

.m

*s

*Corner Point w = 8y, 4- I6y2-.....* •

(0.5) 80

CTti)(9,0) 72

Tfw miriirtium Is 48 whimyt * 4 ati j>,«1*

Corner Point z ~ 9x, + lftr2

Kiÿ'Vÿy- <0-0) 0

7,ÿ «M> 40

/a#:

™ -V'A Tfce maxiraiiffl is 48 when x, = 2 mi x2 = 3

mm48 ffeirmm)f<a>3)__

IjÿKoj 28.8• #'

Discrete Math B: Chapter 4, Linear Programming: The Simplex Method

14

So, the solution to the minimization problem Minimum = 48 whenyÿ 4andy2 =l

The solution to the dual problem is Maximum = 48 when xa=2 and x2 = 3

Simplex Method

If you solve the maximization problem using simplex method:

*1 *2 Z

0 0

5 2 0 10

X2The maximum for the dual

problem is the same as the

minimum for the original

problem.

I 8

16

10 0 0 0

*j *2 h S2 Z

1 2But the solution xa and x2 is not

the correct answer to theminimization problem.

0 0

1 l 0 8-R,+Rr"*Kj

»i+R* a WllMMM*'ir'L XT*

.-4 0 5 0 1 40Do you see the correct solution(4, 1) anywhere in the tableau?

s2 z240 5 -1 08-Rl84 0 -1. 1 0

Oni (4sj)ovaRt + Ra R*

1AS LONG AS THE COEFFICIENT FOR Z IN THE LAST ROW OF THE MATRIX IS ,THE SOLUTION TO THE

slack varCaipl-e S IN THEMINIMIZATION PROBLEM IS GIVEN BY THE COEFFICIENTS OF THE

las\r. LINE OF THE MATRIX.

Example 2: State the dual problem for the linear programming problem.

SwckHv«-ÿ

w~y\ +7J3Minimize

3x,«-

IsXi 3Xa ~

vuUwrt- OC, V-j. Z-Q

3ÿ, +6ÿ2+9ÿ > -5

+9ÿSubject to:

when _y, > 0,_y2 > 0,_p3 >0

1C|

r* 1 ,] io *2> 1 3

n °\

f:\-5 15 \0

\l (» 5-5l 3 °l l5

1

“7l ?> “1 0k>

Discrete Math B: Chapter 4, Linear Programming: The Simplex Method

15

Example 3: Use the simplex method to solve.

15 2.Minimize w =2yi+y2+3y3 \ \ \

5 \ o°l t\l41

y+y2+y3ÿ

5y,+y2 >47l 3_Tÿ\0

Such that2 \ 3 o

with k>0,y2>0,y3>0

-1S* *0 MAjoMiÿe

Suck t +•5y 2. 1-

X, y *2.

3

5ÿ(?) S vXi1-2.\ o oa\o.4lolI O o

1V3\ oo(3\ o

><ÿ

b l ooao-4H

wifk t%lÿd>) ?%IC>

-1R.I +*5R2.ÿÿ

4W + 5Rt>1 4- 5**. VSi=Z

X, t-

+- S3 - 3

*S, ?z*2.'A<? 0 2-\ o3\

5 o o 3*t 0

3<?1<2OI o

6 hi2, O Hi o &

fÿT5

Si

5 \

4 0 "l 5

V o_0

o (55__ii

7.000\ 30o

300 1

18.%0.4

18.8

1 g,--»Wy*•v- 0

Discrete Math B: Chapter 4, Linear Programming: The Simplex Method

fyjmATr7tcH£D)Example 4: One gram of soybean meal provides at least 2.5 units of vitamins and 5 calories. One gram of meat

provides at least 4.5 units of vitamins and 3 calories. One gram of grain provides at least 5 units of vitamins and

10 calories. If a gram of soybean meal costs 7 cents, a gram of meat costs 9 cents, and a gram of grain costs 11

cents, what mixture of these three ingredients will provide at least 60 units of vitamins and 66 calories per

serving at a minimum cost? What will be the minimum cost?

16

2,5*i * Sfi + S, - 'OH

H»Sx, r vSx

SY.I v \ov. x + S3

-tooy.,

y'a.'vnSo »j wml

vr+o.<wtr\5 2y 5 H- 5

&.oAsrri e$ B

dost- ,0“7

55 Iff t>

3- 0

M )U*

&r *• y-t g, s, &

w- T-

Sw tk fkct-k

+ÿ 3ÿ2- *

•o7t o'H

.o3*

o O4.\ÿ3 2.5 5 l o

*0 1

5

1 o oo

t o >1]o o,0ÿ

o O o \ c>-bb “tofe2-6? (o

wijUO

-3R3+- \C>p,3, -3 R333ÿ 4-5p.1t& 6,N2.5 5

3

bo2,5 4-5 5

5 3 10 r*0.07(0 toV 2. S, Sx S* "Zrl

5 10 0. ll0.11o.n .o°i 0 .032- O

o jc? ~3 o

0 obo tow 0

'53 0,oi°i .SIIUcoci •It5 )0 o o \ OxOV-

£ - too +-W(oXx-0 <? 35 5 3.03 |-13S 0

Suck+'k*1-'ÿ

(\\2.a.vÿ

a»Sy, - ,0ÿ

y, t- 3ÿ

+ lOyÿ.ll

Si S 3s,

o d 7,

30 60

0 bO O

o -\ o ,0 310 “3 0 ,51

-10 C| 0 ,0°lWku.

yÿ\ l>3rÿ

1.23ÿparfLÿ>10£ 0

1 S.«f) I0

Follow Book Instructions Exactly

#16a, 17a, 23, 24 Set UP and State the DUAL Problem... Do not actually solve.HWK: 4.3 pg 199-200 #1, 2, 8, 9, 14

0 Sotj/[A IN

J'l-ZV

j

lU?nQj (4) -Hi

-1RI +. $ {23.

-\ O

o O 0 W.-ID £> O

5 1D Z O

-5"5 O O o - 2-

5 o o 3

-\

5 5 oo '®3% o -\0 0

t o -i 5 0 45 3

-3ÿ3+ i0jz-3s+ S PL4 (*••+

“15 -3o

4 5 3o

o o - 3

C? 10 O CJ

o -.5 3O. °f

HH 2*5 47 O 0 0

'23S 000B0-»B

•S70Bo 010-3 o5 °l447 0 002-

33 1ÿ3 + ££.4 -3 12-4

3,ÿ3o33 0

o o O 5* 0l<»5 33o

- 300 "5 30

o

o 0 3 5 13 "*ÿ3£>-135

-\p.2+-1*6-3 -}p-3>

-3d -ID 5> D — * 5" "7

C? 6> D * <* («

0 O

Gs 0 0

0 "10 C? » 0 °jo (0 o

0|{2.gÿ

~[MPo -*» 0 -na.70 O

-X7D 6s 4

3*v Tb \2.,S4

DO 0

0 0 °[00

Discrete Math B: Chapter 4, Linear Programming: The Simplex Method17

4.4 Discrete Math B

Non Standard Problems-Mixture of Maximum and Minimum

Example 1:X , f Xi *3 +• s, 100

lOX, +1X3+£2 -500

X\ y 2, v- y — S3 ~U>o

-lao-* “U>c>x 3 +-2-ÿ-0

'V-T. yÿ *5 1 $». 1ÿ\ =2-

Consider:

Maximize

z =120x, + 40:x:2 +60x3For

X| + + x3 100

lOx, +4x2 +7X3 <500

x, + x2 + x3 > 60

When

x,,x2,x3 > 0

to t>/\ •=ÿ[00

etfo - So

\ 10 o

50 o

l oo o

H3 H -1 \o 0 o

l K b o\--©---0- O

0-lio “HO -IcO o o o

fp,Vc)f US.ivÿ Column1

To solve a "non standard problem"

1. If "Minimize", convert to "Maximize" by letting w = -z

You do not need to solve using the "dual" from 4.3

Add slack variables as needed to convert to simplex tableau.

Remember: if<#, use + si if>#,use-sl2.

Check all "basic variables", if any are negative, locate a pivot.

-identify the negative basic variable coefficient-identify the positive element in that row farthest left, this tells you which column to

choose for your pivot variable.- calculate the "test ratio" for each row in that column and choose the smallest

corresponding coefficient for your pivot.

3.

Check all "basic variables", if any are negative, repeat step 3.

If none are negative, move on to step 5.

4.

Solve the problem using simplex method. If there are negative #'s in your bottom row, use the most

negative column & calculate the test ratio. Use the test ratio to identify the pivot. Pivot5.

once.

6. If all numbers in the bottom row are positive, read the solution from the tableau. If any numbers are

negative, repeat step 5.

If you changed the minimum to a maximum, change it back using w = -z7.

Discrete Math B: Chapter 4, Linear Programming: The Simplex Method

18

VJO&*.Solve:

F <ÿ

- •+ 2~<Z\

—i -I

Example 2-o \ o - ZH

4 -z. o o 7fc

6 52_

Maximize z = 3x3 +2x2 +2x3subject to x3 +x2 + 2X3 <38

2X3 + x2 + x3 >24

x1>0, x2 > 0, x3 >0

t!3O I

3P.-Z- nR-3 -*» £3with

U •*>ÿ?> o -'So “7 2.

-4-H o o 7- o

-'0 '3 -2u “t '2U-3y, -Zv2 -z* j+i-o

*« + V2sc3 t sÿ38

7-X i +

6V.

{2\ 4 B.Z-9 C-7-

O < 3> z. (

i 1

o *> '2-

0 -i o 7-moÿ

£. *. >4 2 o o 76,

V, Vi Vs \

o 3VZ.\ #-*> p- 33So1\ 2m

& o 2H4- o-1 0'S

o -| -1 o -3i11.

\7-

Oj O-Z- 2.-3t» T_ *2" 6, 0 2. z2.ÿ

f -IRZ t

3«z 4-7ÿ3-ÿ JZ-3Kfv fffColl 0*U.V-

EC cS, Sx ra,TTÿT o S»w«iUe$V

+es+!

71 5i35*-l 2-HI o c7-

11O

V7-I -I0

t

SI’°0ÿ/y,'3ÿ

%iK'°

oV.—[ft Sz. ST"Y 2_ X 3 S i

c? \ 5 x\il 3

«2_ M Z3. ""o

'06 0 7CP2-

2/ 2-ZSOyIP%%Oj

Discrete Math B: Chapters Linear Programming: The Simplex Method

19Solve

Example 3:

Minimize w =3yi+2y2

*•V " 5%' 3>

» + + £~£>

>',+3J2<62j,+j2>3

Such that

and

a M. 0,‘'W irtvÿI'

-nz.2 + z ei4?l \ \

0-4-z -t o l o “3

-2_ <P Z O tr 12-3i OA

3 2. \ o / \ ©/ \l o0 5 z t O

-\(?Z+ 2RI -3 **l-802. + 2-A3 A3

-3fcz <-ze3 P-30ÿ

(* \i-U

& M

o 3 o - «fz> o a o

S, St\i

o \ s z I *o I -\

°lo o o 3 2-?t O 3a.

3 ZA0

l.s

'o

Si"

SiT-aV “ M.*C

J\MN-4-S"

-VvJ -VJ ~ 4-V

HOMEWORK: 4.4 Day1 P209 #1,3,9,15