0% found this document useful (0 votes)
10 views2 pages

Ex 5 Discrete Math

Uploaded by

Manuel Flores
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

Ex 5 Discrete Math

Uploaded by

Manuel Flores
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Exercise 5

Consider the linear program given by:

maximize x 1 + 3x2 + 2x3 = Z


subject to x 1 + 3x2 + 3x3 ⩽ 6
2x1 + x2 + 2x3 ⩽ 2
x 1 + 2x2 + x3 ⩽ 3

a) Write it in equational standard form and find a basic feasible solution

x1 + 3x2 + 3x3 + s 1 ⩽ 6
2x1 + x2 + 2x3 + s2 ⩽ 2
x1 + 2x2 + x3 + s3 ⩽ 3

Basic feasible solution : (0, 0, 0, 6, 2, 3)

b) Apply the simplex method in order to find an optimal solution

Z X1 X2 X3 S1 S2 S3

1 -1 -3 -2 0 0 0 0

S1 0 1 3 3 1 0 0 6

S2 0 2 1 2 0 1 0 2

S3 0 1 2 1 0 0 1 3

We take the smallest number on the objective function and its variable will enter the basis (-3
= X2)
We then check which number limits the most the increase of X2 by dividing the total with the
coefficent of X2 on each row (6/3 = 2, 2/1 = 2, 3/2 = 1.5). We conclude that S3 will leave the
basis.

To construct the pivot row (highlighted in red) we divide the S3 row by the coefficient
intersecting S3 and X2. We will then want to get 0s on the remaining spots on the X2 column,
so we will multiply the pivot row by a number in order to get 0 on the X2 column.
Objective row + Pivot row * 3
S1 row + Pivot row * (-3)
S2 row + Pivot row * (-1)

Z X1 X2 X3 S1 S2 S3

1 1/2 0 -1/2 0 0 3/2 9/2

S1 0 -1/2 0 3/2 1 0 -3/2 3/2

S2 0 3/2 0 3/2 0 1 -1/2 1/2

X2 0 1/2 1 1/2 0 0 1/2 3/2

We take the smallest number on the objective function and its variable will enter the basis
(-1/2 = X3)
We then check which number limits the most the increase of X3 by dividing the total with the
coefficent of X3 on each row (3/2 / 3/2 = 1, 1/2 / 3/2 = 1/3, 3/2 / 1/2 = 3). We conclude that S2
will leave the basis.

To construct the pivot row (highlighted in red) we divide the S2 row by the coefficient
intersecting S2 and X3. We will then want to get 0s on the remaining spots on the X3 column,
so we will multiply the pivot row by a number in order to get 0 on the X3 column.
Objective row + Pivot row * 1/2
S1 row + Pivot row * (-3/2)
X2 row + Pivot row * (-1/2)

Z X1 X2 X3 S1 S2 S3

1 1 0 0 0 1/3 4/3 14/3

S1 0 -2 0 0 1 -1 -1 1

X3 0 1 0 1 0 2/3 -1/3 1/3

X2 0 0 1 0 0 -1/3 2/3 4/3

4 1
Optimal solution = 0, , , 1, 0, 0
3 3

You might also like