Sie sind auf Seite 1von 45

Graphical

method
The graphical method is a solution method when you have 2 variables (maximum 3, using graphs
and figures in three dimensions).

Step 1. Graph the constraints and find the region of feasible solutions (feasible region).

Step 2. Graph the objective function and slide it, according to the objective (maximize or
minimize) to the optimal point, if it exists.

Step 3. Find the optimal values for xi and z.


Example:
Min z= x1 + x2
s.t.
2x1 + 1x2 ≥ 12
2x1 + 3x2 ≥ 18
Feasible region
x1, x2 ≥ 0

For each constraint, find two points to draw the


corresponding line. We can find the
corresponding coordinates by substituting x1 = 0
and solving for x2, and vice versa.
2x1 + 1x2 ≥ 12 (0,12)(6,0)
2x1 + 3x2 ≥ 18 (0,6)(9,0)
x1, x2 ≥ 0
We do not necessarily have to use 0; we can use Note: This chart is not
any convenient values. completely to scale.
For the objective function, assign arbitrary
values to find two coordinates in which the
relation of the objective function is fulfilled.
Increase direction of the
objective function
Min z= x1 + x2

Decrease
direction of
the objective
function

Note: This chart is not


completely to scale.
Subsequently, move the objective function in
the direction of decrease, as far as the region
of feasible solutions allows.
Min z= x1 + x2 Increase direction of the
objective function

Decrease
direction of
the objective
function

Optimal
point:
X1* = 4.5
X2* = 3
z*= 7.5 Z*= 7.5

Note: This chart is not


completely to scale.
.
Types of solutions
1. Unique optimal solution
2. Multiple optimal solution
3. Unbounded solution
4. Infeasible solution.
The unique optimal solution is like the one in the previous example.
In the multiple optimal solution, the objective function is parallel to one of the constraints and the
direction in which it moves to achieve the desired objective (maximize or minimize, as the case may
be) makes it merge with the constraint.
The unbounded solution exists only in unbounded regions, but only if the objective function moves in
the direction of the unbounded part.
The infeasible solution occurs when there is no feasible solution region when plotting the restrictions,
either because the constraints are pure equations that do not cross at the same point, or because in
the constraints with inequalities one or more does not join with the others .
Examples
Optimality
direction

Objective function Unbounded feasible


parallel to a constraint region AND objective
AND optimality direction function moving in the
makes it merge with it. direction of the
unbounded part.

Multiple Unbounded
solution solution
Infeasible Infeasible
solution solution
Software
QM for Windows
Download at:
http://wps.prenhall.com/bp_taylor_introms_11/220/56508/14466195.cw/content/
Standard and canonical forms of Linear
Programming models. Transformation from one
form to another. Unrestricted variables.
STANDARD FORM CANONICAL FORM

1. All constraints are equations (not inequalities) 1. All constraints are inequalities (≥ in
minimization and ≤ in maximization).
2. All variables are non-negative
2. All variables are non-negative
3. The objective function can be maximization or
minimization 3. The objective function can be maximization
Min or Max z = or minimization.

s.t Min z s. t. ≥ xi ≥ 0 for all i.

= or

xi ≥ 0 for all i. Max z s. t. ≤ xi ≥ 0 for all i.


