You are on page 1of 19

1

 If
you can only check a corner point one at a time,
which corner point do you select to maximize P?
y
P = x + 1.2 y Graphical Method
200 Corners P
2 A(0, 0) 0
D(0, 100) 3 B(90, 0) 90
100 C(48, 84)
C(48, 84) 148.8
S x  3 y  300
1 A(0, 0)
D(0, 100) 120
B(90, 0)
x
100 200 300
Algebraic Method
2 x  y  180
Corners P
1 A(0, 0) 0
How to solve LP without drawing a graph? 2 D(0, 100) 120
3 C(48, 84) 148.8
2
Algebraic representation of the LP solution space is made with
two conditions:
• All the constraints (with the exception of the non-negativity
restrictions) are equations with a non-negative RHS.
• All the variables are non-negative.

In (  ) constraints, the RHS representing the limit on the


availability of a resource, in which LHS represents the usage of
limited resource.
( ) constraint yield the unused or slack amount of the resource.
6 x1  4 x2  24 6 x1  4 x2  s1  24, s1  0

In (  ) constraints, the LHS exceeds the minimum limit represents


a surplus. A non-negative surplus variable is subtracted from LHS
of the inequality
3x1  5x2  9 3x1  5x2  s2  9, s2  0

3
Find out the number of equations (e) and variables (v) for a
LP problem v!
Ce 
v
e!(v  e)!
Example LP formulation:
Maximize Max Z = 2x1 + 3x2
Subject to 2x1 + x2  4
x1 + 2x2  5 } NOT equation!
x1, x2  0

Express LP in standard equation form:


Maximize Z − 2x1 − 3x2 − 0x3 − 0x4 = 0
Subject to 2x1 + x2 + x3 = 4 e=2, v=4
x1 + 2x2 + x4 = 5 How many
x1, x2, x3, x4  0 basic solutions?
4
v! 4!
Cev    6 basic solutions
e!(v  e)! 2!(4  2)!
The corner point can be determine algebraically by
v – e = 4 – 2 = 2 non basic variables equal to zero
Maximize Max Z = 2x1 + 3x2 + 0x3 + 0x4
Subject to 2x1 + x2 + x3 = 4
x1 + 2x2 + x4 = 5
x1, x2, x3, x4  0

Non Basic Basic Objective


Basic solution Feasible
variables variables value, Z
(x1, x2) = (0,0) (x3, x4) (x3, x4)=(4,5) Yes 0
(x1, x3) (x2, x4) (4, -3) No -
(x1, x4) (x2, x3) (2.5, 1.5) Yes 7.5
(x2, x3) (x1, x4) (2, 3) Yes 4
(x2, x4) (x1, x3) (5, -6) No -
(x3, x4) (x1, x2) (1, 2) Yes 8
(optimum) 5
Non Basic Basic Basic solution Feasible Z
(x1, x2) = (0,0) (x3, x4) A=(x3, x4)=(4,5) Yes 0
(x1, x3) (x2, x4) F=(4, -3) No -
(x1, x4) (x2, x3) B=(2.5, 1.5) Yes 7.5
(x2, x3) (x1, x4) D=(2, 3) Yes 4
(x2, x4) (x1, x3) E=(5, -6) No -
(x3, x4) (x1, x2) C=(1, 2) Yes 8

6
If the size of LP problem increases, such as,
4 equations and 8 variables:
v! 8!
Cev    70 basic solutions
e!(v  e)! 4!(8  4)!

The algebraic method  Simplex method


Simplex method: investigating only a subset of all
possible basic feasible solutions
in iterative way

7
Maximize Z = 2x1 + 3x2
 Simplex method starts
from origin (0,0), Z=0 Path of simplex algorithm:
 Increase either x1 or x2 ABC
will improve Z value
 Value x2 is increased
until reached corner B
 At B, simplex method
will increase x1 to
reach corner C, which
is optimum
 Each corner point is associated (alongside the
edges) with an iteration
8
1. Express LP in standard equation form.
2. Set up the initial simplex table.
3. Determine whether the optimal solution has
been reached by examining all entries in the
last row (Z-row).
a. If all the entries are nonnegative, the optimal
solution has been reached. Proceed to step 5.
b. If there are one or more negative entries, the
optimal solution has not been reached.
Proceed to step 4.
4. Perform the pivot operation. Return to step 3.
5. Determine the optimal solution(s).

9
Conditions for optimal solution:
a) all the variables take nonnegative values
b) the coefficients of the variables in the objective
function are all nonnegative with the coefficients
of the non-basic variables being positive.

If condition (a) fulfilled  the solution is feasible


If condition (b) fulfilled  unique optimal solution.

If this solution had been feasible, but not optimal,


we would continue the algorithm using standard
steps until the optimal solution was found.

10
maximize P  x  1.2 y
subject to 2 x  y  180 x0
x  3 y  300 y0
Express LP in standard equation form:
Maximize P − x − 1.2y + 0u + 0v = 0
Subject to 2x + y + u = 180
x + 3y + v = 300
x, y, u, v  0 u, v are slack variables
We have already performed step 1 & 2 obtaining the initial
simplex table:
Iteration 1:
VERIFY:
Basic x y u v P Solution Basic variables
must be ZERO
u 2 1 1 0 0 180
in objective
v 1 3 0 1 0 300 function
P –1 – 6/5 0 0 1 0 11
Step 3: Determine whether the optimal solution has
been reached.
 Since there are negative entries in the last row
