Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 21

Linear programming

Mathematical Methods for Business


Objectives
• To represent geometrically a linear inequality in two variables.
• To state a linear programming problem and solve it geometrically.
• To consider situations in which a linear programming problem exists.
• To introduce the simplex method.
• To solve problems using the simplex method.
• To introduce use of artificial variables.
• To learn alteration of objective function.
• To define the dual of a linear programming problem.
Linear Inequalities in 2 Variables

• Linear inequality is written as


ax  by  c  0 or
ax  by  c  0 or
ax  by  c  0 or
ax  by  c  0

where a, b, c = constants and not both a and b are zero.


• A solid line is included in the solution and a dashed line is not.
Example 1 – Solving a Linear Inequality

Find the region defined by the inequality y ≤ 5.

Solution:
The region consists of the line y = 5
and with the half-plane below it.
Example 3 – Solving a System of Linear Inequalities

Solve the system y  2 x  10


y  x  2
Solution:
The solution is the unshaded region.
Linear Programming

• A linear function in x and y has the form


P  ax  by
• The function to be maximized or minimized is called the
objective function.
Example 1 – Solving a Linear Programming Problem

Maximize the objective function P = 3x + y subject


to the constraints 2 x  y  8
2 x  3 y  12
x0
y 0
Solution:
The feasible region is nonempty and bounded.
Evaluating Z at these points, we obtain:

Z A   30   0  0
Z B   34   0  12
Z C   33   2  11
Z D   30   4  4

The maximum value of Z occurs when x = 4 and y = 0.


Example 3 – Unbounded Feasible Region

The information for a produce is summarized as follows:

If the grower wishes to minimize cost while still maintaining the


nutrients required, how many bags of each brand should be bought?
Solution:
Let x = number of bags of Fast Grow bought
y = number of bags of Easy Grow bought

To minimize the cost function C  8 x  6 y


Subject to the constraints
3 x  2y  160
5 x  2y  200
x  2y  80
x0
y 0
There is no maximum value
since the feasible region is unbounded .
Multiple Optimum Solutions

• There may be multiple optimum solutions for an objective function.


Example 1 – Multiple Optimum Solutions

Maximize Z = 2x + 4y subject x  4 y  8
to the constraints x  2y  16
Solution: x, y  0
The region is nonempty and bounded.

Z A   20   42  8
Z B   28   44   32 (max)
Z C   20   48   32 (max)
The Simplex Method

Standard Linear Programming Problem


• Maximize the linear function Z  c1x1  c 2 x 2    c n x n
subject to the constraints
a11 x1  a12 x 2    a1n x n  b1 
a11 x1  a12 x 2    a1n x n  b1 
a11 x1  a12 x 2    a1n x n  b1 

. 
where x and b are non-negative. . 

am1x1  am 2 x 2    amn x n  bm 
Example 1 – The Simplex Method

 x1  x 2  20

Maximize Z  5 x1  4 x2 subject to  2 x1  x 2  35 and x 1, x2 ≥ 0.
 3 x  x  12
 1 2

Solution:

B x1 x2 s1 s2 s3 Z R B x1 x2 s1 s2 s3 Z R
s1  1 1 1 0 0 0 20 x2 0 1 2 1 0 0 5
   
s2  2 1 0 1 0 0 35  x1 1 0 1 1 0 0 15 
s3   3 1 0 0 0 0 12  s3 0 0 5 4 1 0 52
   
Z  5  4 0 0 0 1 0  Z 0 0 3 1 0 1 95

The maximum value of Z is 95.


7.5 Degeneracy, Unbounded and Multiple Solutions

Degeneracy
• A basic feasible solution (BFS) is degenerate if one of the basic variables
is 0.
Unbounded Solutions
• An unbounded solution occurs when the objective function has no
maximum value.
Multiple Optimum Solutions
• Multiple (optimum) solutions occur when there are different BFS.
Example 1 – Unbounded Solution

 5 x1  6 x 2  2 x3  30

Maximize Z  x1  4 x 2  x3subject to   x1  3 x 2  6 x3  12
 x1, x 2 , x3  0

Solution:
B x1 x2 s1 s2 s3 Z R B x1 x2 s1 s2 s3 Z R
s1 - 5 6 - 2 1 0 0 30  s1  - 3 0 - 14 1 - 2 0 6 
   