Model manipulation
(to convert from canonical format to standard format,
or from standard format to canonical format)
To change from inequality (≥, ≤) to equation (=)
Add slack variables to (or subtract surplus variables from) the left-hand side of the constraint.
Example:
If the constraint is:
x1 + 2x2 ≤ 6 Add slack variable s1 ≥ 0 to the left-hand side to obtain
x1 + 2x2 + s1 = 6, s1 ≥ 0
If the constraint is:
3x1 + 2x2 -3x3 ≥ 5 Subtract surplus variable s2 ≥ 0 to the left-hand side to obtain
3x1 + 2x2 -3x3 – s2 = 5, s2 ≥ 0
To convert from equation (=) to inequality (≥, ≤)
Each equation is changed into two inequalities (one is ≥, the other one is ≤)
Then, multiply one of those equations times -1 to change the direction of the
inequality, in such way that minimization problems have ≥ constraints, and
maximization problems have ≤ constraints.
Example:
Constraints in Max problems
2x1 + 6x2 + 9x3 = 1000
Step 1: Convert the equation Step 2: Multiply one constraint by -1
into two inequalities so both are of type ≤
2x1 + 6x2 + 9x3 ≥1000 -2x1 - 6x2 - 9x3 ≤ -1000
2x1 + 6x2 + 9x3 ≤ 1000 2x1 + 6x2 + 9x3 ≤ 1000
Variable manipulation to convert them to non-negative
ØIf the variable is unrestricted, we can express it in terms of two non-negative variables by
substituting:
yi = y’i – y’’i y’i, y’’i ≥ 0
With a different notation, if xj is URS (in Spanish NR), we may substitute xj with B-C, where B ≥ 0
and C ≥ 0.
ØIf the variable is negative, express it in terms of a non-negative variable by substituting:
xk ≤ 0 replace with xk = -A where A ≥ 0
Example x1 = A-B x2 = -C x3 = D-E x4 Does not need any changes

Original Problem Standard Form


6(A-B) -3(-C) 7(D-E)
Min z = 6x1 -3x2 +7x3 -7x4 Min z = 6A -6B +3C +7D -7E -7x4 +0S1 +0S3
s.t. s.t.
x1 - ½x2 +⅓x3 +⅘x4 ≥ 68 A -B +½C +⅓D -⅓E +⅘x4 –S1 = 68
-2x1 +3x2 -5x3 +8x4 = 87 -2A +2B -3C -5D +5E +8x4 = 87 It is recommended to
use the constraint
½x1 -⅛x2 +1/9x3 -1/10x4 ≤ 100 number as subscript in
½A -½B +⅛C +1/9D -1/9E -1/10x4 +S3 = 100 the slack/surplus
x1 URS, x2 ≤ 0 , x3 URS, X4 ≥ 0 variables.
A, B, C, D, E, X4, S1, S3 ≥ 0
Note URS means “unrestricted”
(NR means “no restringida”)
Example x1 = A-B x2 = -C x3 = D-E x4 Does not need changes

Standard Form Canonical Form

Min z = 6A -6B +3C +7D -7E -7x4 Min z = 6A -6B +3C +7D -7E -7x4
s.t. s.t. Constraint 1 without
slack (or, in this case,
A -B +½C +⅓D -⅓E +⅘x4 –S1 = 68 A -B +½C +⅓D -⅓E +⅘x4 ≥ 68 surplus)

Constraint 2 is written
twice (one with ≥ and
-2A +2B -3C -5D +5E +8x4 ≥ 87 the other one with ≤
-2A +2B -3C -5D +5E +8x4 = 87
+2A -2B +3C +5D -5E -8x4 ≥ -87 and multiply one –in
this case, the second
one, by -1)
½A -½B +⅛C +1/9D -1/9E -1/10x4 +S3 = 100 -½A +½B -⅛C -1/9D +1/9E +1/10x4 ≥ -100 Constraint 3, without
slack, is multiplied by -1
to make it ≥
A, B, C, D, E, X4, S1, S3 ≥ 0 A, B, C, D, E, X4 ≥ 0
Simplex Method using Matrices (Algorithm)
1. Convert to standard form, and then express in matrix notation.
2. Choose a starting basic feasible solution (BFS) with basis B (usually, with the slack variables).
Nonbasic Variables (NBV or XN) = 0 Basic Variables (BV or XB) different from 0.
The NBV form matrix N. The BV form matrix B.
In a basic solution, matrix B has inverse B-1.
The solution is feasible if xB = B-1b ≥ 0
3. Is it optimal? (If so, stop; otherwise, go to step 4).
Costos marginales = Matriz de costos básicos * Inversa de B * vector j de la matriz tecnológica – su costo en la función objetivo.

