You are on page 1of 4

Chapter 1: Linear Programming

Two methods commonly used to solve a linear programming problem:


(a) The graphical method
(b) The simplex method
Steps for solving a linear programming problem:
(a) The graphical method
(1)
Form a mathematical model for the problem
- Introduce decision variables to each of the unknown quantities which are to solve, and
write an expression for the linear objective function in terms of the decision variables.
Example:
A factory that manufactures tools and gadgets has recorded the following
production information. To produce a tool requires 4 hours of working time on
machine A and 3 hours on machine B. To produce a gadget requires 3 hours on
machine A and 1 hour on machine B. Machine A is available for no more than 120
hours per week and machine B is available for at most than 60 hours per week.
Tools can be sold at a profit of RM4.50 each and a profit of RM3.20 can be
realized on a gadget. Find the number of tools and gadgets that the factory should
produce each week in order to maximize its profit.
Let

x represents the number of tools and


y represents the number of gadgets.
Then, the profit function is F = 4.5x + 3.2y
-

Determine all the constraints or limited resources in terms of the decision variables and in
form of linear inequalities. Write nonnegative constraints.
The constraints for the problem are as follows:
4x + 3y 120
3x + y 60
x 0
nonnegative contraints
y 0

(2)

Graph the system of inequalities and shade the feasible region.

(3)

Find the coordinates of all corner points, that is, find the vertices of the feasible set.
Vertices:
O (0, 0)
L (0, 40)
M (12, 24)
N (20, 0)

(4)

Find the value of the objective function at each vertex to determine the optimal solution.
Vertices
O (0, 0)
L (0, 40)
M (12, 24)
N (20, 0)

(5)

Value of F = 4.5x + 3.2y


4.5 (0) + 3.2 (0) = 0
4.5 (0) + 3.2 (40) = 128
4.5 (12) + 3.2 (24) = 130.8 (max)
4.5 (20) + 3.2 (0) = 90

Select the optimal solution, that is, the greatest or smallest of those values are maximum or
minimum of the objective function. If two vertices have the same optimal value, then
optimum occurs at every point on the line segment joining the respective vertices.
Thus, a maximum profit of RM130.80 is realized by producing 12 tools
and 24 gadgets.

(b) The simplex method


(1)
Set up the initial simplex tableau of a standard form of maximum or minimum linear
programming problem. Rewrite the objective function F a1 x1 a 2 x 2 a n x n in the form
F a1 x1 a 2 x 2 a n x n 0 . Transform the system of linear inequalities into a system of
linear equations by introducing slack variables. Construct a table associated with this system
of linear equation which is known as the initial simplex tableau with slacks as the basic
variables in the first volume.
(2)

(3)

Example:
Select the column that contains the most negative entry in the objective row, which is known
Solvecolumn.
the following linear programming problem by using simplex method.
as the pivot
F x 2y
Maximize:
3 x y 15
to:
TableauSubject
1:
3 x 4 y 24
X
Y
S1
S2
Solution
Row
x 0, y 0
F
-1
-2
0
0
0
(1)
S1
3
1
1
0
15
(2)
F x 2y 0
Thus,
S2
3
4
0
1
24
(3)
3 x dividing
y s1 each
15 entry in the solution column by the corresponding
Conduct the ratio test by
3 x The
4 y row
s 2 that
24 contains the smallest ratio is pivot row. Locate the
entry in the pivot column.
Tableau
1:
pivot element,
which is the element common to both the pivot column and the pivot row.
X
Y
S1
S2
Solution
Row
15
24
F test:
-1
0
0
(1)
15 and -2 6 (smaller)0
The ratio
1 3
41
S1
1
0
15
(2)
S2
3
4
0
1
24
(3)
Tableau 1:
X
Y
S1
S2
Solution
Row
F
-1
-2
0
0
0
(1)
S1
3
1
1
0
15
(2)
S2
3
4
0
1
24
(3)

(4)

Divide all the elements in the pivot row by the pivot element.
Tableau 2:
X
-1
3
3
4

F
S1
Y

(5)

Y
-2
1

S1
0
1

S2
0
0
1
4

Solution
0
15

Row
(1)
(2)

(4) (3) 4

Row operations.
Add or subtract multiples of the pivot row to or from the other rows, so that the pivot element
is 1 and all other elements in the pivot column are zeros.
Tableau 2:
X
F
S1
Y

(6)

1
2
9
4

3
4

S1

S2
1
2
1

Solution

Row

12

5 1 2 4

(6) = (2) 1(4)

(4) (3) 4

1
4

Optimal solution.
The operation stops here as there are no more negative entries in the objective row. If there are
one or more negative entries, the optimal solution has not reached. Repeat the process from
step (2).
Thus, the solution is x 0, y 6, s1 9, s 2 0 and F 12 .
The objective F is maximized at (0, 6) where F 12 .

Exercise 1:
Solve the following linear programming problems by using simplex method.
F 3x 4 y
(a) Maximize:
x 2 y 60
Subject to:
x y 40
x 0, y 0

(b) Maximize:
Subject to:

(c) Minimize:
Subject to:

Exercise 2:

F x 2 y 4z
x 2 y 3 z 50
x 3 y 5 z 60
x 0, y 0, z 0

[ans: F 140; x 20, y 20, s1 0, s 2 0 ]

[ans: F 55; x 35, y 0, z 5, s1 0, s 2 0 ]

F 6x 4 y
6 x y 60
2 x y 40
x y 30
x 0, y 0

[ans: F 140; x 10, y 20]

Rose owns a jewels shop. She makes bracelets and necklaces from crystals and pearls. She has 9 grosses of
crystals and 15 grosses of pearls available. Each bracelet requires 1 gross of crystal and 2 grosses of pearls.
Each necklace requires 2 grosses of crystals and 3 grosses of pearls. A maximum of 6 bracelets can be sold.
The sale of a bracelet makes RM60 profit and the sale of a necklace makes RM100 profit. Rose whishes to
determine the number of bracelets and necklaces to make in order to maximize her profits. It may be assumed
that all she makes can be sold.
(i) Formulate this as a linear programming problem.
(ii) Solve the linear programming problem graphically.
[ans: (i) x + 2y 9, 2x + 3y 15, x 6, x 0, y 0; P = 60x + 100y
(ii) Maximum profit RM480 with 3 bracelets and 3 necklaces.]