s2  - 1 3 6 0 1 0 12  x2 - 13 1 2 0 13 0 4 
Z  - 1 - 4 - 1 0 0 1 0  Z - 73 0 9 0 43 1 16 

Since the 1st two rows of the x1-column are negative, no quotients
exist.
Hence, it has an unbounded solution.
Artificial Variables

• Use artificial variables to handle maximization problems that are not of


standard form.

Example 1 – Artificial Variables  x  x  12
1 2

Maximize Z  2 x1  x 2 subject to x1  2x2  20
  x1  x 2  2
Solution: 
 x1, x 2  0
Add an artificial variable t, x  x  s  12
1 2 1

x1  2 x 2  s2  20
 x1  x 2  s3  t  2
Consider an artificial objective equation,
 2 x1  x 2  Mt  W  0
Construct a Simplex Table,
B x` x2 s1 s2 s3 t W R B x` x2 s1 s2 s3 Z R
s1  1 1 1 0 0 12 
0 0 s1 1 0 1
2 0 1
2 0 5
s2  1 2 0 1 0 0 0 20   0  32 0 1 
s 2 0 1 1
2
t  1 1 0 0 1 1 0 2  t 0 1 1
0  12 0 7
  2
W  2  M  1  M 0 0 M 0 1  2M   
W 0 0 3
2 0 1
2 1 17

All indicators are nonnegative.


The maximum value of Z is 17.
Example 3 – An Empty Feasible Region

Use the simplex method to maximize Z  2 x1 3x2


subject to  x  x  2

1 2

 x1  x2  1
 x ,x 0
 1 2
Solution:
Construct a Simplex Table,
B x1 x2 s1 s2 t1 W R
t1   1 1 1 0 1 0 2  B x1 x2 s1 s2 t1 W R
s2  1 1 0 1 0 0 1  t1   2 0 1 1 1 0 1 
W  2  M  1  M M 0 0 1  2M  s2  1 1 0 1 0 0 1 
W  1  2M 0 M 1  M 0 1 1  M 

The feasible region is empty, hence, no solution exists.


Minimization
• To minimize a function is to maximize the negative of the function.

Example 1 – Minimization

 2 x1  x 2  1
Minimize Z  x1  2x 2 subject to   x1  x2  2
 x ,x  0
Solution:  1 2
Construct a Simplex Table,
B x1 x2 s1 s2 t1 t 2 W R B x1 x 2 s1 s2 t1 t2 W R
t1   2 1 1 0 1 0 0 1  t1   1 1 0  1 0 1 0 2
t 2  1 1 0 1 0 1 0 2  t 2  1 0 1  1  1 1 0 1 
W 1  3M 2  2M M M 0 0 1  3M  W  3 0 0 2 M  2  M 1  4

The minimum value of Z is −(−4) = 4.


The Dual
Example 1 – Finding the Dual of a Maximization Problem

Find the dual of the following:  x1  2 x 2  10


Maximize Z  3 x1  4 x2  2x3 subject to 2x  2x  x  10
 1 2 3
where x1, x 2 , x3  0

Solution:  3 x1  x 2  2

The dual is minimize W  10 y 1  10 y 2subject to   x1  x 2  1
 4 x  x  3
 1 2
where y 1, y 2  0
Example 3 – Applying the Simplex Method to the Dual

Use the dual and the simplex method to maximize Z  4 x1  x2  x3


subject to 3 x1  x2  x3  4 where x1, x 2 , x3  0
 x1  x 2  x3  2

Solution:  3y1  y 2  4
 y  y  1
The dual is minimize W  4 y1  2 y2 subject to  1 2
 y 1  y 2  1

The final Simplex Table is B y 1 y 2 s1 s2 s3  W R
y2 0 1  41 0  34 0 1
4 
 
s2 0 0  21 1  21 0 5
2 
y1 1 0  41 0 41 0 5
4

 
The minimum value of W is 11/2 . W 0 0 32 0 21 1 11
2 
Bibliography and further readings
• Haeussler, E. F., Paul, R. S. & Wood, R. J. (2015). Matemáticas para
administración y economía: Pearson Educación. (Textbook)
• Anderson, D. R., Sweeney, D. J., Williams, T. A., Camm, J. D., &
Cochran, J. J. (2015). Quantitative Methods for Business: Cengage
Learning

You might also like