Calculate the marginal costs zj-cj for all nonbasic variables: zj - cj = CB B-1 aj - cj j ∈ N
Optimality criteria:
If zj-cj ≥ 0 ∀ j ∈ N in maximization problems, ⇒ the BFS is optimal
If zj-cj ≤ 0 ∀ j ∈ N in minimization problems, ⇒ the BFS is optimal
4. Choose the entering variable (Which variable enters the basis)
In maximization problems: Choose the variable with the most negative zj – cj zj-cj << 0
In minimization problems: Choose the variable with the most positive zj – cj zj-cj >> 0

5. Choose the exiting variable (Which variable leaves the basis?)


Calculate yk = B-1 ak
Feasibility criterion called minimum ratio test (for both min and max problems):
$% - 𝑚𝑖𝑛𝑖𝑚𝑢𝑚 -6
xk = minimum , 𝑦* >0 You may also find it as & . = : 𝑦6* >0
&' .' 1≤𝑖≤𝑚 &7'

6. Update the basis B and calculate XB and z.


7. Go to step 3: Is it optimal?
Example
Max z = 3x1 + 5x2
s.t.
x1 ≤ 4
2x2 ≤ 12
3x1 + 2x2 ≤ 18
x1, x2 ≥ 0
Example. Step 1. Convert to standard
form.
ORIGINAL PROBLEM STANDARD FORM

Max z = 3x1 + 5x2 Max z = 3x1 + 5x2 +0S1 +0S2 +0S3


s.t. s.t.
x1 ≤ 4 x1 +S1 = 4
2x2 ≤ 12 2x2 +S2 = 12
3x1 + 2x2 ≤ 18 3x1 + 2x2 +S3 = 18
x1, x2 ≥ 0 x1, x2 , S1, S2, S3 ≥ 0
In Matrix notation s.t.
a1 a2 as1 as2 as3
Max z = ( 3 5 0 0 0 ) x1 x1 4
1 0 1 0 0
x2 x 0 2 0 1 0 x2 12
(variable =
c
(cost vector) s1 vector) 3 2 0 0 1 s1 18
It is always a It is always a
row vector. s2 column s2
It contains as vector. It
many elements s3 contains the A s3
as variables in variables. b
Constraint matrix (resource
the problem. (matrix of vector)
technological x
coefficients). (variable
vector)
We will partition these matrices and vectors to
distinguish basic and nonbasic variables.
s.t
a1 a2 as1 as2 as3
Max z = ( 3 5 0 0 0 ) x1 xN x1 4
(vector of 1 0 1 0 0 xN
x2 nonbasic 0 2 0 1 0 x2 12
cN cB
variables) =
(vector of (vector of
s1 3 2 0 0 1 s1 18
nonbasic basic
costs). costs). xB
s2 s2 xB
(vector of
basic N B
s3 variables) (basic s3
b
matrix)
In this (vector of
moment, resources)
x
it is the (vector of
identity
variables)
matrix.
In matrix notation, our problem is:
Max z = ( CN , CB) xN This is,
xB Max z = CNXN + CBXB
s. t. s.t.
(N, B) NXN + BXB = b
xN
= b We need matrix B to
xB
From there, we solve for XB have inverse, otherwise,
that solution cannot be
basic.
XB = B-1b –B-1NXN

Since the nonbasic variables are equal to 0, we


