Linear Programming

Download as pdf or txt
Download as pdf or txt
You are on page 1of 34
At a glance
Powered by AI
The key takeaways from the document are that linear programming deals with modeling decision problems to optimize an objective function subject to constraints, and it discusses the formulation and various solution methods of linear programming problems.

The four steps to formulate a linear programming problem are: 1) Identify the decision variables, 2) Identify the constraints, 3) Identify the objective function, 4) Add the non-negativity condition.

The three types of constraints that can be used in linear programming problems are less than or equal to (≤), equal to (=), and greater than or equal to (≥).

0.

1 Linear Programming
0.1.1 Objectives
By the end of this unit you will be able to:
formulate simple linear programming problems in terms of an objective function to be maxi-
mized or minimized subject to a set of constraints.
nd feasible solutions for maximization and minimization linear programming problems using
the graphical method of solution.
solve maximization linear programming problems using the simplex method.
construct the Dual of a linear programming problem.
solve minimization linear programming problems by maximizing their Dual.
0.1.2 Introduction
One of the major applications of linear algebra involving systems of linear equations is in nding
the maximum or minimum of some quantity, such as prot or cost. In mathematics the process
of nding an extreme value (maximum or minimum) of a quantity (normally called a function) is
known as optimization . Linear programming (LP) is a branch of Mathematics which deals
with modeling a decision problem and subsequently solving it by mathematical techniques. The
problem is presented in a form of a linear function which is to be optimized (i.e maximized or
minimized) subject to a set of linear constraints. The function to be optimized is known as the
objective function .
Linear programming nds many uses in the business and industry, where a decision maker may want
to utilize limited available resources in the best possible manner. The limited resources may include
material, money, manpower, space and time. Linear Programming provides various methods of
solving such problems. In this unit, we present the basic concepts of linear programming problems,
their formulation and methods of solution.
0.1.3 Formulation of linear programming problems
Mathematically, the general linear programming problem (LPP) may be stated as:
Maximize or Minimize Z = c
1
x
1
+c
2
x
2
+. . . +c
n
x
n
subject to a
11
x
1
+a
12
x
2
+. . . +a
1n
x
n
(, =, ) b
1
a
21
x
1
+a
22
x
2
+. . . +a
2n
x
n
(, =, ) b
2
(1)
.
.
.
a
m1
x
1
+a
m2
x
2
+. . . +a
mn
x
n
(, =, ) b
m
x
1
, x
2
, . . . , x
n
0
where
i
(i) the function Z is the objective function.
(ii) x
1
, x
2
, . . . , x
n
are the decision variables.
(iii) the expression (, =, ) means that each constraint may take any one of the three signs.
(iv) c
j
(j = 1, . . . , n) represents the per unit cost or prot to the j
th
variable.
(v) b
i
(i = 1, . . . , m) is the requirement or availability of the i
th
constraint.
(vi) x
1
, x
2
, . . . , x
n
0 is the set of non-negative restriction on the LPP. In real life problems
negative decision variables have no valid meaning.
In this module we shall only discuss cases in which the constraints are strictly inequalities (either
have a or ).
In formulating the LPP as a mathematical model we shall follow the following four steps.
1. Identify the decision variables and assign symbols to them (eg x, y, z,. . . or x
1
, x
2
, x
2
,
. . .). These decision variables are those quantities whose values we wish to determine.
2. Identify the set if constraints and express them in terms of inequalities involving the
decision variables.
3. Identify the objective function and express it is terms of the decision variables.
4. Add the non-negativity condition.
We will use the following product mix problem to illustrate the formulation of an LPP.
Example 0.1.1 Prototype Example A paint manufacturer produces two types of paint, one type
of standard quality (S) and the other of top quality (T). To make these paints, he needs two ingre-
dients, the pigment and the resin. Standard quality paint requires 2 units of pigment and 3 units of
resin for each unit made, and is sold at a prot of R1 per unit. Top quality paint requires 4 units
of pigment and 2 units of resin for each unit made, and is sold at a prot of R1.50 per unit. He
has stocks of 12 units of pigment, and 10 units of resin. Formulate the above problem as a linear
programming problem to maximize his prot?
We make the following table from the given data.
Product Available
Ingredients S-Type T-Type Stock
Pigment 2 4 12
Resin 3 2 10
Prot (R/Unit) 1.0 1.5
We follow the four steps outlined above for solving LP problems.
1. In our prototype Example 0.1.1, the number of units of S-type and T-type paint are the decision
variables.
ii
2. The rst constraint is the number of units of pigment available, while the second constraint
is the number of units of resin available. It is required that the total pigment and resin used
does not exceed 12 and 10, respectively.
Pigment: for S is 2 Resin: S = 3
for T is 4 T = 2
Therefore the required mathematical expressions for the constraints are
2S + 4T 12
3S + 2T 10
3. If we let P be the prot, then the objective in our example is to maximize prots
P = S + 1.5T,
i.e. the number of units of S times R1 plus the number of units of T times R1.5 .
4. In addition to the given constraints, there are nonnegativity constraints which ensure that the
solution is meaningful. This is a requirement that whatever the decision, the decision variables
should not be negative.
S 0 , T 0
We can now write the complete mathematical model of the problem described in Example 0.1.1 as
Maximise: P = S + 1.5T
Subject to: 2S + 4T 12
3S + 2T 10
S 0 , T 0
(2)
The above problem is an example of a maximization LPP. Maximization LPPs are usually identied
by the in all the constraints. Minimization problems can be identied by a in all the constraints.
In the next example we formulate a minimization LPP.
Example 0.1.2
(Diet problem) A house wife wishes to mix two types of food F
1
and F
2
in such a way that the
vitamin contents of the mixture contain at least 8 units of vitamin A and 11 units of vitamin B.
Food F
1
costs E60/Kg and Food F
2
costs E80/kg. Food F
1
contains 3 units/kg of vitamin A and 5
units/kg of vitamin B while Food F
2
contains 4 units/kg of vitamin A and 2 units/kg of vitamin B.
Formulate this problem as a linear programming problem to minimize the cost of the mixtures.
We make the following table from the given data.
Vitamin Food (in Kg) Requirement
content F
1
F
2
(in units)
Vitamin A (units/kg) 3 4 8
Vitamin B (units/kg) 5 2 11
Cost (E/Kg) 60 80
iii
In formulating the LPP we use the following steps:
1. The number of kilograms of the foods F
1
and F
2
contained in the mixture are the decision
variables. Let the mixture contain x
1
Kg of Food F
1
and x
2
Kg of food F
2
.
2. In this example, the constraints are the minimum requirements of the vitamins. The minimum
requirement of vitamin A is 8 units. Therefore
3x
1
+ 4x
2
8
Similarly, the minimum requirement of vitamin B is 11 units. Therefore,
5x
1
+ 2x
2
11
3. The cost of purchasing 1 Kg of food F
1
is E60.
The cost of purchasing 1 Kg of food F
2
is E80.
The total cost of purchasing x
1
Kg of food F
1
and x
2
Kg of food F
2
is
C = 60x
1
+ 80x
2
which is the objective function.
4. The non-negativity conditions are
x
1
0, x
2
0
Therefore the mathematical formulation of the LPP is
Minimize: C = 60x
1
+ 80x
2
Subject to: 3x
1
+ 4x
2
8
5x
1
+ 2x
2
11
x
1
0 , x
2
0
0.1.4 The graphical method of solution
The graphical method of solving a linear programming problem is used when there are only two
decision variables. If the problem has three or more variables, the graphical method is not suitable.
In that case we use the simplex method which is discussed in the next section.
We begin by giving some important denitions and concepts that are used in the methods of solving
linear programming problems.
1. Solution A set of values of decision variables satisfying all the constraints of a linear pro-
gramming problem is called a solution to that problem.
2. Feasible solution Any solution which also satises the non-negativity restrictions of the
problem is called a feasible solution.
3. Optimal feasible solution Any feasible solution which maximizes or minimizes the objective
function is called an optimal feasible solution.
iv
4. Feasible region The common region determined by all the constraints and non-negativity
restriction of a LPP is called a feasible region.
5. Corner point A corner point of a feasible region is a point in the feasible region that is
the intersection of two boundary lines.
The following theorem is the fundamental theorem of linear programming .
Theorem 0.1.1 If the optimal value of the objective function in a linear programming problem
exists, then that value must occur at one (or more) of the corner points of the feasible region.
To solve a linear programming problem with two decision variables using the graphical method we
use the procedure outlined below;
Graphical method of solving a LPP
Step 1. Formulate the linear programming problem.
Step 2. Graph the feasible region and nd the corner points.
The coordinates of the corner points can be obtained by
either inspection or by solving the two equations of
the lines intersecting at that point.
Step 3. Make a table listing the value of the objective function
at each corner point.
Step 4. Determine the optimal solution from the table in step 3.
If the problem is of maximization (minimization) type, the solution
corresponding to the largest (smallest) value of the objective
function is the optimal solution of the LPP.
We will now use this procedure to solve some LPP where the model has already been determined.
We use example (0.1.1) for illustration purposes The graph of the LPP is shown in Figure 1.
Step 2
The boundary of the feasible region consists of the lines obtained from changing the inequalities to
equalities; i.e. The lines
2S + 4T = 12 and 3S + 2T = 10
Step 3
The corner points (or extreme points) and their corresponding objective functional values are:
Extreme Points Prot (P = S + 1.5T)
(0, 0) 0
(
10
3
, 0)
10
3
(2, 2) 5
(0, 3) 4.5
Step 4
We therefore deduce that the optimal solution is S = 2 , T = 2 corresponding to a prot P = 5.
Thus prots are maximized when 2 units of standard quality and 2 units of top quality type paint
are produced.
v
T
S
0 1 2 3 4 5 6 7
0
1
2
3
4
5
6
(2,2)

