Topic 5 1 Linear Programming
Topic 5 1 Linear Programming
The Constraints
1
4. Constraints: The maximisation (or minimisation) is performed subject to a set of
constraints. Therefore LP can be defined as a constrained optimisation problem. They reflect
the limitations of the resources.
5. Input-Output coefficients: The coefficient of constraint variables are called the Input-
Output Coefficients. They indicate the rate at which a given resource is unitized or depleted.
They appear on the left side of the constraints.
6. Capacities: The capacities or availability of the various resources are given on the right
hand side of the constraints.
FORMULATION OF LPP
STEPS
1. Identify decision variables
2. Write objective function
3. Formulate constraints
EXAMPLE 1. (PRODUCTION ALLOCATION PROBLEM)
A firm produces three products. These products are processed on three different machines.
The time required to manufacture one unit of each of the three products and the daily capacity
of the three machines are given in the table below:
Time per unit (Minutes) Machine Capacity
Machine Product 1 Product 2 Product 3 (minutes/day)
M1 2 3 2 440
M2 4 - 3 470
M3 2 5 - 430
2
It is required to determine the daily number of units to be manufactured for each product. The
profit per unit for product 1, 2 and 3 is Rs. 4, Rs.3 and Rs.6 respectively. It is assumed that all
the amounts produced are consumed in the market. Formulate the mathematical (L.P.) model
that will maximise the daily profit.
Formulation of Linear Programming Model
Step 1
From the study of the situation find the key-decision to be made. In the given situation key
decision is to decide the extent of products 1, 2 and 3, as the extents are permitted to vary.
Step 2
Assume symbols for variable quantities noticed in step 1. Let the extents (amounts) of
products 1, 2 and 3 manufactured daily be x1, x2 and x3 units respectively.
Step 3
Express the feasible alternatives mathematically in terms of variable. Feasible alternatives are
those which are physically, economically and financially possible. In the given situation
feasible alternatives are sets of values of x1, x2 and x3 units respectively.
where x1, x2 and x3 ≥ 0.
since negative production has no meaning and is not feasible.
Step 4
Mention the objective function quantitatively and express it as a linear function of variables.
In the present situation, objective is to maximize the profit.
i.e., Z = 4x1+ 3x2 + 6x3
Step 5
Put into words the influencing factors or constraints. These occur generally because of
constraints on availability (resources) or requirements (demands). Express these constraints
also as linear equations/inequalities in terms of variables.
Here, constraints are on the machine capacities and can be mathematically expressed as
2x1+ 3x2 + 2x3 ≤ 440
4x1+ 0x2 + 3x3 ≤ 470
2x1+ 5x2 + 0x3 ≤ 430
EXAMPLE 2: PRODUCT MIX PROBLEM
A factory manufactures two products A and B. To manufacture one unit of A, 1.5 machine
hours and 2.5 labour hours are required. To manufacture product B, 2.5 machine hours and
1.5 labour hours are required. In a month, 300 machine hours and 240 labour hours are
available.
Profit per unit for A is Rs. 50 and for B is Rs. 40. Formulate as LPP.
Solution:
Products Resource/unit
Machine Labour
A 1.5 2.5
B 2.5 1.5
Availability 300 hrs 240 hrs
There will be two constraints. One for machine hours availability and for labour hours
availability.
Decision variables
3
X1 = Number of units of A manufactured per month.
X2 = Number of units of B manufactured per month.
The objective function:
Max Z = 50x1+ 40x2
Subjective Constraints
For machine hours
1.5x1+ 2.5x2 ≤ 300
For labour hours
2.5x1+ 1.5x2 ≤ 240
Non negativity
x1, x2 ≥0
EXAMPLE: 3
A company produces three products A, B, C.
For manufacturing three raw materials P, Q and R are used.
Profit per unit
A - Rs. 5, B - Rs. 3, C - Rs. 4
Resource requirements/unit
Raw Material P Q R
Product
A - 20 50
B 20 30 -
C 30 20 40
Maximum raw material availability:
P - 80 units; Q - 100 units; R - 150 units. Formulate LPP.
Solution:
Decision variables:
x1 = Number of units of A
x2 = Number of units of B
x3 = Number of units of C
Objective Function
Since Profit per unit is given, objective function is maximisation
Max Z = 5x1+ 3x2 + 4x3
Constraints:
For P:
0x1+ 20x2 + 30x3 ≤ 80
For Q:
20x1+ 30x2 + 20x3 ≤ 100
For R:
50x1+ 0x2 + 40x3 ≤ 150
(for B, R is not required)
X1, X2, X3 ≥ 0
EXAMPLE 4: PORTFOLIO SELECTION (INVESTMENT DECISIONS)
An investor is considering investing in two securities 'A' and 'B'. The risk and return
associated with these securities is different.
4
Security 'A' gives a return of 9% and has a risk factor of 5 on a scale of zero to 10. Security
'B' gives return of 15% but has risk factor of 8.
Total amount to be invested is Rs. 5, 00, 000/- Total minimum returns on the investment
should be 12%. Maximum combined risk should not be more than 6. Formulate as LPP.
Solution:
Decision Variables:
X1 = Amount invested in Security A
X2 = Amount invested in Security B
Objective Function:
The objective is to maximise the return on total investment.
⸫ Max Z = 0.09 X1 + 0.015 X2 ((% = 0.09, 15% = 0.15)
Constraints:
1. Related to Total Investment:
X1 + X2 = 5, 00, 000
2. Related to Risk:
5X1 + 8X2 = (6 X 5, 00, 000)
5X1 + 8X2 = 30, 00, 000
3. Related to Returns:
0.09X1 + 0.15X2 = (0.12 X 5, 00, 000)
⸫0.09X1 + 0.15X2 = 60, 000
4. Non-negativity
X1, X2 ≥ 0
EXAMPLE 5: INSPECTION PROBLEM
A company has two grades of inspectors, I and II to undertake quality control inspection. At
least 1, 500 pieces must be inspected in an 8-hour day. Grade I inspector can check 20 pieces
in an hour with an accuracy of 96%. Grade II inspector checks 14 pieces an hour with an
accuracy of 92%.
Wages of grade I inspector are Rs. 5 per hour while those of grade II inspector are Rs. 4 per
hour. Any error made by an inspector costs Rs. 3 to the company. If there are, in all, 10 grade
I inspectors and 15 grade II inspectors in the company, find the optimal assignment of
inspectors that minimise the daily inspection cost.
Solution:
Let x1 and x2 denote the number of grade I and grade II inspectors that may be assigned the
job of quality control inspection.
The objective is to minimise the daily cost of inspection. Now the company has to incur two
types of costs; wages paid to the inspectors and the cost of their inspection errors. The cost of
grade I inspector/hour is
Rs. (5 + 3 X 0.04 X 20) = Rs. 7.40.
Similarly, cost of grade II inspector/hour is
Rs. (4 + 3 X 0.08 X 14) = Rs. 7.36.
⸫ The objective function is
minimise Z = 8(7.40x1 + 7.36x2) = 59.20 x1 + 58.88x2.
Constraints are
on the number of grade I inspectors: x1 ≤ 10,
5
on the number of grade II inspectors: x2 ≤ 15
on the number of pieces to be inspected daily: 20 x 8x1 + 14 x 8x2 ≥ 1500
or 160x1 + 112x2 ≥ 1500
where, x1, x2 ≥ 0.
EXAMPLE 6: TRIM LOSS PROBLEM
A manufacturer of cylindrical containers receives tin sheets in widths of 30 cm and 60 cm
respectively. For these containers the sheets are to be cut to three different widths of 15 cm,
21 cm and 27 cm respectively. The number of containers to be manufactured from these three
widths are 400, 200 and 300 respectively. The bottom plates and top covers of the containers
are purchased directly from the market. There is no limit on the lengths of standard tin sheets.
Formulate the LPP for the production schedule that minimises the trim losses.
Solution:
Key decision is to determine how each of the two standard widths of tin sheets be cut to the
require widths so that trim losses are minimum.
From the available widths of 30 cm and 60 cm, several combinations of the three required
widths of 15 cm, 21 cm and 27 cm are possible.
Let xij represent these combinations. Each combination results in certain trim loss.
Constraints can be formulated as follows:
The possible cutting combinations (plans) for both types of sheets are shown in the table
below:
Width i = I (30 cm) i = II (60 cm)
(cm)
X11 X12 X13 X21 X22 X23 X24 X25 X26
15 2 0 0 4 2 2 1 0 0
21 0 1 0 0 1 0 2 1 0
27 0 0 1 0 0 1 0 1 2
Trim Loss 0 9 3 0 9 3 3 12 6
(cm)
Thus, the constraints are
2x11 + 4x21 + 2x22 + 2x23 + x24 ≥ 400
x12 + x22 + 2x24 + x25 ≥ 200
x13 +x23 + x25 + x26 ≥ 300
Objective is to maximise the trim losses.
i.e., minimise Z = 9x12 + 3x13 + 9x22 + 3x23 + 3x24 + 12x25 + 6x26
where x11, x12, x13, x21, x22, x23, x24, x25, x26 ≥ 0.
EXAMPLE 7: MEDIA SELECTION
An advertising agency is planning to launch an ad campaign. Media under consideration are
T.V., Radio & Newspaper. Each medium has different reach potential and different cost.
Minimum 10, 000, 000 households are to be reached through T.V. Expenditure on
newspapers should not be more than Rs. 10, 00, 000. Total advertising budget is Rs. 20
million.
Following data is available:
Medium Cost per Unit Reach per unit
(Rs.) (No. of households)
Television 2, 00, 000 20, 00, 000
6
Radio 80, 000 10, 00, 000
Newspaper 40, 000 2, 00, 000
Solution:
Decision Variables:
x1 = Number of units of T.V. ads,
x2 = Number of units of Radio ads,
x3 = Number of units of Newspaper ads.
Objective function: (Maximise reach)
Max. Z = 20, 00, 000 x1 + 10, 00, 000 x2 + 2, 00, 000x3
Subject to constraints:
20, 00, 000 x1 ≥ 10, 000, 000 ........ (for T.V.)
40, 000 x3 ≤ 10, 00, 000 ........... (for Newspaper)
2, 00, 000x1 + 80, 000x2 + 40, 000x3 ≤ 20, 000, 000 .......... (Ad. budget)
x1, x2, x3 ≥ 0
⸫ Simplifying constraints:
for T.V. 2 x1 ≥ 10 ⸫ x1 ≥ 5
for Newspaper 4 x3 ≤ 100 ⸫ x3 ≤ 25
Ad. Budget
20 x1 + 8 x2 + 4 x3 ≤ 2000
5 x1 + 2x2 + x3 ≤ 500
x1, x2, x3 ≥ 0
EXAMPLE 8: DIET PROBLEM
Vitamins B1 and B2 are found in two foods F1 and F2. 1 unit of F1 contains 3 units of B1 and 4
units of B2. 1 unit of F2 contains 5 units of B1 and 3 units of B2 respectively.
Minimum daily prescribed consumption of B1 & B2 is 50 and 60 units respectively. Cost per
unit of F1 & F2 is Rs. 6 & Rs. 3 respectively.
Formulate as LPP.
Solution:
Vitamins Foods Minimum
F1 F2 Consumption
B1 3 5 30
B2 5 7 40
Decision Variables:
x1 = No. of units of P1 per day.
x2 = No. of units of P2 per day.
Objective function:
Min. Z = 100 x1 + 150 x2
Subject to constraints:
3x1+ 5x2 ≥ 30 (for N1)
5x1+ 7x2 ≥ 40 (for N2)
x1, x2 ≥ 0
EXAMPLE 9: BLENDING PROBLEM
A manager at an oil company wants to find optimal mix of two blending processes.
Formulate LPP.
7
Data:
Process Input (Crude Oil) Output (Gasoline)
Grade A Grade B X Y
P1 6 4 6 9
P2 5 6 5 5
Profit per operation: Process 1 (P1) = Rs. 4, 000
Process 2 (P2) = Rs. 5, 000
Maximum availability of crude oil: Grade A = 500 units
Grade B = 400 units
Minimum Demand for Gasoline: X = 300 units
Y = 200 units
Solution:
Decision Variables:
x1 = No. of operations of P1
x2 = No. of operations of P2
Objective Function:
Max. Z = 4000 x1 + 5000 x2
Subjective to constraints:
6x1+ 5x2 ≤ 500
4x1+ 6x2 ≤ 400
6x1+ 5x2 ≥300
9x1+ 5x2 ≥200
x1, x2 ≥ 0
EXAMPLE 10: FARM PLANNING
A farmer has 200 acres of land. He produces three products X, Y & Z. Average yield per acre
for X, Y & Z is 4000, 6000 and 2000 kg.
Selling price of X, Y & Z is Rs. 2, 1.5 & 4 per kg respectively. Each product needs fertilizers.
Cost of fertilizer is Rs. 1 per kg. Per acre need for fertilizer for X, Y & Z is 200, 200 & 100
kg respectively. Labour requirements for X, Y & Z is 10, 12 & 10 man hours per acre. Cost
of labour is Rs. 40 per man hour. Maximum availability of labour is 20, 000 man hours.
Formulate as LPP to maximise profit.
Solution:
Decision variables:
The production/yield of three products X, Y & Z is given as per acre.
Hence,
x1 = No. of acres allocated to X
x2 = No. of acres allocated to Y
x3 = No. of acres allocated to Z
Objective Function:
Profit = Revenue - Cost
Profit = Revenue - (Fertiliser Cost + Labour Cost)
Product X Y Z
Revenue 2 (4000) x1 1.5 (6000) x2 4 (2000) x3
(-) Less:
8
Fertiliser Cost 1 (200) x1 1 (200) x2 1 (100) x3
Labour Cost 40 (10) x1 40 (12) x2 40 (10) x3
Profit 7400 x1 8320 x2 7500 x3
⸫ Objective function
Max. = 7400 x1 + 8320 x2 + 7500 x3
Subject to constraints:
x1 + x2 + x3 = 200 (Total Land)
10 x1 + 12 x2 + 10 x3 ≤ 20, 000 (Max Man hours)
x1, x2, x3 ≥ 0
MERITS OF LPP
1. Helps management to make efficient use of resources.
2. Provides quality in decision making.
3. Excellent tools for adjusting to meet changing demands.
4. Fast determination of the solution if a computer is used.
5. Provides a natural sensitivity analysis.
6. Finds solution to problems with a very large or infinite number of possible solution.
DEMERITS OF LPP
1. Existence of non-linear equation: The primary requirements of Linear Programming is
the objective function and constraint function should be linear. Practically linear relationship
do not exist in all cases.
2. Interaction between variables: LP fails in a situation where non-linearity in the equation
emerge due to joint interaction between some of the activities like total effectiveness.
3. Fractional Value: In LPP fractional values are permitted for the decision variable.
4. Knowledge of Coefficients of the equation: It may not be possible to state all coefficients
in the objective function and constraints with certainty.
9
EXERCISES
1. Explain what is meant by decision variables, objective function and constraints in Linear
Programming.
2. Give the mathematical formulation of the linear programming problems.
3. What are the components of LPP? What is the significance of non-negativity restriction?
4. State the limitations of LPP.
5. Give the assumptions and advantages of LPP.
6. An investor wants to identify how much to invest in two funds, one equity and one debt.
Total amount available is Rs. 5, 00, 000. Not more than Rs. 3, 00, 000 should be invested in a
single fund. Returns expected are 30% in equity and 8% in debt. Minimum return on total
investment should be 15%. Formulate as LPP.
7. A company manufactures two products P1 and P2. Profit per unit for P1 is Rs. 200 and for
P2 is Rs. 300. Three raw materials M1, M2 and M3 are required. One unit of P1 needs 5 units of
M1 and 10 units of M2. One unit of P2 needs 18 units of M2 and 10 units of M3. Availability is
50 units of M1, 90 units of M2 and 50 units of M3. Formulate as LPP.
8. A firm produces two products X and Y. Minimum 50 units of X should be produced. There
is no limit for producing Y. Profit per unit is Rs. 100 for X and Rs. 150 for Y.
Product Resource Requirement Resource Availability
X 20 Machine Hours Machine Hours = 2500
10 Labour Hours Labour Hours = 3000
Y 10 Machine Hours
15 Labour Hours
Formulate as LPP.
9. A patient has been recommended two nutrients N1 and N2 everyday. Minimum intake is
10g for N1 and 15g for N2 everyday.
These nutrients are available in two products P1 and P2. One unit of P1 contains 2g of N1 and
3g of N2. One unit of P2 contains 1g of N1 and 2g of N2. Cost per unit is Rs. 200 for P1 and
Rs. 150 for P2.
Formulate as LPP such that nutrient requirement can be fulfilled at the lowest cost.
10. Two vitamins A and B are to be given as health supplements on daily basis to students.
There are two products Alpha & Beta which contain vitamins A and B. One unit of Alpha
contains 2g of A and 1g of B. One unit of Beta contains 1g of A and 2g of B. Daily
requirements for A and B are atleast 10g each. Cost per unit of Alpha is Rs. 20 and of Beta is
Rs. 30. Formulate as LPP to satisfy the requirements at minimum cost.
------xxx------xxx-----
10
UNIT 3
LINEAR PROGRAMMING SOLUTION - GRAPHICAL METHOD
INTRODUCTION
There are two methods available to find optimal solution to a Linear Programming Problem.
One is graphical method and the other is simplex method.
Graphical method can be used only for a two variables problem i.e. a problem which involves
two decision variables. The two axes of the graph (X & Y axis) represent the two decision
variables X1 & X2.
1
6 X1 = 7200 ⸫ X1 = 1200; X2 = 0 (1200, 0)
To find X2, let X1 = 0
4 X2 = 7200 X2 = 1800; X1 = 0 (0, 1800)
Hence the two points which make the constraint line are:
(1200, 0) and (0, 1800)
Note: When we write co-ordinates of any point, we always write (X1, X2). The value of X1 is
written first and then value of X2. Hence, if for a point X1 is 1200 and X2 is zero, then its co-
ordinates will be (1200, 0).
Similarly, for second point, X1 is 0 and X2 is 1800. Hence, its co-ordinates are (0, 1800).
Constraint No. 2:
2 X1 + 4 X2 ≤ 4000
To find X1, let X2 = 0
2 X1 = 4000 ⸫ X1 = 2000; X2 = 0 (2000, 0)
To find X2, let X1 = 0
4 X2 =4000 ⸫ X2 = 1000; X1 = 0 (0, 1000)
Each constraint will be represented by a single straight line on the graph. There are two
constraints, hence there will be two straight lines.
The co-ordinates of points are:
1. Constraint No. 1: (1200, 0) and (0, 1800)
2. Constraint No. 2: (2000, 0) and (0, 1000)
2
Fig 1.
(0, 1800) 6 X1 + 4 X2 ≤ 7200.
(1200, 0)
Every point on the line will satisfy the equation (equality) 6 X1 + 4 X2 ≤ 7200.
Every point below the line will satisfy the inequality (less than) 6 X1 + 4 X2 ≤ 7200.
Constraint No. 2:
The line joining the two points (2000, 0) and (0, 1000) represents the constraint
2 X1 + 4 X2 ≤ 4000
Every point on the line will satisfy the equation (equality) 2 X 1 + 4 X2 ≤ 4000.
Every point below the line will satisfy the inequality (less than) 2 X1 + 4 X2 ≤ 4000.
Fig 2
(0, 1000)
2 X1 + 4 X2 ≤ 4000.
(2000, 0)
3
(0, 1800) Fig. 3
2 X1 + 4 X2 ≤ 4000.
(1200, 0) (2000, 0)
2 X1 + 4 X2 ≤ 4000
O (1200, 0) C (2000, 0)
Step 6: Finding the optimal Solution
The optimal solution always lies at one of the vertices or corners of the feasible region.
To find optimal solution:
We use corner point method. We find coordinates (X1, X2 Values) for each vertex or corner
point. From this we fine 'Z' value for each corner point.
Vertex Co-ordinates Z = 100 X1 + 80 X2
O X1 = 0, X2 = 0 Z=0
From Graph
A X1 = 0, X2 = 1000 Z = Rs. 80, 000
From Graph
4
B X1 = 800, X2 = 600 Z = Rs. 1, 28, 000
From Simultaneous equations
C X1 = 1200, X2 = 0 Z = Rs. 1, 20, 000
From Graph
Max. Z = Rs. 1, 28, 000 (At point B)
For B B is at the intersection of two constraint lines 6 X1 + 4 X2 ≤ 7200 and 2 X1 + 4
X2 ≤ 4000. Hence, values of X1 and X2 at B must satisfy both the equations.
We have two equations and two unknowns, X1 and X2. Solving simultaneously.
6 X1 + 4 X2 ≤ 7200 (1)
2 X1 + 4 X2 ≤ 4000 (2)
4 X1 = 3200 Subtracting (2) from (1)
X1 = 800
Substituting value of X1 in equation (1), we get
4 X2 = 2400 ⸫ X2 = 600
Solution
Optimal Profit = Max Z = Rs. 1, 28, 000
Product Mix:
X1 = No. of units of A / Month = 800
X2 = No. of units of A / Month = 600
ISO Profit line:
ISO profit line is the line which passes through the points of optimal solution (Maximum
Profit). The slope of the iso-profit line depends on the objective function.
In the above example, the objective function is:
Max. Z = 100 X1 + 80 X2
How to find slope of iso-profit line:
Equation of a straight line: y = mx + c
where, m = slope of the straight line
In our case, y means ' X2' and x means ' X1'.
c means 'Z'.
⸫ X2 = m . X1 + Z
Converting original objective function in this format:
Max. Z = 100 X1 + 80 X2
⸫ 80 X2 = Z - 100 X1 = - 100 X1 + Z
−100 𝑍
⸫ X2 = 80
X1 + 80
−5 𝑍
⸫ X2 = X1 +
4 80
−5
⸫ Slope of ISO profit line = 4
Negative sign indicates that the line will slope from left to right downwards. And slope will
be 5/4. Every 4 units on X-axis for 5 units on Y-axis.
5
Slope of ISO - profit line
As we start from the origin and go away from origin to maximise profit, 'B' is the last point
on the feasible region that is intersected by the iso-profit line. Hence, B is the optimal
solution.
MINIMISATION
Example 2
A firm is engaged in animal breeding. The animals are to be given nutrition supplements
everyday. There are two products A and B which contain the three required nutrients.
Nutrients Quantity/unit Minimum Requirement
A B
1 72 12 216
2 6 24 72
3 40 20 200
Product cost per unit are: A: rs. 40; B: Rs. 80. Find out quantity of product A & B to be given
to provide minimum nutritional requirement.
Step 1: Formulation as LPP
X1 - Number of units of A
X2 - Number of units of B
Z - Total Cost
Min. Z = 40 X1 + 80 X2
Subject to constraints:
72 X1 + 12 X2 ≥ 216
6 X1 + 24 X2 ≥ 72
40 X1 + 20 X2 ≥ 200
X1, X2 ≥ 0.
Step 2: Determination of each axis
Horizontal (X) axis: Product A (X1)
Vertical (Y) axis: Product B (X2)
Step 3: Finding co-ordinates of constraint lines to represent the graph
All constraints are 'greater than or equal to' type. We should convert them into equality:
1. Constraint No. 1: 72 X1 + 12 X2 ≥ 216
Converting into equality
6
72 X1 + 12 X2 = 216
To find X1, let X2 = 0
72 X1 = 216 ⸫ X1 = 3, X2 = 0 (3, 0)
To find X2, let X1 = 0
12 X2 = 216 ⸫ X1 = 0, X2 = 18 (0, 18)
2. Constraint No. 2:
6 X1 + 24 X2 ≥ 72
To find X1, let X2 = 0
6 X1 = 72 ⸫ X1 = 12, X2 = 0 (12, 0)
To find X2, let X1 = 0
24 X2 = 72 ⸫ X1 = 0, X2 = 3 (0, 3)
3. Constraint No. 3:
40 X1 + 20 X2 ≥ 200
To find X1, let X2 = 0
40 X1 = 200 ⸫ X1 = 5, X2 = 0 (5, 0)
To find X2, let X1 = 0
20 X2 = 200 ⸫ X1 = 0, X2 = 10 (0, 10)
The co-ordinates of points are:
1. Constraint No. 1: (3, 0) & (0, 18)
2. Constraint No. 2: (12, 0) & (0, 3)
3. Constraint No. 3: (5, 0) & (0, 5)
Every point on the line will satisfy the equation (equality) 72 X1 + 12 X2 = 216.
Every point above the line will satisfy the inequality (greater than) 72 X1 + 12 X2 = 216.
Similarly, we can draw lines for other two constraints.
Step 5: Feasible Region
40 X1 + 20 X2 ≥ 200
(0, 10)
B
6 X1 + 24 X2 ≥ 72
(0, 3) C
D
(3, 0) (5, 0) (10, 0)
All constraints are greater than or equal to (≥) type. Hence, feasible region should be above
(to the right of) all constraints.
The vertices of the feasible region are A, B, C & D.
7
Step 6: Finding the optimal solution
Corner Point Method
Vertex Co-ordinates Z = 40 X1 + 80 X2
A X1 = 0, X2 = 18 ⸫ Z = 1, 440
From Graph
B X1 = 2, X2 = 6 ⸫ Z = 560
From Simultaneous Equations
C X1 = 4, X2 = 2 ⸫ Z = 320
From Simultaneous Equations
D X1 = 12, X2 = 0 ⸫ Z = 480
From graph
⸫ Min. Z = Rs. 320 (At point 'C')
For B - Point B is at intersection of constraint lines '72 X1 + 12 X2 ≥ 216' and '40 X1 + 20 X2
≥ 200'. Hence, point B should satisfy both the equations.
72 X1 + 12 X2= 216 (1)
40 X1 + 20 X2 = 200 (2)
⸫360 X1 + 60 X2 = 1080 (1) x 5
120 X1 + 60 X2 = 600 (2) x 3
⸫ 240 X1 = 480
X1 = 2
Substituting value of X1 in equation (1), we get:
12 X2= 216 - 144 = 72
X2= 6
For C - Point C is at intersection of constraint lines '6 X1 + 24 X2= 72' and '40 X1 + 20 X2 =
200'. Hence, point C should satisfy both the equations.
6 X1 + 24 X2= 72 (1)
40 X1 + 20 X2 = 200 (2)
30 X1 + 120 X2 = 360 (1) x 5
240 X1 + 120 X2 = 1200 (2) x 6
210 X1 = 840
X1 = 4
Substituting value of X1 in equation (1), we get
24 X2= 72 - 24 = 48
X2= 2
Solution
Optimal Cost = Z min = Rs. 320
Optimal Product Mix:
X1 = No. of units of product A = 4
X2 = No. of units of product B = 2
ISO Cost Line
ISO Cost line passes through the point of optimal solution (Minimum cost)
Objective function: Z = 40 X1 + 80 X2
Equation of straight line: y = mx + c
where m = slope
8
In this case, y is X2 & x is X1
Z = 40 X1 + 80 X2
⸫ 80 X2 = - 40 X1 + Z
⸫ X2 = -1/2x1 + Z/80
⸫ Slope of ISO-cost line = -1/2
Sloping from left to right downwards
MAXIMISATION-MIXED CONSTRAINTS
Example 1
A firm makes two products P1 & P2 and has production capacity of 18 tonnes per day. P 1 &
P2 require same production capacity. The firm must supply at least 4 t of P 1 & 6 t of P2 per
day. Each tonne of P1 & P2 requires 60 hours of machine work each. Maximum machine
hours available are 720. Profit per tonne for P 1 is Rs. 160 & P2 is Rs. 240. Find optimal
solution by graphical method.
LPP Formulation
X1 = Tonnes of P1 / Day
X2 = Tonnes of P2 / Day
Max. Z = 160 X1 + 240 X2
Subject to constraints
X1 ≥ 4
X2 ≥ 6
X1 + X2 ≤ 18
60 X1 + 60 X2 ≤ 720
X1, X2 ≥ 0
Coordinates for constraint lines:
1. X1 ≥ 4 (4, 0) .... No value for X2, ⸫ X2 = 0
2. X2 ≥ 6 (0, 6) .... No value for X1, ⸫ X1 = 0
3. X1 + X2 ≤ 18 (18, 0) (0, 18)
4. 60 X1 + 60 X2 ≤ 720 (12, 0) (0, 12)
If X1 = 0, 60 X2 = 720 ⸫ X2 = 12 (0, 12)
9
If X2 = 0, 60 X1 = 720 ⸫ X1 = 12 ( 12, 0)
Graph: X1: X Axis
X2: Y Axis
Scale:
Maximum value for X1 = 18; Maximum value for X2 = 18; ⸫ Scale: 1 cm = 2 Tonnes.
(0, 18) X1 ≥ 4
X1 + X2 ≤ 18
(0, 12)
60 X1 + 60 X2 ≤ 720
A
(0, 6) B C X2 ≥ 6
Two constraints are 'greater than or equal to' type. Hence, feasible region will be above or to
the right of these constraint lines. Two constraints are 'less than or equal to' type. Hence,
feasible region will be below or to the left of these constraint lines. Hence, feasible region is
ABC.
Optimal Solution
Corner Point Method
Vertex Coordinates Z = 160 X1 + 240 X2
A X1 = 4, X2 = 8 ⸫ Z = Rs. 2, 560
Simultaneous Equation
B X1 = 4, X2 = 6 ⸫ Z = Rs. 2, 080
From Graph
C X1 = 6, X2 = 6 ⸫ Z = Rs. 2, 400
Simultaneous Equations
For A X1 = 4 from graph
A is on the line 60 X1 + 60 X2 = 720
60 X2 = 720 - 60 (4) = 480 ⸫ X2 = 8
For C X2 = 6 from graph
A is on the line 60 X1 + 60 X2 = 720
60 X1 = 720 - 60 (6) = 360 ⸫ X1 = 6
⸫ Z = Rs. 2, 560 (At point 'A')
Solution
Optimal Profit Z. Max = Rs. 2, 560
X1 = Tonnes of P1 = 4 tonnes
X2 = Tonnes of P2 = 8 tonnes.
10
MINIMISATION MIXED CONSTRAINTS
Example 1:
A firm produces two products P and Q. Daily production upper limit is 600 units for total
production. But at least 300 total units must be produced every day. Machine hours
consumption per unit is 6 for P and 2 for Q. At least 1200 machine hours must be used daily.
Manufacturing costs per unit are Rs. 50 for P and Rs. 20 for Q. Find optimal solution for the
LPP graphically.
LPP formulation
X1 = No. of Units of P / Day
X2 = No. of Units of Q / Day
Min. Z = 50 X1 + 20 X2
Subject to constraints
X1 + X2 ≤ 600
X1 + X2 ≥ 300
6 X1 + 2 X2 ≥ 1200
X1, X2 ≥ 0
Coordinates for Constraint lines
1. X1 + X2 = 600
If X1 = 0, X2 = 600 ⸫ (0, 600)
If X2 = 0, 60 X1 = 600 ⸫ (600, 0)
2. X1 + X2 = 300
If X1 = 0, X2 = 300 ⸫ (0, 300)
If X2 = 0, 60 X1 = 300 ⸫ (300, 0)
3. 6 X1 + 2 X2 ≥ 1200
If X1 = 0, 2X2 = 1200 ⸫ X2 = 600 (0, 600)
If X2 = 0, 6 X1 = 1200 ⸫ X1 = 200 (200, 0)
Graph: X1: X Axis
X2: Y Axis
Scale:
Maximum value for X1 = 600; Maximum value for X2 = 600; ⸫ Scale: 1 cm = 50 units.
Feasible region is ABCD.
(0, 600) A
X1 + X2 = 600
6 X1 + 2 X2 ≥ 1200 B
C D
(0, 0) (200, 0) (300, 0) (600, 0)
11
Two constraints are 'greater than or equal to' type. Hence, feasible region will be above or to
the right of these constraint lines. Two constraints are 'less than or equal to' type. Hence,
feasible region will be below or to the left of these constraint lines. Hence, feasible region is
ABCD.
Optimal Solution
Corner Point Method
Vertex Coordinates Z = 160 X1 + 240 X2
A X1 = 0, X2 = 600 ⸫ Z = Rs. 12, 000
From Graph
B X1 = 150, X2 = 150 ⸫ Z = Rs. 10, 500
Simultaneous Equations
C X1 = 300, X2 = 0 ⸫ Z = Rs. 15, 000
From Graph
D X1 = 600, X2 = 0 ⸫ Z = Rs. 30, 000
From Graph
Min. Z = Rs. 10, 500
For B - B is at intersection of two constraint lines '6 X1 + 2 X2 ≥ 1200' and ' X1 + X2 = 300'.
6 X1 + 2 X2 ≥ 1200 (1)
X1 + X2 = 300 (2)
2X1 + 2X2 = 600 (2) X 2
2X1 = 600
X1 = 150
Substituting value in Equation (2), X2 = 150.
Solution
Optimal Cost = Rs. 10, 500/-
X1 = No. of Units of P = 150
X2 = No. of Units of P = 150.
12
EXERCISES
1. What is meant by feasible region in graphical method.
2. What is meant by 'iso-profit' and 'iso-cost line' in graphical solution.
3. Mr. A. P. Ravi wants to invest Rs. 1, 00, 000 in two companies 'A' and 'B' so as not to
exceed Rs. 75, 000 in either of the company. The company 'A' assures average return of 10%
in whereas the average return for company 'B' is 20%. The risk factor rating of company 'A' is
4 on 0 to 10 scale whereas the risk factor rating for 'B' is 9 on similar scale. As Mr. Ravi
wants to maximise his returns, he will not accept an average rate of return below 12% risk or
a risk factor above 6.
Formulate this as LPP and solve it graphically.
4. Solve the following LPP graphically and interpret the result.
Max. Z = 8X1 + 16 X2
Subject to:
X1 + X2 ≤ 200
X2 ≤ 125
3X1 + 6X2 ≤ 900
X1, X2 ≥ 0
5. A furniture manufacturer makes two products - tables and chairs.
Processing of these products is done on two types of machines A and B. A chair requires 2
hours on machine type A and 6 hours on machine type B. A table requires 5 hours on
machine type A and no time on Machine type B. There are 16 hours/day available on
machine type A and 30 hours/day on machine type B. Profits gained by the manufacturer
from a chair and a table are Rs. 2 and Rs. 10 respectively. What should be the daily
production of each of the two products? Use graphical method of LPP to find the solution.
13
Special Cases in Linear Programming
a. Infeasible Solution (Infeasibility)
Infeasible means not possible. Infeasible solution happens when the constraints have
contradictory nature. It is not possible to find a solution which can satisfy all constraints.
B
4 X1 + 8 X2 ≤ 40
A C
4 X1 + 6 X2 ≤ 24
There is no common feasible region for line AB and CD.
Hence, solution is infeasible.
b. Unbounded Solution (Unboundedness)
Unbounded mean infinite solution. A solution which has infinity answer is called unbounded
solution.
In graphical solution, the direction with respect to origin is as follows:
Max Z Min. Z
away from origin towards origin
Maximisation Minimisation
2
Max. Z
There is no upper limit (away from origin), hence the answer will be infinity. This is called
unbounded solution.
c. Redundant Constraint (Redundancy)
A constraint is called redundant when it does not affect the solution. The feasible region does
not depend on that constraint.
Even if we remove the constraint from the solution, the optimal answer is not affected.
Example
Max. Z = 5 X1 + 8 X2
Subject to Constraints
3 X1 + 2 X2 ≤ 24
X1 + 3 X2 ≤ 12
X1 ≤ 16
X1, X2 ≥ 0
(0, 12)
(0, 4)
The feasible region for the above problem is OABC. The 3rd constraint does not affect the
feasible region.
Hence, the constraint X1 ≤ 16 is redundant constraint.
d. Alternate Optimal Solution: (Multiple Optimal Solution)
Alternate or multiple optimal solution means a problem has more than one solution which
gives the optimal answer.
3
There are two or more sets of solution values which give maximum profit or minimum cost.
In graphical method, we come to know that there is optimal solution which is alternative
when:
The iso-profit or iso-cost line is parallel to one of the boundaries of feasible region (they have
the same slope value).
SPECIAL CASES IN SIMPLEX
1. Unbounded Solution
Max Z = 60 X1 + 20X2∆
Subject to
2 X1 + 4X2 ≥ 120
8 X1 + 6X2 ≥ 240
X1, X2 ≥ 0
Solution
Max Z = 60 X1 + 20X2 + 0S1 + 0S2 - MA1 - MA2
Subject to
2 X1 + 4X2 - S1 + A1 = 120
8 X1 + 6X2 - S2 + A1 = 240
X1, X2, S1, S2, A1, A2, ≥ 0
When we solve this LPP by simplex method, we will get the following values in 4th Simplex
Table.
Cj 60 20 0 0 -M -M R.R
C X B X1 X2 S1 S2 A1 A2
0 S2 240 0 10 -4 1 - 60
60 X1 60 1 2 -1/2 0 - 120
Zj 60 120 - 30 0
∆ = Cj - Zj 0 - 100 30 0
Max Positive Cj - Zj = 30
Key Column = S1
But there is no positive Replacement Ration R means there is an Entering variable, but there
is no outgoing variable.
Hence, the solution is unbounded or infinity.
The value of Z (Profit) keeps on increasing infinitely.
2. Infeasible Region
Max Z = 3 X1 + 2 X2
Subject to:
X1 + X2 ≤ 4
2 X1 + X2≥ 10
X1, X2 ≥ 0
Solution
Standard Form
Max Z = 3 X1 + 2 X2 + 0S1 + 0S2 - MA1
Subject to
X1 + X2 + S1 = 4
4
2 X1 + X2 - S2 + A1 = 10
X1, X2, S1, S2, A1 ≥ 0
When we solve this LPP by simplex method, we will get the following values in 2nd Simplex
Table.
Cj 60 20 0 0 -M R.R
C X B X1 X2 S1 S2 A1
3 X1 4 1 1 1 0 0
-M A1 2 -2 -1 -1/2 -1 1
Zj 3 3 + M 3 + 2M M -M
∆ = Cj - Zj 0 - 1 - M -3 -2M -M 0
No positive ∆ value.
All Cj - Zj values are either zero or negative. Hence, test of optimality is satisfied. So, the
solution appears to be optimal. But an artificial variable (A1) is present in the basis, which has
objective function coefficient of - M (infinity).
Hence, the solution is infeasible (Not feasible).
Infeasibility occurs when there is no solution which satisfies all the constraints of the LPP.
Concept of Duality
Every linear programming problem has a mirror image associated with it. If the original
problem is maximisation, the mirror image is minimisation and vice versa.
The original problem is called 'primal' and the mirror image is called 'dual'.
The format of simplex method is such that when we obtain optimal solution of any one out of
primal or dual, we automatically get optimal solution of the other.
For example, if we solve dual by simplex method, we also get optimal solution of primal.
Advantages of Duality
5
1. If primal problem contains a large number of rows and a smaller number of columns we
can reduce the computational procedure by converting into dual.
2. Solution of the dual helps in checking computational accuracy of the primal.
3. Economic interpretation of the dual helps the management in decision making.
For example,
Minimisation LPP can be solved by two methods:
1. Simplex of Dual Method and
2. Artificial Variable Method
Method:1 Simplex of Dual Method
The original problem is called 'Primal'. We convert the problem in its 'Dual'.
Primal Dual
1. Minimisation Problem Min. Z Maximisation Problem Max. Z*
2. Constraints are of ' ≥ ′ type Constraints are of '≤' type.
3. Decision variables are X1, X2 etc. Decision variables are Y1, Y2 etc.
4. Objective function coefficients of primal (4, 3) become RHS of constraints in Dual.
5. RHS of Constraints of Primal (4000, 50, 1400) become objective function coefficients of
Dual.
6. In the LHS (left side) of constraints, all vertical values are written horizontally in Dual.
7. No. of Decision Variables in Primal = No. of constraints in Dual
8. No. of Constraints in Primal = No. of Decision Variables in Dual
For example,
Primal Dual
Min Z = 4 X1 + 3 X2 Max Z = 4000 Y1 + 50 Y2 + 1400 Y3
Subject to: Subject to:
200 X1 + 100 X2 ≥ 4000 200 y1 + 1y2 + 40y3 ≤ 4
1 X1 + 2 X2 ≥ 50 100 y1 + 2y2 + 40y3 ≤ 3
40 X1 + 40 X2 ≥1400
EXERCISES
1. Why an optimal solution to an unbounded maximisation LPP cannot be found in Simplex
Method?
2. What is meant by shadow price of a resource?
6
UNIT 6
SENSITIVITY ANALYSIS
The solution to a LPP is determined by simplex method is a static solution, It means that
solution corresponds to:
But in reality, profit coefficients of variables may increase or decrease. Similarly, availability
of resources may also increase or decrease. In that case, the optimal profit and optimal
quantity (b values) of variables calculated as per Simplex solution will change.
The objective of sensitivity analysis is to determine the new values of solution. If possible,
from the given simplex solution. This will be possible only if the changes (increase/decrease)
in the objective function or constraint capacities is in certain limits. These will be two limits,
lower limit (max. possible decrease) and upper limit (max. possible increase). These two
limits provide the range within which the present simplex table remains optimal.
Hence, if the change in profit or change in capacity constraints is in the range, we can find
new values of the solution. If it is not in the range, we cannot find the new values of the
solution. Because the present simplex table will not remain optimal any more.
1
A. Range for profit coefficients of products:
∆𝑗
Formula =
𝑋𝑛
B. Range for profit coefficients of X1:
∆𝑗
Formula = 𝑋𝑖
We take ration of '∆′ (Cj - Zj) row and ' X1' row:
The ratios will be:
−80/3 − 80 6
= x = - 160
1/6 3 1
100
− − 100 3
3
−2/3
= 3
x − 2 = 50
−20/3 − 20 6
= x = - 40
1/6 3 1
'-' sign indicates decrease in profit & '+' sign indicates increase in profit. It means possible
decrease is 160 or 40. Hence, we can decrease profit by only 40. Possible increase is 50.
⸫ Range for profit coefficient of X1 is:
Original Profit ± (increase or decrease)
100 + 50 = 150
100 - 40 = 60
⸫ Rs. 60 to Rs. 150
It means profit of X1 (transistors) can fluctuate within the range of Rs. 60 to Rs. 150. The
simplex solution will remain optimal in this range.
2. Range for profit coefficient of X2
∆1
Formula = 𝑋2
We take ration of '∆′ (Cj - Zj) row and 'X2 ' row:
−80/3 − 80 6
5/6
= 3
x 5 = - 32
100
− − 100 3
3
5/3
= 3
x − 5 = - 20
−20/3 − 20 6
1/6
= 3
x 1 = 40
Hence, possible decrease is Rs. 20 and possible increase is Rs. 40. Range for profit
coefficient of X2 is
60 - 20 = 40
60 + 40 = 100
Rs. 40 to Rs. 100.
It means the present simplex solution will remain optimal even if profit of X 2
(resistors)fluctuates in the range of Rs. 40 to Rs. 100.
3. Range for profit coefficient of X3
X3 capacitors is not produced.
∆ of X3 = -80/3
It means if we produce X3, we will incur a loss of Rs. 80/3 per unit of X3.So, X3 will be
produced only if present profit of X3 is increased by Rs. 80/3.
⸫ X3 will be produced if its profit becomes [40 + 80/3] = Rs. 200/3 or more than that.
Hence, the present simplex solution remains optimal till the profit value of 200/3 for X 3.
2
⸫ Range for profit coefficient of X3 is
Rs. zero to 200/3.
B. Range for capacity of resources
OR Range for validity of shadow prices of Resources
𝑏
Formula = - [ ]
𝑆𝑛
1. Range for capacity or availability of Engineering hours
Engineering hours is represented in simplex table by slack variable s1:
𝑏
Formula = - [ ]
𝑆1
We will take ratio of 'b' column and 'S1' column.
The ratios will be
200/3 200 3
-[ ]=-[ x ] = - 40
5/6 3 5
100/3 100 −3
-[ ]=-[ x ]= 50
− 2/3 3 2
100/3
- [ − 2/3] = - [- 50] = 50
Hence, possible decrease in capacity is 40 hrs and possible increase in capacity is 50 hrs.
Range for resource capacity of Engineering is:
Original Capacity ± (increase or decrease)
100 + 950) = 150
100 - 40 = 60
⸫ Range is 60 hrs to 150 hrs.
It means the present simplex solution will remain optimal even if availability of Engineering
resource fluctuates between 60 hrs to 150 hrs.
Note: In other words the shadow price of Engineering resource [which is Rs. 100/3] will
remain valid even if the resource availability fluctuates between 60 hrs. to 150 hrs.
2. Range for availability of Direct Labour
𝑏
Formula = - [𝑆2]
The ratios will be
200/3 200 −6
- [ − 1/6 ] = - [ x ] = 400
3 1
100/3 100 6
- [ −1/6 ] = - [ 3
x 1 ]= - 200
100
-[ 0
] = Infinity.
⸫ Range for resource capacity of Direct Labour is:
600 + 400 = 1000
600 - 200 = 400
⸫ Range is 400 hrs to 1000 hrs.
It means the present simplex solution will remain optimal even if availability of Direct
Labour resource fluctuates between 400 hrs to 1000 hrs.
Note: In other words, the shadow price of Direct Labour resource (which is Rs. 20/3) will
remain valid even if the resource availability fluctuates between 400 hrs to 1000 hrs.
3. Range for availability of Admin:
𝑏
Formula = - [𝑆3]
3
The ratios will be
200/3
-[ ] = - [Infinity] = Infinity
0
100/3
-[ ] = - [Infinity]= Infinity
0
100
-[ 1
] = - 100.
It means the capacity can increase upto infinity.
Possible decrease = 100 hrs.
Range for resource capacity of Admin is
300 + Infinity = Infinity
300 - 100 = 200
⸫ Range is 200 hrs to Infinity.
It means the present simplex solution will remain optimal even if availability of Admin
resource fluctuates between 200 hrs to Infinity.
Note: In other words, the shadow price of Admin resource (which is Rs. zero) will remain
valid even if the resource availability fluctuates between 200 hrs to infinity.
c. Effect on the solution due to increase or decrease in the availability of resources
1. What will be the effect on solution if capacity of Engineering is increased by 30%?
Answer:
Original capacity = 100 hrs.
Increase = 30%
New capacity = 130 hrs.
Note:
To find the effect on solution we need to find the range of resource capacity. We can find the
effect on solution only if the new capacity is in the range.
If the new capacity goes out of the range, then we cannot find effect on solution.
Because in that case, the present simplex solution does not remain optimal any more.
From earlier calculation, we know that, Range for resource capacity of Engineering is 60 hrs
to 150 hrs.
⸫ New capacity is in the range.
Change in capacity = 130 - 100 = + 30 hrs.
Hence, we multiply column S1 by + 30.
From that we will get change in 'b' column.
S1 X (+30) = Change in 'b' column
X2 5/3 X + 30 = + 50
X1 -2/3 X + 30 = - 20
Now we can find new basis values.
New Basis:
c X New b
60 X2 200/3 + 50 = 350/3
100 X1 100/3 - 20 = 40/3
New Z = (60 x 350/3) + (100 X 40/3)
New Z = 25, 000/3 Rs.
Increase in optimal profit = 25, 000 - 22, 000/3
= Rs. 1, 000
4
New Optimal Product Mix:
X1 = 40/3 units
X2 = 350/3 units.
2. Can you find out effect on optimal solution if excess capacity of abundant resource is
transferred to Direct Labour?
Answer:
In the optional solution, S3 is present in the basis.
S3 = 100
S3 represents slack value of Admin.
Hence, Admin is abundant resource and its excess (unused) capacity is 100 hrs.
Capacity of Direct Labour = 600 hrs.
If 100 hrs are transferred,
New capacity of Direct labour = 700 hrs.
We, know that range of Direct Labour capacity is 400 hrs to 1000 hrs.
New capacity is in the range.
S1 X (+30) = Change in 'b' column
X2 -1/6 X + 100 = - 100/6 - -50/3
X1 1/6 X + 100 = 100/6 = 50/3
New Basis:
c X New b
60 X2 200/3 - 50/3 = 150/3 = 50
100 X1 100/3 + 50/3 = 150/3 = 50
New Z = (60 x 50) + (100 + 50) = Rs. 8, 000
Increase in optimal profit = 8, 000 - 22, 000/3
= Rs. 2, 000/3
New Optimal Product Mix:
X1 = 50 units
X2 = 50 units.
3. What will be the effect on optimal solution if capacity of Admin is reduced to 175 hrs?
Answer: Range for capacity of Admin = 200 hrs to Infinity.
Since, 175 hrs is out of the range, if Admin capacity is reduced to 175 hr. solution will not
remain optimal.
5
EXERCISES
1. An engineering company BMS Ltd. produces three products A, B and C using three
machines M1, M2 and M3. The resource constraints on M1, M2 and M3 are 96, 40 and 60 hours
respectively. The profits earned by the products A, B and C are Rs. 2, Rs.5 and Rs. 8 per unit
respectively. A simplex optimal solution to maximize the profit is given below where X 1, X2
and X3 are quantities of products A, B and C produced by the company s1, s2 and s3 represent
the slack in the resources M1, M2 and M3. Study the solution given below and answer the
following questions:
C X X1 X2 X3 S1 S2 S3 B
Variables Solution
in the Values
basis
5 X2 1/3 1 0 1/6 - 1/3 0 8/3
8 X3 5/6 0 1 - 1/12 2/3 0 56/3
0 S3 7/3 0 0 - 1/13 - 1/3 1 44/3
∆ = C - Z - 19/3 0 0 - 1/6 - 11/3 0
1. Indicate the shadow price of each resource. Which of the resources are abundant and which
are scarce?
2. What profit margin for product A do you expect the marketing department to secure if it is
to be produced, and justify your advice?
3. Within what range, the profit of product B can change for the above solution to remain
optimal?
4. How would an increase of 10 hours in the resource M2 affect the optimality?
5. If the company BMS Ltd. wishes to raise production which of the three resources should
be given priority for enhancement?
2. A business problem is formulated and expressed below as an LPP. (Profit is in Rs. and
Resources are in units).
Objective function
Maximise Z = 80 X1 + 100 X2
Subject to resource constraints,
X1 + 2X2 ≤ 720 (Resource 1)
5X1 + 4X2 ≤ 1800 (Resource 2)
3X1 + X2 ≤ 900 (Resource 3)
X1, X2 ≥ 0
Simplex algorithm of LPP, applied to the above problem yielded following solution:
Basis B1
Cb Xb X1 X2 S1 S2 S3
100 X2 0 1 5/6 - 1/6 0 300
80 X2 1 0 - 2/3 1/3 0 120
0 S3 0 0 7/6 - 5/6 1 240
Cj 80 100 0 0 0
∆ = Cj - Zj 0 0 - 30 - 10 0
1. Answer the following questions with justification:
a. Is the solution optimal and unique?
6
b. Is the above solution infeasible?
c. What is the maximum profit as per optimal solution?
d. Which resources are abundant and which are scarce as per optimal solution?
2. Find out the range of coefficient of X1 in the objective function for which the above
solution remains optimal.
3. Can you obtain the solution values of basic variables form the optimal solution when
resource constraint (a) Changes to 750 units? If yes, find the new values of the basic
variables.
7
494 CHAPTER 9 LINEAR PROGRAMMING
Standard Form of a A linear programming problem is in standard form if it seeks to maximize the objec-
tive function z 5 c1x1 1 c2 x2 1 . . . 1 cn xn subject to the constraints
Linear Programming
a11x1 1 a12x2 1 . . . 1 a1nxn # b1
Problem
a21x1 1 a22x2 1 . . . 1 a2nxn # b2
.
.
.
am1 x1 1 am2 x2 1 . . . 1 amn xn # bm
where xi $ 0 and bi $ 0. After adding slack variables, the corresponding system of
constraint equations is
a11x1 1 a12x2 1 . . . 1 a1nxn 1 s1 5 b1
a21x1 1 a22x2 1 . . . 1 a2nxn 1 s2 5 b2
.
.
.
am1x1 1 am2x2 1 . . . 1 amnxn 1 s m 5 bm
where si $ 0.
SECTION 9.3 THE SIMPLEX METHOD: MAXIMIZATION 495
REMARK: Note that for a linear programming problem in standard form, the objective
function is to be maximized, not minimized. (Minimization problems will be discussed in
Sections 9.4 and 9.5.)
2x1 1 5x2 1 s1 1 s2 1 s3 5 11
2x1 1 5x2 1 s1 1 s2 1 s3 5 27
2x1 1 5x2 1 s1 1 s2 1 s3 5 90
} Constraints
is as follows.
Basic
x1 x2 s1 s2 s3 b Variables
21 1 1 0 0 11 s1
1 1 0 1 0 27 s2
2 5 0 0 1 90 s3
24 26 0 0 0 0
↑
Current z–value
For this initial simplex tableau, the basic variables are s1, s2, and s3, and the nonbasic
variables (which have a value of zero) are x1 and x2. Hence, from the two columns that are
farthest to the right, we see that the current solution is
x1 5 0, x2 5 0, s1 5 11, s2 5 27, and s3 5 90.
This solution is a basic feasible solution and is often written as
sx1, x2, s1, s2, s3d 5 s0, 0, 11, 27, 90d.
496 CHAPTER 9 LINEAR PROGRAMMING
The entry in the lower–right corner of the simplex tableau is the current value of z. Note
that the bottom–row entries under x1 and x2 are the negatives of the coefficients of x1 and
x2 in the objective function
z 5 4x1 1 6x2.
To perform an optimality check for a solution represented by a simplex tableau, we look
at the entries in the bottom row of the tableau. If any of these entries are negative (as
above), then the current solution is not optimal.
Pivoting
Once we have set up the initial simplex tableau for a linear programming problem, the sim-
plex method consists of checking for optimality and then, if the current solution is not op-
timal, improving the current solution. (An improved solution is one that has a larger z-value
than the current solution.) To improve the current solution, we bring a new basic variable
into the solution––we call this variable the entering variable. This implies that one of the
current basic variables must leave, otherwise we would have too many variables for a basic
solution––we call this variable the departing variable. We choose the entering and
departing variables as follows.
1. The entering variable corresponds to the smallest (the most negative) entry in the
bottom row of the tableau.
2. The departing variable corresponds to the smallest nonnegative ratio of biyaij, in the
column determined by the entering variable.
3. The entry in the simplex tableau in the entering variable’s column and the departing
variable’s row is called the pivot.
Finally, to form the improved solution, we apply Gauss-Jordan elimination to the column
that contains the pivot, as illustrated in the following example. (This process is called
pivoting.)
21 1 1 0 0 11 s1
1 1 0 1 0 27 s2
2 5 0 0 1 90 s3
24 26 0 0 0 0
The objective function for this problem is z 5 4x1 1 6x2.
SECTION 9.3 THE SIMPLEX METHOD: MAXIMIZATION 497
Solution Note that the current solution sx1 5 0, x2 5 0, s1 5 11, s2 5 27, s3 5 90d corresponds to
a z–value of 0. To improve this solution, we determine that x2 is the entering variable,
because 26 is the smallest entry in the bottom row.
Basic
x1 x2 s1 s2 s3 b Variables
21 1 1 0 0 11 s1
1 1 0 1 0 27 s2
2 5 0 0 1 90 s3
24 26 0 0 0 0
↑
Entering
To see why we choose x2 as the entering variable, remember that z 5 4x1 1 6x2. Hence, it
appears that a unit change in x2 produces a change of 6 in z, whereas a unit change in x1
produces a change of only 4 in z.
To find the departing variable, we locate the bi’s that have corresponding positive elements
in the entering variables column and form the following ratios.
11 27 90
5 11, 5 27, 5 18
1 1 5
Here the smallest positive ratio is 11, so we choose s1 as the departing variable.
Basic
x1 x2 s1 s2 s3 b Variables
21 1 1 0 0 11 s1 ← Departing
1 1 0 1 0 27 s2
2 5 0 0 1 90 s3
24 26 0 0 0 0
↑
Entering
Note that the pivot is the entry in the first row and second column. Now, we use Gauss-
Jordan elimination to obtain the following improved solution.
Before Pivoting After Pivoting
21 21
3 4 3 4
1 1 0 0 11 1 1 0 0 11
1 1 0 1 0 27 2 0 21 1 0 16
2 5 0 0 1 90 7 0 25 0 1 35
24 26 0 0 0 0 210 0 6 0 0 66
Basic
x1 x2 s1 s2 s3 b Variables
21 1 1 0 0 11 x2
2 0 21 1 0 16 s2
7 0 25 0 1 35 s3
210 0 6 0 0 66
Note that x2 has replaced s1 in the basis column and the improved solution
sx1, x2, s1, s2, s3d 5 s0, 11, 0, 16, 35d
has a z-value of
z 5 4x1 1 6x2 5 4s0d 1 6s11d 5 66.
In Example 1 the improved solution is not yet optimal since the bottom row still has a
negative entry. Thus, we can apply another iteration of the simplex method to further im-
prove our solution as follows. We choose x1 as the entering variable. Moreover, the small-
est nonnegative ratio of 11ys21d, 16y2 5 8, and 35y7 5 5 is 5, so s3 is the departing
variable. Gauss-Jordan elimination produces the following.
21 21
3 4 3 4
1 1 0 0 11 1 1 0 0 11
2 0 21 1 0 16 2 0 21 1 0 16
7 0 25 0 1 35 1 0 257 0 1
7 5
210 0 6 0 0 66 210 0 6 0 0 66
2 1
3 4
0 1 7 0 7 16
3
0 0 7 1 227 6
257
1
1 0 0 7 5
287
10
0 0 0 7 116
0 0 287 0 10
7 116
In this tableau, there is still a negative entry in the bottom row. Thus, we choose s1 as the
entering variable and s2 as the departing variable, as shown in the following tableau.
SECTION 9.3 THE SIMPLEX METHOD: MAXIMIZATION 499
Basic
x1 x2 s1 s2 s3 b Variables
2 1
0 1 7 0 7 16 x2
3
0 0 7 1 227 6 s2 ← Departing
5 1
1 0 27 0 7 5 x1
8 10
0 0 27 0 7 116
↑
Entering
By performing one more iteration of the simplex method, we obtain the following tableau.
(Try checking this.)
Basic
x1 x2 s1 s2 s3 b Variables
0 1 0 223 1
3 12 x2
7
0 0 1 3 223 14 s1
5
1 0 0 3 213 15 x1
0 0 0 8
3
2
3 132 ← Maximum z-value
In this tableau, there are no negative elements in the bottom row. We have therefore deter-
mined the optimal solution to be
REMARK: Ties may occur in choosing entering and/or departing variables. Should this
happen, any choice among the tied variables may be made.
Because the linear programming problem in Example 1 involved only two decision vari-
Figure 9.18 ables, we could have used a graphical solution technique, as we did in Example 2, Section
x2 9.2. Notice in Figure 9.18 that each iteration in the simplex method corresponds to moving
from a given vertex to an adjacent vertex with an improved z-value.
25
20
(5, 16) s0, 0d s0, 11d s5, 16d s15, 12d
15 (15, 12) z50 z 5 66 z 5 116 z 5 132
10 (0, 11)
5
(0, 0) (27, 0)
The Simplex Method
x1
5 10 15 20 25 30 We summarize the steps involved in the simplex method as follows.
500 CHAPTER 9 LINEAR PROGRAMMING
The Simplex Method To solve a linear programming problem in standard form, use the following steps.
1. Convert each inequality in the set of constraints to an equation by adding slack
(Standard Form) variables.
2. Create the initial simplex tableau.
3. Locate the most negative entry in the bottom row. The column for this entry is called
the entering column. (If ties occur, any of the tied entries can be used to determine
the entering column.)
4. Form the ratios of the entries in the “b-column” with their corresponding positive
entries in the entering column. The departing row corresponds to the smallest non-
negative ratio biyaij . (If all entries in the entering column are 0 or negative, then there
is no maximum solution. For ties, choose either entry.) The entry in the departing row
and the entering column is called the pivot.
5. Use elementary row operations so that the pivot is 1, and all other entries in the
entering column are 0. This process is called pivoting.
6. If all entries in the bottom row are zero or positive, this is the final tableau. If not, go
back to Step 3.
7. If you obtain a final tableau, then the linear programming problem has a maximum
solution, which is given by the entry in the lower-right corner of the tableau.
where x1 $ 0, x2 $ 0, and x3 $ 0.
the initial simplex tableau for this problem is as follows. (Try checking these computations,
and note the “tie” that occurs when choosing the first entering variable.)
SECTION 9.3 THE SIMPLEX METHOD: MAXIMIZATION 501
Basic
x1 x2 x3 s1 s2 s3 b Variables
2 1 0 1 0 0 10 s1
1 2 22 0 1 0 20 s2
0 1 2 0 0 1 5 s3 ← Departing
22 1 22 0 0 0 0
↑
Entering
Basic
x1 x2 x3 s1 s2 s3 b Variables
2 1 0 1 0 0 10 s1 ← Departing
1 3 0 0 1 1 25 s2
1 1 5
0 2 1 0 0 2 2 x3
22 2 0 0 0 1 5
↑
Entering
Basic
x1 x2 x3 s1 s2 s3 b Variables
1 1
1 2 0 2 0 0 5 x1
5
0 2 0 212 1 1 20 s2
1 1 5
0 2 1 0 0 2 2 x3
0 3 0 1 0 1 15
where x1 $ 0, x2 $ 0, and x3 $ 0.
4 1 1 1 0 0 30 s1 ← Departing
2 3 1 0 1 0 60 s2
1 2 3 0 0 1 40 s3
23 22 21 0 0 0 0
↑
Entering
Basic
x1 x2 x3 s1 s2 s3 b Variables
1 1 1 15
1 4 4 4 0 0 2 x1
5 1
0 2 2 212 1 0 45 s2 ← Departing
7 11
0 4 4 214 0 1
65
2 s3
254 214
3 45
0 4 0 0 2
↑
Entering
Basic
x1 x2 x3 s1 s2 s3 b Variables
1 3 1
1 0 5 10 210 0 3 x1
1
0 1 5 215 2
5 0 18 x2
12 1 7
0 0 5 10 210 1 1 s3
1 1
0 0 0 2 2 0 45
This implies that the optimal solution is
sx1, x2, x3, s1, s2, s3d 5 s3, 18, 0, 0, 0, 1d
and the maximum value of z is 45. (This solution satisfies the equation given in the con-
straints because 4s3d 1 1s18d 1 1s0d 5 30.d
SECTION 9.3 THE SIMPLEX METHOD: MAXIMIZATION 503
Applications
How many dozen of each type of fixture should be produced to obtain a maximum profit?
Solution Letting x1, x2, and x3 represent the number of dozen units of Types A, B, and C, respec-
tively, the objective function is given by
Profit 5 P 5 11x1 1 16x2 1 15x3.
Moreover, using the information in the table, we construct the following constraints.
2
3 x1 1 2x2 1 32 x3 # 12,000
2
3 x1 1 23 x2 1 32 x3 # 14,600
1 1 1
2 x1 1 3 x2 1 2 x3 # 12,400
(We also assume that x1 $ 0, x2 $ 0, and x3 $ 0.) Now, applying the simplex method with
the basic feasible solution
sx1, x2, x3, s1, s2, s3d 5 s0, 0, 0, 12,000, 4,600, 2,400d
we obtain the following tableaus.
Basic
x1 x2 x3 s1 s2 s3 b Variables
3
1 2 2 1 0 0 12,000 s1 ← Departing
2 2
3 3 1 0 1 0 4,600 s2
1 1 1
2 3 2 0 0 1 2,400 s3
Basic
x1 x2 x3 s1 s2 s3 b Variables
1 3 1
2 1 4 2 0 0 6,000 x2
1 1 1
3 0 2 23 1 0 600 s2
1 1
3 0 4 216 0 1 400 s3 ← Departing
23 0 −3 8 0 0 96,000
↑
Entering
Basic
x1 x2 x3 s1 s2 s3 b Variables
3 3
0 1 8 4 0 232 5,400 x2
1
0 0 4 216 1 21 200 s2 ← Departing
3
1 0 4 212 0 3 1,200 x1
234
13
0 0 2 0 9 99,600
↑
Entering
Basic
x1 x2 x3 s1 s2 s3 b Variables
0 1 0 1 232 0 5,100 x2
0 0 1 223 4 24 800 x3
1 0 0 0 23 6 600 x1
0 0 0 6 3 6 100,200
From this final simplex tableau, we see that the maximum profit is $100,200, and this is
obtained by the following production levels.
Type A: 600 dozen units
Type B: 5,100 dozen units
Type C: 800 dozen units
REMARK: In Example 4, note that the second simplex tableau contains a “tie” for the
minimum entry in the bottom row. (Both the first and third entries in the bottom row are
23.) Although we chose the first column to represent the departing variable, we could have
chosen the third column. Try reworking the problem with this choice to see that you obtain
the same solution.
TABLE 9.2
The local newspaper limits the number of weekly advertisements from a single company to
ten. Moreover, in order to balance the advertising among the three types of media, no more
than half of the total number of advertisements should occur on the radio, and at least 10%
should occur on television. The weekly advertising budget is $18,200. How many adver-
tisements should be run in each of the three types of media to maximize the total audience?
Solution To begin, we let x1, x2, and x3 represent the number of advertisements in television, news-
paper, and radio, respectively. The objective function (to be maximized) is therefore
20 6 3 1 0 0 0 182 s1 ← Departing
0 1 0 0 1 0 0 10 s2
21 21 1 0 0 1 0 0 s3
29 1 1 0 0 0 1 0 s4
Basic
x1 x2 x3 s1 s2 s3 s4 b Variables
3 1 3 61
1 0 20 20 210 0 0 10 x1
0 1 0 0 1 0 0 10 x2
23 1 7 161
0 0 20 20 10 1 0 10 s3 ← Departing
47 9 37 449
0 0 20 20 210 0 1 10 s4
Basic
x1 x2 x3 s1 s2 s3 s4 b Variables
1 9 3
1 0 0 23 223 223 0 4 x1
0 1 0 0 1 0 0 10 x2
1 14 20
0 0 1 23 23 23 0 14 x3
8 118
0 0 0 23 2 23 247
23 1 12 s4
118,000 272,000 60,000
0 0 0 23 23 23 0 1,052,000
From this tableau, we see that the maximum weekly audience for an advertising budget of
$18,200 is
z 5 1,052,000 Maximum weekly audience
and this occurs when x1 5 4, x2 5 10, and x3 5 14. We sum up the results here.
Number of
Media Advertisements Cost Audience
Television 4 $ 8,000 400,000
Newspaper 10 $ 6,000 400,000
Radio 14 $ 4,200 252,000
Total 28 $18,200 1,052,000
SECTION 9.3 EXERCISES 507
21. A merchant plans to sell two models of home computers at 26. Suppose in Exercise 25 the total time available for assem-
costs of $250 and $400, respectively. The $250 model yields a bling, painting, and packaging is 4000 hours, 2500 hours, and
profit of $45 and the $400 model yields a profit of $50. The 1500 hours, respectively, and that the profit per unit is $48
merchant estimates that the total monthly demand will not (Model A), $50 (Model B), and $52 (Model C). How many
exceed 250 units. Find the number of units of each model that of each type should be produced to obtain a maximum profit?
should be stocked in order to maximize profit. Assume that 27. A company has budgeted a maximum of $600,000 for adver-
the merchant does not want to invest more than $70,000 in tising a certain product nationally. Each minute of television
computer inventory. (See Exercise 21 in Section 9.2.) time costs $60,000 and each one-page newspaper ad costs
22. A fruit grower has 150 acres of land available to raise two $15,000. Each television ad is expected to be viewed by 15
crops, A and B. It takes one day to trim an acre of crop A and million viewers, and each newspaper ad is expected to be
two days to trim an acre of crop B, and there are 240 days per seen by 3 million readers. The company’s market research
year available for trimming. It takes 0.3 day to pick an acre of department advises the company to use at most 90% of the
crop A and 0.1 day to pick an acre of crop B, and there are 30 advertising budget on television ads. How should the
days per year available for picking. Find the number of acres advertising budget be allocated to maximize the total audi-
of each fruit that should be planted to maximize profit, as- ence?
suming that the profit is $140 per acre for crop A and $235 28. Rework Exercise 27 assuming that each one-page newspaper
per acre for B. (See Exercise 22 in Section 9.2.) ad costs $30,000.
23. A grower has 50 acres of land for which she plans to raise 29. An investor has up to $250,000 to invest in three types of in-
three crops. It costs $200 to produce an acre of carrots and vestments. Type A pays 8% annually and has a risk factor of
the profit is $60 per acre. It costs $80 to produce an acre of 0. Type B pays 10% annually and has a risk factor of 0.06.
celery and the profit is $20 per acre. Finally, it costs $140 to Type C pays 14% annually and has a risk factor of 0.10. To
produce an acre of lettuce and the profit is $30 per acre. Use have a well-balanced portfolio, the investor imposes the fol-
the simplex method to find the number of acres of each crop lowing conditions. The average risk factor should be no
she should plant in order to maximize her profit. Assume that greater than 0.05. Moreover, at least one-fourth of the total
her cost cannot exceed $10,000. portfolio is to be allocated to Type A investments and at least
24. A fruit juice company makes two special drinks by blending one-fourth of the portfolio is to be allocated to Type B invest-
apple and pineapple juices. The first drink uses 30% apple ments. How much should be allocated to each type of invest-
juice and 70% pineapple, while the second drink uses 60% ment to obtain a maximum return?
apple and 40% pineapple. There are 1000 liters of apple and 30. An investor has up to $450,000 to invest in three types of
1500 liters of pineapple juice available. If the profit for the investments. Type A pays 6% annually and has a risk factor
first drink is $0.60 per liter and that for the second drink is of 0. Type B pays 10% annually and has a risk factor of 0.06.
$0.50, use the simplex method to find the number of liters of Type C pays 12% annually and has a risk factor of 0.08. To
each drink that should be produced in order to maximize the have a well-balanced portfolio, the investor imposes the
profit. following conditions. The average risk factor should be no
25. A manufacturer produces three models of bicycles. The time greater than 0.05. Moreover, at least one-half of the total
(in hours) required for assembling, painting, and packaging portfolio is to be allocated to Type A investments and at least
each model is as follows. one-fourth of the portfolio is to be allocated to Type B invest-
ments. How much should be allocated to each type of
Model A Model B Model C investment to obtain a maximum return?
Assembling 2 2.5 3 31. An accounting firm has 900 hours of staff time and 100 hours
of reviewing time available each week. The firm charges
Painting 1.5 2 1 $2000 for an audit and $300 for a tax return. Each audit
Packaging 1 0.75 1.25 requires 100 hours of staff time and 10 hours of review time,
and each tax return requires 12.5 hours of staff time and 2.5
The total time available for assembling, painting, and packag- hours of review time. What number of audits and tax returns
ing is 4006 hours, 2495 hours and 1500 hours, respectively. will bring in a maximum revenue?
The profit per unit for each model is $45 (Model A), $50
(Model B), and $55 (Model C). How many of each type
should be produced to obtain a maximum profit?
SECTION 9.4 THE SIMPLEX METHOD: MINIMIZATION 509
32. The accounting firm in Exercise 31 raises its charge for an 35. (Maximize) 36. (Maximize)
audit to $2500. What number of audits and tax returns will Objective function: Objective function:
bring in a maximum revenue? z 5 2.5x1 1 x2 z 5 x1 1 12 x2
In the simplex method, it may happen that in selecting the departing Constraints: Constraints:
variable all the calculated ratios are negative. This indicates an un- 3x1 1 5x2 # 15 2x1 1 3x2 # 20
bounded solution. Demonstrate this in Exercises 33 and 34. 5x1 1 2x2 # 10 2x1 1 3x2 # 35
x1, x2 $ 10 x1, x2 $ 30
33. (Maximize) 34. (Maximize)
C 37. Use a computer to maximize the objective function
Objective function: Objective function:
z 5 x1 1 2x2 z 5 x1 1 3x2 z 5 2x1 1 7x2 1 6x3 1 4x4
Constraints: Constraints: subject to the constraints
2x1 2 3x2 # 1 2x1 1 x2 # 20 1.2x1 1 0.7x2 1 0.83x3 1 0.5x4 # 65
2x1 1 2x2 # 4 22x1 1 x2 # 50 1.2x1 1 0.7x2 1 0.83x3 1 1.2x4 # 96
x1, x2 $ 0 x1, x2 $ 50 0.5x1 1 0.7x2 1 01.2x3 1 0.4x4 # 80
where x1, x2, x3, x4 $ 0.
If the simplex method terminates and one or more variables not in C 38. Use a computer to maximize the objective function
the final basis have bottom-row entries of zero, bringing these
variables into the basis will determine other optimal solutions. z 5 1.2x1 1 x2 1 x3 1 x4
Demonstrate this in Exercises 35 and 36. subject to the same set of constraints given in Exercise 37.
where xi $ 0 and bi $ 0. The basic procedure used to solve such a problem is to convert it
to a maximization problem in standard form, and then apply the simplex method as dis-
cussed in Section 9.3.
In Example 5 in Section 9.2, we used geometric methods to solve the following
minimization problem.
SECTION 9.4 THE SIMPLEX METHOD: MINIMIZATION 509
32. The accounting firm in Exercise 31 raises its charge for an 35. (Maximize) 36. (Maximize)
audit to $2500. What number of audits and tax returns will Objective function: Objective function:
bring in a maximum revenue? z 5 2.5x1 1 x2 z 5 x1 1 12 x2
In the simplex method, it may happen that in selecting the departing Constraints: Constraints:
variable all the calculated ratios are negative. This indicates an un- 3x1 1 5x2 # 15 2x1 1 3x2 # 20
bounded solution. Demonstrate this in Exercises 33 and 34. 5x1 1 2x2 # 10 2x1 1 3x2 # 35
x1, x2 $ 10 x1, x2 $ 30
33. (Maximize) 34. (Maximize)
C 37. Use a computer to maximize the objective function
Objective function: Objective function:
z 5 x1 1 2x2 z 5 x1 1 3x2 z 5 2x1 1 7x2 1 6x3 1 4x4
Constraints: Constraints: subject to the constraints
2x1 2 3x2 # 1 2x1 1 x2 # 20 1.2x1 1 0.7x2 1 0.83x3 1 0.5x4 # 65
2x1 1 2x2 # 4 22x1 1 x2 # 50 1.2x1 1 0.7x2 1 0.83x3 1 1.2x4 # 96
x1, x2 $ 0 x1, x2 $ 50 0.5x1 1 0.7x2 1 01.2x3 1 0.4x4 # 80
where x1, x2, x3, x4 $ 0.
If the simplex method terminates and one or more variables not in C 38. Use a computer to maximize the objective function
the final basis have bottom-row entries of zero, bringing these
variables into the basis will determine other optimal solutions. z 5 1.2x1 1 x2 1 x3 1 x4
Demonstrate this in Exercises 35 and 36. subject to the same set of constraints given in Exercise 37.
where xi $ 0 and bi $ 0. The basic procedure used to solve such a problem is to convert it
to a maximization problem in standard form, and then apply the simplex method as dis-
cussed in Section 9.3.
In Example 5 in Section 9.2, we used geometric methods to solve the following
minimization problem.
510 CHAPTER 9 LINEAR PROGRAMMING
where x1 $ 0 and x2 $ 0. The first step in converting this problem to a maximization prob-
lem is to form the augmented matrix for this system of inequalities. To this augmented
matrix we add a last row that represents the coefficients of the objective function, as
follows.
.. 300
60 60 .
.. 36
12 6 .
.. 90
10 30 .
... ... ... ...
..
0.12 0.15 . 0
Next, we form the transpose of this matrix by interchanging its rows and columns.
..
3 4
60 12 10 .. 0.12
60 6 30 .. 0.15
... ... ... ... ...
..
300 36 90 . 0
Note that the rows of this matrix are the columns of the first matrix, and vice versa. Finally,
we interpret the new matrix as a maximization problem as follows. (To do this, we intro-
duce new variables, y1, y2, and y3.) We call this corresponding maximization problem the
dual of the original minimization problem.
Dual Maximization Problem: Find the maximum value of
z 5 300y1 1 36y2 1 90y3 Dual objective function
where y1 $ 0, y2 $ 0, and y3 $ 0.
As it turns out, the solution of the original minimization problem can be found by
applying the simplex method to the new dual problem, as follows.
SECTION 9.4 THE SIMPLEX METHOD: MINIMIZATION 511
Basic
y1 y2 y3 s1 s2 b Variables
60 12 10 1 0 0.12 s1 ← Departing
60 6 30 0 1 0.15 s2
Basic
y1 y2 y3 s1 s2 b Variables
1 1 1 1
1 5 6 60 0 500 y1
3
0 –6 20 –1 1 100 s2 ← Departing
3
0 24 – 40 5 0 5
↑
Entering
Basic
y1 y2 y3 s1 s2 b Variables
1 1 1 7
1 4 0 40 2120 4000 y1
3 1 1 3
0 210 1 220 20 2000 y3
33
0 12 0 3 2 50
↑ ↑
x1 x2
Thus, the solution of the dual maximization problem is z 5 33 50 5 0.66. This is the same
value we obtained in the minimization problem given in Example 5, in Section 9.2. The
x-values corresponding to this optimal solution are obtained from the entries in the bottom
row corresponding to slack variable columns. In other words, the optimal solution occurs
when x1 5 3 and x2 5 2.
The fact that a dual maximization problem has the same solution as its original
minimization problem is stated formally in a result called the von Neumann Duality
Principle, after the American mathematician John von Neumann (1903–1957).
Theorem 9.2 The objective value w of a minimization problem in standard form has a minimum value
if and only if the objective value z of the dual maximization problem has a maximum
The von Neumann value. Moreover, the minimum value of w is equal to the maximum value of z.
Duality Principle
Solving a Minimization A minimization problem is in standard form if the objective function w 5 c1x1 1 c 2x 2
1 . . . 1 cn x n is to be minimized, subject to the constraints
Problem
a11x1 1 a12 x 2 1 . . . 1 a1n x n $ b1
a21x1 1 a22 x 2 1 . . . 1 a2n x n $ b2
..
.
am1x1 1 am2 x 2 1 . . . 1 amn xn $ bm
where xi $ 0 and bi $ 0. To solve this problem we use the following steps.
1. Form the augmented matrix for the given system of inequalities, and add a bottom
row consisting of the coefficients of the objective function.
..
a11 a12 . . . a1n . b1
..
a21 a22 . . . a2n . b2
..
.
..
am1 am 2 . . . amn . bm
..
... ... ... ... . ...
..
c 1 c ...
2 c n . 0
2. Form the transpose of this matrix.
..
a11 a21 . . . am1 . c1
..
a12 a22 . . . am2 . c2
..
.
..
a1n a2n . . . amn . cn
..
... ... ... ... . ...
..
b 1 b ... b
2 m . 0
3. Form the dual maximization problem corresponding to this transposed matrix. That
is, find the maximum of the objective function given by z 5 b1y1 1 b2y2 1 . . .
1 bmym subject to the constraints
a11y1 1 a21y2 1 . . . 1 am1ym # c1
a12 y1 1 a22 y2 1 . . . 1 am2 ym # c2
..
.
a1ny1 1 a2n y2 1 . . . 1 amnym # cn
where y1 $ 0, y2 $ 0, . . . , and ym $ 0.
4. Apply the simplex method to the dual maximization problem. The maximum value
of z will be the minimum value of w. Moreover, the values of x1, x 2 , . . . , and xn will
occur in the bottom row of the final simplex tableau, in the columns corresponding
to the slack variables.
SECTION 9.4 THE SIMPLEX METHOD: MINIMIZATION 513
where x1 $ 0 and x2 $ 0.
3 4
.
1 1 .. 4
. .
. . . . . . .. . . .
..
3 2 . 0
Thus, the matrix corresponding to the dual maximization problem is given by the follow-
ing transpose.
.
2 1 ..
3 4
3
.
1 1 .. 2
.. .
... ... . ...
.
6 4 .. 0
This implies that the dual maximization problem is as follows.
Dual Maximization Problem: Find the maximum value of
z 5 6y1 1 4y2 Dual objective function
where y1 $ 0 and y2 $ 0. We now apply the simplex method to the dual problem as
follows.
Basic
y1 y2 s1 s2 b Variables
2 1 1 0 3 s1 ← Departing
1 1 0 1 2 s2
26 24 0 0 0
↑
Entering
514 CHAPTER 9 LINEAR PROGRAMMING
Basic
y1 y2 s1 s2 b Variables
1 1 3
1 2 2 0 2 y1
← Departing
1
0 2 212 1
1
2 s2
0 21 3 0 9
↑
Entering
Basic
y1 y2 s1 s2 b Variables
1 0 1 21 1 y1
0 1 21 2 1 y2
0 0 2 2 10
↑ ↑
x1 x2
From this final simplex tableau, we see that the maximum value of z is 10. Therefore, the
solution of the original minimization problem is
w 5 10 Minimum Value
Both the minimization and the maximization linear programming problems in Example
1 could have been solved with a graphical method, as indicated in Figure 9.19. Note in
Figure 9.19 (a) that the maximum value of z 5 6y1 2 4y2 is the same as the minimum value
of w 5 3x1 1 2x2, as shown in Figure 9.19 (b). (See page 515.)
where x1 $ 0, x2 $ 0, and x3 $ 0.
SECTION 9.4 THE SIMPLEX METHOD: MINIMIZATION 515
y1
y1 1 2y2 1 2y3 # 10
y1 1 2y2 1 2y3 # 18 } Dual constraints
1 0 21 1 0 0 2 s1 ← Departing
1
2 0 1 0 1 212 6 s2
1 1
2 1 1 0 0 2 4 y2
22 0 4 0 0 4 32
↑
Entering
516 CHAPTER 9 LINEAR PROGRAMMING
Basic
y1 y2 y3 s1 s2 s3 b Variables
1 0 21 1 0 0 2 y1
3 1 1
0 0 2 22 1 22 5 s2
3
0 1 2 212 0 1
2 3 y2
0 0 2 2 0 4 36
↑ ↑ ↑
x1 x2 x3
From this final simplex tableau, we see that the maximum value of z is 36. Therefore, the
solution of the original minimization problem is
w 5 36 Minimum Value
Applications
Solution To begin, we let x1 and x2 represent the number of days the two refineries are operated.
Then the total cost is given by
..
400 300 . 25,000
..
300 400 . 27,000
..
200 500 . 30,000 .
..
... ... . ...
..
20,000 25,000 . 0
The matrix corresponding to the dual maximization problem is
..
3 4
400 300 200 . 20,000
..
300 400 500 . 25,000
.. .
... ... ... . ...
..
25,000 27,000 30,000 . 0
Basic
y1 y2 y3 s1 s2 b Variables
3 4 1
5 5 1 0 500 50 y3
Basic
y1 y2 y3 s1 s2 b Variables
1 1 1 250
1 2 0 280 2700 7 y1
1 3 1 200
0 2 1 21400 350 7 y3
0 500 0 25 50 1,750,000
↑ ↑
x1 x2
From the third simplex tableau, we see that the solution to the original minimization
problem is
518 CHAPTER 9 LINEAR PROGRAMMING
and this occurs when x1 5 25 and x2 5 50. Thus, the two refineries should be operated for
the following number of days.
Refinery 1: 25 days
Refinery 2: 50 days
Note that by operating the two refineries for this number of days, the company will have
produced the following amounts of oil.
High-grade oil: 25s400d 1 50s300d 5 25,000 barrels
Medium-grade oil: 25s300d 1 50s400d 5 27,500 barrels
Low-grade oil: 25s200d 1 50s500d 5 30,000 barrels
Thus, the original production level has been met (with a surplus of 500 barrels of medium-
grade oil).
9. Objective function: 10. Objective function: 15. Objective function: 16. Objective function:
w 5 x1 1 4x2 w 5 2x1 1 6x2 w 5 2x1 1 x2 w 5 2x1 1 2x2
Constraints: Constraints: Constraints: Constraints:
2x1 1 2x2 $ 3 22x1 1 3x2 $ 0 5x1 1 2x2 $ 09 23x1 1 2x2 $ 6
2x1 1 2x2 $ 2 22x1 1 3x2 $ 9 2x1 1 2x2 $ 10 24x1 1 2x2 $ 2
x1, x2 $ 0 x1, x2 $ 0 x1, x2 $ 00 x1, x2 $ 0
x2 x2 17. Objective function: 18. Objective function:
(0, 3) w 5 8x1 1 4x2 1 6x3 w 5 8x1 1 16x2 1 18x3
3 10
Constraints: Constraints:
8
2 3x1 1 2x2 1 3x3 $ 6 22x1 1 2x2 2 2x3 $ 4
6
(43, 53( 4 (0, 3)
4x1 1 2x2 1 3x3 $ 7 24x1 1 3x2 2 3x3 $ 1
2x1 1 2x2 1 4x3 $ 8 24x1 2 3x2 1 3x3 $ 8
2 (3, 2)
x1 x1, x2, x3 $ 0 x1, x2, x3 $ 0
1 2 3 x1
2 4 6 8 10 19. Objective function: 20. Objective function:
w 5 6x1 1 2x2 1 3x3 w 5 42x1 1 5x2 1 17x3
11. Objective function: 12. Objective function: Constraints: Constraints:
w 5 6x1 1 3x2 w 5 x1 1 6x2 3x1 1 2x2 1 3x3 $ 28 23x1 2 x2 1 7x3 $ 05
Constraints: Constraints: 6x1 1 2x2 1 3x3 $ 24 23x1 2 x2 1 3x3 $ 08
4x1 1 x2 $ 4 2x1 1 3x2 $ 15 3x1 1 2x2 1 2x3 $ 40 26x1 1 x2 1 3x3 $ 16
4x1 1 x2 $ 2 2x1 1 2x2 $ 03 x1, x2, x3 $ 40 x1, x2, x3 $ 00
x1, x2 $ 0 x1, x2 $ 00 In Exercises 21–24, two dietary drinks are used to supply protein
x2 x2 and carbohydrates. The first drink provides 1 unit of protein and 3
units of carbohydrates in each liter. The second drink supplies 2
8 units of protein and 2 units of carbohydrates in each liter. An ath-
(0, 4) lete requires 3 units of protein and 5 units of carbohydrates. Find
4 6
(0, 5) the amount of each drink the athlete should consume to minimize
3
4 the cost and still meet the minimum dietary requirements.
(3, 3)
1 ( 2(
1
2
, 2 21. The first drink costs $2 per liter and the second costs $3 per
liter.
x1 x1
2 3 4 5 2 4 6 22. The first drink costs $4 per liter and the second costs $2 per
liter.
In Exercises 13–20, solve the given minimization problem by solv- 23. The first drink costs $1 per liter and the second costs $3 per
ing the dual maximization problem with the simplex method. liter.
24. The first drink costs $1 per liter and the second costs $2 per
13. Objective function: 14. Objective function: liter.
w 5 x2 w 5 3x1 1 8x2 In Exercises 25–28, an athlete uses two dietary drinks that provide
Constraints: Constraints: the nutritional elements listed in the following table.
26x1 1 5x2 $ 10 2x1 1 7x2 $ 9
Drink Protein Carbohydrates Vitamin D
26x1 1 5x2 $ 03 2x1 1 2x2 $ 4
x1, x2 $ 00 x1, x2 $ 0 I 4 2 1
II 1 5 1
520 CHAPTER 9 LINEAR PROGRAMMING
Find the combination of drinks of minimum cost that will meet 32. A steel company has two mills. Mill 1 costs $70,000 per day
the minimum requirements of 4 units of protein, 10 units of carbo- to operate, and it can produce 400 tons of high-grade steel,
hydrates, and 3 units of vitamin D. 500 tons of medium-grade steel, and 450 tons of low-grade
steel each day. Mill 2 costs $60,000 per day to operate, and it
25. Drink I costs $5 per liter and drink II costs $8 per liter. can produce 350 tons of high-grade steel, 600 tons of
26. Drink I costs $7 per liter and drink II costs $4 per liter. medium-grade steel, and 400 tons of low-grade steel each day.
27. Drink I costs $1 per liter and drink II costs $5 per liter. The company has orders totaling 100,000 tons of high-grade
28. Drink I costs $8 per liter and drink II costs $1 per liter. steel, 150,000 tons of medium-grade steel, and 124,500 tons
of low-grade steel. How many days should the company run
29. A company has three production plants, each of which pro-
each mill to minimize its costs and still fill the orders?
duces three different models of a particular product. The daily
C 33. Use a computer to minimize the objective function
capacities (in thousands of units) of the three plants are as
follows. w 5 x1 1 0.5x2 1 2.5x3 1 3x4
subject to the constraints
Model 1 Model 2 Model 3 1.5x1 1 2x2 1 2.5x3 1 1.2x4 $ 035
1.5x1 1 2x2 1 2.6x3 1 1.4x4 $ 120
Plant 1 8 4 8
1.5x1 1 2x2 1 2.5x3 1 1.2x4 $ 050
Plant 2 6 6 3 0.5x1 1 2x2 1 2.5x3 1 1.5x4 $ 075
where x1, x2, x3, x4 $ 0.
Plant 3 12 4 8
C 34. Use a computer to minimize the objective function
The total demand for Model 1 is 300,000 units, for Model 2 w 5 1.5x1 1 x2 1 0.5x3 1 2x4
is 172,000 units, and for Model 3 is 249,500 units. Moreover, subject to the same set of constraints given in Exercise 33.
the daily operating cost for Plant 1 is $55,000, for Plant 2 is
$60,000, and for Plant 3 is $60,000. How many days should
each plant be operated in order to fill the total demand, and
keep the operating cost at a minimum?
30. The company in Exercise 29 has lowered the daily operating
cost for Plant 3 to $50,000. How many days should each plant
be operated in order to fill the total demand, and keep the op-
erating cost at a minimum?
31. A small petroleum company owns two refineries. Refinery 1
costs $25,000 per day to operate, and it can produce 300 bar-
rels of high-grade oil, 200 barrels of medium-grade oil, and
150 barrels of low-grade oil each day. Refinery 2 is newer
and more modern. It costs $30,000 per day to operate, and it
can produce 300 barrels of high-grade oil, 250 barrels of
medium-grade oil, and 400 barrels of low-grade oil each day.
The company has orders totaling 35,000 barrels of high-grade
oil, 30,000 barrels of medium-grade oil, and 40,000 barrels of
low-grade oil. How many days should the company run each
refinery to minimize its costs and still meet its orders?
4 UNIT FOUR: Transportation and Assignment problems
4.1 Objectives
• use the Stepping Stone method to find an optimal solution of a transportation problem
4.2 Introduction
In this unit we extend the theory of linear programming to two special linear programming
problems, the Transportation and Assignment Problems. Both of these problems can
be solved by the simplex algorithm, but the process would result in very large simplex
tableaux and numerous simplex iterations.
Because of the special characteristics of each problem, however, alternative solution methods
requiring significantly less mathematical manipulation have been developed.
The general transportation problem is concerned with determining an optimal strategy for
distributing a commodity from a group of supply centres,such as factories, called sources,
to various receiving centers, such as warehouses, called destinations, in such a way as to
minimise total distribution costs.
Each source is able to supply a fixed number of units of the product, usually called the
capacity or availability, and each destination has a fixed demand, often called the require-
ment.
105
Transportation models can also be used when a firm is trying to decide where to locate a
new facility. Good financial decisions concerning facility location also attempt to minimize
total transportation and production costs for the entire system.
Example 4.1
A concrete company transports concrete from three plants, 1, 2 and 3, to three construction
sites, A, B and C.
The plants are able to supply the following numbers of tons per week:
The cost of transporting 1 ton of concrete from each plant to each site is shown in the figure
8 in Emalangeni per ton.
For computational purposes it is convenient to put all the above information into a table, as
in the simplex method. In this table each row represents a source and each column represents
a destination.
Sites
PP
P PP To Supply (Avail-
P A B C
From PP ability)
P
1 4 3 8 300
Plants 2 7 5 9 300
3 4 5 5 100
Demand (re-
200 200 300
quirement)
106
Figure 8: Constructing a transportation problem
Before we discuss the solution of transportation problems we will introduce the notation
used to describe the transportation problem and show that it can be formulated as a linear
programming problem.
We use the following notation;
xij = the number of units to be distributed from
source i to destination j
(i = 1, 2, . . . , m; j = 1, 2, . . . , n);
si = supply from source i;
dj = demand at destination j;
cij = cost per unit distributed from
source i to destination j
With respect to Example 4.1 the decision variables xij are the numbers of tons transported
from plant i (where i = 1, 2, 3) to each site j (where j = A, B, C)
A basic assumption is that the distribution costs of units from source i to destination j is
directly proportional to the number of units distributed. A typical cost and requirements
table has the form shown on Table 4.
Let Z be total distribution costs from all the m sources to the n destinations. In example
4.1 each term in the objective function Z represents the total cost of tonnage transported
on one route. For example, in the route 2 −→ C, the term in 9x2C , that is:
107
Destination
1 2 ... n Supply
1 c11 c12 . . . c1n s1
2 c21 c22 . . . c2n s2
. .. .. .. ..
Source .. . . ... . .
m cm1 cm2 . . . cmn sm
Demand d1 d2 . . . dn
Notice that in this problem the total supply is 300 + 300 + 200 = 700 and the total demand
is 200 + 200 + 300 = 700. Thus
This is called a balanced problem . In this unit our discussion shall be restricted to the
balanced problems.
In a balanced problem all the products that can be supplied are used to meet the demand.
There are no slacks and so all constraints are equalities rather than inequalities as was the
case in the previous unit.
The formulation of this problem as a linear programming problem is presented as
m X
X n
Minimise Z = cij xij , (48)
i=1 j=1
subject to
n
X
xij = si , for i = 1, 2, . . . , m (49)
j=1
Xn
xij = dj , for j = 1, 2, . . . , n (50)
i=1
108
and
xij ≥ 0, for all i and j.
Any linear programming problem that fits this special formulation is of the transportation
type, regardless of its physical context. For many applications, the supply and demand
quantities in the model will have integer values and implementation will require that the
distribution quantities also be integers. Fortunately, the unit coefficients of the unknown
variables in the constraints guarantee an optimal solution with only integer values.
The initial basic feasible solution can be obtained by using one of several methods. We
will consider only the North West corner rule of developing an initial solution. Other
methods can be found in standard texts on linear programming.
The procedure for constructing an initial basic feasible solution selects the basic variables
one at a time. The North West corner rule begins with an allocation at the top left-hand
corner of the tableau and proceeds systematically along either a row or a column and make
allocations to subsequent cells until the bottom right-hand corner is reached, by which time
enough allocations will have been made to constitute an initial solution.
The procedure for constructing an initial solution using the North West Corner rule is as
follows:
1. Start by selecting the cell in the most “North-West” corner of the table.
2. Assign the maximum amount to this cell that is allowable based on the require-
ments and the capacity constraints.
3. Exhaust the capacity from each row before moving down to another row.
4. Exhaust the requirement from each column before moving right to another col-
umn.
5. Check to make sure that the capacity and requirements are met.
Let us begin with an example dealing with Executive Furniture corporation, which manu-
factures office desks at three locations: D, E and F. The firm distributes the desks through
regional warehouses located in A, B and C (see the Network format diagram below)
109
Factories Warehouses
(Sources) (Destinations)
- 300 Units
100 Units D 1 A
*
300 Units E -
:q B 200 Units
300 Units F s
q
- C 200 Units
6 6 6
It is assumed that the production costs per desk are identical at each factory. The only
relevant costs are those of shipping from each source to each destination. The costs are
shown in Table 5
PP
PP To
PP A B C
From P PP
D $5 $4 $3
E $8 $4 $3
F $9 $7 $5
We proceed to construct a transportation table and label its various components as show
in Table 6.
We can now use the Northwest corner rule to find an initial feasible solution to the problem.
We start in the upper left hand cell and allocate units to shipping routes as follows:
110
PP
P PP To
P A B C Capacity
From PP
P
D 5 4 3
100
E 8 4 3
300
F 9 7 5
300
Requirements 300 200 200 700
1. Exhaust the supply (factory capacity) of each row before moving down to the next
row.
2. Exhaust the demand (warehouse) requirements of each column before moving to the
next column to the right.
This initial solution can also be presented together with the costs per unit as shown in the
Table 8.
We can compute the cost of this shipping assignment as follows;
Therefore, the initial feasible solution for this problem is $4200.
Example 4.2
Consider a transportation problem in which the cost, supply and demand values are presented
in Table 10.
111
PP
P PP To
P A B C Capacity
From PP
P
D 5 4 3
100 100
E 8 4 3
200 100 300
F 9 7 5
100 200 300
Requirements 300 200 200 700
(b) Obtain the initial feasible solution using the North-West Corner rule.
Solution:
(b) The allocations according to the North-West corner rule are shown in Table 11 The
initial feasible solution is
112
Destination
1 2 3 4 Supply
1 10 30 25 15 14
Source 2 20 15 20 10 10
3 10 30 20 20 15
4 30 40 35 45 13
Demand 10 15 12 15
1 2 3 4 Supply
1 10 4 14
2 10 10
3 1 12 2 15
4 13 13
Demand 10 15 12 15
In each of the following problems check whether the solution is balanced or not then use
the North West Corner rule to find the basic feasible solution.
PP
PPP TO
PP 1 2 3 Supply
FROM PP
1 3 2 0 45
1.
2 1 5 0 60
3 5 4 0 35
Demand 50 60 30
PP
PPP TO
1 2 3 Supply
FROM PPPP
1 5 4 3 100
2.
2 8 4 3 300
3 9 7 5 300
Demand 300 200 200
113
PP
PP TO
P 1 2 3 4 Supply
FROM PPPP
A 12 13 4 6 500
3.
B 6 4 10 11 700
C 10 9 12 4 800
Demand 400 900 200 500
PP
PP TO
PP 1 2 3 4 Supply
FROM P PP
1 10 30 25 15 14
4. 2 20 15 20 10 10
3 10 30 20 20 15
4 30 40 35 45 13
Demand 10 15 12 15
The next step is to determine whether the current allocation at any stage of the solution
process is optimal. We will present one of the methods used to determine optimality of and
improve a current solution. The method derives its name from the analogy of crossing a
pond using stepping stones. The occupied cells are analogous to the stepping stones, which
are used in making certain movements in this method.
The five steps of the Stepping-Stone Method are as follows:
114
STEPPING-STONE METHOD
2. Beginning at this square, trace a closed path back to the original square via
squares that are currently being used (only horizontal or vertical moves allowed).
You can only change directions at occupied cells!.
3. Beginning with a plus (+) sign at the unused square, place alternative minus (-)
signs and plus signs on each corner square of the closed path just traced.
4. Calculate an improvement index, Iij by adding together the unit cost figures
found in each square containing a plus sign and then subtracting the unit costs
in each square containing a minus sign.
5. Repeat steps 1 to 4 until an improvement index has been calculated for all unused
squares.
• If all indices computed are greater than or equal to zero, an optimal solution
has been reached.
• If not, it is possible to improve the current solution and decrease total ship-
ping costs.
If all the cost index values obtained for all the currently unoccupied cells are nonnegative,
then the current solution is optimal. If there are negative values the solution has to be
improved. This means that an allocation is made to one of the empty cells (unused routes)
and the necessary adjustments in the supply and demand effected accordingly.
To see how the Stepping-Stone method works we apply these steps to the Furniture Corpo-
ration example to evaluate the shipping routes.
Steps 1-3 Beginning with the D-B route, we first trace a closed path using only currently oc-
cupied squared (see Table 12) and then place alternate plus signs and minus signs in
the corners of this path.
Step 4 An improvement index Iij for the D-B route in now computed by adding unit costs
in squares with plus signs and subtracting costs in squares with minus signs. Thus
IDB = +4 − 5 + 8 − 4 = +3
This means that for every desk shipped via the D-B route, total transportation costs
will increase by $3 over their current level.
115
PP
PP To
PP A B C Capacity
From PP
P
D 5 Start 4 3
100 - ← + 100
E ↓ 8 ↑ 4 3
200 + → - 100 300
F 9 7 5
100 200 300
Requirements 300 200 200 700
Step 5 Next we consider the D-C unused route. The closed path we use is (see Table 13)
+DC − DA + EA − EB + F B − F C
IDC = +3 − 5 + 8 − 4 + 7 − 5 = +4
PP
PP To
P PP A B C Capacity
From PP
D 5 4 Start 3
100 - ← ←− ←− ← + 100
E ↓ 8 4 ↑ 3
200 + → - 100 ↑ 300
9 ↓ 7 ↑ 5
F + −→ → -
100 200 300
Requirements 300 200 200 700
IEC = +3 − 4 + 7 − 5 = +1
FA route: closed path = +FA - FB + EB - EA
IF A = +9 − 7 + 4 − 8 = −2
Because the IF A index is negative, a cost saving may be attained by making use of the
FA route i.e the FA cell can be improved. The Stepping-Stone path used to evaluate
the route FA is shown in Table 14
116
PP
PP To
P PP A B C Capacity
From PP
D 5 4 3
100 100
E 8 4 3
200 - ← + 100 300
F ↓ 9 ↑ 7 5
Start + → - 100 200 300
Requirements 300 200 200 700
The next step, then is to ship the maximum allowable number of units on the new route (FA
route). What is the maximum quantity that can be shipped on the money-saving route?
The quantity is found by referring to the closed path of plus signs and minus signs drawn
for the route and selecting the smallest number found in those squares containing minus
signs. To obtain a new solution, that number is added to all squares on the closed path
with plus signs and subtracted from all squares on the path assigned minus signs. All other
squares are left unchanged. The new solution is shown in Table 15.
PP
P PP To
P A B C Capacity
From PP
P
D 5 4 3
100 100
E 8 4 3
100 200 300
F 9 7 5
100 200 300
Requirements 300 200 200 700
This solution may or may not be optimal. To determine whether further improvement is
possible, we return to the first five steps to test each square that is now unused. The four
improvement indices - each representing an available shipping route are as follows:
D to B = IDB = 4 − 5 + 8 − 4 = +$3
(Closed path : +DB − DA + EA − EB)
117
D to C = IDC = 3 − 5 + 9 − 5 = +$2
(Closed path : +DC − DA + F A − F C)
E to C = IEC = 3 − 8 + 9 − 5 = −$1
(Closed path : +EC − EA + F A − F C)
F to B = IF B = 7 − 4 + 8 − 9 = +$2
(Closed path : +F B − EB + EA − F A)
Hence, an improvement can be made by shipping the maximum allowable number of units
from E to C (see Table 16).
PP
PP To
P PP A B C Capacity
From PP
D 5 4 3
100 100
E - 8 ← ← 4 ← + 3
100 ↓ 200 Start 300
F ↓ 9 7 ↑ 5
100 + → → → → → - 200 300
Requirements 300 200 200 700
The improved solution is shown in Table 17. The total cost for the third solution is
To determine if the current solution is optimal we calculate the improvement indices - each
PP
P PP To
P A B C Capacity
From PP
P
D 5 4 3
100 100
E 8 4 3
200 100 300
F 9 7 5
200 100 300
Requirements 300 200 200 700
D to B = IDB = 4 − 5 + 9 − 5 + 3 − 4 = +$2
118
(Closed path: + DB − DA + F A − F C + EC − EB)
D to C = IDC = 3 − 5 + 9 − 5 = +$2
(Closed path: + DC − DA + F A − F C)
E to A = IEA = 8 − 9 + 5 − 3 = +$1
(Closed path: + EA − F A + F C − EC)
F to B = IF B = 7 − 5 + 3 − 4 = +$1
(Closed path: + F B − F C + EC − EB)
Table 17 contains the optimal solution because each improvement index for the Table is
greater than or equal to zero.
4.5 Summary
In this section we discussed the formulation of transportation problems and their methods
of solution. We used the North West corner rule to obtain the initial feasible solution and
the Stepping-Stone method to find the optimal solution. We restricted focus to balanced
transportation problems where it is assumed that the total supply is equal to total demand.
Factory D E F Capacity
A 16 20 12 200
B 14 8 18 160
C 26 24 16 90
Demand 180 120 150 450
Determine the optimum distribution for this company to minimize shipping costs.
[E5920]
2. A Timber company ships pine flooring to three building supply houses from its mills
in Bhunya, Mondi and Pigg’s Peak. Determine the best transportation schedule for
the data given below using the Northwest corner rule and the Stepping Stone method.
[E230]
119
PP
PP TO Supply Supply Supply M ill
P
FROM PPPP House 1 House 2 House 3 Capacity (tons)
Bhunya 3 3 2 25
Mondi 4 2 3 40
Pigg’s Peak 3 2 3 30
Supply House
30 30 35 95
Demand (tons)
3. A trucking company has a contract to move 115 truckloads of sand per week between
three sand-washing plants W,X and Y, and three destinations, A,B and C. Cost and
volume information is given below. Compute the optimal transportation cost.
PP
PP To
PP Project A Project B Project C Supply
From PP
P
Plant W 5 10 10 35
Plant X 20 30 20 40
Plant Y 5 8 12 40
Demand 45 50 20
[C=1345]
4. In each of the following cases write down the North West corner solution and use the
Stepping Stone method to find the minimal cost.
PP
PP TO
P PP D E F Capacity
FROM PP
A 8 6 9 20
(a)
B 6 3 8 30
C 10 7 9 70
Demand 90 20 10 120
[E970]
PP
PP TO
P PP D E F Capacity
FROM PP
A 2 2 3 4
(b)
B 2 1 6 6
C 1 3 4 8
Demand 2 5 11 18
[E48]
120
PP
PP TO
P D E F Capacity
FROM PPPP
A 5 2 2 7
(c)
B 7 3 4 5
C 6 4 3 3
Demand 4 5 6
121
4.7 Assignment Problem
The assignment problem refers to the class of linear programming problems that involve
determining the most efficient assignment of
• people to projects
• salespeople to territories
• contracts to bidders
The objective is most often to minimize total costs or total time of performing the tasks at
hand.
One important characteristic of assignment problems is that only one job or worker is
assigned to one machine or project. An example is the problem of a taxi company with
4 taxis and 4 passengers. Which taxi should collect which passenger in order to minimize
costs?
Each assignment problem has associated with it a table, or matrix. Generally, the rows
contain the objects or people we wish to assign, and the columns comprise the tasks or
things we want them assigned to. The numbers in the table are the costs associated with
each particular assignment.
An assignment problem can be viewed as a transportation problem in which
122
PROJECT
PERSON 1 2 3
Adams $11 $14 $6
Brown 8 10 11
Cooper 9 12 7
PROJECT ASSIGNMENT
1 2 3 LABOUR COSTS ($) TOTAL COSTS ($)
Adams Brown Cooper 11 + 10 +7 28
Adams Cooper Brown 11 + 12 +11 34
Brown Adams Cooper 8 + 14 + 7 29
Brown Cooper Adams 8 + 12 + 6 26
Cooper Adams Brown 9 + 14 + 11 34
Cooper Brown Adams 9 + 10 + 6 25
Special algorithms exist to solve assignment problems. The most common is probably the
Hungarian solution method. The Hungarian method of assignment provides us with an
efficient means of finding the optimal solution without having to make a direct comparison
of every assignment option. It operates on a principle of matrix reduction, which means
that by subtracting and adding appropriate numbers in the cost table or matrix, we can
reduce the problem to a matrix of opportunity costs. Opportunity costs show the relative
penalties associated with assigning any person to a project as opposed to making the best
or least-cost assignment. We would like to make assignments such that the opportunity
cost for each assignment is zero.
The steps involved in the Hungarian method are outlined below.
123
THE HUNGARIAN METHOD
(a) Subtracting the smallest number in each row of the original cost table or
matrix from every number in that row.
(b) Then subtracting the smallest number in each column of the table obtained
in part (a) from every number in that column.
2. Test the table resulting from step 1 to see whether an optimal assignment can be
made. The procedure is to draw the minimum number of vertical and horizontal
straight lines necessary to cover all zeros in the table. If the number of lines equals
either the number of rows or columns, an optimal assignment can be made. If
the number of lines is less than the number of rows or columns, we proceed to
step 3.
3. Revise the present opportunity cost table. This is done by subtracting the smallest
number not covered by a line from every other uncovered number. This same
smallest number is also added to any number(s) lying at the intersection of the
horizontal and vertical lines. We then return to step 2 and continue the cycle
until an optimal assignment is possible.
Let us now apply the three steps to the Fix-It-Shop assignment example.
The original cost table for the problem is given in Table 20
PROJECT PROJECT
PERSON 1 2 3 PERSON 1 2 3
Adams 11 14 6 Adams 5 8 0
Brown 8 10 11 Brown 0 2 3
Cooper 9 12 7 Cooper 2 5 0
After the row reduction (Step 1 part a) we get the cost Table 21.
Taking the costs in Table 21 and subtracting the the smallest number in each column from
each number in that column results in the total opportunity costs given in Table 22. This
step is the column reduction of Step 1 part (b)
If we draw vertical and horizontal straight lines (Step 2) to cover all the zeros in Table 22
we get Table 23. Since the number of lines is less than the number of rows or columns an
optimal assignment cannot be made.
Since Table 23 doesn’t give an optimal solution we revise the table. This is accomplished
by subtracting the smallest number not covered by a line from all numbers not covered by
124
PROJECT
PERSON 1 2 3
Adams 5 6 0
Brown 0 0 3
Cooper 2 3 0
PROJECT
PERSON 1 2 3
Adams 5 6 0
Brown 0 0 3
Cooper 2 3 0
a straight line. This same smallest number is then added to every number (including zeros)
lying in the intersection on any two lines. The smallest uncovered number in Table 23 is 2,
so this value is subtracted from each of the four uncovered numbers. A 2 is also added to
the number that is covered by the intersecting horizontal and vertical lines. The results of
this step are shown in Table 24
To test now for an optimal assignment, we return to Step 2 and find the minimum number
of lines necessary to cover all zeros in the revised opportunity cost table. Because it requires
three lines to cover the zeros (see Table 25), an optimal assignment can be made.
PROJECT PROJECT
PERSON 1 2 3 PERSON 1 2 3
Adams 3 4 0 Adams 3 4 0
Brown 0 0 5 Brown 0 0 5
Cooper 0 1 0 Cooper 0 1 0
Table 24: Revised opportunity cost Table 25: Optimality test on the re-
table vised table
Finally, we make the allocation. Note that only one assignment will be made from each row
or column. We use this fact to proceed to making the final allocation as follows:
125
For our Fix-It-Shop problem these steps are summarized in Table 26.
To interpret the table we recall that our objective was to minimize costs, there is only one
assignment that Adams can go to where the opportunity costs are $0. That is to assign
Adams Project 3. If Adams gets assigned to Project 3, then there is only one project left
where the opportunity cost is $0 for Cooper. Therefore Cooper gets assigned to Project 1.
This leaves Brown being assigned to Project 2, where the opportunity costs are $0.
The optimal allocation is to assign Adams to Project 3, Brown to Project 2, and Cooper
to Project 1. The total labour cost of this assignment are computed from the original cost
table (see Table 18). They are as follows:
Example 4.3 Suppose we have to allocate 4 tasks (1,2,3,4) between 4 people (W,X,Y,Z).
The costs are set out in the following table:
Task
Person 1 2 3 4
W 8 20 15 17
X 15 16 12 10
Y 22 19 16 30
Z 25 15 12 9
The entries in the table denote the costs of assigning a task to a particular person.
Solution: Step 1 of the Hungarian method involves the following parts:
(a) subtract the minimum value from each column (see Table 27)
(b) subtract the minimum value from each column (see Table 28)
126
Task Task
Person 1 2 3 4 Person 1 2 3 4
W 0 12 7 9 W 0 9 7 9
X 5 6 2 0 X 5 3 2 0
Y 6 3 0 14 Y 6 0 0 14
Z 16 6 3 0 Z 16 3 3 0
Table 27: Subtract the minimum Table 28: subtract the minimum
value from each row value from each column
The next step is to check whether optimal assignment can be made. This is done by finding
the minimum number of lines necessary to cross-out all the zero cells in the table. If this
is equal to n (the number of people/tasks) then the solution has been found. The minimum
number of lines necessary to cross through all the zeros (see Table 29)is 3 ¡ n = 4 so that
an optimal allocation has not been found.
( Note that there may be more than one way to draw the lines through the zero cells. It
does not matter which way you choose as long as there is no alternative way involving fewer
lines)
Task
Person 1 2 3 4
W 0 9 7 9
X 5 3 2 0
Y 6 0 0 14
Z 16 3 3 0
(a) Finding the minimum uncovered cell. Table 29 shows that the minimum uncovered
cell has a value of 2
(b) Subtracting the value obtained in (a) (i.e subtract 2) from all the uncovered cells.
(c) Adding to all the cells at the intersection of the two lines.
127
Task Task
Person 1 2 3 4 Person 1 2 3 4
W 0 7 5 9 W 0 7 5 9
X 5 1 0 0 X 5 1 0 0
Y 8 0 0 16 Y 8 0 0 16
Z 16 1 1 0 Z 16 1 1 0
Table 30: Revising the Table Table 31: Checking for optimality
Task
Person 1 2 3 4
W 0 7 5 9
X 5 1 0 0
Y 8 0 0 16
Z 16 1 1 0
From the original cost table, we can determine the costs associated with the optimal assign-
ment:
T otal Cost = 48
Some assignment problems are phrased in terms of maximizing the payoff, profit, or effec-
tiveness of an assignment instead of minimization costs. It is easy to obtain an equivalent
minimization problem by converting all numbers in the table to opportunity costs; efficien-
cies to inefficiencies,etc. This is achieved through subtracting every number in the original
payoff table from the largest single number in the number. The transformed entries represent
opportunity costs; it turns out that minimizing the opportunity costs produces the same
128
assignment as the original maximization problem. Once the optimal assignment for this
transformed problem has been computed, the total payoff or profit is found by adding the
original payoffs of those cells that are in the original assignment.
Example. The British Navy wishes to assign four ships to patrol four sectors of the North
Sea. In some areas ships are to be on the outlook for illegal fishing boats, and in other
sectors to watch for enemy submarines, so the commander rates each ship in terms of its
profitable efficiency in each sector. These relative efficiencies are illustrated in Tables 32. On
the basis of the ratings shown, the commander wants to determine the patrol assignments
producing the greatest overall efficiencies.
SECTOR SECTOR
SHIP A B C D SHIP A B C D
1 20 60 50 55 1 80 40 50 45
2 60 30 80 75 2 40 70 20 25
3 80 100 90 80 3 20 0 10 20
4 65 80 75 70 4 35 20 25 30
We start by converting the maximizing efficiency table into a minimization opportunity cost
table. This is done by subtracting each rating from 100, the largest rating in the whole
table. The resulting opportunity costs are given in Table 33.
Next, we follow steps 1 and 2 of the assignment algorithm. The smallest number is sub-
tracted from every number in that row to give Table 34; and then the smallest number in
each column is subtracted from every number in that column as shown in Table 35.
SECTOR SECTOR
SHIP A B C D SHIP A B C D
1 40 0 10 5 1 25 0 10 0
2 20 50 0 5 2 5 50 0 0
3 20 0 10 20 3 5 0 10 15
4 15 0 5 10 4 0 0 5 5
Table 34: Row opportunity costs for Table 35: Total opportunity costs for
the British Navy Problem the British Navy Problem
The minimum number of straight lines needed to cover all zeros in this total opportunity
cost table is four. Hence an optimal assignment can be made. The optimal assignment is
ship 1 to sector D, ship 2 to sector C, ship 3 to sector B, and ship 4 to sector A.
The overall efficiency, computed from the original efficiency data Table 32, can now be
shown:
129
ASSIGNMENT EFFICIENCY
Ship 1 to Sector D 55
Ship 2 to Sector C 80
Ship 3 to Sector B 100
Ship 4 to Sector A 65
Total Efficiency 300
4.9 Summary
In this section we discussed the Hungarian method for solving both maximization and
minimization assignment problems.
1. Three accountants, Phindile, Rachel and Sibongile, are to be assigned to three projects,
1, 2 and 3. The assignment costs in units of E1000 are given in the table below.
Project
1 2 3
P 15 9 12
Accountant R 7 5 10
S 13 4 6
2. Joy Taxi has four taxis, 1,2,3 and 4, and there are four customers, P, Q, R and S
requiring taxis. The distance between the taxis and the customers are given in the
table below, in Kilometres. The Taxi company wishes to assign the taxis to customers
so that the distance traveled is a minimum.
Customers
P Q R S
1 10 8 4 6
Taxis 2 6 4 12 8
3 14 10 8 2
4 4 14 10 8
3. Four precision components are to be shaped using four machine tools, one tool being
assigned to each component. The machining times, in minutes, are given in the table
below.
130
Component
1 2 3 4
A 21 20 39 36
Machine Tool B 25 22 24 25
C 36 22 36 26
D 34 21 25 39
4. In a job shop operation, four jobs may be performed on any of four machines. The
hours required for each job on each machine are presented in the following table. The
plant supervisor would like to assign jobs so that total time in minimized. Use the
assignment method to find the best solution.
MACHINE
JOB W X Y Z
A12 10 14 16 13
A15 12 13 15 12
B2 9 12 12 11
B9 14 16 18 16
1. A head of department has four lecturers to assign to pure maths (1), mechanics (2),
statistics (3) and Quantitative techniques (4). All of the teachers have taught the
courses in the past and have been evaluated with a score from 0 to 100. The scores
are shown in the table below.
1 2 3 4
Peters 80 55 45 45
Radebe 58 35 70 50
Tsabedze 70 50 80 65
Williams 90 70 40 80
The head of department wishes to know the optimal assignment of teachers to courses
that will maximize the overall total score. Use the Hungarian algorithm to solve this
problem. [ P → 1 , R → 3, T → 4, W → 2 Max Score = 285]
2. A department store has leased a new store and wishes to decide how to place four
departments in four locations so as to maximize total profits. The table below gives
the profits, in thousands of emalangeni, when the departments are allocated to the
various locations. Find the assignment that maximizes total profits.
131
Location
1 2 3 4
Shoes 20 16 22 18
Department Toys 25 28 15 21
Auto 27 20 23 26
Housewares 24 22 23 22
3. The head of the business department, has decided to apply the Hungarian method in
assigning lecturers to courses next semester. As a criterion for judging who should
teach each course, the head of department reviews the past two years’ teaching eval-
uations. All the four lecturers have taught each of the courses at one time or another
during the two year period. The ratings are shown in the table below.
Find the best assignment of lecturers to courses to maximize the overall teaching rat-
ing. Total Rating =
335
COURSE
LECTURER STATISTICS MANAGEMENT FINANCE ECONOMICS
Dlamini 90 65 95 40
Khumalo 70 60 80 75
Masuku 85 40 80 60
Nxumalo 55 80 65 55
132