Linear Programming

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

Linear Programming

This is entirely an allocation cause. Allocation problems are concerned with the

utilization of limited resources to best advantage. It is clear that many management

decisions are essentially resource allocation decisions and various techniques exist to

help management in this area. LP is one technique which is usually applied.

Linear Programming Definition

This is a mathematical technique concerned with the allocation of scarce resources. It is

a procedure to optimize the value of some objective e.g. maximum profit or minimum

cost, when the factors involved e.g labour or machine home are subject to some

constraints e.g. 1,000 labour hours are available in a week.

Assumptions of Linear programming

(1) Divisibility

The variables in linear programming model should be divisible in order to

facilitate the calculation of the linear programming models. In order to achieve

this, variables that can be divided are usually converted into their monetary values

which are then use in solving linear programming models.

(2) Additivity

The variables in Linear Programming model should be added when calculating

linear programming problems. Again the ones that can not be added one

ALFREY Page 1
converted into their monetary values to facilitate the computation of linear

programming problems.

(3) Linearity

Linear Programming assumes a linear relation among the different variables

which implies constant proportionality between inputs and outputs within a

process.

(4) Constraints

Linear Programming assumes that the producers and business enterprises when

are faced with constraint/limitations while producing and marketing their

products.

They may be credit, raw material and space for expansion. The type of constraint

depends upon the nature of the problem.

(5) Non-negativity

It is for bidden to impute negative values to the activities or enterprises in the

linear programming model. If the activity is not being produced then there is zero

production and if it is being produced then its greater than zero so we can not

have negative production.

(6) Time band

ALFREY Page 2
For purposes of programming a certain period is assumed. And for convenience

and more accurate results, the period is generally short, though longer period are

not ruled out.

(7) Input-Output prices and coefficients are given and constant. They are known

with certainty.

There are basically two methods that this book is going to use to show how linear

programming techniques works. That’s the graphical approach and the simplex procedure.

Linear Programming using the graphical approach.

This method can only be applied with only two unknowns or decision variable.

However, problems with three or none unknowns must be solved by techniques such as

the simplex method.

Maximization using graphs

This approach uses four steps as follows;

(i) Express the data as an equation or inequalities.

ALFREY Page 3
(ii) Treat the inequalities as equations to obtain points to be plotted.

(iii) Find the feasible region by plotting and shading off the unwanted regions.

(iv) Use the knowledge of extreme points by substitution to obtain the

maximum possible solution (profit).

Example I:

Assume a firm that makes sleeping bags X1 and tents X2. Each sleeping bag requires 2

hours for cutting A, 5 hours for sewing B, and 1 hour for water proofing C. Each tent

requires 1 hour for cutting, 5 hours for sewing, and 3 hours for water proofing. Given

current resources, the company has utmost 14 hours for cutting, 40 hours for sewing and

18 hours for water proofing a day. Its profit margin is $50 per sleeping bag and $30 per

tent. What would be the optimal allocation of resources?

Solution:

1. Expressing data in equation from objective function.

 = 50X1 + 30X2

Constraints:

Constraint A: 2X1 + X2 < 14

Constraint B: 5X1 + 5X2 < 40

Constraint C: .X1 +3X2 < 18

X1, X2 > 0:

ALFREY Page 4
X1 & X2 are the decision variables A, B, C are technical constraints determined

by the state of technology and the availability of inputs.

2. Treat all the inequalities as equations

Constraint A: 2X1 + X2 = 14

X1 0 7

X2 14 0

Constraint B: 5X1 + 5X2 = 40

X1 0 8

X2 8 0

Constraint C: .X1 +3X2 = 18

X1 0 18

X2 6 0

Note: The non negativity constraints X1, X2 > 0 are represented by the vertical

and horizontal axes, respectively.

ALFREY Page 5
3. Find the feasible region

Constraint A
14

12

10 Constraint B

8 Constraint C

2 4 6 8 10 12 14 16 18
 = 50X1 + 30X2

A(7,0) = 350

B(0,6) = 180

C(6,2) = 360

D(5,3) = 340

Optimal solution are X 1  6, X 2  . 2 S3 = 6

  50(6)  30(2)  360

ALFREY Page 6
SIMPLEX PROCEDURE USING THE PREVIOUS EXAMPLE

ON MAXIISATION

 = 50X1 + 30X2

Constraints:

Constraint A: 2X1 + X2 < 14

Constraint B: 5X1 + 5X2 < 40

Constraint C: .X1 +3X2 < 18

 Write the objective function implicitly then add a slack variable on each

inequality to eliminate inequality

 - 50X1 - 30X2+0S1+0S2+0S3 = 0