10
3
, 0

(0,3)
3S + 2T = 10
S + 2T = 6
Figure 1: Graphical solution of the model of prototype example
Example 0.1.3
A furniture company produces inexpensive tables and chairs. The production process for each is
similar in that both require a certain number of hours of carpentry work and a certain number of
labour hours in the painting department.
Each table takes 4 hours of carpentry and 2 hours in the painting department. Each chair requires
3 hours of carpentry and 1 hour in the painting department. During the current production period,
240 hours of carpentry time are available and 100 hours in painting is available. Each table sold
yields a prot of E7; each chair produced is sold for a E5 prot.
Find the best combination of tables and chairs to manufacture in order to reach the maximum prot.
Solution:
We begin by summarizing the information needed to solve the problem in the form of a table. This
helps us understand the problem being faced.
Hours required
to make 1 Unit
Department Tables Chairs Available Hours
Carpentry 4 3 240
Painting 2 1 100
Prot 7 5
The objective is to maximize prot.
vi
The constraints are
1. The hours of carpentry time used cannot exceed 240 hours per week.
2. The hours of painting time used cannot exceed 100 hours per week.
3. The number of tables and chairs must be non-negative.
The decision variables that represent the actual decision to be made are dened as
x
1
= number of tables to be produced
x
2
= number of chairs to be produced
Now we can state the linear programming (LP) problem in terms of x
1
and x
2
and Prot (P).
maximize P = 7x
1
+ 5x
2
(Objective function)
subject to 4x
1
+ 3x
2
240 (hours of carpentry constraint)
2x
1
+x
2
100 (hours of painting constraint)
x
1
0, x
2
0 (Non-negativity constraint)
To nd the optimal solution to this LP using the graphical method we rst identify the region of
feasible solutions and the corner points of the of the feasible region. The graph for this example is
plotted in gure (2)
In this example the corner points are (0,0), (50,0), (30,40) and (0,80). Testing these corner points
on P = 7x
1
+ 5x
2
gives
Corner Point Prot
(0, 0) 0
(50, 0) 350
(30, 40) 410
(0, 80) 400
Because the point (30,40) produces the highest prot we conclude that producing 30 tables and 40
chairs will yield a maximum prot of E410.
Example 0.1.4
A small brewery produces Ale and Beer. Suppose that production is limited by scarce resources of
corn, hops and barley malt. To make Ale 5kg of Corn, 4kg of hops and 35kg of malt are required.
To make Beer 15kg of corn, 4 kg of hops and 20kg of malt are required. Suppose that only 480 kg of
corn, 160kg of hops and 1190 kg of malt are available. If the brewery makes a prot of E13 for each
kg of Ale and E23 for each kg of Beer, how much Ale and Beer should the brewer produce in order
to maximize prot?
Solution:
The given information is summarized in the table below.
vii
x1
x2
0 10 20 30 40 50 60 70
0
10
20
30
40
50
60
70
80
90
100
110
(30,40)
4x
1
+3x
2
=240
2x1 +x2 =100
Figure 2: Graphical solution of the carpentry/painting model
Beverages Available
Ingredients Ale Beer quantity
Corn(Kg) 5 15 480
Hops (Kg) 4 4 160
Malt (Kg) 35 20 1190
Prot 13 23
The decision variables are
1. x
1
the amount of Ale to be produced.
2. x
2
the amount of Beer to be produced.
The prot function is given by P = 13x
1
+23x
2
. Thus the LP problem can be formulated as follows:
Maximize P = 13x
1
+ 23x
2
Subject to 5x
1
+ 15x
2
480
4x
1
+ 4x
2
160
35x
1
+ 20x
2
1190
x
1
0 , x
2
0
viii
x
1
x
2
0 5 10 15 20 25 30 35 40 45
0
5
10
15
20
25
30
35
40
45
(0,32)
(0,0)
(34,0)
(26,14)
(12,28)
35x
1
+ 20x
2
= 1190
5x
1
+ 15x
2
= 480
4x
1
+ 4x
2
= 160
Figure 3: Graphical solution of the brewery model
The graph for this example is plotted in gure (3)
The corner points in this example are (0,0), (0,32), (12,28), (26,14) and (34,0). Testing these
corner points on P = 13x
1
+ 23x
2
gives
Corner Point Prot
(0, 0) 0
(0, 32) 736
(12, 28) 800
(26, 14) 660
(34, 0) 442
Because the point (12,28) produces the highest prot we conclude that producing 12 Kg of Ale and
28 Kg of Beer will yield a maximum prot of E800.
Example 0.1.5 (Medicine) A patient in a hospital is required to have at least 84 units of drug
A and 120 units of drug B each day. Each gram of substance M contains 10 units of drug A and 8
units of drug B, and each gram of substance N contains 2 units of drug A and 4 units of drug B.
Now suppose that both M and N contain an undesirable drug C, 3 units per gram in M and 1 unit
per gram in N. How many grams of substances M and N should be mixed to meet the minimum daily
requirements at the same time minimize the intake of drug C? How many units of the undesirable
drug C will be in this mixture?
Solution: We start by summarizing the given data in the following table;
ix
AMOUNT OF DRUG PER GRAM MINIMUM DAILY
Substance M Substance N REQUIREMENT
Drug A 10 Units 2 units 84 units
Drug B 8 units 4 units 120 units
Drug C 3 units 1 unit
To form the mathematical model, we start by identifying the decision variables.
Let: x
1
= Number of grams of substance M used.
x
2
= Number of grams of substance N used.
The objective is to minimize the intake of drug C. In terms of the decision variables, the objective
function is
C = 3x
1
+x
2
which gives the amount of the undesirable drug C in x
1
grams of M and x
2
grams of N.
The following conditions must be satised to meet daily requirements:
_
_
Number of units of
drug A
in x
1
grams of substance M
_
_
+
_
_
Number of units of
drug A
in x
2
grams of substance N
_
_
84
_
_
Number of units of
drug B
in x
1
grams of substance M
_
_
+
_
_
Number of units of
drug B
in x
2
grams of substance N
_
_
120
(Number of grams of substance M used) 0
(Number of grams of substance N used) 0
Writing the above constraint inequalities in terms of the decision variables x
1
and x
2
and including
the objective function we obtain the following linear programming model.
Minimize C = 3x
1
+x
2
Subject to 10x
1
+ 2x
2
84
8x
1
+ 4x
2
120
x
1
0 , x
2
0
Figure 4 shows the graph of the feasible region obtained by plotting the system of inequalities. The
evaluation of the objective function at each corner point is show in the table below.
CORNER POINT
(x
1
, x
2
) C = 3x
1
+x
2
(0,42) 42
(4,22) 34
(15,0) 45
x
0 5 10 15 20 25 30 35 40 45
0
5
10
15
20
25
30
35
40
45
Feasible Region
(0, 42)
(15, 0)
(4, 22)
Figure 4: Graphical solution of the medicine minimization example
The graphical method is the easiest way to solve a small LP problem. However this method is useful
only when there are two decision variables. When there are more than two decision variables, it is
not possible to plot the solution on a two-dimensional graph and we must turn to more complex
methods.
The graphical nature of the above method makes its use limited to problems involving only two
decision variables. For such problems it is possible to represent the constraints graphically. A
graphical solution for a problem with a higher number of decision variables than two cannot be
practically obtained because of the complexity of the graphs in higher dimensional spaces. An
additional limitation of this method is that if the graph is not good, the answer may be very
inaccurate.
A very useful method of solving linear programming problems of any size is the so called Simplex
method. The use of computers has made this method a viable tool for solving linear programming
problems involving a very large number of decision variables.
0.1.5 Summary
In this section we have formulated linear programming problems and used a graphical method to
obtain solutions to such problems. The types of problems we considered were maximization and
minimization problems in which an objective function was either maximized or minimized subject
to a set of constraints.
xi
0.1.6 Exercise: Maximization problems
Use the graphical method to solve each of the following LP problems.
1. A wheat and barley farmer has 168 hectare of ploughed land, and a capital of E2000. It costs
E14 to sow one hectare wheat and E10 to sow one hectare of barley. Suppose that his prot is
E80 per hectare of wheat and E55 per hectare of barley. Find the optimal number of hectares
of wheat and barley that must be ploughed in order to maximize prot? What is the maximum
prot? [80,88], Prot E11 240
2. An company manufactures two electrical products: air conditioners and large fans. The as-
sembly process for each is similar in that both require a certain amount of wiring and drilling.
Each air conditioner takes 3 hours of wiring and 2 hours of drilling. Each fan must go through
2 hours of wiring and 1 hour of drilling. During the next production period, 240 hours of wiring
time are available and up to 140 hours of drilling time may be used. Each air conditioner sold
yields a prot of E25. Each fan assembled may be sold for a prot of E15. Formulate and
solve this linear programming mix situation to nd the best combination of air conditioners
and fans that yields the highest prot. [40 air conditioners, 60 fans, prot E1900]
3. A manufacturer of lightweight mountain tents makes a standard model and an expedition
model for national distribution. Each standard tent requires 1 labour hour from the cutting
department and 3 labour hours from the assembly department. Each expedition tent requires 2
labour hours from the cutting department and 4 labour hours from the assembly department.
The maximum labour hours available per day in the cutting department and the assembly
department are 32 and 84 respectively. If the company makes a prot of E50 on each standard
tent and E80 on each expedition tent, use the graphical method to determine how many tents
of each type should be manufactured each day to maximize the total daily prot? [E1480]
4. A manufacturing plant makes two types of inatable boats, a two-person boat and a four-
person boat. Each two-person boat requires 0.9 labour hours from the cutting department
and 0.8 labour hours from the assembly department. Each four-person boat requires 1.8
labour hours from the cutting department and 1.2 labour hours from the assembly department.
The maximum labour hours available per month in the cutting department and the assembly
department are 864 and 672 respectively. The company makes a prot of E25 on each two-
person boat and E40 on each four-person boat. Use the graphical method to nd the maximum
prot. [E21 600]
5. LESCO Engineering produces chairs and tables. Each table takes four hours of labour from
the carpentry department and two hours of labour from the nishing department. Each chair
requires three hours of carpentry and one hour of nishing. During the current week, 240
hours of carpentry time are available and 100 hours of nishing time. Each table produced
gives a prot of E70 and each chair a prot of E50. How many chairs and tables should be
made in order to maximize prot? [40,30], P = E410
6. A company manufactures two products X and Y. Each product has to be processed in three
departments: welding, assembly and painting. Each unit of X spends 2 hours in the welding
department, 3 hours in assembly and 1 hour in painting. The corresponding times for a unit
of Y are 3,2 and 1 respectively. The man-hours available in a month are 1500 for the welding
department, 1500 in assembly and 550 in painting. The contribution to prots and xed
xii
overheads are E100 for product X and E120 for product Y. Formulate the appropriate linear
programming problem and solve it graphically to obtain the optimal solution for the maximum
contribution. [150, 400], P = 63000
7. Suppose a manufacturer of printed circuits has a stock of 200 resistors, 120 transistors and 150
capacitors and is required to produce two types of circuits.
Type A requires 20 resistors, 10 transistors and 10 capacitors.
Type B requires 10 resistors, 20 transistors and 30 capacitors.
If the prot on type A circuits is E5 and that on type B circuits is E12, how many of each
circuit should be produced in order to maximize prot? [6,3], P = 66
8. A small company builds two types of garden chairs.
Type A requires 2 hours of machine time and 5 hours of craftsman time.
Type B requires 3 hours of machine time and 5 hours of craftsman time.
Each day there are 30 hours of machine time available and 60 hours of craftsman time. The
prot on each type A chair is E60 and on each type B chair is E84. Formulate the appropri-
ate linear programming problem and solve it graphically to obtain the optimal solution that
maximizes prot. [6,6], P = 864
9. Namboard produces two gift packages of fruit. Package A contains 20 peaches, 15 apples and
10 pears. Package B contains 10 peaches, 30 apples and 12 pears. Namboard has 40 000
peaches, 60 000 apples and 27 000 pears available for packaging. The prot on package A is
E2.00 and the prot on B is E2.50. Assuming that all fruit packaged can be sold, what number
of packages of types A and B should be prepared to maximize the prot? [750 type A, 1625
type B]
10. A factory manufactures two products, each requiring the use of three machines. The rst
machine can be used at most 70 hours; the second machine at most 40 hours; and the third
machine at most 90 hours. The rst product requires 2 hours on Machine 1, 1 hour on Machine
2, and 1 hour on Machine 3; the second product requires 1 hour each on machines 1and 2 and
3 hours on Machine 3. If the prot in E40 per unit for the rst product and E60 per unit
for the second product, how many units of each product should be manufactured to maximize
prot? [24,22, P = 2280]
xiii
0.1.7 Exercises 3.2: Minimization problems
1. A house wife wishes to mix together two kinds of food, I and II, in such a way that the mixture
contains at least 10 units of vitamin A, 12 units of vitamin B and 8 units of vitamin C. The
vitamin contents of one kg of food is given below;
Vitamin A Vitamin B Vitamin C
Food I 1 2 3
Food II 2 2 1
One Kg of food I costs E6 and one Kg of food II costs E10. Formulate the above problem as
a linear programming problem and nd the least cost of the mixture which will produce the
diet. [2,4, cost = E52]
2. A chicken farmer can buy a special food mix A at 20c per Kg and special food mix B at 40c per
Kg. Each Kg of mix A contains 3000 units of nutrient N
1
and 1000 units of nutrient N
2
; each
Kg of mix B contains 4000 units of nutrient N
1
and 4000 units of nutrient N
2
. If the minimum
daily requirements for the chickens collectively are 36000 units of nutrient N
1
and 20000 units
of nutrient N
2
, how many pounds of each food mix should be used each day to minimize daily
food costs while meeting (or exceeding) the minimum daily nutrient requirements? What is
the minimum daily cost? [8kg of mix A, 3 kg of mix B; C = E2.80 per day]
3. A farmer can buy two types of plant food, mix A and mix B. Each cubic metre of mix A
contains 20 kg of phosphoric acid, 30 kg of nitrogen, and 5 kg of potash. Each cubic metre of
mix B contains 10 kg of phosphoric acid, 30 kg of nitrogen and 10 kg of potash. The minimum
monthly requirements are 460 kg of phosphoric acid, 960 kg of nitrogen, and 220 kg of potash.
If mix A costs E30 per cubic metre and mix B costs E35 per cubic metre, how many cubic
metres of each mix should the farmer blend to meet the minimum monthly requirements at a
minimal cost? What is the cost? [20 m
3
, 12 m
3
, E1020]
4. A city council voted to conduct a study on inner city community problems. A nearby university
was contacted to provide sociologists and research assistants. Allocation of time and costs per
week are given in the table. How many sociologists and how many research assistants should
be hired to minimize the cost and meet the weekly labour-hour requirements? What is the
weekly cost?
LABOUR HOURS MINIMUM LABOUR-
Research HOURS NEEDED
Sociologist Assistant PER WEEK
FIELDWORK 10 30 180
RESEARCH CENTRE 30 10 140
COSTS PER WEEK (E) 500 300
5. A laboratory technician in a medical research centre is asked to formulate a diet from two
commercially packaged foods, food A and food B, for a group of animals. Each kg of food A
contains 8 units of fat, 16 units of carbohydrates, and 2 units of protein. Each Kg of food B
contains 4 units of fat, 32 units of carbohydrate and 8 units of protein. The minimum daily
requirements are 176 units of fat, 1024 units of carbohydrate, and 384 units of protein. If
xiv
food A costs 5c per Kg and food B costs 5c per Kg, how many kilograms of each food should
be used to meet the minimum daily requirements at the least cost? What is the cost of this
amount?
6. A can of cat food, guaranteed by the manufacturer to contain at least 10 units of protein, 20
units of mineral matter, and 6 units of fat, consists of a mixture of four dierent ingredients.
Ingredient A contains 10 units of protein, 2 units of mineral matter, and
1
2
unit of fat per
100g. Ingredient B contains 1 unit of protein, 40 units of mineral matter, and 3 units of fat
per 100g. Ingredient C contains 1 unit of protein, 1 unit of mineral matter, and 6 units of fat
per 100g. Ingredient D contains 5 units of protein, 10 units of mineral matter, and 3 units
of fat per 100g. The cost of each ingredient is 3c, 2c, 1c, and 4c per 100g, respectively. How
many grammes of each should be used to minimise the cost of the cat food, while still meeting
the guaranteed composition?
xv
0.1.8 The simplex method - maximisation
The Simplex method is based on an understanding of the algebra of the linear programming problem
being solved. We begin by stating a general maximising linear programming problem involving n
unknown (or decision ) variables and m constraints as
Maximise: z = c
1
x
1
+c
2
x
2
+. . . +c
n
x
n
Subject to: a
11
x
1
+a
12
x
2
+. . . +a
1n
x
n
b
1
a
21
x
1
+a
22
x
2
+. . . +a
2n
x
n
b
2
.
.
.
a
m1
x
1
+a
m2
x
2
+. . . +a
mn
x
n
b
m
x
1
, x
2
, . . . , x
n
0
(3)
or equivalently
max z =
n

