There are different ways of writing linear programs, and a variety of names to refer to them. We shall stick to two forms: the standard and the canonical forms. Each form has two versions: the maximization and the minimization versions. Fortunately, all versions and forms are equivalent.
The min version-standard form reads
min c1x1 + c2x2 + ã ã ã + cnxn subject to
a11x1 + a12x2 + ... + a1nxn = b1 a21x1 + a22x2 + ... + a2nxn = b2 ... ... ... ... = ...
am1x1 + am2x2 + ... + amnxn = bm xi ≥ 0, For i = 1, ... , n .
The linear function c1x1 + c2x2 + ... + cnxn is called the objective function. The constraints xi≥ 0 are also referred to as the non-negativity constraints. If the objective is to maximize instead of mini- mize, we have the max version of the standard form.
In canonical form, the min version reads min c1x1 + c2x2 + ... + cnxn subject to
a11x1 + a12x2 + ... + a1nxn≥ b1 a21x1 + a22x2 + ... + a2nxn ≥ b2 ... ... . . .... ≥...
am1x1 + am2x2 + . . + amnxn≥ bm xi≥ 0, For i = 1, . . . , n . and the max version is nothing but
max c1x1 + c2x2 + ... + cnxn subject to
a11x1 + a12x2 + ... + a1nxn≤ b1 a21x1 + a22x2 + ... + a2nxn ≤ b2 ... ... . . .... ≤...
am1x1 + am2x2 + . . + amnxn ≤ bm xi ≤ 0, For i = 1, . . . , n .
The reason we change ≥ to ≤ in the max version is that it might be intuitively easier to remem- ber:
if we are trying to minimize some function of x, there should be some ‘lower bound’ on how much x can get smaller, and vice versa. Obviously, exchanging the terms on both sides and the inequalities are reversed. Hence, beside being easier to remember there is no other value on which way the inequalities should go.
Example 12.2. A firm manufactures two types of products A and B and sells them at a profit of $ 2 on A and $ 3 on B. Each product is processed on two machines M1 and M2. Product A needs one minute of processing time on M1 and two minutes on M2. Product B requires one minute on M1 and one minute on M2. The machine M1 is
available for not more than 6 hours 40 minutes, while machine M2 is available for 10 hours during any working day. Formulate the problem as a linear programming model.
Solution:
Z = 2x1 + 3x2 x1 + x2≤ 400 2x1 + x2≤ 600 x1, x2≥ 0
Example 12.3. A firm manufactures three products A, B and C. The profits are $3, $2, and $4 respectively. The firm has two machines, and the required processing time in minutes for each machine on each product is given in the Table 12.1 below:
Table 12.1
Machine Products
A B C
X 4 3 5
Y 2 2 4
Machines X and Y have 2,000 and 2,500 machine minutes respectively. The firm must manufacture 100 A’s, 200 B’s and 50 C’s but not more than 150 A’s. Set up an LP model to maximize profit.
Solution:
Maximize Z = 3x1 + 2x2 + 4x3 Subject To
4x1 + 3x2 + 5x3≤ 2000 2x1 + 2x2 + 4x3≤ 2500 100 ≤ x1≤ 150 200 ≤ x2 50 ≤ x3
Example 12.4. Find the maximum value of Z = 7x1 + 3x2 Subject to the constraints
x1 + 2x2≥ 3 x1 + x2≤ 4 0 ≤ x1≤ 5/2 0 ≤ x2≤ 3/2
Solution: The lines have been shown graphically on the X1 and X2 plane. The hatched area shows the solution space of the problem. The solution is shown in the following Table-12.2.
Table 12.2
Point X1 X2 Z = Z = 7x1 + 3x2
A 2.5 0.25 ZA = 18.2
B 2.5 1.5 ZB = 22.0
C 0 1.5 ZC = 4.5
x2
(0, 1.5) (2.5, 1.5)
(2.5, 0.25)
x1 So, the objective function will have a maximum value of 22 at point B with
X1= 2.5, and X2 = 1.5
Example 12.5. A company produces Motor cycles and scooters. Production of these is organized in three depart- ments whose maximum weekly capacities for producing either motor cycles or scooters are as follows:
Table 12.3
Department Capacities
Motor cycles Scooters
Forming and welding 90 120
Assembly 80 160
Painting 150 100
The profit contribution of each motor cycle is Rs. 600 and that of a scooter is Rs 400. Use graphical analysis to find the optimum number of motor cycles and scooters to be produced. If at least as many scooters as motorcycles are to be produced, what change in solution space results and what would be the new optimum solution.
Solution:
Let x1 = number of motor cycles x2 = number of scooters Then the objective function is Maximize Z = 600x1 + 400x2 Subject To
x1/90 + x2/120 ≤ 1 x1/80 + x2/160 ≤ 1 x1/150 + x2/100 ≤ 1 Ans: x1 = 73, x2 = 94
When no. of scooters = no. of motor cycles Then x1 = x2 = 76.
Example 12.6. A company plans to manufacture and sell two types of products X and Y. These two products require the use of three different raw materials A, B and C which are available in limited quantities. The profit per unit of product X and Y is Rs 5 and 6 respectively. The other relevant data are given in the Table 12.4 below.
Table 12.4
Raw material Unit of raw material Total units of raw
needed per unit product materials available
X Y
A 2 3 18
B 2 1 12
C 3 3 27
The company wants to determine the product that would maximize the total profit. Fraction units are permissible.
Formulate as a linear programming problem.
Determine the optimal product mix.
Ans: x = 9/2, y = 3.
Example 12.7. A small manufacturer employs 5 skilled men and 10 semi-skilled men. He makes an article in two qualities, a deluxe model and an ordinary model. The making of a deluxe model requires 2 hours of work by semiskilled men and 2 hours of work by skilled men. The ordinary model requires 3 hours of work by semi skilled men, and one hour of work by skilled men. By union rules, no men can work more than 8 hours a day. The manufacturers profits on deluxe model and ordinary model are Rs 10, and Rs 8 respectively. How many of each type of model should be made in order to maximize the profit?
Solution:
Let x1 = no. of deluxe model, x2 = no. of ordinary model Then, the objective function is Maximize Z = 10x1 + 8x2 Subject to the constraints
2x1 + 3x2≤ 10x8 2x1 + x2≤ 5x8 x1, x2≥ 0 Ans: x1 = 10, x2 = 20.
Example 12.8. Use the simplex method to solve the following LP problem.
Maximize: Z = 3X1 + 5X2 + 4X3 Subjected to: 2X1 + 3X2 < 8
2X1 + 5X3≤ 10 3X1 + 2X2 + 4X3≤ 18 X1, X2, X3≥ 0.
Solution:
Sept 1. Transform the equation into standard form.
Z = 3X1 + 5X2 + 4X3 + 0.S1 + 0.S2 + 0.S3 2X1 + 3X2 + S1 < 8
2X1 + 5X3 + S2≤ 10 3X1 + 2X2 + 4X3 + S3≤ 18 X1, X2, X3≥ 0
By normalizing the equation, we get
3X1 + 5X2 + 4X3 + 0.S1 + 0.S2 + 0.S3 = Z 2X1 + 3X2 + 0.X3 + S1 + 0.S2 + 0.S3 = 8 2X1 + 0.X2 + 5X3 + 0.S1 + S2 + 0.S3 = 10 3X1 + 2X2 + 4X3 + 0.S1 + 0.S2 + S3 =15 Sept 2. Set up the tableau and identify the key row and key column.
Then for the simplex solution the matrix form of the above equations are as follows:
Iteration 0
3 5 4 0 0 0 b/cc
X1 X2 X3 S1 S2 S3
0 S1 8 2 3 0 1 0 0 8/3
0 S2 10 2 0 5 0 1 0 8
0 S3 15 3 2 4 0 0 1 15/2
– 3 – 5 – 4 0 0 0
Note. X2 is the entering variable and S1 is the leaving variables.
Step 3. Compute the second iteration (tableau)
Here the selected row is the second and the selected column is the fifth, then the next matrix is as follows:
Note. X3 is the coming variable and S2 is the leaving variables.
Iteration 1
3 5 4 0 0 0 b/cc
X1 X2 X3 S1 S2 S3
5 X2 8/3 2/3 1 0 1/3 0 0 8
0 S2 10 2 0 5 0 1 0 2
0 S3 29/3 5/3 0 4 – 0.667 0 1 2.44
40/3 1/3 0 – 4 5/3 0 0
Since all the values on the bottom row are positive, therefore, it is an optimal solution with X1 = 0, X2 = 8/3, X3 = 2
Then Z = 3X1 + 5X2 + 4X3
= 3(0) + 5(8/3) + 4(2) = 64/3 Iteration 2
3 5 4 0 0 0
X1 X2 X3 S1 S2 S3
5 X2 8/3 2/3 1 0 1/3 0 0
4 X3 2 2/5 0 1 0 1/5 0
0 S3 113/15 17/15 – 4/5 0 – 2/3 – 4/5 1
64/3 29/15 0 0 5/3 4/5 0
Since all the values on the bottom row are positive, therefore, it is an optimal solution with X1 = 0, X2 = 8/3, X3 = 2
Then Z = 3X1 + 5X2 + 4X3
= 3(0) + 5(8/3) + 4(2) = 64/3
Example 12.9. Use the Big-M simplex method in order to solve the following LP problem.
Maximize Z = 2.1X1 + 4.8X2 + 6X3 Subject to: 10X1 + 23X2 + 26X3 < 700
5X1+ 13X2 + 22X3 < 550 7X1 + 9X2 + 11X3 < 450
X1 > 0 X2, X3 > 0 10X1 + 23X2 + 26X3 + S1 = 700 5X1+ 13X2 + 22X3 + S2 = 550 7X1 + 9X2 + 11X3 + S3 = 450 X1 – S4 + A1 = 50
Z = 2.1X1 + 4.8X2 + 6X3 + 0.S1 + 0.S2 + 0.S3 + 0.S4 – MA1 BIG M-METHOD
Z = 2.1X1 + 4.8X2 + 6X3 + 0.S1 + 0.S2 + 0.S3 + 0.S4 – MA1 10X1 + 23X2 + 26X3 + S1 + 0.S2 + 0.S3 + 0.S4 – 0.A1 = 700 5X1 + 13X2 + 22X3 + 0.S1 + S2 + 0.S3 + 0.S4 – 0A1 = 550 7X1 + 9X2 + 11X3 + 0.S1 + 0.S2 + S3 + 0.S4 – 0A1 = 450 X1 + 0X2 + 0X3 + 0.S1 + 0.S2 + 0.S3 – S4 + A1 = 50
Iteration 0
2.1 4.8 6 0 0 0 0 – M
X1 X2 X3 S1 S2 S3 S4 A1
0 S1 700 10 23 26 1 0 0 0 0 70
0 S2 550 5 13 22 0 1 0 0 0 110
0 S3 450 7 9 11 0 0 1 0 0 450/7
– M A1 50 1 0 0 0 0 0 – 1 1 50
– 50M – M – 21 – 4.8 – 6 0 0 0 M 0
Iteration 1
2.1 4.8 6 0 0 0 0 – M
X1 X2 X3 S1 S2 S3 S4 A1
0 S1 200 0 23 26 1 0 0 0 0 200/26
0 S2 300 0 13 22 0 1 0 0 0 300/22
0 S3 100 0 9 11 0 0 1 0 0 100/87
2.1 X1 50 1 0 0 0 0 0 – 1 1 8
105 0 – 4.8 – 6 0 0 0 – 2.1 2.1 + M
Iteration 2
2.1 4.8 6 0 0 0 0 – M
X1 X2 X3 S1 S2 S3 S4 A1
6 X3 200/26 0 23/26 1 1/26 0 0 0 0
0 S2 3400/26 0 – 168/26 0 – 22/26 1 0 0 0
0 S3 400/26 0 – 19/26 0 – 11/26 0 1 0 0
2.1 X1 50 1 0 0 0 0 0 – 1 1
1965/13 0 0.51 0 6/26 0 0 – 2.1 2.1 + M
From the table we can get that;
X1 = 50 X2 = 0 X3 = 200/26
Then Z = 2.1X1 + 4.8X2 + 6X3
= 2.1(50) + 4.8(0) + 6(200/26) = 151.1538
Example 12.10. Primal form
Maximize: ZP = 10X1 + 6X2. Subject to: X1 + 4X2 = 40
3X1 + 2X2 = 60 – 3X1 – 2X2 = – 60 – 2X1 – X2 = – 25 X1, X2 = 0
One of the conditions for transferring a primal problem into dual is that the primal be in standard form.
The above given problem is in standard form. However, it violates simplex restriction that all quantity values must be either zero or positive. The constraints are not converted so that it can be solved with the simplex method;
rather, it is being converted into the dual form. In the dual, the quantity (right hand side) values of the optimal form the coefficient of the objective function and these can be negative.
The dual form of this model is formulated as follows:
Minimize Zd = 40Y1 + 60Y2 – 60Y3 – 25Y4. Subject to: Y1 + 3Y2 – 3Y3 – 2Y4≥ 10
4Y1 + 2Y2 – 2Y3 – Y4≥ 6 Y1, Y2, Y3, Y4 = 0
Example 12.11. A manufacturing firm has discontinuous production of a certain unprofitable product line. This created considerable excess production capacity. Management is considering to devote this excess capacity to one or more of three products A, B, and C. The available capacity on the machines which might limit output, is summarized in the following Table 12.5.
Table 12.5
Time (hours) required by Product Time available (hours)
Machines A B C
Milling machine 8 2 3 250
Lathe 4 3 0 150
Grinder 2 — 1 50
The unit profit would be Rs. 20, Rs. 6, and Rs. 8 for products A, B, and C respectively. Find how much of each product the firm should produce to maximize the profit ?
Solution: Mathematical formulation
Let the management decides to produce x1 units of A, x2 units of B, and x3 units of C respectively per week. Then the objective function will be to
Maximize Z = 20x1 + 6x2 + 8x3 Subject to the constraints
8x1 + 2x2 + 3x3≤ 250 4x1 + 3x2≤ 150 2x1 + x3≤ 50
and x1, x2, x3≥ 0
By introducing y1≥ 0, y2≥ 0, and y3≥ 0, the inequalities of the constraints are converted into equations as follows:
Maximize Z = 20x1 + 6x2 + 8x3 + 0y1 + 0y2 + 0y3 Subject to the constraints
8x1 + 2x2 + 3x3 + 1y1 + 0y2 + 0y3 = 250 4x1 + 3x2 + 0x3 + 0y1 + 1y2 + 0y3 = 150 2x1 + 0x2 + x3 + 0y1 + 0y2 + 1y3 = 50
As this problem contains more than two variables, we will solve it by simplex technique. Now, let us make the following table for simplex solution.
Iteration 0
x1 x2 x3 y1 y2 y3 b Ratio
y1 8 2 3 1 0 0 250 250/8 = 125/4
y2 4 3 0 0 1 0 150 150/4 = 75/2
y3 2 0 1 0 0 1 50 50/2 = 25 ← KR
Index – 20 – 6 – 8 0 0 0 0
↑ KC
KC = Key Column (Column with maximum negative) KR = Key Row (Row with the minimum ratio)
Key number = the point of intersection between the KC and the KR
Iteration 1
x1 x2 x3 y1 y2 y3 b Ratio
y1 0 2 – 1 1 0 – 4 50 50/2 = 25
y2 0 3 – 2 0 1 – 2 50 50/3 ← KR
x1 1 0 1/2 0 0 1/2 25 25/0 = ∞
Index 0 – 6 2 0 0 10 500
↑ KC
Iteration 2
x1 x2 x3 y1 y2 y3 b Ratio
y1 0 0 1/3 1 – 2/3 – 8/3 50/3 50 ← KR
x2 0 1 – 2/3 0 1/3 – 2/3 50/3 – ve
x1 1 0 1/2 0 0 1/2 25 50
Index 0 0 – 2 0 2 6 600
↑ KC
Iteration 3
x1 x2 x3 y1 y2 y3 b Ratio
x3 0 0 1 1/3 – 2 – 8 50 – ve
x2 0 1 0 – 6 50 – ve
x1 1 0 0 5/2 0 50
Index 0 0 0 6 – 2 – 10 700
Check the table
Iteration 4
x1 x2 x3 y1 y2 y3 b Ratio
x3 0 0 1 1/3 – 2 – 8 50 – ve
x2 0 1 0 – 6 50 – ve
x1 1 0 0 5/2 0 50
Index 0 0 0 6 – 2 – 10 700
Check the table
Ans: x2 = 50, x3 = 50, x1 = 0, and Z* = 700