2X1 + X2 + S1 +0S2 +0S3 = 14

5X1 + 5X2 +0S1+S2+0S3 = 40

X1 +3X2 +0S1+0S2+S3 = 18

 Extract the initial tableau

T0
X1 X2 S1 S2 S3 C D.R
2 1 1 0 0 14 14/2 = 7
5 5 0 1 0 40 40/5 = 8
1 3 0 0 1 18 18/1 = 18
-50 -30 0 0 0 0

Obtain the PIVOT ELMENT (2)

 PIVOTING (X, -, +,  )

Pivoting is the process of converting the pivot element into one , the using the pivot row

to convert the other elements in the pivot column into zero

T1

ALFREY Page 7
M ETHODOLOGY
X1 X2 S1 S2 S3 C (D.R)
R1T1 = R1T0 *1/2 = PR
1 1/2 ½ 0 0 7 (14)
0 5/2 - 5/2 1 0 5 R2T1 = R2T0 – 5 PR (2)
R3T1 = R3T0 – 1 PR
0 5/2 -1/2 0 1 11 (4.4)
0 -5 25 0 0 350 R4T1 = R4T0 + 50 PR
5 5/2 5/2 0 0 35 = 5 PR

1 ½ ½ 0 0 7 = 1PR

50 25 25 0 0 350 = 50 PR

 You again in the indicator row, if all activities have zero or positive coefficients

we stop and conclude, but if one is still negative we continue pivoting.

PIVOTING (X, -, +,  )

T2
X1 X2 S1 S2 S3 C M ETHODOLOGY
1 0 1 -1/5 0 6 R1T2 = R1T1 – ½ PR
0 1 -1 2/5 0 2 R2T2 = R2T1 * 2/5 PR
0 0 2 -1 1 6 R3T2 = R3T1 – 5/2 PR
0 0 20 2 0 360 R4T2 = R4T1 +5 PR
0 ½ -1/2 1/5 0 1 = ½ PR

0 5/2 -5/2 1 0 5 = 5/2 PR

0 5 -5 2 0 10 = 5 PR

X1 = 6

X2 = 2

PROFIT = 360

S3 = 6

ALFREY Page 8
Supplementary problems involving business and economics

Question 1 A bakery makes 4$ profit on its wedding cakes X 1 and $ 3 on its birthday

cakes X 2 . Wedding cakes take 4 minutes for mixing, 90 minutes for baking and 8

minutes for icing. Birth day cakes; take 6 minutes for mixing, 15 minutes for baking and

4 minutes for icing. The bakery has 120 minutes of mixing time, 900 minutes of baking

time and 96 minutes of icing time find the maximum profit of the bakery. (x1 = 3, x2 =

18 and profit = 66)

Question 2 A makers of fine preserves earns $15 profit on its premium brand X 1 and $6

profit on its brand X 2 . The premium brand preserves takes 7.5 minutes for peeling, 20

minutes for stewing and 8 minutes for canning. The standard brand preserve take 5

minutes for peeling, 30 minutes for stewing and 2 minutes for canning. The manufacturer

has 150 minutes for peeling, 540 minutes for stewing and 120 minutes for canning.

Find the maximum profits that can be earned from both brands.

(x1 = 12.6, x2 = 9.6 and profit = 246.6)

For the minimization example.

- Normally in a minimizing problem the limitations are of the greater than or equal to.

- The normal objective is to minimize cost so that the objective function line(s) represent

cost and because the objective is to minimize cost the optimum point will be found from

the cost line furthest to the left which still touches the feasible region.

Example:

A game warden wants his animals to get a minimum of 36 milligrams (mg) of iodine,

84mg of iron, and 16mg of zinc each day. One feed y 1 provides 3mg of iodine, 6mg of

ALFREY Page 9
iron and 1mg of zinc, a second feed y 2 provides 2mg of iodine, 6mg of iron and 4mg of

zinc. The first type of feed costs$20, the second $15. What is the least cost combination

of feeds guaranteeing daily requirements? (y1 =8, y2 = 6 and costs = 250)

Solution:

C = 20Y1+15Y2

S.t 3Y1+2Y2  36

6Y 1 6Y2  84

Y 1 4Y2  16

Y 1 , Y2  0

3Y 11 2Y2  36

Y1 0 12

Y2 18 0

6Y 1 6Y2  84

Y1 0 14

Y2 14 0

Y 1 4Y2  16

Y1 0 16

Y2 4 0

ALFREY Page 10
C=
20Y1 +
15 Y2