i=1
c
i
x
i
subj. to:
n

i=1
a
ki
x
i
b
k
(4)
k = 1, 2, . . . , m
x
i
0 , i = 1, 2, . . . , n (5)
We note in particular that all the constraints involve the sign. We will use this type of maximising
linear programming problem to introduce the Simplex method. Other types of inequalities as well
as the minimising problem will be discussed later. The number m, of constraints, can be less, equal
or even greater than n.
The Simplex method is similar to the graphical method in that it uses the extreme points of the
feasible region to search for the solution. The main dierence is that with the Simplex method, once
the initial vertex has been chosen, movement from one vertex to another is in such a way that the
value of the objective function improves with each move. Although there are n +m variables in m
equations, the solution of the problem concerns the n variables in the original constraints. If m < n
then some of the decision variables will have zero values.
Before we can employ the Simplex method we need to rewrite the problem in a standard form in
which the constraints are equations rather than inequalities.
Standard Form
We consider the k-th constraint of the general linear programming problem (3)
a
k1
x
1
+a
k2
x
2
+. . . +a
kn
x
n
b
k
(6)
We convert the k-th inequality constraint to an equality constraint by introducing a new variable,
x
n+k
0, called a slack variable. The name of the variable derives from the fact that if the left
hand side of the constraint is to balance with the right hand side of the constraint, then something
has to be added to the left side.
xvi
If we do this for each of the m constraints we can write the standard form of the system (4) as
Maximise z =