If XB = B-1b is negative, it implies that this solution only calculate
is not feasible (remember that in the standard XB = B-1b
form all variables have to be non-negative).
Let us choose other basic and nonbasic variables
to illustrate this point (not a good choice)
Nonbasic variables: S1 = S2 = 0 Now, we will check if B is feasible, that is, if all the
elements of vector XB = B-1b are positive.
Basic variables: x1, x2, S3
(we need 3 variables because we have 3
constraints)
In this case, 1 0 0 4 4 x1
x2
XB = 0 ½ 0 12 = 6
-3 -1 1 18 -6 s3
Does B have
a1 a2 as3 inverse? Yes.
This combination is basic, but infeasible, because at
1 0 0 1 0 0 least one of the elements of vector XB (the one that
corresponds to the value of s3) is negative. It is not
B = 0 2 0 B-1 = 0 ½ 0 useful. We need another combination of basic
3 2 1 -3 -1 1 variables with which we can form a basic feasible
solution.
A basic feasible solution we can quickly find is to use
It is basic (B has inverse) the slack variables, which form the identity matrix.
This way, we ensure that it has inverse.
Back to the initially proposed solution (use slack
variables as basic variables)…
s.t
a1 a2 as1 as2 as3
Max z = ( 3 5 0 0 0 ) x1 xN x1 4
(vector of 1 0 1 0 0 xN
x2 nonbasic 0 2 0 1 0 x2 12
cN cB
variables) =
(vector of (vector of
s1 3 2 0 0 1 s1 18
nonbasic basic
costs). costs). xB
s2 s2 xB
(vector of
basic N B
s3 variables) (basic s3
b
matrix)
In this (vector of
moment, resources)
x
it is the (vector of
identity
variables)
matrix.
Step 2. Find a basic feasible solution.
Let us check if this starting solution is basic and feasible.
Nonbasic variables: x1, x2 = 0 Is it feasible? Yes. All the elements of vector
Basic variables: S1, S2, S3 XB = B-1b are positive.
(we need 3 basic variables because we have 3
constraints) 1 0 0 4 4 S1
Does B have 0 1 0 12 12 S2
In this case, inverse? Yes, XB = =
0 0 1 18 18 S3
because it is the
as1 as2 as3 identity matrix.

1 0 0 1 0 0 What is the value of objective function z with this


B = 0 1 0 B-1 = 0 1 0 starting basic feasible solution?
0 0 1 0 0 1
z = CBXB = ( 0 0 0 )
4
12 = 0
It is basic (B has inverse) 18
Step 3. Is it optimal?
Calculate the marginal costs zj-cj for all zj - cj = CB B-1 aj – cj
nonbasic variables: a1
zj - cj = CB B-1 aj - cj j ∈ N z1 – c1 = ( 0 0 0 ) 1 0 0 1 -3 = 0 – 3 = -3
Optimality criterion (in maximization 0 1 0 0
problems): 0 0 1 3
If zj-cj ≥ 0 ∀ j ∈ N ⇒ it is optimal
a2

In our current solution, the nonbasic variables z2 – c2 = ( 0 0 0 ) 1 0 0 0 -5 = 0 – 5 = -5


are x1 and x2. 0 1 0 2
Therefore, we have to check if both z1-c1 and 0 0 1 2
z2-c2 are greater tan or equal to 0.
It would be enough for us that one of these be negative
(to know that this solution is not optimal), and both are.
The solution is not optimal, we need a different one.
Step 4. Choose the entering variable (the
variable that enters to the basis)
In maximization problems: Choose the variable This will increase the value of the objective
with the most negative zj – cj that is, zj-cj << 0 function.

In the previous step, we found that:


z1 – c1 = -3
z2 – c2 = -5
Therefore, x2 enters the basis
Step 5. Choose the exiting variable (the
variable that leaves the basis)
Calculate yk = B-1 ak a2 We will divide elementwise (element by
element), vector XB divided by vector y2 (only
y2 because 1 0 0 0 0 the elements of y2 that are strictly greater tan
the entering y2 = B-1 a2 = 0 1 0 2 2 0), and choose the minimum of those
variable is x2 = quotients.
0 0 1 2 2

4 0
XB = 12 y2 = 2
Feasibility criterion (minimum ratio test) for 18 2
both min and max problems:
$%
xk = min , 𝑦* >0
&'
X2 = min { --- , 12/2 , 18/2 } = 6
With the feasibility criterion we ensure we preserve s1, s2, s3
the non-negativity in the new solution.
S2 leaves the basis.
Step 6. With the new basis, calculate XB
and z.
In the previous basis: Is it feasible? Yes. All elements in vector
Basic variables: S1, S2, S3 XB = B-1b are positive.
In the new basis:
1 0 0 4 4 S1
Basic variables : S1, X2, S3
0 ½ 0 12 6 x2
XB = =
0 -1 1 18 6 S3
as1 a2 as3

1 0 0 1 0 0 What is the value of the objective function z with