A(0,18) =270
20
WE
TAKE
19 B(8,6) =250 ON B
18 A
17 C(13,1) =275
16
15 D(16,0) 320
14
13
12
11
10 (10,10)
9
8
7
6 B
5
4
3
2
1 (2,1) C
0 D
2 4 6 8 10 12 14 16 18 20

C = 20Y1 + 15 Y2

SIMPLEX PROCEDURE

C = 20Y 1 15Y2 A PRIMAL into a dual

S.t 3Y 11 2Y2  36

6Y 1 6Y2  84

Y 1 4Y2  16

ALFREY Page 11
C = 36y1 +84y2 +16y3 a dual

3y1 +6y2 +y3  20

2y1 +6y2 +4y3  15

We write objective function implicitly and add a slack variable on each inequality to

eliminate the inequality.

C - 36y1 - 84y2 -16y3 +0s1 +0s2 =0

3y1 +6y2 +y3 +s1 + 0s2= 20

2y1 +6y2 +4y3 +0s1 + s2 = 15

Extract the initial tableau

T0
Y1 Y2 Y3 S1 S2 C D.R
3 6 1 1 0 20 20/6=3.3
2 6 4 0 1 15 15/6=2.5
-36 -84 -16 0 0 0
Pivot element = 6 in second row

PIVOTING:

T1
Y1 Y2 Y3 S1 S2 C METHODOLOGY D.R
1 0 -3 1 -1 5 R1T1 = R1T0 – 6PR (5/1) = 5
R2T1 = R2T0*1/6 (15/6)/(2/6) =
2/6 1 4/6 0 1/6 15/6 7.5
-8 0 40 0 14 210 R3T1 = R3T0 +84 PR
2 6 4 0 1 15 = 6PR

28 84 56 0 14 210 = 84PR

T2
Y1 Y2 Y3 S1 S2 C METHODOLOGY
1 0 -3 1 -1 5 PR
0 1 5/3 -2/6 1/2 5/6 R2T2 = R2T1 – 2/6 PR
0 0 16 8 6 250 R3T2 = R3T1 + 8PR
2/6 0 -1 2/6 -2/6 10/6 = 2/6PR

ALFREY Page 12
8 0 -24 8 -8 40 = 8PR

Y1 = 8, Y2 = 6 , C = 250

More problems on minimization

1. A cereal manufacturer wants to make a new brand combining 2 natural grains X 1 and

X 2 . The new cereal must have a minimum of 128 units of carbohydrates, 168 units of

proteins 120 units of fructose.

Grain 1 has 24 units of carbohydrates 14 units of proteins and 8 units of fructose.

Grain 2 has 4 units, 7 units of proteins and 32 units of fructose:

Grain 1 costs$ 7 of bushel

Crain 2 costs $2 of bushel.

Find the least cost combination of the grains that will fulfill all the nutritional

requirements. (x1 = 2, x2 = 20 and cost = 54)

2. A landscaper wants to mix her own fertilizer containing a minimum of 50 units of

phosphates, 240 units of nitrates and 210 units of calcium. Brand 1 contains 1 unit of

phosphates, 6 units of nitrates and 15 units of calcium.

Brand 2 contains 5 units of phosphates, 8 units of nitrates and 6 units of calcium.

Brand 1 costs $ 2.50 whereas brand 2 costs $ 5.

Determine the least cost combination of fertilizers that will meet her requirements. (x1 =

36.3, x2 = 2.7 cost = 104.5)

ALFREY Page 13
Linear Programming Using the Simplex Procedure:

Example: 1

Use the simplex method to solve the given linear programming problem (The objective

function is to be maximized)

Z = X1 – X2 + X3

Constraints

2X1 +X2 – 3X3 < 40

X1 +X3 < 25

2X2 + 3X3 < 32

X1, X2, X3 > 0

Solution

2X1 + X2 – 3X3 ≤ 40

X1 + 0X2 + X3 ≤ 25

0X1 + 2X2 + 3X3 ≤ 32

Z – X1 + X2 – X3 = 0

2X1 + X2 – 3X3 + S1 + 0S2 + 0S3 = 40

X1 +0X2 + X3 + 0S1 + S2 + 0S3 = 25

0X1 + 2X2 + 3X3 + 0S1 + 0S2 + S3 = 32

T0
X1 X2 X3 S1 S2 S3 C Displacement

ALFREY Page 14
ratio

2 1 -3 1 0 0 40 -40/3

1 0 1 0 1 0 25 25

0 2 3 0 0 1 32 32/3

-1 1 -1 0 0 0 0

T1
X1 X2 X3 S1 S2 S3 C Methodology

6 5 1 5 4 4 44 R1T1 = R1T0 +4

-5 -5 0 -5 -3 -4 -19 R2T1 = R2T0 – R1T1