n
i=1
c
i
x
i
Subject to:

n
i=1
a
ki
x
i
+x
n+k
= b
k
k = 1, 2, . . . , m
x
i
0 , x
n+k
0 , i = 1, 2, . . . , n
(7)
We can write the standard form of the linear programming problem as a set of matrix equations
z = Cx
Ax = b (8)
where
A =
_

_
a
11
a
12
. . . a
1n
1 0 . . . 0
a
21
a
22
. . . a
2n
0 1 . . . 0
.
.
. . . .
.
.
.
.
.
.
.
.
.
a
m1
a
m2
. . . a
mn
0 0 . . . 1
_

_
(9)
and
C =
_

_
c
1
c
2
.
.
.
c
n
0
0
.
.
.
0
_

_
T
, x =
_

_
x
1
x
2
.
.
.
x
n
x
n+1
.
.
.
x
n+m
_

_
, b =
_

_
b
1
b
2
.
.
.
b
m
_

_
(10)
We note the following about the standard linear programming problem:
1. The objective function is unchanged. The slack variables can be included in the objective
function with zero coecients.
2. The m constraints of the new system are represented by m equations and there are now n+m
unknown variables (the solution variables plus the slack variables);
3. All the variables including the slack variables are nonnegative;
4. The right side values are nonnegative.
Denition 0.1.1 A set of variables x
i
, together which satisfy the equality constraints Ax = b are
said to be basic variables. These basic variables form a basic solution or a basis. If all the basic
variables are nonnegative then they form a basic feasible solution. We note that a basic feasible
solution may not necessarily optimise the objective function.
In relation to the graphical approach we point out that every basic feasible solution is an extreme
point of the feasible region, and conversely, every extreme point is a basic feasible solution.
As we discuss the Simplex procedure we will use our prototype example of the paint mix problem
presented by the linear programme (2), whose solution has been previously found using the graphical
method.
xvii
The linear programming problem (2) is restated below with a slight change in the names of the
decision variables (x
1
instead of S and x
2
instead of T) as
Maximise: P = x
1
+ 1.5x
2
Subject to: 2x
1
+ 4x
2
12
3x
1
+ 2x
2
10
x
1
0 , x
2
0
(11)
Example 0.1.6
Writing the linear programme (11) in standard form we obtain
Maximise: P = x
1
+ 1.5x
2
Subject to: 2x
1
+ 4x
2
+x
3
= 12
3x
1
+ 2x
2
+x
4
= 10
x
1
0 , x
2
0
(12)
where x
3
and x
4
are the slack variables.
Once we have written a linear programming in standard we are ready to solve it using the Simplex
method.
The Simplex Procedure
The Simplex procedure involves the following steps:
Step 1: Find the initial basic feasible solution
The simplest choice of an initial feasible basic is to assume that none of the decision variables are
basic. Hence we initially assume that the basic solution consists only of the slack variables.
i.e. Set x
i
= 0 , i = 1, 2, . . . , n and x
n+k
= 0 , k = 1, 2, . . . , m. This choice of the initial solution
means that we initially assume that objective functional value is zero. In terms of the graphical
method we start at the origin so as to move along the best possible route to the optimal solution.
Example 0.1.7 If in the constraints of the standard form (12) we set x
1
= 0, x
2
= 0 we have the
initial basic feasible solution x
3
= 12, x
4
= 10, and P = 0.
Step 2: Set up the initial Simplex tableau
In this step we arrange the various matrices and vectors involved in the matrix form of the linear
programming problem in the simplex tableau. This tableau contains all the information about the
current basic variables and their corresponding values, the optimality status of the solution. The
method then continues to use the principle of the Gauss-Jordan procedure to compute the next
improved solution.
A typical initial simplex tableau has the form shown in Table 1
In the tableau:
1. The top row shows both the n +m decision and slack variables x
1
, x
2
, . . . , x
n+1
, . . . , x
n+m
as
labels for the corresponding columns;
2. The coecients of the constraints are shown in the middle rows;
3. The last row is the z-equation, showing the objective coecients;
xviii
Basic x
1
x
2
. . . x
n
x
n+1
x
n+2
. . . x
n+m
x
n+1
a
11
a
12
. . . a
1n
1 0 . . . 0 b
1
x
n+2
a
21
a
22
. . . a
2n
0 1 . . . 0 b
2
.
.
.
.
.
.
.
.
. 0
.
.
.
.
.
.
x
n+m
a
m1
a
m2
. . . a
mn
0 0 . . . 1 b
m
z c
1
c
2
. . . c
n
0 0 . . . 0 0
Table 1: The general simplex tableau.
4. The extreme left column shows the basic variables;
5. Each basic variable
appears in exactly one equation in which it has a coecient 1. The column it labels has
all zeros except in the row in which it is shown as a basic variable
has a value shown on the extreme right column.
Initially the negative coecients in the z-equation are a result of writing the objective equation as
z c
1
x
1
c
2
x
2
. . . c
n
x
n
= 0 (13)
so that z itself is treated like a variable. When the decision variables are initially set to zero, the
initial value of z is also zero. The value of z will vary as the decision variables assume nonzero
values. In particular for the maximising problem z will increase as any of the nonbasic variables
with a negative entry in the z-row is increased.
Example 0.1.8
The initial Simplex tableau of our example is
Tableau 1:
Basic x
1
x
2
x
3
x
4
R.H.S.
x
3
2 4 1 0 12
x
4
3 2 0 1 10
P 1 1.5 0 0 0
The initial basic variables are x
3
= 12 and x
4
= 10 which you can read from the extreme left and
right columns of the tableau.
Step 3: Test for optimality
At any stage of the procedure you can check whether the current basic solution is optimal. This
information is contained in the objective row of the tableau. If all the entries in the objective row are
nonnegative, then the current basic solution is optimal. In particular all the columns associated
with the basic solution will have zero coecients in the objective row while the columns associated
with the nonbasic variables will have positive coecients.
For our example, in the last row of Tableau 1 we have the negative coecients 1 and 1.5 corre-
sponding to x
1
and x
2
. Thus the present solution is not optimal.
xix
Step 4: Choose the variable to enter/leave the basic set
First you decide which of the nonbasic variables will bring about the best improvement on the
objective value if entered into the basic set. i.e. if it is increased from zero. The nonbasic variables
corresponding to the negative coecients in the objective row are candidates for entry into the basic
set. The entering variable is the one associated with the column with the most negative coecient
in the z-row. This column is known as the pivot column.
Since this variable will become basic, one of the basic variables will have to become nonbasic (or
will leave the basic set) and be reduced to zero. The leaving variable determined by the quotients
of the right hand column and the pivot column. You rst compute quotients of the right hand side
and positive coecients of the pivot column. Thus you compare only positive quotients. Once you
have computed all positive quotients, you choose the row which has the least quotient. This is called
the pivot row. The leaving variable is the one which corresponds to the pivot row on the left hand
side of the tableau (among the basic variables).
The element at the intersection of the pivot row and pivot column is called the pivot coecient.
It is normally highlighted by circling it (we will highlight it by boldface type). It is necessary to
identify this element in order to move on to the next step.
In our example the variables x
1
and x
2
are the candidates for entry into the basis. The most negative
coecient in the last row is 1.5 in the column labeled x
2
. This is the pivot column and thus the
entering variable is x
2
. This variable is raised from zero a nonzero value which will be determined
in the next step.
Now we need to decide which variable should leave the basis. If we divide the coecients of the last
column by corresponding coecients in the x
2
-column we obtain the quotients
12
4
= 3 and
10
2
= 5.
The smallest quotient is 3, corresponding to x
3
in the extreme left column. Thus the x
3
-row is the
pivot row, the variable x
3
has to leave the basis as x
2
enters, and assumes the value 3. The pivot
coecient is 4. (in box)
We are now ready to proceed to the next step.
Step 5: Update the Simplex tableau
The next step is to update the tableau by reducing it using the Gauss reduction principle. By
updating the tableau you are essentially determining the eect of the introduction of the new basic
variable and discarding the one that has left the basis.
By Gauss reduction, you reduce the pivot coecient to one and all other coecients in that column
to zero. Let us illustrate this using our example once again.
In updating the tableau we rst divide the x
3
-row by 4 to reduce the pivot coecient to 1. The
coecients 2 and 1.5 in the pivot column should be reduced to 0 by either adding or subtracting a
suitable multiple of the pivot row. i.e. R
2
becomes R
2
2R
1
, R
3
becomes R
3
+ 1.5R
1
. Performing
these Gaussian operations leads to the tableau
Tableau 2
x
1
x
2
x
3
x
4
x
2
1
2
1
1
4
0 3
x
4
2 0
1
2
1 4
P
1
4
0
3
8
0 4.5
Thus the objective functional value has improved from 0 to 4.5 as x
2
is raised from zero to 3. Note
xx
that 4.5 = 1.5 3, the contribution made by x
2
in the objective. Step 6: Repeat Steps 3 - 5
Test for optimality and pivot again until the optimal solution is obtained or some other conclusion
is made of the problem.
Once again we test whether the current solution is optimal. Looking at the last row of the Tableau 2
above we see that there is still a negative coecient, so the solution is not optimal. We repeat the last
three steps of the Simplex procedure. Since
1
4
in the objective row is the only negative coecient, the
corresponding column is the pivot column and x
1
enters the basis. The leaving variable is obtained
by comparing the quotients
3
1
2
= 6 and
4
2
= 2. Hence x
4
should leave the basis and give way to x
1
.
The pivot coecient is 2, at the intersection of the pivot row and pivot column.
Updating the tableau by Gauss reduction leads to the tableau
Tableau 3
x
1
x
2
x
3
x
4
x
2
0 1
3
8