B = 0 2 0 B-1 = 0 ½ 0 this basic feasible solution?
0 2 1 0 -1 1
z = CBXB = ( 0 5 0 ) 4 = 30
6
6
Go back to step 3. Is it optimal?
Calculate the marginal costs zj-cj for all nonbasic zj - cj = CB B-1 aj – cj
variables: a1
zj - cj = CB B-1 aj - cj j ∈ N z1 – c1 = ( 0 5 0 )
1 0 0 1 -3 = -3
0 ½ 0 0
Optimality criterion (in maximization problems): 0 -1 1 3
If zj-cj ≥ 0 ∀ j ∈ N ⇒ it is optimal
as2

zs2 – cs2= ( 0 5 0 ) -0 = 5/2


In our current solution, the nonbasic variables 1 0 0 0
are x1 and S2. 0 ½ 0 1
0 -1 1 0
Therefore, we have to check that both z1-c1 and
zs2-cs2 are greater tan or equal to 0.
It is not optimal because z1-c1 is negative.
Step 4. Which variable enters the basis?
x1 of course!
(The only remaining negative value)

z1 – c1 = -3
zs2 – cs2= 5/2

The variable that enters the basis is x1


Step 5. Choose the exiting variable
(Which variable leaves the basis?)
Calculate yk = B-1 ak a1 We will divide elementwise, vector XB by
vector y2 (only the elements of y2 that are
y1 because the
1 0 0 1 1 strictly greater than 0) and choose the
entering variable
y1 = B a1 = 0 ½ 0
-1
0 = 0 minimum among those quotients.
is x1
0 -1 1 3 3

4 1
XB = 6 y1 = 0
Feasibility criterion (minimum ratio test) for 6 3
both min and max problems:
$%
xk = min , 𝑦* >0 X2 = min {4/1, --- , 6/3 } = 2
&'
This preserves the non-negativity in the new s1, x2, s3
solution.
S3 exits the basis.
Step 6. With the new basis, calculate XB
and z.
In the previous basis: Is it feasible? Yes. All the elements of vector
Basic variables: S1, X2, S3 XB = B-1b are positive.
In the new basis:
1 ⅓ -⅓ 4 2 S1
Basic variables: S1, X2, X1
0 ½ 0 12 6 x2
XB = =
0 - ⅓ ⅓ 18 2 x1
as1 a2 a1

1 0 1 1 ⅓ -⅓ What is the value of the objective function z with


B = 0 2 0 B-1 = 0 ½ 0 this basic feasible solution?
0 2 3 0 - ⅓ ⅓
z = CBXB = ( 0 5 3 ) 2 = 36
6
2
Go back to step 3. Is it optimal?
Calculate the marginal costs zj-cj for all zj - cj = CB B-1 aj – cj
nonbasic variables: zj - cj = CB B-1 aj - cj j ∈ N as3

Optimality criterion (in maximization zs3 – cs3=( 0 5 3 ) 1 ⅓ -⅓ 0 -0 = 1


problems) :
0 ½ 0 0
If zj-cj ≥ 0 ∀ j ∈ N ⇒ it is optimal 0 - ⅓ ⅓ 1

as2
In our current solution, the nonbasic variables
are S3 and S2. 0 -0 = 3/2
zs2 – cs2= ( 0 5 3 ) 1 ⅓ -⅓
0 ½ 0 1
Therefore, we have to check whether both 0 - ⅓ ⅓ 0
zs3-cs3 and zs2-cs2 are greater tan or equal to 0.
It is optimal because all zj-cj are positive.
The optimal solution is:
z* = 36
CBXB
x1* = 2
x2* = 6
Come from XB
S1* = 2
S2* = 0
S3* = 0 Nonbasic
variables = 0

With the initial solution, where the basis was S1, S2 S3, z = 0.
With the next solution, where the basis was S1, x2 S3, z = 30.
With the optimal solution, where the basis is S1, x2 x1, z* = 36.
Optimality criteria in different types of
solutions:
Unique solution:
If zj-cj ≥ 0 ∀ j ∈ N in maximization problems, ⇒ the solution is optimal
If zj-cj ≤ 0 ∀ j ∈ N in minimization problems, ⇒ the solution is optimal

