You are on page 1of 13

CHAPTER THREE

INTRODUCTION TO LINEAR PROGRAMMING


INTRODUCTION
The concept of optimization is a critical issue in our everyday lives. We either need to use the
available scarce resources in the most efficient way and, thus to minimize input usage (cost),
or to maximize the output of any operation. To achieve this goals, operations research
(management science) has different tools, among which linear programming is one of the
most probably, used techniques.
3.1 Basic Concepts and Terminologies
Objective function – the expression that is supposed to be optimized
Optimization – maximization or minimization
Constraint – the restrictions or limitations or conditions under which the objective
function should be optimized
Feasible solution – any point in the region or on its boundary determined by the
constraint
Non- negativity constraint – that can’t taken negative values. That is points only in the
first quadrant, including the axes, are under consideration.
3.2 Formulating a Linear Programming Model
One of the most important phases in the solution of linear programming (LP) problem is the
formulation, which translates the verbiage in to an objective function together with a set of
constraints. Therefore, word expressions should be converted in to numerical models so as to
be solved by the help of LP.
Furthermore, any constraint is made up of the decision variables that represent the actual
problem at hand. The non- negativity constraint should be always included. The following are
steps;
STEP 1 Problem definition: Find the key decision to be made from the study of the problem
STEP 2 – identify the variables and assign symbols X1, X2 and X3 ….
STEP 3 – identify the objective which is to be optimized and represent it as a linear function
in terms of unknown variables.
STEP 4 – identify the constraints or restrictions in the problem and express them as a linear
equations or inequalities which are linear functions of unknown variables.

Example - 1- A company makes tables in two models; secretarial model and standard model.
Each standard model requires 2 hrs in wood working and 3 hrs in finishing. Each secretarial
model requires 3 hrs in wood working and 5 hrs in finishing. The company has a total of 240
working hrs available in the wood working department and a total of 390 working hrs
available in the finishing department in each week.
Mathematics for Finance Chapter Three Page 1 of 13
A profit of birr 20 is made on each standard model and birr 50 on each secretarial model.
Assuming that all models are sold, formulate the LP model.
Solution: - STEP- 1- Problem definition
 To determine the number of two types of tables that can be produced and sold per
week so as to maximize the weekly profit given the restriction (constraints).
STEP -2- Variable representation
 Let X1 be the number of standard models to be produced and sold
 Let X2 be the number of secretarial models to be produced and sold
STEP -3- Developing the objective function
The objective is to maximize profit
X1 contributes birr 20 to profit and X2 contributes birr 50 to profit.
Thus, Maximize: 20X1+ 50X2 is the objective function.
STEP-4- Constraint identification / system constraints/

2X1 + 3X2 ≤ 240(wood working)

3X1 + 5X2 ≤ 390 (finishing)

X1, X2 ≥ 0 (non negativity constraints)

In summary, the mathematical model for the table problem is:


Max. Profit = 20X1 + 50X2
Subject to: 2X1 + 3X2 ≤ 240
3X1 + 5X2 ≤ 390
X1, X2 ≥ 0, thus LP model is formulated.

The given data can be organized as follows;

Department Standard tables (X1) Secretarial tables (X2) Availability(limit)


Wood working 2 3 ≤ 240
Finishing 3 5 ≤ 390
Profit 20 50

Example 2: Minimization

ABC mixes two foods for a special diet. Food K has 30 units of vitamin C and 90 units of
vitamin D per kg. Food L has 40 units of vitamin C and 50 units of vitamin D per kg. The
mixture is to have at least 1,200 units of vitamin C and at least 2970 units of vitamin D. If
Food K costs 30 cents per kg, and Food L costs 20 cents per kg, how many kg of each food
should be used to meet this requirement while keeping costs to minimum?

Mathematics for Finance Chapter Three Page 2 of 13


Solution: The above information can be given as below table:
Vitamin C vitamin D Cost
Food K 30 90 30
Food L 40 50 20
Lim ≥ 1,200 ≥ 2970
Let X1 be number of kg of Food K
Let X2 be number of kg of Food L
The objective is to minimize cost, thus,
Z min = 30X1 + 20X2
Subject to: 30X1+ 40X2 ≥ 1,200 Vitamin C
90X1 +50X2 ≥ 2,970 Vitamin D
X1 , X2 ≥ 0 (Non-Negativity constraints)
Solving Linear Programming Problems (LPPs)
There are two approaches to solve LPPs
1. The Graphical Approach