1
4
2
x
1
1 0
1
4
1
2
2
P 0 0
5
16
1
8
5
Since there are no more negative coecients in the objective row of Tableau 3 we conclude that the
current solution is optimal.
The optimal solution
Once the optimality test is met (i.e. all coecients in the objective row are nonnegative), we can
extract the solution from the nal tableau. The optimal solution consists of the basic decision
variables appearing in the extreme left column. The corresponding values appear in the extreme
right column. Any decision variable which is not in the basic set has a zero value.
Referring this to our particular example, the extreme columns of the nal tableau give the solution
x
2
= 2, x
1
= 2 P = 5
which agrees with what we obtained earlier using the graphical approach.
We note what was mentioned earlier about the coecients of the basic variables in the last row and
the existence of a unit matrix in the tableau.
If we relate this procedure to the geometrical solution we observe the following movements: From
the origin the search for the solution moved to the vertex (0, 2) then to (2, 2).
We will now solve the following linear programming problem to illustrate the implementation of the
complete Simplex algorithm.
Example 0.1.9
Consider the following linear programming problem in standard form
Maximise z = 120x
1
+ 100x
2
Subj. to 2x
1
+ 2x
2
+x
3
= 8
5x
1
+ 3x
2
+x
4
= 15
x
1
, x
2
, x
3
, x
4
0
xxi
The initial tableau is shown in Tableau 1. The initial basic feasible solution is obtained by setting
x
1
= x
2
= 0, so that x
3
= 8 and x
4
= 15.
Tableau 1
x
1
x
2
x
3
x
4
x
3
2 2 1 0 8
x
4
5 3 0 1 15
z 120 100 0 0 0
The initial solution is not optimal since there are negative coecients in the z-row.
The entering variable is x
1
corresponding to the most negative coecient, 120.
The required quotients to determine the leaving variable are
8
2
= 4, and
15
3
= 3 of which 3 is smaller.
Hence x
4
is the leaving variable. The pivot element is therefore 5.
In pivoting, x
1
now replaces x
4
in the extreme left column. The new x
1
-row entries are obtained by
dividing by 5. The variable x
3
remains in the basic solution but the coecients in the corresponding
row are obtained by carrying out a row operations on x
3
-row and z-row so that the x
1
-column entries
are zero except for the pivot coecient.
The new tableau is shown in Tableau 2.
Tableau 2
x
1
x
2
x
3
x
4
x
3
0
4
5
1
2
5
2
x
1
1
3
5
0
1
5
3
z 0 28 0 24 360
The new basic feasible solution, x
1
= 3, x
2
= 0, is not optimal. Hence we continue pivoting. The
next variable to enter the basis is x
2
. The leaving variable is x
3
(quotients are 5/2 and 5). Pivoting
on
4
5
leads to the new tableau shown in Tableau 3.
Tableau 3
x
1
x
2
x
3
x
4
x
2
0 1
5
4