Multiple solutions:
There is a zj-cj = 0 in the optimal solution

Unbounded solution:
$%
It is not possible to find xk = min , 𝑦* > 0 , that is, yk ≤ 0 in all positions.
&'
Exercises
Min z = -x1 –x2 Max z = 2x1 +3x2
s.t. s.t.
x1 – x2 ≤ 1 x1 – x2 ≤ 1
x1 + x2 ≤ 2 x1 -2x2 ≤ 2
x1, x2 ≥ 0 x1, x2 ≥ 0

Note: This problem has multiple solutions. Note: This problem has an unbounded solution.
(There is a zj-cj = 0 in the optimal solution)
z*=-2, x1*=0, x2*=2, s1*=3 s2*=0
z*=-2, x1*=1.5, x2*=0.5, s1*=0 s2*=0
Simplex tableau (Método simplex tabular)
z xB xN RHS

z 1 0 cBB-1N-cN cBB-1b
xB 0 I B-1N B-1b

cB xB b: XN XB

cB xB B-1b B-1N I
(each B-1ai) (Each B-1ai)
(initially 0)

cBB-1b cBB-1N-cN 0
(that is, z) (that is, zj-cj) (that is zj-cj)
Example
ORIGINAL PROBLEM STANDARD FORM

Max z = 4x1 +x2 Max z = 4x1 +1x2 + 0s1 + 0s2 + 0s3


s.t. s.t.
2x1 +x2 ≤ 8 2x1 +1x2 +1S1 +0S2 +0S3 = 8
x2 ≤ 5 0x1 +1x2 +0S1 +1S2 +0S3 = 5
x1 -x2 ≤ 4 1x1 -1x2 +0S1 +0s2 +1s3 = 4
x1, x2 ≥ 0 x1, x2, s1, s2, s3 ≥ 0
Coef. of VB: S1, S2, S3
Basic B-1b B-1ai
basic variables Value of the VNB: X1, X2
variables (listed) basic
in the variables
objective
function

CB XB b: x1 x2 s1 s2 s3
Max z = 4x1 +1x2 + 0s1 + 0s2 + 0s3
0 S1 8 2 1 1 0 0
s.t.
0 S2 5 0 1 0 1 0
0 S3 4 1 -1 0 0 1 2x1 +1x2 +1S1 +0S2 +0S3 = 8
0x1 +1x2 +0S1 +1S2 +0S3 = 5
1x1 -1x2 +0S1 +0s2 +1s3 = 4
x1, x2 ≥ 0
Coef. of VB: S1, S2, S3
Basic B-1b B-1ai
basic variables Value of the VNB: X1, X2
variables basic
in the O.F. variables

z = cBƃ = (0*8 + 0*5 +0*4) = 0. In the starting solution z=0.


CB XB b: x1 x2 s1 s2 s3
z1-c1 = cBx1-c1 = (0*2 + 0*0 +0*1) - 4 = -4
0 S1 8 2 1 1 0 0
z2-c2 = cBx2-c2 = (0*1 + 0*1 +0*-1) - 1 = -1
0 S2 5 0 1 0 1 0
0 S3 4 1 -1 0 0 1 zs1-cs1 = cBs1-cs1 = (0*1 + 0*0 +0*0) - 0 = 0
zs2-cs2 = cBs2-cs2 = (0*0 + 0*1 +0*0) - 0 = 0
0 -4 -1 0 0 0 zs3-cs3 = cBs3-cs3 = (0*0 + 0*0 +0*1) - 0 = 0

Not optimal, there are zj-cj ≤ 0 ∀ j ∈ VNB New basis: x1 enters (the most negative; -4 is more negative than -1).

1 0 0 2 2
y1 = B-1 a1 = 0 1 0 * 0 = 0 There is a tie, I choose the
0 0 1 1 1
s1, s2, s3 variable I want, but only
𝑠= 8 2 one. S1 exits.
-: E G
Exits min , 𝑦* > 0 = min 𝑠> 5 ÷ 0 = min , −, = min 4, −, 4
&' > =
𝑠? 4 1
Coef. of New basis:
Basic B-1b B-1ai
basic variables Value of the
variables VB: X1, S2, S3
basic
in the O.F. variables VNB: S1, X2