2. The Simplex Algorism (Algebraic Method)


3.3.1 The Graphic Solution Method
STEP-1- Graph the constraints
STEP-2-Identify the feasible region (solution space)- the region that satisfies all the constraint
STEP-3- Locate the solution points – the feasible region contains an infinite number of points
that will satisfy all the constraints of the problem. We should select the point which will
make the objective function optimum and such point will be only from among the corner
points of the solution space.
Example -1- Take the previous minimization example
The objective is to minimize cost, thus,
Z min = 30X1 + 20X2
Subject to: 30X1+ 40X2 ≥ 1,200
90X1 +50X2 ≥ 2,970
X1, X2 ≥ 0 (non negativity constraints)
To graph the constraints, first the inequality sign should be changed in to equal (=) sign in
order to graph the boundary.

1st 30X1+40X2 = 1,200 ---------------- first constraint

= 30X1+ 40X2 = 1200


If X2 = 0 ---------------- 30X1 = 1200 If X1=0 -----------------40X2 = 1200
X1 = 40 X2 = 30

(40, 0) X- Intercept of the first constraint (0, 30) Y- Intercept of the first constraint

Mathematics for Finance Chapter Three Page 3 of 13


2nd Constraint 90X1+ 50X2 = 2970
If X2 = 0 90X1 = 2970 If X1 = 0 50X2 = 2970
X1 = 2970/90 = 33 X2 = 2970/50= 59.4
(33, 0) X1- Intercept of the second constraint (0, 59.4) X2 intercept of second constraint

X2 60 A (0, 59.40)

50

40

30 B (28, 9)

20 C (40, 0)

10

0 X1
10 20 30 40 50 60
Point B is the intersection point of the two graphs, which is found when the two constraints
are equal. Use elimination procedure

30X1+40X2 = 1,200 30X1 + 40( 9) =1200

90X1+ 50X2 = 2970 30X1= 1200-360

-90X1+ -120X2= -3600 30X1 = 840

90X1+ 50X2= 2970 X1 = 28

-70X2 = -360 SO B (28, 9)

X2 = 9

All the three corners (A, B, and C) satisfies the constraints, but where is the optimal value
found is our next concern. So, we have to evaluate the objective function by considering this
three corner (extreme) points:

Corner Points Value of Z min = 30X1 + 20X2


A (0,59.4) 30 (0) + 59.4 (20) = 1,188
B (28,8) 30(28) + 20 (9) = 840 + 180 = 1,020---Minimum
C (40,0) 30 (40) + 20 (0) = 1,200
Thus the minimum cost is 1,020 cents when 28 kg of food K and 9 kg of food L are used.
Example 2: - Solve example using graphical method
Z max = 20 X1 + 50 X2
Subject to: 2X1 + 3X2 ≤ 240
3X1 + 5X2 ≤ 390
X1, X2 ≥ 0

Mathematics for Finance Chapter Three Page 4 of 13


1. Graphing the constraints;
1st constraint------------ 2X1 + 3X2 = 240
If X2 = 0 2X1 = 240 X1 = 120 i.e. (120, 0)
If X1=0 3X2 = 240 X2 = 80 i.e. (0, 80)
2 constraint ------------- 3X1 + 5X2 = 390
nd

If X2 = 0 3X1 = 390 X1 = 130 i.e. (130, 0)


If X1 = 0 5X2 = 390 X2 = 78 i.e. (0, 78)
X2

A (0, 78) 120

90

60 B (30, 60)
30 C (120, 0)

0 X1
30 60 90 120
To find the coordinate value of B,
2X1 + 3X2 = 240
3X1 + 5X2 = 390 2x1 + 3X2 = 240
-6X1 - 9X2 = -720 2X1 + 3(60) = 240
6X1 + 10X2 = 780 2X1 = 60 X1 = 30
0 + X2 = 60 X2 = 60 Thus, B (30, 60)