1
2
5
2
x
1
1 0
3
4
1
2
3
2
z 0 0 35 10 430
Since all the entries in the z-row of the last tableau, Tableau 3 are positive, we deduce that optimality
has been reached.
The solution is obtained from reading the rst and last columns of the tableau. On the rst column,
the basic variables are x
1
and x
2
. The corresponding values in the last column are
3
2
and
5
2
. The
maximum value of z is 430, corresponding to z in the last column.
Hence the optimal solution is
x
1
=
5
2
, x
2
=
3
2
, z = 430
Example 0.1.10
xxii
Maximize P = 70x
1
+ 50x
2
+ 35x
3
subject to 4x
1
+ 3x
2
+x
3
240
2x
1
+x
2
+x
3
100
4x
1
+x
2
0
x
1
0, x
2
0, x
3
0.
Solution:
We add the slack variables x
4
, x
5
and x
6
to convert the problem to standard form.
Maximize P = 70x
1
+ 50x
2
+ 35x
3
subject to 4x
1
+ 3x
2
+x
3
+x
4
= 240
2x
1
+x
2
+x
3
+x
5
= 100
4x
1
+x
2
+x
6
= 0
x
1
, x
2
, x
3
, x
4
, x
5
, x
6
0
The initial Tableau is shown below
Tableau 1
Basic x
1
x
2
x
3
x
4
x
5
x
6
RHS
x
4
4 3 1 1 0 0 240
x
5
2 1 1 0 1 0 100
x
6
4 1 0 0 0 1 0
P 70 50 35 0 0 0 0
The initial basic feasible solution is obtained by setting x
1
= x
2
= x
3
= 0 so that x
4
= 240,
x
5
= 100 and x
6
= 0. This solution is not optimal since there are negative coecients in the last
row containing P. The entering variable is x
1
corresponding to the most negative coecient, -70.
The quotients are
100
2
= 50 and
240
4
= 60 of which 50 is the smallest (note that we dont consider
the quotient
0
4
= 0). Thus x
5
is the leaving variable and the pivot element is 2.
Dividing row 2 by 2 gives
Basic x
1
x
2
x
3
x
4
x
5
x
6
RHS
R
1
: x
4
4 3 1 1 0 0 240
R
2
: x
1
1
1
2
1
2
0
1
2
0 50
R
3
: x
6
4 1 0 0 0 1 0
R
4
: P 70 50 35 0 0 0 0
To obtain Tableau 2 we perform the following row operations
4R
2
+R
1
, 4R
2
+R
3
, 70R
2
+R
4
This gives
Tableau 2
Basic x
1
x
2
x
3
x
4
x
5
x
6
RHS
x
4
0 1 1 1 2 0 40
x
1
1
1
2
1
2
0
1
2
0 50
x
6
0 3 2 0 2 1 200
P 0 15 0 0 35 0 3500
xxiii
Since -15 is the only negative coecient in the P-row, it follows that the entering variable is x
2
.
The quotients required to determine the leaving variable are
200
3
= 66
2
3
,
50
1
2
= 100,
40
1
= 40 of which
40 is the smallest. Thus x
4
is the leaving variable and 1 is the pivot coecient.
To obtain Tableau 4 we perform the following row operations