-18 -13 0 -15 -12 -11 -100 R3T1 = R3T0 – 3R1T1

5 6 0 5 4 4 44 R4T1 = R4T0 + R1T1

X3 = 44

Profit = 44

Example 2:
Solve the following given problem by solving the dual maximization problem with the

simplex method.

ALFREY Page 15
W = 8X1 + 4X2 + 6X3

Constraints

3X1 + 2X2 + X3 > 6

4X1 +X2 + 3X3 > 7

2X1 + X2 + 4X3 > 8

X1 > 0, X2 > 0, X3 > 0

Solution

W = 6X1 + 7X2 + 8X3

W – 6X1 – 7X2 – 8X3 = 0

3X1 + 4X2 + 2X3 < 8

X1 + 3X2 + 4X3 < 4

2X1 + X2 + X3 < 6

X1 > 0, X2 > 0, X3 > 0

ALFREY Page 16
3X1 + 4X2 + 2X3 + S1 + 0S2 + 0S3 = 8

2X1 + X2 + X3 + 0S1 + S2 + 0S3 =4

X1 + 3X2 + 4X3 + 0S1 + 0S2 + S3 = 6

T0
X1 X2 X3 S1 S2 S3 C Displacement
ratio

3 4 2 1 0 0 8 4

2 1 1 0 1 0 4 4

1 3 4 0 0 1 6 3/2

-6 -7 -8 0 0 0 0

T1
X1 X2 X3 S1 S2 S3 C Methodology Displacement
ratio

5/2 5/2 0 1 0 -1/2 5 R1T1=R1T0-2R3T3 2

7/4 ¼ 0 0 1 -1/4 5/2 R2T1=R2T0-R3T3 10/7

1/4 ¾ 1 0 0 ¼ 3/2 R3T1= R3T0*1/4 6

-4 -1 0 0 0 2 12 R4T1=R4T0+8R3T3

ALFREY Page 17
T2
X1 X2 X3 S1 S2 S3 C Methodology Displacement
ratio

0 15/7 0 1 -10/7 -1/7 10/7 R1T2=R1T1-5/2R2T2 2/3

1 1/7 0 0 4/7 -1/7 10/7 R2T2=R2T1*4/7 10

0 5/7 1 0 -1/7 2/7 8/7 R3T2=R3T1-1/4R2T2 8/5

0 -3/7 0 0 16/7 10/7 124/7 R4T2=R4T1+4R2T2

T3
X1 X2 X3 S1 S2 S3 C Methodology

0 1 0 7/15 -2/3 -1/15 2/3 R1T3= R1T2*7/15

1 0 0 -1/15 2/3 -2/15 4/3 R2T3=R2T2-1/7R1T3

0 0 1 -7/3 1/3 1/3 2/3 R3T3=R3T2-5/7R1T3

0 0 0 1/5 2 7/5 18 R4T3=R4T2+3/7R1T3

X1 = 1/5 (S1)

X2 = 2 (S2)

X3 = 7/5 (S3)

Profit = 18

ALFREY Page 18
Uses of linear programming

1. Has a definite objective to solve or achieve.

2. The assumption of constraints is more realistic to developing countries that lack

sufficient capital and machinery, growing population. But L.P takes their problem into

account and solves the objective within a specified period of time. Helpful in the

sectorial-plans.

3. It helps in solving transport problems in developing countries

4. This technique is used to assign jobs to the work force for maximum effectiveness and

optimum results subject to constraints of wages and other costs.

5. Purchasing, assembling, production and marketing problems are solved through the

L.P techniques in order to minimize costs and maximize the given the various constraints

in the case of each problem.

Limitations of L.P

1. It is not easy to define a specific objective function.

2. Even if a specific objective function is laid down, it may not be so easy to find out the

various social institutional, financial and other constraints which may be operative in

pursuing the given objective

3. Given a specific objective and a set of constraints, it is possible that the constraints

may not be directly expressible as linear inequalities.

ALFREY Page 19
4. There is a problem of estimating relevant value of the various constant coefficients that

enter into L.P problems e.g. population figures and prices.

5. The assumption of linearity is not applicable. In real life, most of the relations are non-

linear.

6. This technique assumes perfect competition in product and factor markets. But perfect

competition is not a reality.

7. The L.P technique is based on the assumption of constant returns in the economy. In

reality, there are either diminishing or increasing returns.

8. The technique is highly mathematical and complicated. The solution of a problem with

linear programming requires the maximization or minimization of a clearly specified

variable. For instance the solution through the simplex that involves a large number of

mathematical calculations –using the tables known as tableaus.

ALFREY Page 20

You might also like