Corner Value of Z max = 20X1 + 50X2


A (0,78) 20(0) +50(78) = 3,900 -------- Maximum
B (30,60) 20( 30) + 50(60) = 600+ 3,000 =3,600
C (120,0) 20(120) + 50(0) = 2,400
So, the amount of profit is 3,900 at X1 = 0 and X2 = 78 /X2 -----secretarial model is
produced and sold.

3.3.2 Simplex (Algebraic) Method of Solving LPPs


LP model is a mathematical model which is used to allocate scarce organizational resources
so as to achieve optimization, i.e., either profit maximization or cost minimization.
Remember all that we graph constraints by treating them as equality. Likewise in simplex
algorism, to convert the inequality constraints into equality, we introduce slack or surplus
variables.
In economic terminology slack variables represent unused capacity and surplus variables
represent excess amount and the contribution associated with them in zero.
A. Solving maximization problem

Mathematics for Finance Chapter Three Page 5 of 13


The simplex procedure for a maximization problem with all “≤” constraints of the following
steps:

STEP-1- Write the LP model in a standard form (conversion of constraints and the objective
function).
When all the constraints are written as equalities, the LPP is said to be in a standard form.
Applying the slack variables to standardize:
a1X1 + a2X2 +---------------------+anXn ≤ b
Standardize: a1X1 + a2X2 + --------------+ anXn + S1 = b
 Every variable in the model must be represented in the objective function
 Since slacks don’t provide any real contribution to the objective, each slack variable is
assigned a coefficient of zero in the objective function.
Example: - Z max = 60X1 + 50X2
S.t: 4X1 + 10X2 ≤ 100
2X1 + X2 ≤ 22
3X1 + 3X2 ≤ 39
X1, X2 ≥ 0
Standardize; the non negativity quantity be added to the left side increases to RHS value
(slacks)
Z max = 60X1 + 50X2 + 0S1 + 0S2 + 0S3
S.t: 4X1 + 10X2 + S1 + 0S2 + 0S3 = 100
2X1 + X2 + 0S1 +S2 + 0S3 = 22
3X1 + 3X2 + 0S1 + 0S2 + S3 = 39
X1, X2, S1, S2, S3 ≥ 0
STEP-2- Develop the initial tableau (finding an initial feasible solution)
 List the variables across the top of the table and write the objective function coefficient
of each variable just below it.

 There should be one row in the body of the table for each constraint, list the slack
variables in the bases column, one per row.

 In the Cj column enter the objective function coefficient of zero for each slack variable

 Compute values for row Zj

 Compute values for row Cj-Zj, where Cj is coefficient of variable j in the objective
function.

Mathematics for Finance Chapter Three Page 6 of 13


Initial feasibility S1 = 100
S2 = 22 obtained by equating row variables zero
S3 = 39
X1 = 0 and X2 = 0 decision variables
Zmax = 0 Profit
STEP-3- Developing subsequent tables (choosing the entering and leaving variables)
 Identify the entry variable that has a largest positive value in the Cj– Zj row.

 Identify the leaving variable, using the coefficient or substitution rates in the entering variable column
dived each one in to the corresponding quantity value, however, don’t divide by a zero or a negative
value. The smallest non negative ratio that results indicate which leave the solution.

STEP-4- Find unique vectors for the next basic variable using row operations on the pivot element.
STEP-5- If all Cj-Zj row values are zeros and negatives, you have reached optimality.
 A simplex solution in a maximization is optimal if the Cj – Zj consists entirely of zeros and negative
numbers, i.e. there is no positive values in the bottom row.
½ R2 = newR2 = 1 ½ 0 ½ 0 11
-4 R2 + R1 = new R1 = 0 8 1 -2 0 56
-3R2 +R3 = new R3 = 0 3/2 0 -3/2 1 6

Mathematics for Finance Chapter Three Page 7 of 13


2/3 R3 = 0 1 0 -1 2/3 4 new R3
-1/2 R3 + R2 = 1 0 0 1 -1/3 9 new R2
-8R3 + R1 = 0 0 1 6 -16/3 24
new R1