1
2
R
1
+R
2
, 3R
1
+R
3
, 15R
1
+R
4
This gives
Tableau 3
Basic x
1
x
2
x
3
x
4
x
5
x
6
RHS
x
2
0 1 1 1 2 0 40
x
1
1 0 1
1
2
3
2
0 30
x
6
0 0 5 3 8 1 80
P 0 0 15 15 5 0 4100
Looking at the coecient of the P-row in Tableau 3 we note that the only negative coecient is -15.
Thus, x
3
is the entering variable. The quotients are
80
5
= 16,
30
1
= 30. Thus, x
6
is the leaving
variable and 5 is the pivot coecient.
Dividing row 3 by 5 gives
Basic x
1
x
2
x
3
x
4
x
5
x
6
RHS
x
2
0 1 1 1 2 0 40
x
1
1 0 1
1
2
3
2
0 30
x
3
0 0 1
3
5
8
5
1
5
16
P 0 0 15 15 5 0 4100
To obtain Tableau 4 we perform the following row operations
R
3
+R
1
, R
3
+R
2
, 15R
3
+R
4
Tableau 4
Basic x
1
x
2
x
3
x
4
x
5
x
6
RHS
x
2
0 1 0
2
5

2
5
1
5
56
x
1
1 0 0
1
10

1
10
1
5
14
x
3
0 0 1
3
5
8
5
1
5
16
P 0 0 0 6 39 3 4340
Since all the entries in the P-row of Tableau 4 are positive, we deduce that the optimal solution has
been reached. The solution is
x
1
= 14, x
2
= 56, x
3
= 16 and maximum P = 4340
Special cases in the simplex procedure
Certain situations may arise which do not comply to the assumptions so far made in implementing
the Simplex procedure. Some of these situations and how they are handled are discussed below.
xxiv
Tie breaking
It may happen that during pivoting there is a tie in the entering and leaving variables; i.e. the most
negative coecient of the z-equation appears under more than one variable; or the smallest quotient
corresponds to more than one variable. Normally the tie is broken (called tie breaking) by making
an arbitrarily selection of the entering or leaving variables among those that qualify.
Unbounded solution
Unboundedness describes linear programs that do not have nite solutions.Under very rare occasions
in the Simplex method it may turn out that every coecient in the pivot column is either zero or
negative (called the unbounded solution situation). Hence there would be no way of computing a
leaving variable. In this case, it may be necessary to check if there has been no computational errors
or else z would be unbounded.
0.1.9 Summary
In this section we solved maximization linear programming problems using the Simplex method with
slack variables. The Simplex method is a very practical way of solving linear programming involving
two or more decision variables.
xxv
0.1.10 Exercises 3.3: The Simplex method
Solve the following LP problems using the Simplex Method
1.
maximize P = 70x
1
+ 50x
2
subject to 4x
1
+ 3x
2
240
2x
1
+x
2
100
x
1
, x
2
0
P = 4100, x
1
= 30, x
2
= 40
2.
maximize P = 10x
1
+ 5x
2
subject to 4x
1
+x
2
28
2x
1
+ 3x
2
24
x
1
, x
2
0
P = 80, x
1
= 6, x
2
= 4
3.
maximize P = 70x
1
+ 50x
2
+ 35x
3
subject to 4x
1
+ 3x
2
+x
3
240
2x
1
+x
2
+x
3
100
x
1
, x
2
, x
3
0
P = 4550, x
1
= 0, x
2
= 70, x
3
= 30
4.
maximize P = 2x
1
+ x
2
subject to 5x
1
+x
2
9
x
1
+x
2
5
x
1
, x
2
0
P = 6, x
1
= 1, x
2
= 4
5.
maximize P = 30x
1
+ 40x
2
subject to 2x
1
+x
2
10
x
1
+x
2
7
x
1
+ 2x
2
12
x
1
, x
2
0
P = 260, x
1
= 2, x
2
= 5
xxvi
6.
maximize P = x
1
+ 2x
2
subject to x
1
+x
2
2
x
1
+ 3x
2
12
x
1
4x
2
4
x
1
, x
2
0
P = 7, x
1
= 3, x
2
= 5
xxvii
0.1.11 The minimisation problem : Dual problem
We have so far discussed the Simplex method as applied to solving a maximizing linear programming
problem. One way to solve a minimisation problem is to solve an equivalent maximising problem
called the dual problem. The theory of duality simply states that every linear programming
problem can be written in two forms: the primal form and the dual form. The original problem is
called the primal problem. The objective of a dual problem is opposite that of the given primal
problem. Thus a primal minimisation problem has a dual maximisation problem. The same holds for
a maximisation problem. That is, a primal maximisation problem has a dual minimisation problem.
Sometimes it is easier to solve the dual problem than it is to solve the primal problem. The
relationship between the two types of problems is given in the following statement.
There is an important result called the Von Neumann duality principle which relates the optimal value
of the dual problem to that of the primal problem. The statement of the result is that the optimal
solution of a primal linear programming problem, if it exists, has the same value at the
optimal solution of the dual problem. Thus the optimal value determined for the dual problem
is the same optimal value for the primal problem.
Solving a Minimization problem
A minimization problem is in standard form if the objective function
z = c
1
x
1
+c
2
x
2
+. . . +c
n
x
n
is to be minimized subject to the constraints.
a
11
x
1
+a
12
x
2
+. . . +a
1n
x
n
b
1
a
21
x
1
+a
22
x
2
+. . . +a
2n
x
n
b
2
.
.
.
a
m1
x
1
+a
m2
x
2
+. . . +a
mn
x
n
b
m
where x
i
0 and b
i
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 coecients of the objective function.
_

_
a
11
a
12
a
1n
.
.
. b
1
a
21
a
22
a
2n
.
.
. b
2
.
.
.
a
m1
a
m2
a
mn
.
.
. b
m

.
.
.
c
1
c
2
c
n
.
.
. 1
_

_
xxviii
2. Form the transpose of this matrix.
_

_
a
11
a
21
a
m1
.
.
. c
1
a
12
a
22
a
m2
.
.
. c
2
.
.
.
a
1n
a
2n
a
mn
.
.
. c
n

.
.
.
b
1
b
2
b
m
.
.
. 1
_

_
3. Form the dual maximization problem corresponding to this standard matrix. That is, nd the
maximum of the objective function given by
w = b
1
y
1
+b
2
y
2
+. . . +b
m
y
n
subject to the constraints.
a
11
y
1
+a
21
y
2
+. . . +a
m1
y
m
c
1
a
12
y
1
+a
22
y
2
+. . . +a
m2
y
m
c
2
.
.
.
a
1n
y
1
+a
2n
y
2
+. . . +a
mn
y
m
c
n
where y
1
0, y
2
0,. . . and y
m
0 and y
m
0
4. Apply the Simplex Method to the dual maximization problem. The maximization value of
w will be the minimum value of z. Moreover, the values of x
1
, x
2
, . . . and x
n
will occur in the
bottom row of the nal simplex tableau, in the columns corresponding to the slack variables.
We will illustrate the concept of duality by way of a minimization linear programming problem.
Constructing the dual problem
Example 0.1.11
Consider the minimization problem
Minimize : C = 16 x
1
+ 45 x
2
Subject to : 2x
1
+ 5x
2
50
x
1
+ 3x
2
27
x
1
, x
2
0
(14)
The following steps are involved in constructing the dual problem from a given primal problem.
1. Construct a special augmented matrix from the constraints coecients of the primal problem
without introducing slack/surplus variables and append the objective coecients.
2x
1
+ 5x
2
50
x
1
+ 3x
2
27
16x
1
+ 45x
2
= C
A =
_