of the table, the initial solution is not optimal.
Basic x y u v Solution Pivot Operation
1  180
180
u 2 1 1 0 180
v 1 3 0 1 300 300
3  100
P –1 – 6/5 0 0 0
Conclusion: y enters to basic variable and v leaves basic
Step 4: Perform the pivot operation.
a) Since the entry – 6/5 is the most negative entry the
second column in the table is the pivot column.
b) Divide each positive number of the pivot column into the
corresponding entry in the column of solution.
c) Select the smallest nonnegative ratio (≥0)  pivot row.
12
Step 4: Perform the pivot operation.
d)Convert the pivot element into 1
New pivot row = old pivot row  pivot element
Basic x y u v Solution
u 2 1 1 0 180
pivot row
v 1 3 0 1 300 pivot element
P –1 – 6/5 0 0 0
Conclusion: y enters to basic variable and v leaves basic

Iteration 1:
Basic x y u v Solution
u 2 1 1 0 180
vy 1/3 1 0 1/3 100
P –1 – 6/5 0 0 0
13
Step 4: Perform the pivot operation.
e) Use elementary row operations to convert the pivot
column = 0 except for the pivot element remains as 1.
For the other rows:
New row = old row − (pivot column coefficient) x (new pivot row)
Basic x y u v Solution
u 2 1 1 0 180
vy 1/3 1 0 1/3 100
P –1 – 6/5 0 0 0
Conclusion: y enters to basic variable and v leaves basic
Row u: 2 1 1 0 0 180  old row
− 1 (1/3 1 0 1/3 0 100)  new pivot row
5/3 0 1 -1/3 0 80  new row

Row P: -1 -6/5 0 0 1 0
− -6/5 (1/3 1 0 1/3 0 100)
-3/5 0 0 2/5 1 120
14
Iteration 2:
Basic x y u v Solution
u 5/3 0 1 –1/3 80
y 1/3 1 0 1/3 100
P –3/5 0 0 2/5 120

Step 3: Determine whether the optimal solution


has been reached.
Step 4: Perform the pivot operation.
Basic x y u v Solution Pivot Operation
u 5/3 0 1 –1/3 80
80
5/3  48
y 1/3 1 0 1/3 100 100
1/3  300
P –3/5 0 0 2/5 120
Conclusion: x enters to basic variable and u leaves basic
15
Iteration 2:
Basic x y u v Solution
ux 5/3 0 1 –1/3 80
y 1/3 1 0 1/3 100
P –3/5 0 0 2/5 120
Conclusion: x enters to basic variable and u leaves basic

Basic x y u v Solution
ux 1 0 3/5 –1/5 48
y 1/3 1 0 1/3 100
P –3/5 0 0 2/5 120

Basic x y u v Solution
ux 1 0 3/5 –1/5 48
y 0 1 –1/5 2/5 84
P 0 0 9/25 7/25 148 4/5
16
Step 3: Determine whether the optimal solution has
been reached.
Iteration 2:
Basic x y u v P Solution
x 1 0 3/5 –1/5 0 48
y 0 1 –1/5 2/5 0 84
P 0 0 9/25 7/25 1 148 4/5
Step 5: Determine the optimal solution(s).
 Locate the basic variables in the final table.
The basic variables = x, y, and P.
 The optimal value for x is 48.
 The optimal value for y is 84.
 The optimal value for P is 148.8.
 Thus, the firm will maximize profits at $148.80 by
producing 48 type-A souvenirs and 84 type-B
souvenirs.
17
1. Infinite solutions: If there are NO negative values in Z-row, but
there is a 0 coefficient associated with a variable that is not in the
basic. Basic x y u v Z Solution
y 0 1 1 –2 0 1
v 1 0 –1 3 0 1
Z 0 0 2 0 1 10

2. Degeneracy: The solution-column (except Z) is equal to 0. At least


one of the constraints is redundant.
Basic x y u v Z Solution
x 1 0 4/3 0 0 4
v 0 0 –5/3 1 0 0
Z 0 1/3 1 0 1 18

3. Unbounded solutions: If the Z-row has a negative coefficient,


but all the entries in the pivot column are all negative / zero (division
result in negative/ infinity). Basic x y u v Z Solution
v 9 0 -1 0 0 160
y 10 1 –1 0 0 200
Z 6 0 -1 0 1 200 18
1. In Simplex table, the intersection of any basic
variable with itself is always 1 and the rest of the
column is 0.

2. If there is a tie (more than one variables have the


same most negative or positive) in determining the
entering variable, choose any variable to be the
entering one.

3. If there is a tie in determining the leaving variable,


choose any one to be the leaving variable. In this case
a zero will appear in RHS column; therefore, a
“cycle” will occur, this means that the value of the
objective function will be the same for several
iterations.

4. If there is no Artificial variables in the problem,


there is no room for “infeasible solution”
19

You might also like