Here, all Cj-Zj row values are zeros and negatives, you have reached optimality. Optimum solution is at X1 = 9,
X2 = 4 and S1 = 24 and the amount of profit is $740.
Example -2- Z max = 9X1 + 9X2
S.t: 6X1 + 3X2 ≤ 42
4X1 + 5X2 ≤ 40
Solution: - Standardization Z max = 9X1 + 9X2 + 0S1 + 0S2
S.t: 6X1 + 3X2 + S1 + 0S2 = 42
4X1 + 5X2 + 0S1 + S2 = 40
X1, X2 S1, S3 ≥ 0

Mathematics for Finance Chapter Three Page 8 of 13


1/6 R1 = 1 ½ 1/6 0 7 new R1
-4R1 +R1 = 0 3 -2/3 1 12
new R2

1/3R2 = 0 1 -2/9 1/3 4 = New R2


-1/2R2 + R1 = 1 0 5/18 -1/6 5 = New R1

Mathematics for Finance Chapter Three Page 9 of 13


Thus, all Cj-Zj row values are zeros and negatives, you have reached optimality. Optimum solution is at X1 = 5 &
X2 = 4 and the amount of profit is $81.

B. Solving Minimization Problems


It is similar to maximization problem except
 The selection of variable to enter the solution (pivot Colum) is based on the most/largest negative value
in the Cj-Zj row (net evaluation row).
 Addition of the coefficient +M to standardize the problem in the OF.
 Have at least one artificial variable for the OF and each constraint
 Subtraction of the surplus

Why the big +M method is used? Since it is easy to visualize that an initial solution doesn’t exist if we let X1 and
X2 each equal to zero, we get S1 and S2 with negative constraints which are not feasible as it violates the non
negativity constraints restriction. To provide an initial feasible solution, we add an artificial variable in to the
model in which has not tangible relationship with the decision with the decision program.

Example: - Z min = 3X1 + 4X2


S.t: 2X1 + 3X2 ≥ 90
4X1 + 3X2 ≥ 120 where; X1 X2 ≥ 0
Solution:-
Standardization: Zmin = 3X1 + 4X2 +0s1+0S2 + MA1 +MA2
S.t 2X1 + 3X2 – S1 -0S2 +A1 +0A2 = 90
4X1 + 3X2 – 0S1-0S2 +0A1 +A2 = 120
X1, X2, S1, S2, A1, A2 ≥ 0

Mathematics for Finance Chapter Three Page 10 of


13
¼ R2 = 1 ¾ 0 -1/4 0 30 = new R2
-2R2 +R1= 0 3/2 -1 ½ 1
30 = new R1

2/3 R1 = 0 1 -2/3 1/3 20 = newR1


-3/4 R1 + R2 = 1 0 ½ -1/2
15 = new R2
Since all the numbers in the index row (Cj – Zj row) are either zero or positive, the optimal solution has been
arrived or realized and the solution is given as; X1 = 15 and X2 = 20 and its minimum cost is = $125.

Example - A chemical company produced two types of compounds, A and B. The following table gives the units
of ingredients X1 and X2 per kg of compounds A and B as well as minimum requirements of X1 and X2 and cost
per Kg of A and B. Using the simplex method, find the quantities of A and B which would give a supply of X1
and X2 at a minimum cost?

Mathematics for Finance Chapter Three Page 11 of


13
Solution:- The OF is to minimize cost. Thus; Z min = 4X1 + 6X2

S.t: X1 + 2X2 ≥ 80
3X1 + X2 ≥75 X1, X2 ≥ 0 Standardization: 4X1 + 6X2 +0S1 +0S2 +MA1+MA2
S.t: X1 + 2X2 –S1-0S2 + A1 +0A2 =80
3X1 + X2 – 0S1 –S2 +0A1 +A2 =75
X1, X2, S1, S2, A1, A2 ≥ 0

Mathematics for Finance Chapter Three Page 12 of


13
Since all the numbers in the index row (Cj – Zj row) are either zero or positive, the optimal solution has been
arrived or realized. Therefore, optimality is found at X1 = 14 , X2 = 33 and the minimum cost is = 254

Mathematics for Finance Chapter Three Page 13 of


13

You might also like