_
2 5 50
1 3 27
16 45 1
_

_
xxix
2. Obtain the transpose of the augmented matrix
A
T
=
_

_
2 1 16
5 3 45
50 27 1
_

_
3. Write out the dual problem from the transpose matrix. This new problem will always be a
maximization problem with problem constraints. To avoid confusion, we shall use dierent
variables in this new problem:
_

_
2 1 16
5 3 45
50 27 1
_

_
2y
1
+y
2
16
5y
1
+ 3y
2
45
50y
1
+ 27y
2
= P
The dual of the minimization problem is the following maximization problem:
Maximize P = 50y
1
+ 27y
2
Subject to 2y
1
+y
2
16
5y
1
+ 3y
2
45
y
1
0, y
2
0
4. Solve the dual problem in the usual way.
Note the following changes when constructing the dual problem, in addition to the change of notation:
1. The objective becomes the opposite of that of the primal problem.
2. signs become and vice versa.
3. There are as many decision variables in the dual problem as there are constraints in the primal
problem.
4. There are as many constraints in the dual problem as there are decision variables in the primal
problem.
5. The objective coecients of primal problem become the right side (resource) values of the dual
problem.
6. The right side (resource) values of the primal problem become the objective coecients of the
dual problem.
Example 0.1.12
Form the dual problem of
Minimize C = 40x
1
+ 12x
2
+ 40x
3
Subject to 2x
1
+x
2
+ 5x
3
20
4x
1
+x
2
+x
3
30
x
1
, x
2
, x
3
0
xxx
Step 1. Form the matrix A
A =
_

_
2 1 5 20
4 1 1 30
40 12 40 1
_

_
Step 2. Find the transpose of A, A
T
.
A
T
=
_

_
2 4 40
1 1 12
5 1 40
20 30 1
_

_
Step 3. State the dual problem.
Maximize P = 20y
1
+ 30y
2
Subject to 2y
1
+ 4y
2
40
y
1
+y
2
12
5y
1
+y
2
40
y
1
, y
2
0
In the next example we solve a minimization problem by solving its dual.
Example 0.1.13
Find the minimum value of
C = 3x
1
+ 2x
2
Objective function
subject to the constraints
2x
1
+ x
2
6
x
1
+ x
2
4
_
Constraints
where x
1
0 and x
2
0.
Solution:
The augmented matrix corresponding to this minimization problem is
_

_
2 1
.
.
. 6
1 1
.
.
. 4

.
.
.
3 2
.
.
. 1
_

_
Thus, the matrix corresponding to the dual maximization problem is given by the following transpose.
_

_
2 1
.
.
. 3
1 1
.
.
. 2

.
.
.
6 4
.
.
. 1
_

_
xxxi
This implies that the dual maximization problem is as follows.
Dual maximization problem: Find the maximum value of
P = 6y
1
+ 4y
2
Subject to the constraints
2y
1
+ y
2
3
y
1
+ y
2
2
_
where y
1
0 and y
2
0.
After writing the dual problem in standard form we obtain the initial tableau
Tableau 1
Basic y
1
y
2
y
3
y
4
y
3
2 1 1 0 3
y
4
1 1 0 1 2
P 6 4 0 0 0
We see from the tableau that the pivot column is the y
1
-column. The quotients are
3
2
and
2
1
= 1.
Hence the y
3
-row is the pivot row. Thus y
1
is the entering variable which replaces y
3
, the leaving
variable. The pivot element at the intersection of the pivot row and pivot column is 2. To update
the tableau we
Performing the Gauss reductions we obtain Tableau 2 given below.
Tableau 2
Basic y
1
y
2
y
3
y
4
y
1
1
1
2
1
2
0
3
2
y
4
0
1
2

1
2
1
1
2
P 0 1 3 0 9
We deduce that the current solution is not optimal. (Why?) Updating once more we obtain Tableau
3 given below
Tableau 3
Basic y
1
y
2
y
3
y
4
y
1
1 0 1 -1 1
y
2
0 1 -1 2 1
P 0 0 2 2 10
The current solution is optimal since all the coecients in the last row are nonnegative.
Reading the solution of the primal problem
We are now going to extract the solution of the primal problem from the nal simplex tableau of
the dual problem. The optimal objective value is
P = C = 10
xxxii
Since the above nal tableau is for the dual problem, we recall that in transposing the primal problem
the objective coecients of the original variables became the right-hand values of the constraints.
This means that each original variable now corresponds to a slack variable. Thus we do not read
the solution in the same way as for the primal simplex tableau.The optimal values of the original
variables correspond to the slack variables in the nal tableau of the dual problem.
For our particular example, the decision variables x
1
and x
2
of the primal problem correspond to
the slack variables of the dual problem and their values are the corresponding coecients in the last
row of the nal simplex tableau. Thus the solution is contained in the y
3
and y
4
columns and is
x
1
= 2, x
2
= 2
and the objective value is in the usual column i.e
y
1
= 1, y
2
= 1
.
Note that if we substitute the basic variables of the dual problem in the dual objective function we
have
P = 6y
1
+ 4y
2
= (6)(1) + (4)(1) = 10.
We get the same objective value if we substitute x
1
= 2, x
2
= 2 into the primal objective function
C = 3x
1
+ 2x
2
= (3)(2) + (2)(2) = 10
This veried the Von Neumann Optimality Principle.
0.1.12 Summary
In this section we solved minimization linear programming problems by forming the dual and solving
it by the Simplex method with slack variables.
xxxiii
0.1.13 Exercises 3.4: The dual problem
Solve the following minimization problems by maximizing the Dual.
1.
minimize C = 40x
1
+ 12x
2
+ 40x
3
subject to 2x
1
+x
2
+ 5x
3
20
4x
1
+x
2
+x
3
30
x
1
, x
2
, x
3
0
C = 320, x
1
= 5, x
2
= 10
2.
minimize C = 21x
1
+ 50x
2
subject to 2x
1
+ 5x
2
12
3x
1
+ 7x
2
17
x
1
, x
2
0
C = 121, x
1
= 1, x
2
= 2
3.
minimize C = 2x
1
+ 10x
2
+ 8x
3
subject to x
1
+x
2
+x
3
6
x
2
+ 2x
3
8
x
1
+ 2x
2
+ 2x
3
4
x
1
, x
2
, x
3
0
C = 36, x
1
= 2, x
2
= 0, x
3
= 4
4.
minimize C = 16x
1
+ 9x
2
+ 21x
3
subject to x
1
+x
2
+ 3x
3
12
2x
1
+x
2
+x
3
16
x
1
, x
2
, x
3
0
C = 136, x
1
= 4, x
2
= 8, x
3
= 0
xxxiv

You might also like