CB XB b: x1 x2 s1 s2 s3
0 S1 8 2 1 1 0 0 We have to form the identity matrix in
0 S2 5 0 1 0 1 0 the columns under the basic variables.
0 S3 4 1 -1 0 0 1
0 -4 -1 0 0 0
4 X1 4 1 ½ ½ 0 0 R1’ = R1/ 2 (because it has to
become 1)
0 S2 5 0 1 0 1 0
R2’ = R2 (because it was already 0)
0 S3 0 0 -3/2 -1/2 0 1
R3’ = R3 – R1’

New row 1: 8/2=4 2/2=1 1/2=½ 1/2=½ 0/2=0 0/2=0


New row 2: Old row 2 (because we already had 0 in that position)
New row 3: 4-4=0 1-1=0 -1-½=-3/2 0-½=-½ 0-0=0 1-0=1
Coef. of New basis:
Basic B-1b B-1ai
basic variables Value of the
variables VB: X1, S2, S3
basic
in the O.F. variables VNB: S1, X2

CB XB b: x1 x2 s1 s2 s3
0 S1 8 2 1 1 0 0
0 S2 5 0 1 0 1 0
0 S3 4 1 -1 0 0 1
0 -4 -1 0 0 0 z = cBƃ = (4*4 + 0*5 +0*0) = 16
4 X1 4 1 ½ ½ 0 0 z1-c1 = cBx1-c1 = (4*1 + 0*0 +0*0) - 4 = 0
0 S2 5 0 1 0 1 0 z2-c2 = cBx2-c2 = (4*1/2 + 0*1 +0*-3/2) - 1 = 1
0 S3 0 0 -3/2 -1/2 0 1
zs1-cs1 = cBs1-cs1 = (4*1/2 + 0*0 +0*-1/2) - 0 = 2
zs2-cs2 = cBs2-cs2 = (4*0 + 0*1 +0*0) - 0 = 0
16 0 1 2 0 0 zs3-cs3 = cBs3-cs3 = (4*0 + 0*0 +0*1) - 0 = 0

It is optimal (there are no negatives in max). Unique solution, there are no zeros in the marginal costs of the
nonbasic variables.
Coef. of New basis:
Basic B-1b B-1ai
basic variables Value of the
variables VB: X1, S2, S3
basic
in the O.F. variables VNB: S1, X2

a1 as2 as3
CB XB b: x1 x2 s1 s2 s3
0 S1 8 2 1 1 0 0 2 0 0 ½ 0 0
B = 0 1 0 B-1 = 0 1 0
0 S2 5 0 1 0 1 0 1 0 1 -½ 0 1
0 S3 4 1 -1 0 0 1
0 -4 -1 0 0 0
4 X1 4 1 ½ ½ 0 0
Notice that where we originally had the
0 S2 5 0 1 0 1 0 identity matrix, now we have B-1
0 S3 0 0 -3/2 -1/2 0 1
16 0 1 2 0 0
Degeneracy and redundancy
Degeneracy: a basic variable with a value of 0.
It usually implies that there exists redundancy in the constraints.
If there exists more than one basis that represents an extreme point (vertex), that extreme point is
degenerate.

Max z=3x1 + 9x2


s.t.
x1 +4x2 ≤ 8 (redundant)
x1 +2x2 ≤ 4
x1, x2 ≥ 0
When we have degeneracy, we simply change basis while we remain in the same point.
Sometimes this leads to cycling, that is, using the same sequence of basis over and over, without
reaching the optimal point :
B1, B2, …, Bt, where Bt = B1.
In order to avoid cycling, when we decide which variable enters the basis and which one exits, if
we have a tie, we do not choose randomly; we always choose the variable with the smallest
subscript. This is called the “lexicographic rule”.

Suppose there is a tie between x1 and x2. According to the lexicographic rule, we should choose
x1.

Das könnte Ihnen auch gefallen