MTH 3202 Linear Programming Notes-summary-2024
MTH 3202 Linear Programming Notes-summary-2024
The concept of Operations Research arose during World War II by military planners. After the
war, the techniques used in their operations research were applied to addressing problems in
business, the government and society, etc.
The process of Operations Research can be broadly broken down into the following steps
1. Observe and identify the problem that needs to be solved then formulate it into the
objective function and constraints
2. Construct a mathematical model around the problem. The model must represent the
real problem and variables such that the solutions from the model are valid for the real
problem.
3. Solve the model (Use the model to derive solutions to the problem.)
4. Test each solution on the model and analyzing its success. This involves;
Operations Research uses mathematics and statistics to answer optimization and simulation
questions. Whenever we translate a business question in an optimization question, it is
primordial/paramount/important that we have clear definitions of a cost to minimize or a
benefit to maximize.
1|Page
As an example of this, we could use an optimization algorithm to minimize the cost of staffing
a factory, given a set of constraints on the number of people needed, and constraints of each of
the individual employees.
2. Optimization
Finding the best possible solution to a question, given potential practical constraints.
Optimization can be about maximization of a cost or Minimization of a benefit that is decided
on before starting.
It is possible to have multiple goals, in which case we can define a combined cost function by
applying weights of our different costs (for example taking the sum of two costs to minimize
could be an example of a combined cost function).
A second often-occurring thing to deal with in those optimizations are constraints. Sometimes,
an algorithm looking for minimization of a cost can go to look for solutions in a way that is
practically impossible. For example, when looking for the best staff planning, we want to
constrain the algorithm to plan people for 24-hour-shifts because that would be simple illegal.
3. Simulation
Simulation is actually a comparable task to optimization. Rather than asking an algorithm what
the best staff planning is, we could also ask an algorithm what the effect of changing the
planning would be. This type of task is close to optimization since we could simply use the
optimization algorithm with a different input configuration to simulate what would be the
optimal outcome with those different inputs.
In due course of applying the above steps, the following methods can be adopted;
a) Mathematical programming which consists of;
i) Linear programming
ii) Networking analysis
b) Dynamic programming
i) Integer programming
ii) Non-linear programming and
iii) Game theory.
c) Probabilistic methods which include;
i) Queuing theory
ii) Inventory theory
iii) Markov’s theory/chains
iv) Simulations
2|Page
o achieve more complete datasets
o consider all available options
o predict all possible outcomes and
o estimate risk.
Additionally, operations research can be tailored to specific business processes or use cases
to determine which techniques are most appropriate to solve the problem.
Assists in making and finding the best or optimal use of scarce resources. Mathematical
models are set up and an attempt is made to provide a quantitative reason for a reason.
OR is applied to problems that concern how to conduct and coordinate activities in
industries, business, organizations, military, civil government, etc.
Disciplines that are similar to, or overlap with, operations research include;
Statistical Analysis
Management Science
Game Theory
Optimization Theory
Artificial Intelligence And
Network Analysis.
All of these techniques have the goal of solving complex problems and improving
quantitative decisions.
3|Page
1.0 Linear programming /planning (LP)
Linear programming is an optimization technique to solve systems of linear constraints with a
linear objective function. It is the most known method of Operations Research-hence a branch
of operations research (OR)
Linear programming (as a method of OR), deals in particular with problems of
allocating/utilizing scarce resources in an optimal manna depending on the objective.
NB
We shall use a mathematical model to describe the given problem.
And by “linear”, we mean that all mathematical functions in the model are linear in the
variables involved.
And we can as well use the word planning instead of programming.
Kapeeka
Lira
Zirobwe
Gulu
Formulation of the problem
Let 𝑃1 and 𝑃2 denote the plants in Kapeeka and Zirobwe, respectively.
Let 𝑤1, 𝑤2 and 𝑤3 denote the warehouse in Mbarara, Lira and Gulu respectively.
Let 𝑥𝑖𝑗 = 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑡𝑜𝑛𝑠 𝑓𝑟𝑜𝑚 𝑃𝑖 𝑡𝑜 𝑤𝑗
𝑐𝑖𝑗 = 𝑡ℎ𝑒 𝑐𝑜𝑠𝑡 𝑜𝑓 𝑡𝑟𝑎𝑛𝑠𝑝𝑜𝑟𝑡𝑖𝑛𝑔 1 𝑡𝑜𝑛𝑒 𝑜𝑓 𝑡𝑖𝑙𝑒𝑠 𝑓𝑟𝑜𝑚 𝑃𝑖 𝑡𝑜 𝑤𝑗 , 𝑓𝑜𝑟 𝑖 = 1,2 𝑎𝑛𝑑 𝑗
= 1,2,3.
4|Page
𝑥11 + 𝑥12 + 𝑥13 ≤ 120 … … … (𝑖)
Similarly, since 𝑷𝟐 can supply only 140 tons, we must have
𝑥21 + 𝑥22 + 𝑥23 ≤ 140 … … … (𝑖𝑖)
Similarly since the demands at 𝑤2 and 𝑤3 are 60 and 80 tons respectively, we would like to
have
𝑥12 + 𝑥22 ≥ 60 … … . . (𝑖𝑣)
𝑥13 + 𝑥23 ≥ 80 … … . … (𝑣)
−−−−−−−−−−−−−−−−−−−
5|Page
2) The diet Problem.
A nutritionist is planning a meal consisting of two main foods A and B. Each kg of A is to
contain 2 units of fat, I unit of carbohydrates and 4 units of proteins. Each kg of B is to contain
3 units of fats, 3 units of carbohydrates and 3 units of proteins. The nutritionist wants the meal
to provide at least 18 units of fat, at least 12 units of carbohydrates and at least 24 units of
proteins. If a kg of A costs Shs.20 and B costs Shs.25, how many kgs of each food should be
served to minimize the cost of the meal yet satisfy the nutritionist’s requirements?
Solution
Formulation
Fats
Carbohydrates A
Proteins
Meal
Fats
Carbohydrates B
Proteins
Let 𝑥 and 𝑦 denote the number of kgs of foods A and B respectively that are served.
The number of units of fats contained in the meal is 2𝑥 + 3𝑦 so that 𝑥 and 𝑦 satisfy the
inequality; 2𝑥 + 3𝑦 ≥ 18 … … (1)
Similarly to meet the nutritionist’s requirements for carbohydrates and proteins, we must have
𝑥 and 𝑦 to satisfy 𝑥 + 3𝑦 ≥ 12 … . (2)
and 4𝑥 + 3𝑦 ≥ 24 … . (3)
6|Page
3) A financial problem.
Suppose that the financial advisor of a University’s endowment fund must invest exactly
Ugshs.100,000 in two types of securities: bond AAA, paying a dividend of 7% and stock BB,
paying a dividend of 9%. The advisor has been told that no more than Ug shs 30,000 can be
invested in stock BB, whereas the amount invested in bond AAA must be at least twice the
amount invested in stock BB. How much should be invested in each security to maximize the
university’s return?
Solution
Formulation
Let 𝑥 and 𝑦 denote the amount invested in bond AAA and stock BB, respectively. We must
then have;
𝑥 + 𝑦 = 100000 … . . (1)
𝑥 ≥ 2𝑦 … … … . . . (2)
𝑦 ≤ 30000 … . . . (3)
Of course, we also require that; 𝑥 ≥ 0 … . . (4)
𝑦 ≥ 0 … . . (5)
The return to the university which we seek to maximize is
𝑧 = 0.07𝑥 + 0.09𝑦 … … (6)
Solution
Formulation (Mathematical model)
Let 𝑥 and 𝑦 denote the amount of finish-grade and construction-grade lumber, respectively to be
sawed per day. Let the units of 𝑥 and 𝑦 be thousands (1000s) of board feet. The number of hours
required daily for the saw is;
7|Page
2𝑥 + 2𝑦. Since only 8 hours are available daily, 𝑥 and 𝑦 must satisfy the inequality 2𝑥 + 2𝑦 ≤
8 … . (1)
Similarly, the number of hours required for the plane is 5𝑥 + 3𝑦, so 𝑥 and 𝑦 must satisfy 5𝑥 +
3𝑦 ≤ 15 … . . (2)
Of course, 𝑥 ≥ 0 … . . (3)
𝑦 ≥ 0 … . . (4)
The profit (in dollars) to be maximized is given by
𝑧 = 120𝑥 + 100𝑦 … … (5)
Solution SWEET
Sacharin
Dextrose
LO-SUGAR
Formulation (Mathematical model)
Let 𝑥 and 𝑦 denote the number of kilograms of SWEET and LO-SUGAR, respectively being
made. The number of kilograms of dextrose being used is
0.4𝑥 + 0.3𝑦 ≤ 18 … . (1)
Similarly, the number kilograms of saccharin being used is 0.2𝑥 + 0.4𝑦 ≤ 14 … . . (2)
8|Page
Thus, our mathematical model is:
Find the values of 𝑥 and 𝑦 that will maximize 𝑧 = 20𝑥 + 30𝑦
Subject to the constraints: 0.4𝑥 + 0.3𝑦 ≤ 18
0.2𝑥 + 0.4𝑦 ≤ 14
𝑥≥0
𝑦≥0
------------------------------------------------
6) A small scale Mobile phone dealer has passed via Duban and has $10,000 to spend on two
types of mobile phones; Nokia 3100 and Sonny Ericsson T100. A Nokia 3100 costs $150 each
and Sony Ericsson T100 costs $100 each. His bag cannot carry more than 100 mobile phones.
If he expects to make a profit of $50 on the Nokia phone and a profit of $30 on the Sonny
Ericsson phone, how many of each type should he buy to obtain as large a total profit as
possible?
Solution
Formulation
Let 𝑥 and 𝑦 denote the number of Nokia and Ericsson phones, respectively to be bought.
The total cost of phones is: 150𝑥 + 100𝑦 ≤ 10000 … . (1)
The bag /space limitation is: 𝑥 + 𝑦 ≤ 100 … . . (2)
9|Page
𝑦 ≥ 0 … . . (5)
Thus, our mathematical model is:
Find the values of 𝑥 and 𝑦 that will maximize 𝑧 = 100𝑥 + 140𝑦
Subject to the constraints: 3𝑥 + 5𝑦 ≤ 70
𝑥 + 𝑦 ≤ 20
𝑥, 𝑦 ≥ 0
---------------------------------------------------
Solution
Formulation (Mathematical model)
Let 𝑥1, 𝑥2 and 𝑥3 be the number of kgm to be supplied per day per head of feeds L,M and N,
respectively.
10 | P a g e
1.2 Stating the general form of the linear programming problem
Following the forms of mathematical models of the previous examples, the general form
of a linear programming problem can be stated as follows;
𝑥1 , 𝑥2 , … , 𝑥𝑛 ≥ 0 …………(3)
where in each inequality in (2), one and only one of the symbols ≤, ≥, = occurs.
---------------------------------------------------------------------------------------------------------
OR
Find the values of 𝑥1 , 𝑥2 , … , 𝑥𝑛 that will minimize or maximize
𝑧 = 𝑐1 𝑥1 + 𝑐2 𝑥2 + ⋯ 𝑐𝑛 𝑥𝑛 ……(1)
Subject to the constraints/restrictions; 𝑎𝑖1 𝑥1 + 𝑎𝑖2 𝑥2 + ⋯ + 𝑎𝑖𝑛 𝑥𝑛 ≤ (≥)(=)𝑏𝑖 ….…(2)
𝑥𝑖 ≥ 0 …………(3)
i=1,2,3,…,m
------------------------------------------------------------------------------------------------------------
OR
Find the values of 𝑥𝑗 that will minimize or maximize 𝑧 = ∑𝑛𝑗=1 𝑐𝑗 𝑥𝑗 ……(1)
𝑚 𝑛
Such that ; ∑𝑖=1 ∑𝑗=1 𝑎𝑖𝑗 𝑥𝑗 ≤ (≥)(=)𝑏𝑖 ……..(2)
𝑥𝑗 ≥ 0 …………(3)
i=1,2,3,…,m, j=1,2,3,…,n
----------------------------------------------------------------------------------------------------------
OR
In a matrix form,
Find the vector 𝑋 ∈ ℛ 𝑛 , that will max/min 𝑧 = 𝑐 𝑇 𝑋……..(1)
Subject to the constraints/restrictions
𝐴𝑋 ≤ (≥) = 𝑏 … … … (2
𝑋≥0 ………(3)
𝑐1 𝑥1 𝑏1
𝑐2 𝑥2 𝑎11 𝑎12 … 𝑎1𝑛 𝑏2
. . .
Where 𝑪 = . , 𝑿 = . , 𝑨 = ( 𝑎21 𝑎22 … 𝑎2𝑛 .. ) and 𝒃 =
. .
. . 𝑎𝑚1 𝑎𝑚2 … 𝑎𝑚𝑛 .
(𝑐𝑛 ) (𝑥𝑛 ) (𝑏𝑚 )
It is advisable that a lp problem be standardized first or be written in a canonical form
before rewriting it into a matrix form.
11 | P a g e
----------------------------------------------------------------------------------------------------------
Examples
1) Example 4 above:
Find the values of 𝑥 and 𝑦 that will maximize 𝑧 = 120𝑥 + 100𝑦
Subject to the constraints: 2𝑥 + 2𝑦 ≤ 8
5𝑥 + 3𝑦 ≤ 15
𝑥,𝑦≥0
In the matrix form, the problem becomes
𝑥 𝑥
Find a vector 𝑋 = (𝑦) ∈ ℛ 2 , that will maximize 𝑧 = (120 100) (𝑦)
2 2 𝑥 8
Subject to the constraints: ( )( ) ≤ ( )
5 3 𝑦 15
𝑥
(𝑦) ≥ 0
--------------------------------------------------------
2) The 𝑙𝑝 problem;
𝑀𝑖𝑛 𝑧 = 𝑥1 + 2𝑥2 − 𝑥3
such that
𝑥1 + 3𝑥2 + 𝑥3 ≥ 7
2𝑥1 − 𝑥2 + 5𝑥3 ≥ 5
𝑥1 − 𝑥3 ≥ 2
𝑥1 , 𝑥2 , 𝑥3 ≥ 0
1 3 1 𝑥1 7
such that (2 𝑥
−1 5 ) ( 2 ) ≥ (5)
1 0 −1 𝑥3 2
𝑥1
(𝑥2 ) ≥ 0
𝑥3
Note
1) For every constraint/restriction, one and only one symbol ≤, ≥, = holds at a time.
2) The above mathematical forms/representations, have three major parts namely;
a) The linear function (1) called the objective function or optimization part
b) The equalities or inequalities (2) called constraints or restrictions.
c) The inequality (3) called decision variables or the Non-negativity conditions
3) The term ‘linear’ implies that the objective function and constraints are ‘linear’ functions of
‘nonnegative’ decision variables 𝑥𝑗 , hence the term linear programming problem. Thus, the
conditions of LP problems (LPP) are that;
a) Objective function must be a linear function of decision variables 𝑥𝑗
b) Constraints must be linear function of decision variables 𝑥𝑗
12 | P a g e
c) All decision variables 𝑥𝑗 must be nonnegatives
4) However, a problem in which not all constraints or the objective functions are linear
functions of variables 𝑥𝑗 , is called a non-linear programming problem. But here we shall
deal with linear problems only.
13 | P a g e
Note. In both forms;
i) The constraints must contain the corresponding symbols and all decision variables
must be constrained /conditioned.
ii) The number of constraints must either be equal or less than the number of decision
variables, 𝑚 ≥ 𝑛 and not more than.
Examples
1. Max 𝑧 = 120𝑥 + 100𝑦
Subject to the constraints: 2𝑥 + 2𝑦 ≤ 8
5𝑥 + 3𝑦 ≤ 15
𝑥, 𝑦 ≥ 0 In proper general form.
6. Max 𝑧 = 3𝑥 + 2𝑦 + 3𝑢 − 4𝑣
Subject to the constraints: 2𝑥 + 𝑦 + 2𝑢 − 𝑣 = 4
5𝑥 + 3𝑦 − 2𝑣 = 15
𝑥, 𝑦, 𝑢, 𝑣 ≥ 0. In standard form
7. Min 𝑧 = 3𝑥 + 2𝑦 + 3𝑢 − 4𝑣
Subject to the constraints: 2𝑥 + 𝑦 + 2𝑢 − 𝑣 = 4
5𝑥 + 3𝑦 + 0𝑢 − 2𝑣 = 15
𝑥, 𝑦, 𝑢, 𝑣 ≥ 0
14 | P a g e
Not in standard form due to 𝑚𝑖𝑛 in objective function. All standard forms have 𝑀𝑎𝑥
in objective functions
15 | P a g e
14. Max 𝑧 = 3𝑥 + 2𝑦 + 3𝑣 − 2𝑤
s.t: 2𝑥 + 6𝑦 + 2𝑣 − 4𝑤 = 7
3𝑥 + 2𝑦 − 5𝑣 + 𝑤 = 8
6𝑥 + 7𝑦 + 2𝑣 + 5𝑤 ≤ 5
𝑥, 𝑦, 𝑢, 𝑣 ≥ 0 .
Not in standard because the symbol ≤ in the third constraint and neither in a general
form due to the = symbols in the first and second constraints.
15. Min 𝑧 = 3𝑥 + 2𝑦 + 3𝑣 − 2𝑤
s.t: 2𝑥 + 6𝑦 + 2𝑣 − 4𝑤 = 7
3𝑥 + 2𝑦 − 5𝑣 + 𝑤 = 8
6𝑥 + 7𝑦 + 2𝑣 + 5𝑤 = 8
𝑥, 𝑦, 𝑢, ≥ 0
Not standard because variable 𝑣 is not constrained and objective function should be
Max
16 | P a g e
1.4 Transforming Min problems into Max general problems and vice versa.
Every Min 𝑙𝑝 problem can be viewed as a Max problem and conversely. This can be seen
from the observation that; 𝑀𝑖𝑛 𝑧 = −𝑀𝑎𝑥 (𝑧) = 𝑀𝑎𝑥 𝑧 ′ = 𝑀𝑎𝑥 𝑤
We can let – 𝑧 = 𝑧 ′ or use another variable say 𝑤
In other word;
i) 𝑀𝑖𝑛 ∑𝑛𝑗=1 𝑐𝑗 𝑥𝑗 = 𝑀𝑎𝑥 − ∑𝑛𝑗=1 𝑐𝑗 𝑥𝑗
ii) −𝑀𝑖𝑛 ∑𝑛𝑗=1 𝑐𝑗 𝑥𝑗 = −𝑀𝑎𝑥 − ∑𝑛𝑗=1 𝑐𝑗 𝑥𝑗
iii) 𝑀𝑎𝑥 ∑𝑛𝑗=1 𝑐𝑗 𝑥𝑗 = 𝑀𝑖𝑛 − ∑𝑛𝑗=1 𝑐𝑗 𝑥𝑗
iv) −𝑀𝑎𝑥 ∑𝑛𝑗=1 𝑐𝑗 𝑥𝑗 = 𝑀𝑖𝑛 − ∑𝑛𝑗=1 𝑐𝑗 𝑥𝑗
Thus, to minimize the objective function of a 𝑙𝑝 problem, we could maximize its negative
objective function instead and then change the sign of the answer. The sense remains the
same “Min 𝑧.”
Examples
i) 3𝑥 + 5𝑦 ≤ 70 => −3𝑥 − 5𝑦 ≥ −70
ii) 2𝑥1 − 𝑥2 + 5𝑥3 ≥ 5 => −2𝑥1 + 𝑥2 − 5𝑥3 ≤ −5
iii) Min 𝑧 = 3𝑥 + 2𝑦
Subject to the constraints: 8𝑥 + 𝑦 ≤ 4
3𝑥 − 2𝑦 ≤ 6
𝑥 ≥ 0,𝑦 ≥ 0
Min 𝑧 = 3𝑥 + 2𝑦
Subject to the constraints: −8𝑥 − 𝑦 ≥ −4
−3𝑥 + 2𝑦 ≥ −6
𝑥 ≥ 0,𝑦 ≥ 0
17 | P a g e
1.4.3 Changing an inequality into an equation (equality) to suit a standard form
The constraint ∑𝑛𝑗=1 𝑎𝑖𝑗 𝑥𝑗 ≤ 𝑏𝑖 can be written as ∑𝑛𝑗=1 𝑎𝑖𝑗 𝑥𝑗 + 𝑠𝑖 = 𝑏𝑖 , where 𝑠𝑖 ≥ 0.
𝑠𝑖 is called a slack variable. Slack variables represent unused capacity/amount.
𝑬𝒙𝒂𝒎𝒑𝒍𝒆
3𝑥 + 5𝑦 ≤ 70 => 3𝑥 + 5𝑦 + 𝑠 = 70
And
∑𝑛𝑗=1 𝑎𝑖𝑗 𝑥𝑗 ≥ 𝑏𝑖 can be written as ∑𝑛𝑗=1 𝑎𝑖𝑗 𝑥𝑗 − 𝑡𝑖 = ∑𝑛𝑗=1 𝑎𝑖𝑗 𝑥𝑗 + (−𝑡𝑖 ) = 𝑏𝑖 , where
𝑡𝑖 ≥ 0, 𝑡𝑖 is called a surplus or a negative slack (−𝑡𝑖 ) variable. Surplus variables
represent excess capacity/amount of which a particular requirement is met.
𝑬𝒙𝒂𝒎𝒑𝒍𝒆
2𝑥1 − 𝑥2 + 5𝑥3 ≥ 5 => 2𝑥1 − 𝑥2 + 5𝑥3 − 𝑡 = 5
Example 1
Write the 𝑙𝑝 problem below in a proper standard form;
Min 𝑧 = 6𝑥 − 4𝑦 + 𝑤
s.t: 3𝑥 + 𝑦 + 2𝑤 ≥ 4
𝑥−𝑦+𝑤 =8
𝑥, 𝑦, 𝑤 ≥ 0
Solution
Min 𝑧 = 6𝑥 − 4𝑦 + 𝑤
s.t: 3𝑥 + 𝑦 + 2𝑤 ≥ 4
𝑥−𝑦+𝑤 ≥8
−𝑥 + 𝑦 − 𝑤 ≥ −8
𝑥, 𝑦, 𝑤 ≥ 0
18 | P a g e
Example 2
Consider the 𝑙𝑝 problem;
Max 𝑧 = 3𝑥 + 2𝑦 + 3𝑣 − 2𝑤
s.t: 2𝑥 + 6𝑦 + 2𝑣 − 4𝑤 = 7
3𝑥 + 2𝑦 − 5𝑣 + 𝑤 = 8
6𝑥 + 7𝑦 + 2𝑣 + 5𝑤 ≤ 5
𝑥, 𝑦, 𝑢, 𝑣 ≥ 0
Max 𝑧 = 3𝑥 + 2𝑦 + 3𝑣 − 2𝑤
s.t 2𝑥 + 6𝑦 + 2𝑣 − 4𝑤 ≤ 7
−2𝑥 − 6𝑦 − 2𝑣 + 4𝑤 ≤ −7
3𝑥 + 2𝑦 − 5𝑣 + 𝑤 ≤ 8
−3𝑥 − 2𝑦 + 5𝑣 − 𝑤 ≤ −8
6𝑥 + 7𝑦 + 2𝑣 + 5𝑤 ≤ 5
𝑥, 𝑦, 𝑢, 𝑣 ≥ 0 Now a standard 𝑙𝑝 problem.
--------------------------------------------------------------------------------------
Example 1
Max 𝑧 = 2𝑥 + 5𝑦
Subject to the constraints: 3𝑥 + 2𝑦 ≤ 6
2𝑥 + 9𝑦 ≤ 8
𝑥≥0
Solution
Observe that variable y is not constrained.
Let 𝑦 = 𝑦 + − 𝑦 − , then the 𝑙𝑝 problem becomes
Max 𝑧 = 2𝑥 + 5(𝑦 + − 𝑦 − )
Subject to the constraints: 3𝑥 + 2(𝑦 + − 𝑦 − ) ≤ 6
2𝑥 + 9(𝑦 + − 𝑦 − ) ≤ 8
𝑥, 𝑦 + , 𝑦 − ≥ 0 which is now in a proper general form.
19 | P a g e
Example 2
Min 𝑧 = 2𝑥1 + 3𝑥2 + 𝑥3
Subject to the constraints: 2𝑥1 + 𝑥2 − 𝑥3 = 4
3𝑥1 + 2𝑥2 + 𝑥3 = 8
𝑥1 − 𝑥2 = 6
𝑥1 , 𝑥2 ≥ 0
Solution
The 𝑙𝑝 is not in proper general form because of the min objective and 𝑥3 is not
constrained. This 𝑙𝑝 can also be converted to a max general problem.
Max 𝑧 ′ = 𝑤 = −2𝑥1 − 3𝑥2 − 𝑥3
Subject to the constraints: 2𝑥1 + 𝑥2 − 𝑥3 = 4
3𝑥1 + 2𝑥2 + 𝑥3 = 8
𝑥1 − 𝑥2 = 6
𝑥1, 𝑥2 ≥ 0
but not in a proper form yet because 𝑥3 is not constrained
Let 𝑥3 = (𝑥3 + − 𝑥3 − ), then we have
Max 𝑤 = −2𝑥1 − 3𝑥2 − (𝑥3 + − 𝑥3 − )
Subject to the constraints: 2𝑥1 + 𝑥2 − (𝑥3 + − 𝑥3 − ) = 4
3𝑥1 + 2𝑥2 + (𝑥3 + − 𝑥3 − ) = 8
𝑥1 − 𝑥2 = 6
𝑥1, 𝑥2 , 𝑥3 + , 𝑥3 − ≥ 0. Now in a canonical form
Note.
Using all the above changes, one can transform any 𝑙𝑝 problem which is not in a proper
general/standard form into an equivalent proper general/standard 𝑙𝑝 problem.
20 | P a g e
1.5 The Canonical form of standard LPP
Canonical form of standard LPP is a set of equations consisting of the ‘objective function’
and all the ‘equality constraints’ (standard form of LPP) expressed in canonical form.
Understanding the canonical form of LPP is necessary for studying simplex method (to be
discussed soon)-which is the most popular method of solving LPP.
We first discuss the canonical form of a set of linear equations, then the Canonical form of LPP
next.
Note that the transformed set of equations through elementary operations is equivalent to the
original set of equations. Thus, solution of the transformed set of equations will be the solution of
the original set of equations too.
Now, let us transform the above set of equation (E1, E2 and E3) through elementary operations
(shown inside bracket in the right side).
𝑥 + 2𝑦3
+ 3𝑧 = 10
3
…E4 (E4= 13E4)
0 − 83𝑦 + 83𝑧 = 83 …E5 (E5= E4 − E2)
1 5
0 + 3𝑦 − 3𝑧 = 3 17
…E6 (E6= E3 − 2E4)
Note that variable x is eliminated from equations E2 and E3 to obtain E5 and E6 respectively.
Equation E1 in the previous set is known as pivotal equation.
Following similar procedure, y is eliminated from E4 and E6 as follows, considering E5 as pivotal
equation.
𝑥+0+𝑧 =4 …E7
0 + 𝑦 − 𝑧 = −1 …E8
0 + 0 − 2𝑧 = −6 …E9
21 | P a g e
x 0y 0z 1 …E10
0x y 0z 2 …E11
0x 0y z 3 …E12
Thus we end up with another set of equations which is equivalent to the original set having one
variable in each equation.
Transformed set of equations, (E10, E11 and E12), thus obtained are said to be in canonical form.
Operation at each step to eliminate one variable at a time, from all equations except one, is
known as pivotal operation.
It is obvious that the number of pivotal operations is the same as the number of variables in the
set of equations. Thus we did three pivotal operations to obtain the canonical form of the set
of equations having three variables each.
It may be noted that, at each pivotal operation, the pivotal equation is transformed first and using
the transformed pivotal equation, other equations in the system are transformed. For example, while
transforming, E2, E3 and E4 to E5, E6 and E7, considering E5 as pivotal equation, E5 is obtained first.
E4 and E6 are then obtained using E5. Transformation can be obtained by some other elementary
operations also but will end up in the same canonical form.
The procedure explained above is used in simplex algorithm which will be discussed later. The
elementary operations involved in pivotal operations, as explained above, will help the reader to
follow the analogy while understanding the simplex algorithm.
It is obvious that a solution of the system of equations can be easily obtained from canonical
form, such as: 𝑥𝑗 = 𝑏𝑗 which is the solution of the original set of equations too as the canonical
form is obtained through elementary operations. In the above case,
=> =>
In general, for the system of equations with m equations with n variables ( n ≥m), it is possible to
transform the set of equations to an equivalent canonical form from which at least one solution
can be easily deduced.
22 | P a g e
1.6 Geometric /graphical representation of the 𝒍𝒑 problem
1.6.1 Geometry of a constraint (in 2 dimensionℝ2 )
A single ith constraint of a 𝑙𝑝 problem in a general form; 𝑎𝑖1 𝑥1 + 𝑎𝑖2 𝑥2 ≤ 𝑏𝑖 can be written as
𝑥1
𝒂𝑻 𝒙 ≤ 𝒃𝒊 ; where 𝒂𝑇 = (𝑎𝑖1 𝑎𝑖2 ) , 𝑥 = (𝑥 ).
2
𝑥1
The set of points = (𝑥 ) 𝑜𝑟 𝑥 𝑇 = (𝑥1 𝑥2 ) in ℝ2 that satisfy the constraint 𝒂𝑻 𝒙 < 𝒃𝒊
2
constitute a half-space/ feasible region defined by 𝐻 = {𝑥: 𝑎𝑇 𝑥 < 𝑏𝑖 }.
If the inequality is closed, 𝒂𝑻 𝒙 ≤ 𝒃𝒊 the set of points 𝑥 𝑇 = (𝑥1 𝑥2 ) in ℝ2 that satisfying
𝑥
𝑎𝑇 𝑥 ≤ 𝑏𝑖 is called a closed half –space. 𝐻 = {𝑥 = (𝑥1 ) : 𝑎𝑇 𝑥 ≤ 𝑏𝑖 }
2
Example
𝑥 𝑥
Consider the constraint 2𝑥 + 3𝑦 ≤ 6, its closed half space is the set 𝐻 = {(𝑦) : (2 3) (𝑦) ≤ 6}
which consists of the points (𝑥, 𝑦) ∈ ℝ2 satisfying the constraint.
E.g;
The points (3,0) and (1,1) satisfy the constraint and are therefore in H
Every point on the line 2𝑥 + 3𝑦 = 6 also satisfies the constraint and thus lies in H.
But the points (3,4) and (−1,3) don’t satisfy the inequality and are therefore not in 𝐻.
𝑓(𝑥)
2-
0 2 4 6 𝑋
2𝑥 + 3𝑦 = 6
The unshaded region below the boundary (inclusive), is the closed half space
𝑥 𝑥
𝐻 = {(𝑦) : (2 3) (𝑦) ≤ 6}
23 | P a g e
Example 2
Sketch the half spaces of the following constraints
Max 𝑧 = 3𝑥 + 𝑦
3𝑥 + 2𝑦 ≤ 6
4𝑥 + 𝑦 ≤ 4
𝑥, 𝑦 ≥ 0
𝑥 3 2 𝑥 6
The closed space 𝐻 in ℝ2 is defined by 𝐻 = {(𝑦) : ( ) (𝑦) ≤ ( )} and consists of all
4 1 4
interior and boundary points.
Example 3 (3 dimensionℝ3 )
Assume a lp problem with a constraint in three variables, 4𝑥 + 2𝑦 + 5𝑧 ≤ 20. The closed half
𝑥 𝑥
3
space 𝐻 in ℝ is defined by 𝐻 = {(𝑦) : (2 4 5) (𝑦) ≤ 20}. This closed half space can be
𝑧 𝑧
sketched by graphing the plane 4𝑥 + 2𝑦 + 5𝑧 = 20 and checking the test point. To graph the
plane 4𝑥 + 2𝑦 + 5𝑧 = 20, we use the intersections of the plane with each of the coordinate
planes. These intersections are lines in the coordinate planes.
Letting 𝑧 = 0, => 4𝑥 + 2𝑦 = 20 (𝑥𝑦 𝑝𝑙𝑎𝑛𝑒)
𝑦 = 0, => 4𝑥 + 5𝑧 = 20 (𝑥𝑧 𝑝𝑙𝑎𝑛𝑒)
𝑥 = 0, => 2𝑦 + 5𝑧 = 20 (𝑦𝑧 𝑝𝑙𝑎𝑛𝑒)
Y
Q
X
𝑥 𝑥
The closed half space 𝐻 in ℝ3 is defined by 𝐻 = {(𝑦) : (245) (𝑦) ≤ 20} consists of the
𝑧 𝑧
plane PQR and all points below it.
24 | P a g e
NB
1) The set of points satisfying the inequality 𝑎𝑇 𝑥 ≤ 𝑏𝑖 is a closed half space defined by
𝑥1
𝑥2
𝐻1 = 𝑥 = . ∈ ℝ𝑛 : 𝑎𝑇 𝑥 ≤ 𝑏 .
.
{ 𝑥
( 𝑛) }
2) The set of points satisfying the inequality 𝑎𝑇 𝑥 ≥ 𝑏𝑖 is also a closed half space defined
by
𝑥1
𝑥2
𝐻2 = 𝑥 = . ∈ ℝ𝑛 : 𝑎𝑇 𝑥 ≥ 𝑏
.
{ 𝑥
( 𝑛) }
3) A typical constraint of a 𝑙𝑝 problem in standard form has the equation 𝑎𝑇 𝑥 = 𝑏, whose
graph in ℝ𝑛 is a hyperplane but not a line. A hyperplane in ℝ𝑛 is defined by the set
𝑥1
𝑥2
̂ =
𝑯 𝑥= . ∈ ℝ𝑛 : 𝑎𝑇 𝑥 = 𝑏 .
.
{ (𝑥𝑛 ) }
In fact a hyperlane is a plane in a hyperspace corresponding to the ordinary space.Thus
the hyperplane is the boundary of a closed half space. Institutively, a hyperplane
consists of points that are in the half space, and on its edge.
4) The hyperplane 𝑎𝑇 𝑥 = 𝑏 divides the plane ℝ𝑛 into two closed half spaces
𝑥1 𝑥1
𝑥2 𝑥2
𝐻1 = 𝑥 = . ∈ ℝ𝑛 : 𝑎𝑇 𝑥 ≤ 𝑏 and 𝐻2 = 𝑥 = . ∈ ℝ𝑛 : 𝑎𝑇 𝑥 ≥ 𝑏
. .
{ (𝑥𝑛 ) } { (𝑥𝑛 ) }
Thus, 𝐻1 ∩ 𝐻2 = 𝑯 ̂ is the original hyperplane. In other words the hyperplane 𝐻 ̂ is the
intersection of two closed half spaces.
5) A close half space consists of a hyperplane and all points on the one side of the
hyperplane.
𝑥1 𝑥1
𝑥2 𝑥2
It is denoted by 𝑥 = . : 𝑎𝑇 𝑥 ≤ 𝑏 or 𝑥 = . : 𝑎𝑇 𝑥 ≥ 𝑏 .
. .
{ 𝑥
( 𝑛) } { 𝑥
( 𝑛) }
Example
The equation 4𝑥 + 2𝑦 + 5𝑧 = 20 defines a hyperplane 𝐻 ̂ in ℝ3 . The graph of this
plane which is really a plane PQR is in fig. 1.4 above.
This hyperplane is the boundary of 𝐻1 , defined by the inequality 4𝑥 + 2𝑦 + 5𝑧 ≤ 20
which extends below the hyperplane 𝐻 ̂ and it lies behind the page.
We also see that the hyperplane 𝐻̂ is the boundary of the closed half space 𝐻2 defined
by the inequality 4𝑥 + 2𝑦 + 5𝑧 ≥ 20. The half space 𝐻2 extends above the hyperplane
̂and reaches out the plane.
𝐻
25 | P a g e
𝑥1
𝑥2
6) A feasible solution to a 𝑙𝑝 is a point 𝑥 = . ∈ ℝ𝑛 that satisfies all the constraints
.
𝑥
( 𝑛)
of the LPP. It then follows that the set of feasible solutions constitutes a feasible region
and is the intersection of all closed half spaces determined by all the constraints.
7) Specifically, the set of solutions to an inequality ≤ 𝑜𝑟 ≥ is a single closed half space
whereas the set of solutions to an equation/equality constraint is the intersection
(hyperplane) of two closed half spaces.
26 | P a g e
1.5.2 Geometry of the objective function
The objective function of any lp problem can be written as 𝑧 = 𝑐 𝑇 𝑥.
1) If 𝑧 is a constant (point 𝑥 known) then the graph of the equation 𝑧 = 𝑐 𝑇 𝑥 is a plane that
just touches the feasible region.
2) Assume we have a lp problem that asks for a max value of the objective function. In solving
this problem,
We are searching for a point(s) in the feasible region for which the value of 𝑧 is as
large as possible.
Geometrically, we are looking for the hyperplane that intersects the set of feasible
solutions and for which 𝑧 is a maximum.
The value of 𝑧 measures the distance from the origin to that hyperplane 𝑧 = 𝑐 𝑇 𝑥
We can think of starting with very large values of 𝑧 and then decreasing them until we
find a hyperplane that first touches the feasible region. Or we can start with very small
values of, say 𝑧 = 0,1,2, …untill we discover the point(s) in the region that maximize
𝑧 such that the corresponding hyperpane just touches the feasible region.
Intuitively, the prospective feasible points are those on the boundary of the feasible
region, especially those at the points of intersection of boundary lines (extreme/vertex
points).
Example 1
Max 𝑧 = 4𝑥 + 3𝑦
𝑠. 𝑡 𝑥+𝑦≤4
5𝑥 + 3𝑦 ≤ 15
𝑥, 𝑦 ≥ 0
The feasible region is show below;
,27
The possible hyperplanes are 𝑧 = 9, 𝑧 = 12, 𝑧 = 𝑎𝑛𝑑 𝑧 = 15. But then it is the hyperplane
2
27
𝑧= that just touches the feasible region, hence it appears that the max value/optimal value
2
27 3 5
of 𝑧 = 4𝑥 + 3𝑦 𝑖𝑠 , obtained at 𝑥 = 2 , 𝑦 = 2.
2
3
Thus 𝑥 = (25) is the optimal solution/feasible solution that maximizes 𝑧 and it is unique.
2
27 | P a g e
Example 2
Max 𝑧 = 3𝑥 + 𝑦
𝑠. 𝑡 3𝑥 + 2𝑦 ≤ 6
4𝑥 + 𝑦 ≤ 4
𝑥, 𝑦 ≥ 0
4-
2 12 18
The point (5 , 5 ) maximizes 𝑧 thus the max value/optimal value is = 5
, obtained when
(3/2, 5/2 ) is the optimal solution/feasible solution that maximizes 𝑧. This point is also unique.
Example 3
Max 𝑧 = 8𝑥 + 2𝑦
𝑠. 𝑡 3𝑥 + 2𝑦 ≤ 6
4𝑥 + 𝑦 ≤ 4
𝑥, 𝑦 ≥ 0
y
4-
3- Extreme Optimal
point value 𝑧 =
2- 3𝑥 + 𝑦
(0,0) 𝑧=0
1- (0,3) 𝑧=6
(2/5,12/5) 𝑧=8
(1,0) 𝑧=8
0 1 2 3 4 x
The feasible region is indicated above. Note that the graph of 𝑧 = 8𝑥 + 2𝑦 is parallel with the
constraint 4𝑥 + 𝑦 ≤ 4, which is one of the boundary lines 4𝑥 + 𝑦 = 4. In this case an infinite
number of optimal points exist that maximize 𝑧. Thus the solution is not unique. This could
have been seen by inspection to discover that 𝑧 = 8𝑥 + 2𝑦 and 4𝑥 + 𝑦 ≤ 4 are parallel and
hence conclude forth with.
28 | P a g e
Example 4
Min 𝑧 = 2𝑥 + 5𝑦 𝑠. 𝑡
−3𝑥 + 2𝑦 ≥ 6
𝑥 + 2𝑦 ≥ 2
𝑥, 𝑦 ≥ 0
The feasible region is unbounded thus we can make 𝑧 as large as we please. In other words the
optimal value of 𝑧 doesn’t exist since in each case there are points that lie to the right of the
hyper plane and are still in the set of the feasible solution. Evidently, the value of 𝑧 can be
made arbitrarily large. Hence no solution exists.
Conclusion
The geometric interpretation of the constraints and the objective function, gives rise to the
geometric method/graphical method of solving a lp problem in only two variables.
However, for a lp problem involving at least three variables (> 2 dimension), another
method called the Simplex Method works best (to be discussed ahead).
Among the feasible points, the prospective / potential optimal points are those on the
boundary of the feasible region, especially those at the points of intersection of boundary
lines (extreme/vertex points).
If a feasible region is unbounded, no optimal point exists.
If a feasible region bounded, then either a unique optimal solution exists or an infinite
number of optimal points exist.
29 | P a g e
1.5.2 Theorems on feasible points in the feasible region
Theorem 1.
1. We first show that if 𝑥1 ∈ ℝ𝑛 , 𝑥2 ∈ ℝ𝑛 are two feasible solutions, then any point on the
line segment joining these two points is also a feasible solution.
Proof
Now suppose that points 𝑥1 , 𝑥2 are two feasible solutions of a lp problem. If 𝑎𝑇 𝑥 ≤ 𝑏𝑖
are constraints of the lp problem, then clearly these two points 𝑥1 , 𝑥2 satisfy the
constraints 𝑎𝑇 𝑥 ≤ 𝑏𝑖
i.e 𝑎𝑇 𝑥1 ≤ 𝑏𝑖 and 𝑎𝑇 𝑥2 ≤ 𝑏𝑖 ……….(i)
Now, for any interior point 𝑥 = 𝜆𝑥1 + (1 − 𝜆)𝑥2 , 0 < 𝜆 < 1 on the line segment
joining 𝑥1 , 𝑥2 , we have 𝑎𝑇 𝑥 = 𝑎𝑇 [𝜆𝑥1 + (1 − 𝜆)𝑥2 ]
𝑎𝑇 𝑥 = 𝜆𝑎𝑇 𝑥1 + (1 − 𝜆)𝑎𝑇 𝑥2 ≤ 𝜆𝑏𝑖 + (1 − 𝜆)𝑏𝑖 ≤ 𝑏𝑖
=> 𝑎𝑇 𝑥 ≤ 𝑏𝑖
Hence any point 𝑥 = 𝜆𝑥1 + (1 − 𝜆)𝑥2 on the line segment joining the points 𝑥1 , 𝑥2
also satisfies the constraints 𝑎𝑇 𝑥 ≤ 𝑏𝑖 and hence is in the feasible region.
This result also holds for 𝑎𝑇 𝑥 ≥ 𝑏𝑖 .
-----------------------
Theorem 2
2. Now we consider the feasible solutions 𝑥1 , 𝑥2 to a lp problem in a standard form with
the objective function 𝑧 = 𝑐 𝑇 𝑥 and constraints 𝑎𝑇 𝑥 = 𝑏𝑖 . If 𝑧 = 𝑐 𝑇 𝑥 has the same value
𝑧 at 𝑥1 and 𝑥2 , then the objective function 𝑧 = 𝑐 𝑇 𝑥 has the same value 𝑧 at any interior
point 𝜆𝑥1 + (1 − 𝜆)𝑥2 , 0 < 𝜆 < 1 on the line segment joining the point 𝑥1 and 𝑥2 .
------------------------
Theorem 3
3. However, suppose that the values of 𝑧 = 𝑐 𝑇 𝑥 are different at 𝑥1 and 𝑥2 , say 𝑧1 < 𝑧2 ,
then the value of the objective function z at any interior point 𝜆𝑥1 + (1 − 𝜆)𝑥2 , 0 <
𝜆 < 1 of the line segment is less than its value at the end point 𝑥2 where 𝑧 is highest.
Proof
𝑧 = 𝑐 𝑇 𝑥 = 𝑐 𝑇 (𝜆𝑥1 + (1 − 𝜆)𝑥2 )
= 𝜆𝑐 𝑇 𝑥1 + (1 − 𝜆)𝑐 𝑇 𝑥2 < 𝜆𝑐 𝑇 𝑥2 + (1 − 𝜆)𝑐 𝑇 𝑥2 < 𝑐 𝑇 𝑥2
=> 𝑧 = 𝑐 𝑇 𝑥 < 𝑐 𝑇 𝑥2 = 𝑧2 .
30 | P a g e
Thus the value of the objective function at any interior point of the line segment is less
than the z value at one end point 𝑥2 .
In conclusion, the objective function either has a constant value or attains a max value
at one end and a minimum value at the other
31 | P a g e
1.6.8 Corollary
The intersection of finite convex sets is convex
A bounded convex set is one that can be enclosed in a rectangle in ℝ𝑛 and the
unbounded convex is one that cannot be enclosed.
1.6.12 Theorem.
Given a convex set (feasible region), an extreme/corner point is always a boundary
point of the convex set, but the converse is not true always (Thus that when a point is
a boundary point, then it is not necessarily an extreme point/ corner point).
Example
A,B,C and D are extreme/corner points
A B and thus are boundary points.
The point E is a boundary point but it is
not an extreme point
E
C D
32 | P a g e
1.6.13 Theorem
Let S be a set of feasible solutions (feasible region) to a general lp problem;
1) If S is non-empty and bounded, then a unique optimal solution to the problem exists
and occurs at one of the extreme point. However, the solution is not unique if there
infinitely many solutions (parallelism)
2) If S is non-empty and unbounded, and if an optimal solution exists, then the optimal
solution occurs at one of the extreme points
3) If an optimal solution to the lp problem doesn’t exist, then either S is empty or S is
unbounded.
Example 1
Min 𝑧 = 2𝑥 + 5𝑦 𝑠. 𝑡
−3𝑥 + 2𝑦 ≥ 6
𝑥 + 2𝑦 ≥ 2
𝑥, 𝑦 ≥ 0
y
4-
3-
2-
-2 -1 0 1 2 3 4 x
Example 2
Max 𝑧 = 4𝑥 + 3𝑦 𝑠. 𝑡
𝑥+𝑦 ≤4
5𝑥 + 3𝑦 ≤ 15
𝑥, 𝑦 ≥ 0
y
4- Extreme Optimal
point value 𝑧 =
- 3𝑥 + 𝑦
(0,0) 𝑧=0
2- (0,4) 𝑧 = 12
(3/2,5/2) 𝑧 = 27/2
(3,0) 𝑧 = 12
0 2 4 6 x
33 | P a g e
3
The feasible region is bounded and a unique extreme point 𝑥 = (25) is the unique optimal
2
solution/feasible solution that maximizes 𝑧.
Example 3
Max 𝑧 = 3𝑥 + 𝑦
𝑠. 𝑡 3𝑥 + 2𝑦 ≤ 6
4𝑥 + 𝑦 ≤ 4
𝑥, 𝑦 ≥ 0
4-
3- Extreme Optimal
point value 𝑧 =
3𝑥 + 𝑦
2- (0,0) 𝑧=0
(0,3) 𝑧=3
1- (2/5,12/5) 𝑧 = 18/5
(1,0) 𝑧=3
0 1 2 3 4 X
2 12
The extreme point (5 , 5 ) maximizes 𝑧 thus (3/2, 5/2 ) is the unique optimal solution/feasible
solution that maximizes 𝑧.
Example 4
Max 𝑧 = 8𝑥 + 2𝑦
𝑠. 𝑡 3𝑥 + 2𝑦 ≤ 6
4𝑥 + 𝑦 ≤ 4
𝑥, 𝑦 ≥ 0
y
4-
3- Extreme Optimal
point value 𝑧 =
3𝑥 + 𝑦
2- (0,0) 𝑧=0
(0,3) 𝑧=6
1- (2/5,12/5) 𝑧=8
(1,0) 𝑧=8
0 1 2 3 4
34 | P a g e
1.6 The algebraic description of extreme/corner points
(The basic solution, feasible solution and an optimal solution)
The algebraic description of extreme points uses the concept of a basic solution to a lp
problem. The following theorems are important to understand a basic solution.
𝑋
[𝐵 𝑅 ] [𝑋𝐵 ] = 𝑏, where 𝐵 is invertible/a non-singular, 𝑅 is singular/non-invertible
𝑅
𝐵𝑋𝐵 + 𝑅𝑋𝑅 = 𝑏
35 | P a g e
𝑥1 𝑠1
𝑥2 𝑠2
. .
𝑥1 . 𝑏1 .
𝑥2 . 𝑎11 𝑎12 … 𝑎1𝑚 −1 𝑏2 .
. 𝑥𝑚 −1 𝑎 𝑎 … 𝑎2𝑚 . 𝑠𝑚
𝑋𝐵 = = 0 = 𝐵 𝑏 = ( 21 22 .. ) = 0 is the basic solution
. . .
. 0 𝑎𝑚1 𝑎𝑚2 … 𝑎𝑚𝑚 0
.
[𝑥𝑚 ] . [𝑏𝑚 ] .
. .
. .
[0] [0]
The vector 𝑋𝐵 is a unique basic solution of 𝐴𝑥 = 𝑏 and the 𝑚 variables 𝑥1 , 𝑥2 ,…, 𝑥𝑚
solved for are called basic variables (decision variables). The 𝑛 − 𝑚 variables
𝑥𝑚+1 , 𝑥𝑚+2 ,…, 𝑥𝑛 that are set to zero are called non-basic variables.
NB
𝑥1
𝑥2
.
.
.
𝑥𝑚
1. A basic solution is just a single unique point 𝑋𝐵 = 0 of the system 𝐴𝑥 = 𝑏
0
.
.
.
[0]
2. A basic variable is just a solution to the system 𝐴𝑥 = 𝑏 but it does not necessarily
satisfy 𝑥𝑖 ≥ 0.Therefore, a basic solution is not necessarily a feasible solution to the
lp problem.
3. A basic solution becomes feasible if 𝑥𝑖 ≥ 0, 𝑖 = 1,2, . . , 𝑚
Example
𝑥1
Assume that 𝑋 = [𝑥 ] and 𝑋𝐵 = 𝑥1 and 𝑋𝑅 = 𝑥2 .
2
𝑥
Now setting 𝑋𝑅 = 0 => 𝑋 = [ 1 ] is a corner point (𝑥1 , 0) (basic solution) and will be
0
feasible if 𝑥1 ≥ 0, hence the name a basic feasible solution.
So generally the basic solution (𝑥1 , 𝑥2 , … , 𝑥𝑚 ,0,0, … ,0) is a corner point/an extreme
point of the feasible region.
36 | P a g e
𝑥1
𝑥2
.
.
.
𝑥𝑚
i.e 𝑥 = 0 ≥ 0, => 𝑥𝑖 ≥ 0 ; 𝑖 = 1,2, … , 𝑚.
0
.
.
.
[0]
1.6.2 Theorem
For the lp problem in a standard form
Max 𝑧 = 𝑐 𝑇 𝑥
s.t 𝐴𝑥 = 𝑏
𝑥≥0
every basic feasible solution is an extreme /corner point, and conversely every
extreme/corner point is a basic feasible solution
Note
i) A basic solution to 𝐴𝑥 = 𝑏 is said to be a feasible solution (a basic feasible solution) if all
its components are positive (𝑥 ≥ 0).
ii) Once a basic solution exists, and it is feasible (𝑥 ≥ 0), then there exists a basic feasible
solution
iii) A basic solution shall be a degenerate solution if at least one of the variables of the basic
solution 𝑋𝐵 takes a zero value.
𝑥1
0
𝑥3
.
.
𝑥𝑚
E.g 𝑋𝐵 = 0
0
.
.
.
[0]
iv) A general lp problem has a finite number of basic feasible solutions (extreme points).
v) A standard lp problem has a finite number of basic feasible solutions (extreme points).
vi) A convex set S of all feasible solutions to a lp problem in general and standard form, has a
finite number of extreme points.
37 | P a g e
An Optimal value/solution to the lp problem
Max 𝑧 = 𝑐 𝑇 𝑥
s.t 𝐴𝑥 = 𝑏
𝑥≥0
is a basic solution that optimizes (maximizes or minimizes) the objective function 𝑧 = 𝑐 𝑇 𝑥
and occurs at the extreme points/vertex /corners of the feasible region.
Proof
Let the convex set S/feasible region be spanned by the points 𝑥1 , 𝑥2 , … , 𝑥𝑟 , such that 𝑥𝑖 ≥ 0.
Let some point 𝑥𝑟 be a corner point, then 𝑧𝑟 = 𝑐 𝑇 𝑥𝑟
Now for any interior point 𝑥 = ∑𝑟𝑖=1 𝜆𝑖 𝑥𝑖 ∈ 𝑆, where, 𝜆𝑖 ≥ 0, ∑𝑟𝑖=1 𝜆𝑖 = 1, then;
𝑟 𝑟 𝑟 𝑟
𝑧 = 𝑐 𝑥 = 𝑐 ∑ 𝜆𝑖 𝑥𝑖 = ∑ 𝜆𝑖 𝑐 𝑥𝑖 ≤ ∑ 𝜆𝑖 𝑐 𝑥𝑟 = 𝑐 𝑥𝑟 ∑ 𝜆𝑖 = 𝑐 𝑇 𝑥𝑟 = 𝑧𝑟
𝑇 𝑇 𝑇 𝑇 𝑇
Example
Consider the lp problem
Max 𝑧 = 120𝑥 + 100𝑦
s.t 2𝑥 + 2𝑦 + 𝑢 = 8
5𝑥 + 3𝑦 + 𝑣 = 15
𝑥, 𝑦, 𝑢, 𝑣 ≥ 0
𝑥
2 2 1 0 𝑦 8
=> [ ][ ] = ( )
5 3 0 1 𝑢 15
𝑣
We can select two of the four variables 𝑥, 𝑦, 𝑣, 𝑢 as non-basic variables by setting
them equal to zero and then we solve for the basic variables.
0
0
If 𝑥 = 𝑦 = 0, are the non-basic variables, => [ ]is a basic feasible solution
8
15
and then 𝑢 = 8, 𝑣 = 15 are the basic variables and hence it is an extreme point
of the convex set
0
5
If 𝑥 = 𝑣 = 0, are the non-basic variables, => [ ] is a basic solution and
−2
0
then 𝑦 = 5, 𝑢 = −2 are the basic variables but not feasible since 𝑢 is negative;
etc.
Summary
𝒙 𝒚 𝒖 𝒗 Type of solution Optimal value of 𝒛
0 0 8 15 Basic feasible 0
38 | P a g e
0 4 0 3 Basic feasible 400
0 5 -2 0 Basic, not feasible -
4 0 0 -5 Basic, not feasible -
3 0 2 0 Basic feasible 360
3/2 5/2 0 0 Basic feasible 430
.
2 The simplex Method of solving lp problems
Introduction
This is an algebraic method which was developed by George .B. Dentzig in 1947,
and is so systematic in finding the optimal solution to the lp problem.
The geometric and algebraic methods discussed above allowed us to characterize the
solution to the lp problem with two variables. However, for the lp problem with more
than two variables, the characterization of the solution does not lead to a practical
method for actually finding the solution to a lp problem.
39 | P a g e
Since we now know that the potential solutions are extreme points of the feasible
region, the simplex method determines these extreme points in the feasible region in
a particular order systematically that allows us to find an optimal solution in just a
small number of trials.
2.1 The Primal simplex method for general (Max and Min) lp problems
Consider the lp problem
Max 𝑧 = 𝑐 𝑇 𝑥 …………..(1)
s.t 𝐴𝑥 ≤ 𝑏
𝑥≥0
where;
𝑐1 𝑥1
𝑐2 𝑥2
. .
𝑐 = . ,𝑥 = . ,
. .
[𝑐𝑛 ] [𝑥𝑛 ]
𝑏1
𝑎11 𝑎12 … 𝑎1𝑚 𝑎1𝑚+1 … 𝑎1𝑛 𝑏2
𝑎21. 𝑎22 … 𝑎2𝑚 𝑎2𝑚+1 … 𝑎2𝑛 .
𝐴 = [𝑎𝑖𝑗 ] = [ .. ] an 𝑚𝑥𝑛, 𝑏 = .
. .
𝑎𝑚1 𝑎𝑚2 … 𝑎𝑚𝑚 𝑎𝑚𝑚+1 𝑎𝑚𝑛 .
[𝑏𝑚 ]
Now,
1) Assume that 𝑏 ≥ 0.
2) Transform each of the constraints in 𝐴𝑥 ≤ 𝑏 into an equation 𝑎𝑇 𝑥 = 𝑏 by
introducing a slack variable 𝑥𝑛+1 , . . , 𝑥𝑛+𝑚 . This gives a standard form of a lp
problem
Max 𝑧 = 𝑐 𝑇 𝑥
s.t 𝐴𝑥 = 𝑏
𝑥 ≥ 0 ……………(2)
40 | P a g e
𝑥1 𝑐1
𝑥2 𝑐2
. .
. .
. .
𝑥𝑚 𝑏1 𝑐𝑚
. 𝑏2 .
. . .
𝑥= , 𝑏= and 𝑐=
. . .
𝑥𝑛 . 𝑐𝑛
𝑥𝑛+1 [𝑏𝑚 ] 0
. 0
. .
. .
. .
[𝑥𝑛+𝑚 ] [0]
Recalling that the basic feasible solution to the standard form of the lp problem is an
extreme point of the convex set S, then 𝑧 = 𝑐 𝑇 𝑥 is an optimal value w.r.t the basic
feasible solution 𝑥 which is an extreme point of the feasible region.
𝑎11 𝑎12 … 𝑎1𝑚 … 𝑎1𝑛 1 0 … 0
𝑎21 𝑎22 … 𝑎2𝑚 … 𝑎2𝑛 0 1 … 0 𝑋
If 𝐴 = [ ... ] = [𝐵 𝑅 ] 𝑎𝑛𝑑 𝑋 = [ 𝐵 ], then
. 𝑋𝑅
𝑎𝑚1 𝑎𝑚2 … 𝑎𝑚𝑚 … 𝑎𝑚𝑛 0 0 … 1
𝑋𝐵
𝐴𝑋 = [𝐵 𝑅 ] [ ] = 𝑏
𝑋𝑅
=> 𝐵𝑋𝐵 + 𝑅𝑋𝑅 = 𝑏
=> 𝑿𝑩 + 𝑩−𝟏 𝑹 𝑿𝑹 = 𝑩−𝟏 𝒃 ………………….(3)
NB
1) 𝐵 is of order 𝑚𝑥𝑚 and rank of A is 𝑚.
2) 𝐵 forms the basis of 𝐴
3) Every invertible 𝑚𝑥𝑚 sub-matrix 𝐵 of 𝐴 has 𝐷𝑒𝑡𝐵 = |𝐵| ≠ 0, forms a basis for the
standard lp problem because its columns are linearly independent
𝑛
4) There are ( ) bases for the standard lp problem
𝑚
5) The assumption of rank 𝑚 for the matrix 𝐴 implies there is at least one basis for the
standard lp problem.
Setting 𝐼 = {𝑖: 1 ≤ 𝑖 ≤ 𝑚}, the set of indices of basic variables
𝐽 = {𝑗: 𝑚 + 1 ≤ 𝑗 ≤ 𝑛}, the set of indices of non-basic variables
Also letting 𝑩−𝟏 𝑹 = 𝑌 = {𝑦𝑗 }, 𝑗 ∈ 𝐽 and let 𝑩−𝟏 𝒃 = 𝑥̅ . So we have
𝑿𝑩 + 𝑌𝑋𝑅 = 𝑥̅
̅ ……….(4)
=> 𝑿𝑩 + ∑𝒋∈𝑱 𝒚𝒋 𝒙𝒋 = 𝒙
41 | P a g e
𝑥1
𝑥2
.
.
.
𝑥𝑚
.
Now 𝑧 = 𝑐 𝑇 𝑥 = [𝑐1 𝑐2 … 𝑐𝑚 … 𝑐𝑛 0 0 … 0] .
.
𝑥𝑛
𝑥𝑛+1
.
.
.
.
[𝑥𝑛+𝑚 ]
𝑋𝐵
𝑧 = [𝐶𝐵 𝐶𝑅 ] [ ]
𝑋𝑅
𝑧 = 𝐶𝐵 𝑿𝑩 + 𝐶𝑅 𝑋𝑅 …(5) - basic representation of the objective function
From (4),
𝑧 = 𝐶𝐵 (𝑥̅ − 𝑌𝑋𝑅 ) + 𝐶𝑅 𝑋𝑅
= 𝐶𝐵 𝑥̅ − 𝐶𝐵 𝑌𝑋𝑅 + 𝐶𝑅 𝑋𝑅
= 𝐶𝐵 𝑥̅ − 𝐶𝐵 ∑𝑗∈𝐽 𝑦𝑗 𝑥𝑗 + ∑𝑗∈𝐽 𝑐𝑗 𝑥𝑗
= 𝐶𝐵 𝑥̅ + ∑𝑗∈𝐽 𝑐𝑗 𝑥𝑗 − 𝐶𝐵 ∑𝑗∈𝐽 𝑦𝑗 𝑥𝑗
̅ + ∑𝒋∈𝑱(𝒄𝒋 − 𝑪𝑩 𝒚𝒋 )𝒙𝒋 ………..(6)
𝒛 = 𝑪𝑩 𝒙
Example
Max 𝑧 = 2𝑥 + 𝑦
s.t 3𝑥 − 𝑦 ≤ 2
𝑥+𝑦 ≤4
𝑥, 𝑦 ≥ 0
Introducing slack variables 𝑢, 𝑣, we obtain;
Max 𝑧 = 2𝑥 + 𝑦+0𝑢 + 0𝑣
s.t 3𝑥 − 𝑦 + 𝑢 = 2
𝑥+𝑦+𝑣 =4
𝑥, 𝑦, 𝑢, 𝑣 ≥ 0
42 | P a g e
𝑥
𝑦
=> Max 𝑧 = [2 1 0 0] [ ]
𝑢
𝑣
𝑥
3 −1 1 0 𝑦 2
s.t [ ][ ] = [ ]
1 1 0 1 𝑢 4
𝑣
𝐶 𝑇 = [2 1 0 0], 𝑋 𝑇 = [𝑥, 𝑦, 𝑢, 𝑣]
3 1 −1 0
Let/assume 𝐵 = [ ], then 𝑅 = [ ];
1 0 1 1
𝑛 4
B is the basis, but there are ( ) = ( ) = 6 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑏𝑎𝑠𝑒𝑠 𝑓𝑜𝑟 𝐴;
𝑚 2
1 0 −1 1 0 −1 0 1
𝐵 −1 = |𝐵| ( ) = −1 ( )=[ ],
−1 3 −1 3 1 −3
𝐼 = {1,3}, 𝐽 = {2,4}
=> 𝑥, 𝑢 are basic variable, 𝑦, 𝑣 are the non-basic variables
𝑥 𝑦
=> 𝑋𝐵 = [ ] and 𝑋𝑅 = [ ] ;
𝑢 𝑣
3 1 𝑥 −1 0 𝑦 2
=> 𝐵𝑋𝐵 + 𝑅𝑋𝑅 = 𝑏 => [ ][ ] + [ ][ ] = [ ]
1 0 𝑢 1 1 𝑣 4
𝑥 0 1 −1 0 𝑦 0 1 2
𝑋𝐵 + 𝐵 −1 𝑅𝑋𝑅 = 𝐵 −1 𝑏 => [ ] + [ ][ ][ ] = [ ][ ]
𝑢 1 −3 1 1 𝑣 1 −3 4
𝑥 1 1 𝑦 4
=> [ ] + [ ][ ] = [ ]
𝑢 −4 −3 𝑣 −10
𝑥 4 1 1 𝑦
=> [ ] = [ ]−[ ] [ ] ……….(1)
𝑢 −10 −4 −3 𝑣
𝐶𝐵 = [2 0], 𝐶𝑅 = [1 0]
𝑧 = 𝐶𝐵 𝑋𝐵 + 𝐶𝑅 𝑋𝑅
𝑥 𝑦
𝑧 = [2 0] [ ] + [1 0] [ ]
𝑢 𝑣
4 1 1 𝑦 𝑦
𝑧 = [2 0] [[ ]−[ ] [ ]] + [1 0] [ ]
−10 −4 −3 𝑣 𝑣
𝑦 𝑦
𝑧 = 8 − [2 2] [ ] + [1 0] [ ]
𝑣 𝑣
𝑦 𝑦
𝑧 = 8 + [1 0] [ ] − [2 2] [ ]
𝑣 𝑣
𝑦
𝑧 = 8 + [[1 0] − [2 2]] [ ]……….(2)
𝑣
𝑧 = 8 + (1 − 2)𝑦 + (0 − 2)𝑣; 𝑐/𝑓 𝒛 = 𝒛̅ − ∑𝒋∈𝑱(𝒛𝒋 − 𝒄𝒋 )𝒙𝒋
=> 𝑐2− 𝑧2 = 1 − 2 = −1 => 𝒛𝟐 − 𝒄𝟐 = 𝟏
𝑐4− 𝑧4 = 0 − 2 = −2 => 𝒛𝟒 − 𝒄𝟒 = 𝟐
Since 𝒛𝒋 − 𝒄𝒋 ≥ 𝟎, then it is evident that the optimal solution is there (finite) and can be
reached.
43 | P a g e
𝑦 𝑥 4
And in (2) above when [ ] = 0, then 𝑧 = 8 and 𝑋𝐵 = [ ] = [ ] , hence one of the basic
𝑣 𝑢 −10
solution is
𝑥 4
𝑦 0
[ ]=[ ].This solution is a degenerate basic solution, but not a feasible solution because
𝑢 −10
𝑣 0
𝑢 < 0.
𝑛 4
Note that there are ( ) = ( ) = 6 𝑏𝑎𝑠𝑒𝑠 𝑓𝑜𝑟 𝐴. So this basic solution is not the only possible
𝑚 2
solution.
……………………………….
Example 2
Max 𝑧 = 𝑥 − 2𝑦 + 𝑢
s.t 𝑥 + 2𝑦 + 𝑢 ≤ 5
2𝑥 − 𝑦 + 𝑢 ≤ 3
𝑥 + 𝑦 − 2𝑧 ≤ 2
𝑥, 𝑦, 𝑢 ≥ 0
8
5
1
𝑥 8/5 −5
3
𝑧 = 5, 𝑋𝐵 = [𝑦] = [−1/5], hence the basic solution is 18 .This basic solution is not a
5
𝑢 18/5 0
0
[0]
feasible solution because 𝑦 < 0.
…………………………………………………
44 | P a g e
The extreme points (0,0,8,15) and (0,4,0,3) are adjacent extreme points since the basic
3 5
variable 𝑣 is common. In the table above, it is only the point (2 , 2 , 0,0) which is not adjacent
to (0,0,8,15).
2.3 Note
The simplex method proceeds from a certain known/given extreme point (initial basic feasible
solution) to an adjacent extreme point in such a way that the value of 𝑧 increases or at worst
remains the same. The method proceeds until we either obtain an optimal solution or find that
the given lp problem has no finite optimal solution. This method does not examine every basic
solution (extreme point), but rather checks only a small number of them.
45 | P a g e
Note
1) The assumption that 𝒃 ≥ 𝟎 allows the simplex procedure to work, otherwise another
procedure must be used. Given a lp problem, standardize it such that 𝒃 ≥ 𝟎.
2) In the second row, we list the variables 𝑥1 , 𝑥2 , … , 𝑥𝑛 , 𝑥𝑛+1 , 𝑥𝑛+2 , … , 𝑥𝑛+𝑚 as labels of
the corresponding columns.
3) First, we consider all the decision (non-slack) variables 𝑥1 , 𝑥2 , . . , 𝑥𝑛 to be non-
basic variable ,then set all them in 𝐴𝑥 = 𝑏 equal to zero. Then instead we treat the
slack variables 𝒙𝒏+𝟏 𝒙𝒏+𝟐 . . . 𝒙𝒏+𝒎 to be the basic variables, i.e
𝑥𝑛+1 𝑥𝑛+2 . . . 𝑥𝑛+𝑚 ≠ 0. This gives the initial basic feasible solution
𝑋𝐵 = (0 0 … 0 𝑥𝑛+1 𝑥𝑛+2 . . . 𝑥𝑛+𝑚 ) = (0,0, … ,0, 𝑥̅1 , 𝑥̅2 , … , 𝑥̅𝑚 ). Hence the table
above is called the initial tableau.
4) A basic variable in a tableau has the following properties;
a) It appears exactly in one equation and it has a coefficient of +1
b) The column that it labels has all zero’s (including the objective row) except +1 in the
row that is labeled by the basic variable.
c) The value of the basic variable 𝑋𝐵 is the entry 𝑥̅𝑖 in the same row in the rightmost
column labeled 𝒙 ̅.
5) The last row 𝒛𝒋 − 𝒄𝒋 is called the objective row/index row.
6) The last entry (𝑧̅) in the objective row and rightmost column is the optimal value of the
objective function 𝑧 for the initial basic solution.
46 | P a g e
Examples of an initial tableau
Example 1
Given the lp problem
Max 𝑧 = 2𝑥1 + 𝑥2
s.t 3𝑥1 − 𝑥2 ≤ 2
𝑥1 + 𝑥2 ≤ 4
𝑥1 , 𝑥2 ≥ 0
Introducing slack variables 𝑥3 , 𝑥4 , we have;
Max 𝑧 = 2𝑥1 + 𝑥2 + 0𝑥3 + 0𝑥4
s.t 3𝑥1 − 𝑥2 + 𝑥3 = 2
𝑥1 + 𝑥2 + 𝑥4 = 4
𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 ≥ 0
Since 𝑏 ≥ 0, the simplex method works and the initial simplex tableau for the lp problem
𝐶𝑗 2 1 0 0 𝐵 −1 𝑏
𝐶𝐵 𝑋𝐵 𝑥1 𝑥2 𝒙𝟑 𝒙𝟒 𝑥̅
0 𝒙𝟑 3 −1 1 0 2
0 𝒙𝟒 1 1 0 1 4
𝒛𝒋 − 𝒄𝒋 −2 − 1 0 0 𝑧 = 𝑧̅ = 0
NB:
𝑥3
𝑥3 , 𝑥4 are regarded to be the basic variables => 𝑋𝐵 = (𝑥 )
4
𝑥1
𝑥1 , 𝑥2 are the non-basic variables => 𝑋𝑅 = (𝑥 )
2
𝑧𝑗 = 𝐶𝐵 𝑦𝑗
3
E.g 𝑧1 = 𝐶𝐵 𝑦1 = (0 0) ( ) = 0 => 𝑧1 − 𝑐1 = 0 − 2 = −2,
1
𝑧2 − 𝑐2 = −1
𝑧3 − 𝑐3 = 0
𝑧4 − 𝑐4 = 0
−1 2
𝐵 𝑏 = 𝑥̅ = ( )
4
−1 2
𝑧̅ = 𝐶𝐵 𝑥̅ = 𝐶𝐵 𝐵 𝑏 = (0 0) ( ) = 0
4
…………………………………………………………..
47 | P a g e
Example 2
Given the lp problem
Max 𝑧 = 𝑥1 + 2𝑥2
s.t 3𝑥1 + 𝑥2 ≤ 10
𝑥1 + 3𝑥2 ≤ 6
𝑥1 , 𝑥2 ≥ 0
NB:
𝑥3
𝑥3 , 𝑥4 are the basic variables => 𝑋𝐵 = (𝑥 )
4
𝑥1
𝑥1 , 𝑥2 are the non basic variables => 𝑋𝑅 = (𝑥 )
2
3
𝑧𝑗 = 𝐶𝐵 𝑦𝑗 e.g 𝑧1 = 𝐶𝐵 𝑦1 = (0 0) ( ) = 0 => 𝑧1 − 𝑐1 = 0 − 1 = −1
1
𝑧2 − 𝑐2 = −2
𝑧3 − 𝑐3 = 0
𝑧4 − 𝑐4 = 0
10
𝑧̅ = 𝐶𝐵 𝑥̅ = 𝐶𝐵 𝐵 −1 𝑏 = (0 0) ( ) = 0
6
48 | P a g e
2.5 The optimality criterion
If the objective row (𝒛𝒊 − 𝒄𝒊 ) has zero entries in the columns labeled by basic variables
𝑥𝑛+1 , 𝑥𝑛+2 , … , 𝑥𝑛+𝑚 and there is no negative entries 𝒂𝒔𝒌 in the columns labeled by non-
basic variables 𝑥1 , 𝑥2 , . . , 𝑥𝑛 , then we stop the iterations and the solution represented in
the tableau is optimal.
A necessary and sufficient condition for a max basic feasible solution to be the unique
max feasible solution to the lp problem is that ∀ 𝑗 ∈ 𝐽, 𝒛𝒋 − 𝒄𝒋 > 0 .
Given a basic feasible solution w.r.t the basis B, a necessary and sufficient condition for
the solution to be an optimal solution is that 𝒛𝒋 − 𝒄𝒋 ≥ 𝟎 ∀ 𝑗 ∈ 𝐽. This is called the
optimality criterion.
As soon as the optimality criterion 𝒛𝒋 − 𝒄𝒋 ≥ 𝟎 has been met, we stop our computations,
because we have found the optimal solution.
If 𝒛𝒌 − 𝒄𝒌 < 0 for some 𝑘 ∈ 𝐽 and 𝒂𝒔𝒌 ≥ 0, ∀ 1 < 𝑠 < 𝑚, then the initial solution is
not the max optimal solution. Continue the iterations to get the adjacent solution. Stop
if the optimality criterion is achieved.
Given a max basic feasible solution and that 𝒛𝒋 − 𝒄𝒋 ≥ 𝟎 ∀ 𝑗 ∈ 𝐽, the necessary and
sufficient condition for another solution to be max is that for some 𝑘 ∈ 𝐽, 𝒛𝒌 − 𝒄𝒌 < 𝟎 .
However, if 𝒛𝒌 − 𝒄𝒌 < 0 for some 𝑘 ∈ 𝐽 and 𝒂𝒔𝒌 < 0, ∀ 1 < 𝑠 < 𝑚 , then no finite max
optimal solution exists. If such a column exists, immediately stop and conclude that no
optimal solution exists. i.e
𝐶𝑗 𝑐1 𝑐2 . . . 𝒄𝒌 𝑐𝑛+1 𝑐𝑛+2 . . . 𝑐𝑛+𝑚 𝐵 −1 𝑏
𝐶𝐵 𝑋𝐵 𝑥1 𝑥2 . . . 𝒙𝒌 𝑥𝑛+1 𝑥𝑛+2 . . . 𝑥𝑛+𝑚 ̅
𝒙
𝑐𝑛+1 𝑥𝑛+1 𝑎11 𝑎12 . . . 𝒂𝟏𝒌<0 𝑎1𝑛+1 𝑎1𝑛+2 . . . 𝑎1𝑛+𝑚 𝑥̅1
𝑐𝑛+2 𝑥𝑛+2 𝑎21 𝑎22 . . . 𝒂𝟐𝒌<0 𝑎2𝑛+1 𝑎2𝑛+2 . . . 𝑎2𝑛+𝑚 𝑥̅2
. . . .
. . . .
. . . .
𝑐𝑛+𝑚 𝑥𝑛+𝑚 𝑎𝑚1 𝑎𝑚2 . . . 𝒂𝒎𝒌 <0 𝑎𝑚𝑛+1 𝑎2𝑛+2 . . . 𝑎𝑚𝑛+𝑚 𝑥̅𝑚
𝑧𝑗 − 𝑐𝑗 𝑧1 − 𝑐1 𝑧2 − 𝑐2 . . 𝒛𝒌 − 𝒄𝒌 < 0 0 0 . . . 0 𝑧̅ = 0 = 𝑧
49 | P a g e
If there are several distinct negative entries 𝑧𝑗 − 𝑐𝑗 < 0 in the objective row, choose
the most negative min{zj − cj } entry or 𝑚𝑎𝑥|𝑧𝑗 − 𝑐𝑗 | in order to determine the
entering variable and the pivotal column.
If there are several equal negative entries 𝑧𝑗 − 𝑐𝑗 < 0 in the objective row, you can
choose any (but we prefer the leftmost negative entry) to determine the entering
variable.
The smallest positive 𝜽 − 𝒓𝒂𝒕𝒊𝒐 determines the departing variable, hence the
basic variable labeling this row is the departing variable and this row becomes
the pivotal row.
𝑥̅
If all the ratios are the same, ∀ 1 < 𝑠 < 𝑚, consider the uppermost ratio to
𝒂𝒔𝒌
determine the departing variable.
We mark the pivotal row by placing an arrow ← to the left of the departing variable or
𝑥̅
to the right of the smallest or uppermost .
𝒂𝒔𝒌
𝑥̅
The value that determines departing variable, becomes the largest possible value
𝒂𝒔𝒌
for the entering variable (see examples ahead).
The entry at the intersection of the pivotal row and pivotal column is called the pivot
(always circled).
NB
1) Negative entries (𝑎𝑠𝑘 < 0) lead to negative 𝜽 − 𝒓𝒂𝒕𝒊𝒐𝒔 which puts no restriction on
how to increase the variable. Thus when calculating 𝜽 − 𝒓𝒂𝒕𝒊𝒐𝒔 don’t use any negative
entry 𝑎𝑠𝑘 in the pivotal column.
𝑥̅
2) If 𝑎𝑠𝑘 = 0 (𝑧𝑒𝑟𝑜 𝑒𝑛𝑡𝑟𝑦) the 𝜽 − 𝒓𝒂𝒕𝒊𝒐 is undefined, = 𝑥𝟎̅ =∞ and this also shows
𝒂𝒔𝒌
no restriction placed on the variable. So we can also ignore any zero entries in the
pivotal column.
3) If all the entries in the pivotal column are either 0 or negatives, we stop the iterations
immediately then conclude that the lp problem has no finite optimal solution.
50 | P a g e
4) Consequently, we only use the positive entries ( 𝑎𝑠𝑘 > 0 ) in the pivotal column to
𝑥̅
form 𝜽 − 𝒓𝒂𝒕𝒊𝒐𝒔,
𝒂𝒔𝒌
Example 1
Given the lp problem
Max 𝑧 = 2𝑥1 + 𝑥2
s.t 3𝑥1 − 𝑥2 ≤ 2
𝑥1 + 𝑥2 ≤ 4 b≥0
𝑥1 , 𝑥2 ≥ 0
Introducing slack variables 𝑥3 , 𝑥4 , we have;
Max 𝑧 = 2𝑥1 + 𝑥2 + 0𝑥3 + 0𝑥4
s.t 3𝑥1 − 𝑥2 + 𝑥3 = 2
𝑥1 + 𝑥2 + 𝑥4 = 4
𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 ≥ 0
51 | P a g e
Since 𝑏 ≥ 0, the simplex method works and the initial simplex tableau for the lp problem
𝐶𝑗 2 1 0 0 𝐵 −1 𝑏
𝐶𝐵 𝑋𝐵 𝑥1 𝑥2 𝒙𝟑 𝒙𝟒 𝑥̅
0 𝒙𝟑 3 −1 1 0 2
0 𝒙𝟒 1 1 0 1 4
𝒛𝒋 − 𝒄𝒋 −2 − 1 0 0 𝑧 = 𝑧̅ = 0
Example 2
Given the lp problem
Max 𝑧 = 𝑥1 + 2𝑥2
s.t 3𝑥1 + 𝑥2 ≤ 10
𝑥1 + 3𝑥2 ≤ 6
𝑥1 , 𝑥2 ≥ 0
Example 3
Max 𝑧 = 𝑥1 − 2𝑥2 + 𝑥3
s.t 𝑥1 + 2𝑥2 + 𝑥3 ≤ 5
2𝑥1 − 3𝑥2 + 𝑥3 ≤ 3
𝑥1 + 𝑥2 − 2𝑥3 ≤ 2
𝑥1 , 𝑥2 , 𝑥3 ≥ 0
𝑏 ≥ 0 and introducing slack variables 𝑥4 , 𝑥5 and 𝑥6 , we have;
Max 𝑧 = 𝑥1 − 2𝑥2 + 𝑥3 + 0𝑥4 + 0𝑥5 + 0𝑥6
s.t 𝑥1 + 2𝑥2 + 𝑥3 + 𝑥4 = 5
2𝑥1 − 3𝑥2 + 𝑥3 + 𝑥5 = 3
𝑥1 + 𝑥2 − 2𝑥3 + 𝑥6 = 2, 𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 , 𝑥5 , 𝑥6 ≥ 0
52 | P a g e
The initial simplex tableau for the lp problem
53 | P a g e
Example 4
Max 𝑧 = 3𝑥1 + 𝑥2 + 𝑥3
s.t 𝑥1 − 𝑥2 + 2𝑥3 ≤ 3
2𝑥1 − 3𝑥2 − 𝑥3 ≤ 2
3𝑥1 + 𝑥2 − 2𝑥3 ≤ 1
𝑥1 , 𝑥2 , 𝑥3 ≥ 0
Introducing slack variables 𝑥4 , 𝑥5 , we have;
Max 𝑧 = 3𝑥1 + 𝑥2 + 𝑥3 + 0𝑥4 + 0𝑥5 + 0𝑥6
s.t 𝑥1 − 𝑥2 + 2𝑥3 + 𝑥4 = 3
2𝑥1 − 3𝑥2 − 𝑥3 +𝑥5 = 2
3𝑥1 + 𝑥2 − 2𝑥3 +𝑥6 = 1
𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 , 𝑥5 , 𝑥6 ≥ 0
The initial simplex tableau for the lp problem
𝐶𝑗 3 1 1 0 0 0 𝑥̅ =b 𝜽 − 𝒓𝒂𝒕𝒊𝒐𝒔
̅
𝑥
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒 𝒙𝟓 𝒙𝟔 ̅
𝒙
𝒂𝒔𝒌
0 𝑥4 1 −1 2 1 0 0 3 3
0 𝑥5 2 −3 −1 0 1 0 2 1
3 1 −2 0 0 1
0 𝑥6 1 1/3 ←
𝑧𝑗 − 𝑐𝑗 −3 − 1 −1 0 0 0 𝑧 = 𝑧̅ = 0
↑
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒 𝒙𝟓 𝒙𝟔 ̅
𝒙 𝑥̅
𝒂𝒔𝒌
0 𝑥4 4 8 8/3 1←
0 − 1 0 − 1/3
3 3
0 𝑥5 4/3 4
0 − 11/3 1/3 0 1 − 2/3
3 𝑥1 1/3
1 1/3 − 2/3 0 0 1/3
𝑧𝑗 − 𝑐𝑗 0 0 −3 0 0 1 𝑧 = 𝑧̅ = 1
↑
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒 𝒙𝟓 𝒙𝟔 ̅
𝒙
1 𝑥3 1 3 1 1
0 − 1 0 −
2 8 8
7 1 5
0 𝑥5 0 −2 0 −8 1 1 ←
8
1
1 0 0 0 1/4
𝑥1 4
3 1
54 | P a g e
Example 5
𝑀𝑎𝑥 𝑧 = −7𝑥1 + 9𝑥2 + 3𝑥3
s.t 5𝑥1 − 4𝑥2 − 𝑥3 ≤ 10
𝑥1 − 𝑥2 ≤ 4
−3𝑥1 + 4𝑥2 + 𝑥3 ≤ 1
𝑥1 , 𝑥2 , 𝑥3 , ≥ 0
Introducing slack variables 𝑥4 , 𝑥5 and 𝑥6 , we have;
𝑀𝑎𝑥 𝑧 = −7𝑥1 + 9𝑥2 + 3𝑥3 + 0𝑥4 + 0𝑥5 + 0𝑥6
s.t 5𝑥1 − 4𝑥2 − 𝑥3 + 𝑥4 = 10
𝑥1 − 𝑥2 + 𝑥5 = 4
−3𝑥1 + 4𝑥2 + 𝑥3 + 𝑥6 = 1
𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 , 𝑥5 , 𝑥6 ≥ 0
The initial simplex tableau for the lp problem
𝐶𝑗 −7 9 3 0 0 0 𝜽 − 𝒓𝒂𝒕𝒊𝒐𝒔
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒 𝒙𝟓 𝒙𝟔 ̅
𝒙 𝑥̅
𝒂𝒔𝒌
0 𝑥4 5 −4 −1 1 0 0 10
0 𝑥5 1 −1 0 0 1 0 4
0 𝑥6 −3 4 1 0 0 1 1
𝑧𝑗 − 𝑐𝑗 7 −9 −3 0 0 0 𝑧 = 𝑧̅ = 0
↑
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒 𝒙𝟓 𝒙𝟔 ̅
𝒙
0 𝑥4 2 0 0 1 0 1 11
1 1 1
0 𝑥5 0 0 1 17/4 17
4 4 4
1
9 𝑥2 −4
3
1 0 0
1 1 1
4 4
4
1 3 9
𝑧𝑗 − 𝑐𝑗 0 −4 0 0 𝑧 = 9/4
4 4
↑
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒 𝒙𝟓 𝒙𝟔 ̅
𝒙
0 𝑥4 2 0 0 1 0 1 11
0 𝑥5 1 −1 0 0 1 0 4
3 𝑥3 −3 4 1 0 0 1 1
𝑧𝑗 − 𝑐𝑗 −2 3 0 0 0 3 𝑧=3
↑
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒 𝒙𝟓 𝒙𝟔 ̅
𝒙
0 𝑥4 0 −2 0 1 −2 1 3
−7 𝒙𝟏 1 −1 0 0 1 0 4
3 𝑥3 0 1 1 0 3 1 13
𝑧𝑗 − 𝑐𝑗 0 1 0 0 0 3 𝑧 = 11
Since ∀ 𝑗 ∈ 𝐽, 𝑧𝑗 − 𝑐𝑗 ≥ 0, the optimal solution has been reached which is 𝑥1 = 4, 𝑥2 = 0,
4
𝑥3 = 13 , => 𝑥 = [ 0 ] and the optimal value is 𝑧 = 11.
13
Verify 𝑧 = −7𝑥1 + 9𝑥2 + 3𝑥3 = 11
55 | P a g e
Exercise. Attempt the following. 8. Max 𝑧 = 3𝑥1 + 4𝑥2 + 𝑥3 + 5𝑥4
1. Max 𝑧 = 4𝑥 + 3𝑦 s.t 𝑥1 + 4𝑥2 + 5𝑥3 + 2𝑥4 ≤ 8
s.t 𝑥+𝑦 ≤4 2𝑥1 + 6𝑥2 + 𝑥3 + 𝑥4 ≤ 3
5𝑥 + 3𝑦 ≤ 15 8𝑥1 + 3𝑥2 + 4𝑥3 +𝑥4 ≤ 7
𝑥, 𝑦 ≥ 0 𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 ≥ 0
2. Max 𝑧 = 8𝑥 + 2𝑦
𝑠. 𝑡 3𝑥 + 2𝑦 ≤ 6
4𝑥 + 𝑦 ≤ 4
𝑥, 𝑦 ≥ 0
3. Max 𝑧 = 3𝑥 + 𝑦
𝑠. 𝑡 3𝑥 + 2𝑦 ≤ 6
4𝑥 + 𝑦 ≤ 4
𝑥, 𝑦 ≥ 0
4. Max 𝑧 = 2𝑥 + 5𝑦
s.t.c 3𝑥 + 2𝑦 ≤ 6
2𝑥 + 9𝑦 ≤ 8
𝑥, 𝑦 ≥ 0
7. Max 𝑧 = 𝑥1 − 2𝑥2 + 𝑥3
s.t 𝑥1 + 2𝑥2 + 𝑥3 ≤ 5
2𝑥1 − 𝑥2 + 𝑥3 ≤ 3
𝑥1 + 𝑥2 − 2𝑥3 ≤ 1
𝑥1 , 𝑥2 , 𝑥3 ≥ 0
56 | P a g e
2.12 Flow chart for the Primal simplex method
YES
YES
The simplex algorithm is the original and still one of the most widely used methods for
solving linear maximization problems.
57 | P a g e
2.13.0 Degeneracy
A basic feasible solution in which some basic variables are zero is said to be degenerate. Thus,
a solution to a lp problem is degenerate if at least one of the basic variables takes on a value 0
and when degeneracy occurs, the value of 𝑧 may not change.
Causes of occurrence
a) When the lp problem is originally degenerate, i.e
In 𝑀𝑎𝑥 𝑧 = 𝑐 𝑇 𝑥
s.t 𝐴𝑥 ≤ 𝑏 (some 𝑏′𝑠 could be zeros)
𝑥≥0
2.13.1 Cycling
If no degenerate solution occurs in the cause of the simplex method, then the value of
𝑧 increases as we go from one basic feasible solution to the next adjacent basic feasible
solution. Since the number of basic feasible solutions is finite, the simplex method
eventually stops. However, if we have a degenerate basic feasible solution, then the
value of 𝑧 does not change. In fact to see this, observe that 𝑧 increases by a multiple of
the values in the right most column (𝑥̅ ) of the pivotal row. But this value is zero so that
z does not increase! So after several steps of the simplex method, we may return to the
basic solution that we already encountered. If this occurs, the simplex method is said to
be cycling and will never terminate by finding an optimal solution and we conclude that
no bounded optimal solution exists.
Cycling can only occur in the presence of degeneracy, but many lp problems that are
degenerate don’t cycle. Examples of cycling problems are difficult to meet and
construct and indeed rarely occur in practice.
Example (Cycling)
Max 𝑧 = 10𝑥1 − 57𝑥2 − 9𝑥3 − 24𝑥4
1 1 5
s.t 𝑥 − 3 𝑥2 − 2 𝑥3 + 9𝑥4 + 𝑥5 = 0
2 1
1 3 1
𝑥 − 2 𝑥2 − 2 𝑥3 + 𝑥4 + 𝑥6 = 0
2 1
𝑥1 + 𝑥7 = 1
𝑥𝑗 ≥ 0, j=1,2,…,7
When tableaux are drawn, the last tableau and the first tableau are the same. Thus the simplex
method has cycled.
58 | P a g e
3 The Big - M (penalty) method
3.1 Introduction
The simplex method was restricted to standard 𝑀𝑎𝑥 lp problems with a positive right
hand side (𝑏 ≥ 0), thus all constraints were of the 𝐴𝑋 ≤ 𝑏 , 𝑏 ≥ 0.
The assumption that 𝑏 ≥ 0 enabled us to easily find an initial basic solution
𝑋 = (0,0, … , 𝑏1 , 𝑏2 , … , 𝑏𝑛 ).
Unfortunately, there are many lp problems in which not all constraints can be
transformed in the form 𝐴𝑋 ≤ 𝑏 where 𝑏 ≥ 0.
Example 1:
Max 𝑧 = 4𝑥 + 3𝑦 Max 𝑧 = 4𝑥 + 3𝑦
s.t 𝑥 + 𝑦 ≤ 1 => s.t 𝑥+𝑦 ≤ 1
2𝑥 + 3𝑦 ≥ 4 −2𝑥 − 3𝑦 ≤ −4
𝑥, 𝑦 ≥ 0 𝑥, 𝑦 ≥ 0
but 𝑏 = −4 𝑖𝑠 𝑛𝑒𝑔𝑎𝑡𝑖𝑣𝑒 !!, and adding a slack 𝑠2
gives
Max 𝑧 = 4𝑥 + 3𝑦
s.t 𝑥 + 𝑦 + 𝑠1 = 1
−2𝑥 − 3𝑦 + 𝑠2 = −4
𝑥, 𝑦, 𝑠1 , 𝑠2 ≥ 0
Max 𝑧 = 4𝑥 + 3𝑦
s.t 𝑥 + 𝑦 + 𝑠1 = 1
2𝑥 + 3𝑦 − 𝑠2 = 4
𝑥, 𝑦, 𝑠1 , 𝑠2 ≥ 0
Note that a slack variable 𝑠2 has a negative coefficient −1 and yet in the standard
form 𝐴𝑋 = 𝑏 where 𝑏 ≥ 0, all slack variables must have positive coefficients (+1).
Therefore, 𝑠2 cannot serve as a basic variable for the initial basic feasible solution in
the initial tableau.
----------------------
Example 2
Min 𝑧 = 4𝑥1 + 𝑥2
Min 𝑧 = 4𝑥1 + 𝑥2
s.t 3𝑥1 + 4𝑥2 ≥ 20 …….(2)
s.t 3𝑥1 + 4𝑥2 ≥ 20 =>
𝑥1 + 5𝑥2 ≥ 15
−𝑥1 − 5𝑥2 ≤ −15
𝑥1 , 𝑥2 ≥ 0 ;
𝑥1 , 𝑥2 ≥ 0
Now a proper general min lp problem
=>
59 | P a g e
−20
Now 𝑏 = ( ) is negative and yet the simplex method was restricted to proper 𝑀𝑎𝑥
−15
lp problems with a positive right hand side (𝑏 ≥ 0),
=>
Min 𝑧 = 4𝑥1 + 𝑥2
s.t 3𝑥1 + 4𝑥2 ≥ 20
𝑥1 + 5𝑥2 ≥ 15
𝑥1 , 𝑥2 ≥ 0
Max −𝑧 = −4𝑥1 − 𝑥2 + 0𝑠1 + 0𝑠2
gives Min 𝑧 = 4𝑥1 + 𝑥2 + 0𝑠1 + 0𝑠2
s.t 3𝑥1 + 4𝑥2 − 𝑠1 = 20
s.t 3𝑥1 + 4𝑥2 − 𝑠1 = 20 =>
𝑥1 + 5𝑥2 − 𝑠2 = 15
𝑥1 + 5𝑥2 − 𝑠2 = 15
𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 ≥ 0
𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 ≥ 0
where the surplus variables 𝑠1 , 𝑠2 have negative coefficients and this violates the non-
negativity restriction of 𝑏 ≥ 0. Hence 𝑠1 , 𝑠2 cannot serve as initial basic variables for the
initial tableau because they have −1 coefficients, so we cannot easily find an initial basic
solution, hence no finite basic feasible solution (infeasible solution) using the simplex
method.
---------------------------
To overcome the problems encountered above, we now develop a procedure for
introducing a variable with coefficient +1 that can serve as an initial basic variable.
a) Case 1
𝑀𝑎𝑥 𝑧 = 𝑐 𝑇 𝑥
s.t 𝐴𝑥 ≤ 𝑏 , 𝑏 ≥ 0
𝑥≥0
Add a slack variable and add the same slack variable with a zero coefficient to the
objective function and proceed to give;
𝑀𝑎𝑥 𝑧 = ∑𝑛𝑗=1 𝑐𝑗 𝑥𝑗 + ∑𝑚 𝑖=1 0𝑠𝑖
𝑛
𝑠. 𝑡 ∑𝑗=1 𝑎𝑖𝑗 𝑥𝑗 + 𝑠𝑖 = 𝑏𝑖 ,
𝑥𝑗 , 𝑠𝑖 ≥ 0, 𝑗 = 1,2, … , 𝑛
Then draw the initial tableau and run the primal simplex algorithm to determine the
feasible solution.
-------------------
60 | P a g e
b) Case 2
𝑀𝑎𝑥 𝑧 = 𝑐 𝑇 𝑥
s.t 𝐴𝑥 ≥ 𝑏 , 𝑏 ≥ 0
𝑥 ≥ 0; not proper general max lpp!!
1) The first step of the simplex method is to convert the inequality 𝐴𝑥 ≥ 𝑏 into
equality constraints 𝐴𝑥 = 𝑏, by introducing surplus variables 𝒔𝒊 (negative slacks
with negative coefficients (−1).
2) We then add an additional variable, 𝑨𝒊 (with a positive coefficient +1) to each
constraint that has a surplus variables 𝒔𝒊 . Variables 𝑨𝒊 are called artificial variables
3) Correspondingly, to correct the original lp problem, we add each artificial variable
𝑨𝒊 to the objective function by assigning it a coefficient −𝑴, defined to be a very
large/high number/cost (add a term−𝑴𝑨𝒊 to the objective function ). This is to
ensure that there are no artificial variables 𝑨𝒊 in the final optimal solution
(𝑨𝒊 become zero in the optimal solution).
4) Then proceed to solve the lp problem using the primal simplex algorithm using
artificial variables 𝑨𝒊 as initial basic variables in the initial tableau and if 𝑨𝒊
remain in the final tableau, then the system has an infeasible solution.
5) This procedure is called the Big M method attributed to Charnes.
Thus,
𝑀𝑎𝑥 𝑧 = 𝑐 𝑇 𝑥
s.t 𝐴𝑥 ≥ 𝑏 , 𝑏 ≥ 0
𝑥≥0
Converting to the standard form, gives;
𝑀𝑎𝑥 𝑧 = ∑𝑛𝑗=1 𝑐𝑗 𝑥𝑗 + ∑𝑚 𝒎
𝑖=1 0𝑠𝑖 − ∑𝒊=𝟏 𝑴𝑨𝒊
𝑠. 𝑡 ∑𝑛𝑗=1 𝑎𝑖𝑗 𝑥𝑗 − ∑𝑚 𝑖=1 𝑠𝑖 + 𝐴𝑖 = 𝑏𝑖 , 𝑏𝑖 ≥ 0
𝑥𝑗 , 𝑠𝑖 , 𝐴𝑖 ≥ 0, 𝑗 = 1,2, … , 𝑛 , 𝑖 = 1,2, … , 𝑚
Then draw the initial tableau and determine the feasible solution
c) Case 3
𝑀𝑖𝑛 𝑧 = 𝑐 𝑇 𝑥
s.t 𝐴𝑥 ≥ 𝑏 , 𝑏 ≥ 0
𝑥≥0
1) The first step of the simplex method is to convert the inequality 𝐴𝑥 ≥ 𝑏 into
equality constraints 𝐴𝑥 = 𝑏, by introducing surplus variables with negative
coefficients (−1). We then add an additional variable, 𝑨𝒊 (with a positive
coefficient +1) to each constraint that has a surplus variable.
2) Correspondingly, to correct the original lp problem, we add each artificial variable
𝑨𝒊 to the objective function by assigning it a coefficient +𝑴, defined to be a very
large/high number/cost (add a term+𝑴𝑨𝒊 to the objective function). This is to
ensure that there are no artificial variables 𝑨𝒊 in the final optimal solution
(𝑨𝒊 become zero in the optimal solution).
61 | P a g e
3) Then proceed to solve the lp problem using the primal simplex algorithm using
artificial variables 𝐴𝑖 as initial basic variables in the initial tableau and if 𝐴𝑖 remain
in the final tableau, then the system has an infeasible solution.
Thus,
𝑀𝑖𝑛 𝑧 = 𝑐 𝑇 𝑥
s.t 𝐴𝑥 ≥ 𝑏 , 𝑏 ≥ 0
𝑥≥0
Converting to the standard form, gives;
𝑀𝑖𝑛 𝑧 = ∑𝑛𝑗=1 𝑐𝑗 𝑥𝑗 + ∑𝑚 𝒎
𝑖=1 0𝑠𝑖 + ∑𝒊=𝟏 𝑴𝑨𝒊
𝑠. 𝑡 ∑𝑛𝑗=1 𝑎𝑖𝑗 𝑥𝑗 − ∑𝑚 𝑖=1 𝑠𝑖 + 𝐴𝑖 = 𝑏𝑖 , 𝑏𝑖 ≥ 0
𝑥𝑗 , 𝑠𝑖 , 𝐴𝑖 ≥ 0, 𝑗 = 1,2, … , 𝑛 , 𝑖 = 1,2, … , 𝑚
Then draw the initial tableau and determine the feasible solution
d) Case 4
4) If a given Max/Min problem has equality constraints, 𝐴𝑋 = 𝑏 , for each
constraint, add an artificial variable 𝑨𝒊 and add the same artificial variable to the
objective function with a penalty cost – 𝑴 (add a term−𝑨𝒊 𝑴 to the objective
function).
5) – 𝑴 is called the penalty cost. This is done so to ensure that the artificial variables
𝑨𝒊 also leave the final optimal solution, but if 𝑨𝒊 remain in the final tableau, then
the system has an infeasible solution.
6) Then proceed with the tableau, starting with the artificial variables as basic
variables.
Summary of the steps of the Big-M method for a Max(Min) linear programming problem.
1) For Max lp problems with " ≤ " , introduce slack variables 𝒔𝒊 so that all constraints are
equalities then use simplex algorithm
2) If the problem is of Min, and all constraints contain ≥ symbol, you can transform to Max
by multiplying the objective and constraints by -1 then use primal simplex algorithm
provided that 𝑏 ≥ 0
3) It may be emphasised that artificial variables 𝑨𝒊 are used in both Max and Min problems,
as long as at least one ≥ constraints are involved. In other words, introduce artificial variables
𝑨𝒊 in each row with no basic variable (if row has -ve slack). Put the artificial variables into the
objective function: 𝑛 𝑚 𝑚
Convention (1): 𝑀𝑖𝑛 𝑧 = ∑ 𝑐𝑗 𝑥𝑗 + ∑ 0𝑠𝑖 − ∑ 𝑀𝐴𝑖
For Max problem 𝑀𝑎𝑥 𝑧 = 𝑐 𝑇 𝑥 𝑗=1 𝑖=1 𝑖=1
For Min problem with ≥, introduce a surplus variable 𝒔𝒊 in each " ≥ " constraint, and
add an artificial variable 𝑨𝒊 in each " = " constraint formed, then add −𝑴𝑨𝒊 to the
objective function. 𝑀𝑖𝑛 𝑧 = 𝑐 𝑇 𝑥 𝑛 𝑚 𝑚
𝑥𝑗 , 𝑠𝑖 , 𝐴𝑖 ≥ 0, 𝑗 = 1,2, … , 𝑛 , 𝑖 = 1,2, … , 𝑚
62 | P a g e
4) In Max (Min), if = constraints are involved, introduce 𝑨𝒊 in constraints and −𝑴𝑨𝒊 in the
objective function.
5) Then run the usual simplex algorithm starting with artificial variables 𝑨𝒊 with +1
coefficient as basic variables and the rest are considered non-basic.
6) If at optimal all 𝑨𝒊 = 0, then we got the optimal solution for the original LP. Otherwise,
if some 𝑨𝒊 > 0 at optimal, then the original LP is infeasible.
7) An artificial variable 𝑨𝒊 permits us to convert from an infeasible to a feasible point.The
Big M method extends the power of the simplex algorithm to solve both Max and Min
problems that contain ≥ and = symbols in constraints.
63 | P a g e
Example 1
Method 1
Min 𝑧 = 4𝑥1 + 𝑥2
s.t 3𝑥1 + 4𝑥2 ≥ 20
𝑥1 + 5𝑥2 ≥ 15
𝑥1 , 𝑥2 ≥ 0
Draw a tableau with 𝐴1 , 𝐴2 as initial basic variables because they have +1 coefficients.
𝐶𝑗 4 1 0 0 −𝑀 −𝑀 𝜽 − 𝒓𝒂𝒕𝒊𝒐𝒔
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝑠1 𝑠2 𝐴1 𝐴2 ̅
𝒙 𝑥̅
𝒂𝒔𝒌
−𝑀 𝐴1 3 4 −1 0 1 0 20 5
−𝑀 𝐴2 1 5 0 −1 0 1 15 3←
(−4𝑀 − 4 ) (−9𝑀 − 1) 𝑀 𝑀 0 0
(𝑧𝑗 − 𝑐𝑗 ) 𝑧 = −35𝑀
↑
𝑥̅
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝑠1 𝑠2 𝐴1 𝐴2 ̅
𝒙 𝒂𝒔𝒌
11 4 −4 𝟒𝟎
−𝑀 𝐴1 0 −1 1 8 𝟏𝟏
←
5 5 5
1 −1 1
1 𝑥2 5
1 0 5
0 5
3 𝟏𝟓
−11𝑀−19 −4𝑀−1 4𝑀+1 𝑧̅ = −8𝑀 + 3
(𝑧𝑗 − 𝑐𝑗 ) 5
0 𝑀 5
0 5
↑
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝑠1 𝑠2 𝐴1 𝐴2 ̅
𝒙 𝑥̅
𝒂𝒔𝒌
4 𝑥1 5 4 5 −4 𝟒𝟎
1 0 − 11 11 11 11 𝟏𝟏
1 −3 1 −3 25
1 𝑥2 0 1 25←
11 11 11 11 11
−1 13 21 −19 185
(𝑧𝑗 − 𝑐𝑗 ) 0 0 +𝑀 +𝑀 𝑧 = 𝑧̅ =
11 11 11 11 11
↑
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝑠1 𝑠2 𝐴1 𝐴2 ̅
𝒙 𝑥̅
𝒂𝒔𝒌
1 10 𝟔𝟓
4 𝑥1 1 5 0 −19
11 11 11 𝟏𝟏
0 𝑠1 0 11 1 −3 1 −3 25
40 −76 260
(𝑧𝑗 − 𝑐𝑗 ) 0 19 0 4/11 11
+𝑀
11
+𝑀 𝑧 = 𝑧̅ = 11
64 | P a g e
Method 2
Min 𝑧 = 4𝑥1 + 𝑥2
s.t 3𝑥1 + 4𝑥2 ≥ 20
𝑥1 + 5𝑥2 ≥ 15
𝑥1 , 𝑥2 ≥ 0
In a standard form, introduce slacks and artificial variables. Using convention (1)
Min 𝑧 = 4𝑥1 + 𝑥2 + 0𝑠1 + 0𝑠1 + 𝑀𝐴1 + 𝑀𝐴2
s.t 3𝑥1 + 4𝑥2 − 𝑠1 + 𝐴1 = 20
𝑥1 + 5𝑥2 − 𝑠2 + 𝐴2 = 15
𝑥1 , 𝑥2, , 𝑠1 , 𝑠2 , 𝐴1 , 𝐴2 ≥ 0
Draw a tableau with 𝐴1 , 𝐴2 as initial basic variables because they have +1 coefficients.
𝐶𝑗 4 1 0 0 𝑀 𝑀 𝜽 − 𝒓𝒂𝒕𝒊𝒐𝒔
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝑠1 𝑠2 𝐴1 𝐴2 ̅
𝒙 𝑥̅
𝒂𝒔𝒌
𝑀 𝐴1 3 4 −1 0 1 0 20 5
𝑀 𝐴2 1 5 0 −1 0 1 15 3←
(4𝑀 − 4 ) (9𝑀 − 1) −𝑀 −𝑀 0 0
(𝑧𝑗 − 𝑐𝑗 ) 𝑧 = 35𝑀
↑
𝑥̅
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝑠1 𝑠2 𝐴1 𝐴2 ̅
𝒙 𝒂𝒔𝒌
11 4 −4 𝟒𝟎
𝑀 𝐴1 0 −1 1 8 𝟏𝟏
←
5 5 5
1 −1 1
1 𝑥2 5
1 0 5
0 5
3 𝟏𝟓
65 | P a g e
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝑠1 𝑠2 𝐴1 𝐴2 ̅
𝒙 𝑥̅
𝒂𝒔𝒌
1 10 −19
4 𝑥1 1 5 0 11 11 11
𝟔𝟓/𝟏𝟏
0 𝑠2 33 176 1 0 31 − 60 220
(𝑧𝑗 − 𝑐𝑗 ) 40 219 0 4 40−𝑀 𝑀−76 𝑧̅ = 260/11
Example 2
Max 𝑧 = 𝑥1 + 3𝑥2
s.t 𝑥1 + 2𝑥2 ≤ 8
6𝑥1 + 4𝑥2 ≥ 24
𝑥1 , 𝑥2 ≥ 0
In a standard form and introducing slack variables 𝑥3 , 𝑥4 and an artificial variable 𝐴1 in the
second constraint and adding −𝑴𝑨𝟏 into the objective function. Using convention (1) gives;
Max 𝑧 = 𝑥1 + 3𝑥2 +0𝑥3 + 0𝑥4 − 𝑴𝑨𝟏
s.t 𝑥1 + 2𝑥2 + 𝑠3 = 8
6𝑥1 + 4𝑥2 − 𝑠4 + 𝐴1 = 24
𝑥1 , 𝑥2, 𝑠3 , 𝑠4 , 𝐴1 ≥ 0
Draw a tableau using 𝑥3 , 𝐴1 as initial basic variables because they have +1 coefficients.
𝒙𝟑 and 𝑨𝟏 have positive coefficients
𝐶𝑗 1 3 0 0 −𝑀 𝜽 − 𝒓𝒂𝒕𝒊𝒐𝒔
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝒔𝟑 𝒔𝟒 𝑨𝟏 ̅
𝒙 𝑥̅
𝒂𝒔𝒌
0 𝑠3 1 2 1 0 0 8 8
−𝑀 𝐴1 6 4 0 −1 1 24 4←
(−6𝑀 − 1 ) (−4𝑀 − 3) 0 𝑀 0
(𝑧𝑗 − 𝑐𝑗 ) 𝑧 = −24𝑀
↑
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝒔𝟑 𝒔𝟒 𝐴1 ̅
𝒙 𝑥̅
𝒂𝒔𝒌
4 1 1
0 𝑠3 0 1 −6 4 3←
3 6
2 1 1
1 𝑥1 1 3
0 −6 6
4 2/3
7 1 1
(𝑧𝑗 − 𝑐𝑗 ) 0 −3 0 −6 +𝑀 𝑧 = 𝑧̅ = 4
6
↑
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝒔𝟑 𝒔𝟒 𝐴1 ̅
𝒙
3 1 1
3 𝑥2 0 1 −8 3
4 8
1 𝑥1 1 1 1 2
1 0 −2 −4 4
7 1 1 𝑧 = 𝑧̅ = 11
(𝑧𝑗 − 𝑐𝑗 ) 0 0 −8+𝑀
4 8
The optimal solution is 𝑥1 = 2, 𝑥2 = 3 𝑎𝑛𝑑 𝑧 = 11
66 | P a g e
Example 3
Max 𝑧 = 2𝑥1 + 5𝑥2 − 3𝑥3
s.t 𝑥1 + 𝑥2 + 𝑥3 = 10
𝑥1 − 𝑥2 ≥ 1
𝑥1 + 3𝑥2 + 𝑥3 ≤ 4
𝑥1 , 𝑥2 , 𝑥3 ≥ 0
Solution
Introducing slack and artificial variables (using convention 1) gives;
𝑀𝑎𝑥 𝑧 = 2𝑥1 + 5𝑥2 − 3𝑥3 +0𝒔𝟏 + 0𝒔𝟐 − 𝑀𝐴1 − 𝑀𝐴2
s.t 𝑥1 + 𝑥2 + 𝑥3 + 𝑨𝟏 = 10
𝑥1 − 𝑥2 − 𝒔𝟏 + 𝑨𝟐 = 1
𝑥1 + 3𝑥2 + 𝑥3 + 𝒔𝟐 = 4
𝑥1 , 𝑥2 , 𝑥3 , 𝑠1 , 𝑠2 , 𝐴1 , 𝐴2 ≥ 0
In the initial tableau use 𝑠2 , 𝐴1 , 𝐴2 as basic variables because they have +1 coefficients
Example 4
Max 𝑧 = 2𝑥1 + 5𝑥2
s.t 2𝑥1 − 𝑥2 ≤ 8
6𝑥1 + 4𝑥2 ≥ 24
𝑥1 , 𝑥2 ≥ 0
67 | P a g e
Example 5
𝑀𝑖𝑛 𝑧 = 9𝑥1 + 10𝑥2
s.t 𝑥1 + 2𝑥2 ≥ 25
3𝑥1 + 2𝑥2 ≥ 60
4𝑥1 + 3𝑥2 ≥ 24
𝑥1 , 𝑥2 ≥ 0
Introducing negative slacks and artificial variables, we have
𝑀𝑖𝑛 𝑧 = 9𝑥1 + 10𝑥2 +0𝑠1 + 0𝑠2 + 0𝑠3 +M𝐴1 + 𝑀𝐴2 + 𝑀𝐴3
s.t 𝑥1 + 2𝑥2 − 𝑠1 + 𝐴1 = 25
3𝑥1 + 2𝑥2 − 𝑠2 + 𝐴2 = 60
4𝑥1 + 3𝑥2 − 𝑠3 + 𝐴3 = 24
𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 , 𝑠3 , 𝐴1 , 𝐴2 , 𝐴3 ≥ 0
Using 𝐴1 , 𝐴2 , 𝐴3 as basic variables in the initial tableau, and continuing the iterations, the
optimal solution is 𝑥1 = 17.5, 𝑥2 = 3.75 and 𝑧 = 195 (min 𝑣𝑎𝑙𝑢𝑒).
Example 6
𝑀𝑎𝑥 𝑧 = 𝑥1 − 2𝑥2 − 3𝑥3 +𝑥4 + 5𝑥5 + 2𝑥6
s.t 𝑥1 + 2𝑥2 + 2𝑥3 + 𝑥4 + 𝑥5 = 12
𝑥1 + 2𝑥2 + 𝑥3 + 𝑥4 + 2𝑥5 + 𝑥6 = 18
3𝑥1 + 6𝑥2 + 2𝑥3 + 𝑥4 + 3𝑥5 = 24
𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 , 𝑥5 , 𝑥6 ≥ 0
This system is already in a standard form. And since 𝑥6 appears in only one constraint, it can
be used as a basic variable. Introduce artificial variables 𝐴1 , 𝐴3 in the first and third constraints
only. Thus, using convention (1), ives;
68 | P a g e
4. DUALITY (The Dual Problems and the Dual simplex method)
In this section we need to associate a 𝑴𝒊𝒏 lp problem with each lp problem in Max
standard form. There are some very interesting interpretations of the associated problem
that we will discuss.
Generally, a Max lp problem can be thought of as a manufacturing problem in which
scarce/limited resources are allocated in a way that maximizes profit and the associated
𝑴𝒊𝒏 lp problem seeks to minimize the costs involved.
Whenever we solve a lp problem, we implicitly have two problems at the same time;
a) the primal resource allocation problem and
b) the dual resource valuation problem.
This chapter covers the primal problem and its relationship with the dual problem.
69 | P a g e
4) The coefficients of the objective function of the primal problem, become the right hand
side of the constraints of the dual problem.
5) The solution 𝒃 to the primal problem , becomes the coefficients to the decision variables
𝒘𝒊 in the objective function of the dual problem.
NB
In order to be able to convert any primal lp problem to the dual form, it has to be written
first in either the proper general or standard form.
i) If the 𝑴𝒂𝒙 primal problem contains a constraint with ≥, correct the constraint
to ≤ before writing the dual.
ii) If the primal is a 𝑴𝒊𝒏 problem, you may wish to convert it to the
𝑀𝑎𝑥 𝑝𝑟𝑖𝑚𝑎𝑙 problem first then write the Dual problem.
iii) And if the primal has a = constraint, don’t bother to convert it to an inequality
constraint to suit the min or max proper general form, but instead the
corresponding dual variable will not conditioned.
Example 3
If the Primal problem is The Dual problem is ;
𝑀𝑎𝑥 𝑧 = 3𝑥1 + 2𝑥2 + 𝑥3 𝑀𝑖𝑛 𝑧 ′ = 4𝑤1 + 8𝑤2 + 6𝑤3
s.t 𝑥1 + 2𝑥2 − 𝑥3 ≤ 4 => s.t 𝑤1 + 2𝑤2 + 𝑤3 ≥ 3
2𝑥1 − 𝑥2 + 𝑥3 = 8 2𝑤1 − 𝑤2 − 𝑤3 ≥ 2
𝑥1 − 𝑥2 + 0𝑥2 ≤ 6 −𝑤1 + 𝑤2 + 0𝑤2 ≥ 1
𝑥1 , 𝑥2 , 𝑥3 ≥ 0 𝑤1 , 𝑤3 ≥ 0
We don’t restrict 𝑤2 since the second primal constraint contained " = "
--------------------------------------------------------------------------------------------------------------
Summary of the relationship between Primal and Dual problems
Primal problem Dual problem
1 Is 𝑝𝑟𝑜𝑝𝑒𝑟 𝑔𝑒𝑛𝑒𝑟𝑎𝑙 𝑴𝒂𝒙 problem 1 𝐼𝑠 𝑝𝑟𝑜𝑝𝑒𝑟 𝑔𝑒𝑛𝑒𝑟𝑎𝑙 𝑴𝒊𝒏 problem
𝑡ℎ
2 𝑖 constraint has symbol ≤ while 4 Constraints contain symbol ≥
3 Objective function has coefficients 𝑐𝑖 𝑇 2 Objective function has coefficients 𝑏 𝑇 the
RHS of the primal constraint.
𝑡ℎ
4 Coefficients in 𝑖 constraint become 3 Coefficients of variable 𝑤𝑖
5 Coefficients of 𝑥𝑖 become 3 Coefficients 𝑖 𝑡ℎ constraint
6 Number of constraints equals to 6 Number of variables 𝑤𝑖
7 If the 𝑖 𝑡ℎ constraint has symbol = 5 The 𝑖 𝑡ℎ dual variable 𝑤𝑖 is not restricted
8 Number of variables 𝑥𝑖 equals 7 Number of dual constraints
Example 2
Primal problem Dual problem;
𝑴𝒂𝒙 𝑧 = 2000𝑥1 + 1700𝑥2 + +1200𝑥3 𝑴𝒊𝒏 𝑤 = 120𝑢1 + 280𝑢1
s.t 𝑥1 + 𝑥2 + 𝑥3 ≤ 120 s.t 𝑢1 + 25𝑢2 ≥ 2000
25𝑥1 + 20𝑥2 + 19𝑥3 ≤ 280 => 𝑢1 + 20𝑢2 ≥ 1700
𝑥1 , 𝑥2 , 𝑥3 ≥ 0 𝑢1 + 19𝑢2 ≥ 1200
𝑢1 , 𝑢2 ≥ 0
70 | P a g e
Example 3
If the Primal problem is;
𝑀𝑖𝑛 𝑧 = 2𝑥1 − 3𝑥2 + 𝑥3
s.t 𝑥1 + 2𝑥2 + 𝑥3 ≤ 7
𝑥1 + 4𝑥2 − 𝑥4 = 5
𝑥2 + 𝑥3 + 5𝑥4 ≥ 3
𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 ≥ 0
Note that the primal problem is not a proper standard 𝑴𝒊𝒏 lp problem.
So we must correct the first constraint with ≤ to ≥ before writing the dual.
Primal problem is ;
𝑀𝑖𝑛 𝑧 = 2𝑥1 − 3𝑥2 + 𝑥3
s.t −𝑥1 − 2𝑥2 − 𝑥3 ≥ −7
𝑥1 + 4𝑥2 − 𝑥3 = 5 =>
𝑥1 + 𝑥2 + 5𝑥3 ≥ 3
𝑥1 , 𝑥2 , 𝑥3 ≥ 0
71 | P a g e
NB.
If 𝒙 and 𝒘 exist, they are the primal and dual solutions to the dual lp problems respectively.
4.1 Theorem
Given a primal problem, the dual of its dual problem is again the original primal
problem. Or the dual to the dual problem is the primal problem.
Proof
Given a Primal problem
𝑀𝑎𝑥 𝑧 = 𝑐 𝑇 𝑥
s.t 𝐴𝑥 ≤ 𝑏
𝑥≥0
its the dual problem be given by
𝑀𝑖𝑛 𝑧 ′ = 𝑏 𝑇 𝑤
s.t 𝐴𝑇 𝑤 ≥ 𝑐 ……..(1)
𝑤≥0
72 | P a g e
3.3 The fundamental theorem of Duality
Lemma 1
If 𝒙 and 𝒘 are the corresponding solutions to a pair of primal and dual problems
respectively, the value of the objective function of the primal problem is always equal
or less than the value of the objective function of the dual problem,
i.e 𝑴𝒂𝒙 𝒛 ≤ 𝑴𝒊𝒏 𝒛′ => 𝒄𝑻 𝒙 ≤ 𝒃𝑻 𝒘
Proof
Primal problem Dual problem
𝑇
𝑀𝑎𝑥 𝑧 = 𝑐 𝑥 𝑀𝑖𝑛 𝑧 = 𝑏 𝑇 𝑤
′
2.6.3 Theorem
̅ and 𝒘
If 𝒙 ̅=𝒘
̅ are the primal and dual feasible solutions respectively satisfying 𝒄𝒙 ̅ 𝒃,
then 𝒙̅ and 𝒘
̅ are optimal solutions.
2.6.4 Theorem
If the solution to Primal is not bounded (no unique feasible solution), then Dual Problem
has no feasible solution and also if the solution to the dual problem is unbounded, then the
P has no feasible solution.
73 | P a g e
Therefore, (𝑐 − ∑ 𝑤𝑖 𝑎𝑖 ) ≠ 0 => 𝑥 ∗ = 0 and (∑ 𝑎𝑖𝑗 𝑥𝑖 − 𝑏𝑖 ) ≠ 0 => 𝑤 ∗ = 0
When one of the constraints holds with a strict regularity, it means the corresponding
variable in the dual problem is zero. And if the slack (surplus) variable introduced into
problem is not zero (𝑠𝑖 > 0) in the final tableau then the corresponding dual variable 𝑤𝑖 =
0, => 𝑤𝑖 is a non basic variable. Then obtain the other variables 𝑤𝑖 that are not zero, equate
them to the –ve values of the coefficients of the slack variables. If the coefficients are already
+𝑣𝑒, don’t multiply by −1.
2.7 Theorem
1) The optimal value to the dual problem is given by 𝒘 ̅ = 𝒛𝒊 − 𝒄𝒊 ∀𝑗 in the optimal tableau
of the primal problem. The solution 𝒘
̅ is itself optimal, meaning that the primal simplex
method solves both the primal and dual problems.
2) When solving the primal problem, one simultaneously solves the dual problem, and vice
versa.
Example.
Consider the lp problem below;
𝑀𝑎𝑥 𝑧 = 2𝑥1 − 𝑥2
s.t 𝑥1 + 𝑥2 ≤ 2
−𝑥1 + 𝑥2 ≤ 1 ……….(i)
3𝑥1 − 2𝑥2 ≤ 5
𝑥1 , 𝑥2 ≥ 0
So using the simplex method to solve the Primal problem (i) would give the following
last tableau
𝐶𝑗 2 −1 0 0 0
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙 𝟐 𝒙𝟑 𝒙𝟒 𝒙𝟓 𝑥̅
3 1 1
−1 𝒙𝟐 0 1 0 −5
5 5
1 2 13
0 𝒙𝟒 0 0 −5 1 −5 5
2 1 19
2 𝒙𝟏 1 0 0
5 5 5
1 3
𝑧𝑗 − 𝑐𝑗 0 0 0 𝑧 = 17/5
5 5
𝟏𝟗 𝟏 𝟏𝟕
The optimal solution for the primal is 𝒙𝟏 = , 𝒙𝟐 = 𝟓, with optimal value z= .
𝟓 𝟓
1 3 17
The optimal solution for the dual is 𝑢1 = 5 , 𝑢2 = 0, 𝑢3 = 5 and dual optimal value is 5
Note that the optimal values are the same.
74 | P a g e
2.8 Steps to follow in the Dual Simplex method
1) Ensure that the lp problem is proper general first , even if some 𝑏𝑖 < 0 occur.
2) If the primal problem is Min, convert it 𝑴𝒂𝒙 problem (proper general) in order to use dual-
simplex method.
3) Then transform the Max to standard form by introducing slacks and surplus variables only.
No artificial variables.
4) Start with a tableau in which 𝑧𝑗 − 𝑐𝑗 ≥ 0, And also if all 𝑥̅𝑖 ≥ 0, then the problem is solved.
Stop.
5) If there are some 𝑥̅𝑖 < 0 , then choose the 𝑥̅𝑘 value such that the 𝑥̅ 𝑘 selected is the minimum
(most negative) 𝑖. 𝑒 𝑥̅𝑘 = min(𝑥̅𝑘 ) and the variable 𝑥𝑘 labeling the row becomes non-basic
(the departing variable) and the row is the pivotal row. If 𝑥̅𝑖 < 0 are equal, use the
uppermost to determine the pivot row (departing variable).
𝑧𝑗 −𝑐𝑗
6) In this pivotal row, for every 𝑦𝑖𝑘 < 0, compute | |.
𝑦𝑖𝑘
𝑧𝑗 −𝑐𝑗
For min | |, the column containing 𝑦𝑖𝑘 is the pivotal column and the variable leading
𝑦𝑖𝑘 <0 𝑦𝑖𝑘
the pivotal column is the entering variable. The entry 𝑦𝑖𝑘 becomes the pivot element (circle
the pivot 𝑦𝑖𝑘 )
7) Divide each element in the pivot row by the pivot 𝑦𝑖𝑘 and change all the other pivot column
elements to zero by the Gauss-Jordan technique (reduce to row echelon), except 𝑦𝑖𝑘 which
becomes +1, then return to 4.
8) The target is to obtain all 𝑧𝑗 − 𝑐𝑗 ≥ 0 and 𝑥̅𝐵 ≥ 0 to stop.
9) If all 𝑥̅𝑖 ≥ 0 then the problem is solved. Stop
………………………………………………………………..
Example.
Use the dual –simplex method to solve the lp problem
𝑀𝑖𝑛 𝑧 = 𝑥1 + 𝑥2
s.t 3𝑥1 + 𝑥2 ≥ 12
−3𝑥1 + 5𝑥2 ≥ 12
𝑥1 , 𝑥2 ≥ 0
Solution
Convert the lp problem to a 𝑀𝑎𝑥 problem in order to use dual-simplex method;
𝑀𝑎𝑥 − 𝑧 = −𝑥1 − 𝑥2
s.t −3𝑥1 − 𝑥2 ≤ −12
3𝑥1 − 5𝑥2 ≤ −12
𝑥1 , 𝑥2 ≥ 0
Either regard this to be the primal problem, then form standard and run a tableau, or obtain its
dual problem then form standard form and run a tableau.
So using the primal problem
𝑀𝑎𝑥 − 𝑧 = −𝑥1 − 𝑥2
s.t −3𝑥1 − 𝑥2 ≤ −12
3𝑥1 − 5𝑥2 ≤ −12
𝑥1 , 𝑥2 ≥ 0
75 | P a g e
Introduce the slack variables
𝑀𝑎𝑥 − 𝑧 = −𝑥1 − 𝑥2 + 0𝑠1 + 0𝑠2
s.t −3𝑥1 − 𝑥2 + 𝑠1 = −12
3𝑥1 − 5𝑥2 + 𝑠2 = −12
𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 ≥ 0
𝐶𝑗 −1 −1 0 0
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒔𝟐 𝑥̅𝐵
0 𝒔𝟏 −3 −1 1 0 −12
0 𝒔𝟐 3 −5 0 1 −12
𝑧𝑗 − 𝑐𝑗 1 1 0 0 𝑧=0
|(𝑧𝑗 − 𝑐𝑗 )/𝑦𝑖𝑘 | 1
3
1
𝐶𝑗 −1 −1 0 0
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒔𝟐 𝑥̅𝐵
1 −1
−1 𝒙𝟏 1 0 4
3 3
0 𝒔𝟐 0 −6 1 1 −24
𝑧𝑗 − 𝑐𝑗 1 1 0 0 𝑧 = −4
|(𝑧𝑗 − 𝑐𝑗 )/𝑦𝑖𝑘 | 1
6
𝐶𝑗 −1 −1 0 0
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒔𝟐 𝑥̅𝐵
−5 1 8
−1 𝒙𝟏 1 0 18 18 3
1 1
−1 𝒙𝟐 0 1 −6 −6 4
4 1 −20
𝑧𝑗 − 𝑐𝑗 0 0 𝑧=
9 9 3
Since both 𝑧𝑗 − 𝑐𝑗 ≥ 0, 𝑎𝑛𝑑 𝑥̅ 𝐵 > 0 stop the iteration. And the optimal solution to
8
the original problem (Primal) would be 𝑥1 = 3 , 𝑥2 = 4 with optimal value 𝑧 = 20/3.
1
The dual problem optimal solution is: 𝑤1 = 4/9, 𝑤2 = and with optimal value
9
−20 20
𝑀𝑎𝑥 − 𝑧 = − ( )=
3 3
76 | P a g e
Example 2
Using the dual-Simplex Method, find the solutions to the following lp problem
𝑀𝑎𝑥 𝑧 = −2𝑥1 − 3𝑥2 − 5𝑥3 − 6𝑥4
S.t 𝑥1 + 2𝑥2 + 3𝑥3 + 𝑥4 ≥ 2
−𝑥1 + 𝑥2 − 𝑥3 +3𝑥4 ≤ −3
𝑥1 , 𝑥2 , 𝑥3 ,𝑥4 ≥ 0
Standardize lp problem
𝑀𝑎𝑥 𝑧 = −2𝑥1 − 3𝑥2 − 5𝑥3 − 6𝑥4
S.t −𝑥1 − 2𝑥2 − 3𝑥3 − 𝑥4 ≤ −2 ……(1)
−𝑥1 + 𝑥2 − 𝑥3 +3𝑥4 ≤ −3
𝑥1 , 𝑥2 , 𝑥3 ,𝑥4 ≥ 0
Either regard this to be the primal problem, introduce slacks then run the simplex
algorithm, or obtain its dual problem → introduce slacks → run the simplex algorithm.
𝐶𝑗 −2 −3 −5 −6 0 0
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒 𝒙𝟓 𝒙𝟔 𝑥̅𝐵
0 𝒙𝟓 0 −3 −2 −4 1 −1 1
−2 𝒙𝟏 1 −1 1 −3 0 −1 3
𝑧𝑗 − 𝑐𝑗 0 5 3 12 0 2 𝑧 = −6
Since all 𝑥̅𝐵 > 0, 𝑎𝑛𝑑 𝑧𝑗 − 𝑐𝑗 ≥ 0, then the optimal solution is reached, Hence, the
solution to the primal problem is 𝑥1 = 3, 𝑥2 = 0 , 𝑥3 = 0, 𝑥4 = 0 and 𝑀𝑎𝑥 𝑧 = −6
The dual problem solution would be 𝑤1 = 0, 𝑤2 = 2 and 𝑀𝑖𝑛 𝑧 ′ = 6
77 | P a g e
EXC/ Example 3
a) State the dual of the following lp problem.
b) Use the dual-Primal Simplex method to determine the optimal solutions for
both the primal and the dual problems.
Solution
a) Given the primal problem
𝑀𝑖𝑛 𝑧 = 𝑥1 + 2𝑥2
s.t 3𝑥1 + 2𝑥2 ≥ 6
𝑥1 + 6𝑥2 ≥ 3
𝑥1 , 𝑥2 ≥ 0
its dual problem is
𝑀𝑎𝑥 𝑧 ′ = 𝑤 = 6𝑢1 + 3𝑢2
s.t 3𝑢1 + 1𝑢2 ≤ 1
2𝑢1 + 6𝑢2 ≤ 2
𝑢1 , 𝑢2 ≥ 0
78 | P a g e
b) Using the dual Simplex method
Given 𝑀𝑖𝑛 𝑧 = 𝑥1 + 2𝑥2
s.t 3𝑥1 + 2𝑥2 ≥ 6
𝑥1 + 6𝑥2 ≥ 3
𝑥1 , 𝑥2 ≥ 0
Convert to 𝑀𝑎𝑥 lp problem
𝑀𝑎𝑥 − 𝑧 = −𝑥1 − 2𝑥2
s.t −3𝑥1 − 2𝑥2 ≤ −6
−𝑥1 − 6𝑥2 ≤ −3
𝑥1 , 𝑥2 ≥ 0
𝐶𝑗 −1 −2 0 0
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒 𝑥̅𝐵
2 1
−1 𝒙𝟏 1 −3 0 2
3
0 𝒙𝟒 16 1 −1
0 − −3 1
3
𝑧𝑗 − 𝑐𝑗 4 1
0 0 𝑧 = −2
3 3
|(𝑧𝑗 − 𝑐𝑗 )/𝑦𝑖𝑘 | 1
4
1
𝐶𝑗 −1 −2 0 0
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒 𝑥̅𝐵
3 1 15
−1 𝒙𝟏 1 0 −8 8 8
1 3 3
−2 𝒙𝟐 0 1 − 16
16 16
1 1 −9
𝑧𝑗 − 𝑐𝑗 0 0 𝑧=
4 4 4
15 3 9
The solution to the primal problem is 𝑥1 = 8
, 𝑥2 = 16 𝑎𝑛𝑑 𝑀𝑖𝑛 𝑧 = 4
1 1 9
The solution to the dual problem is 𝑢1 = 4 , 𝑢2 = 4 𝑎𝑛𝑑 𝑀𝑎𝑥 𝑧 = 4
79 | P a g e
Question/Test 1. (20 marks)
A nutritionist is planning a menu consisting of two main foods A and B. Each kg of A contains
2 units of fat, I unit of carbohydrates and 4 units of proteins. Each kg of B contains 3 units of
fats, 3 units of carbohydrates and 3 units of proteins. The nutritionist wants the meal to provide
at least 18 units of fat, at least 12 units of carbohydrates and at least 24 units of proteins. If a
kg of A costs Shs.20 and B costs Shs.25.
a) Use the Big-M method to find the amount of each food that should be served to
minimize the cost of the meal yet satisfy the nutritionist’s requirements
b) Determine the dual solution if it exists
Solution
a) The Mathematical model is:
Find the values of 𝑥 and 𝑦 that will
Minimize 𝑧 = 20𝑥 + 25𝑦
Subject to 2𝑥 + 3𝑦 ≥ 18
2
𝑥 + 3𝑦 ≥ 12
marks
4𝑥 + 3𝑦 ≥ 24
𝑥, 𝑦 ≥ 0
Introducing negative slacks and artificial variables, we have
𝑀𝑖𝑛 𝑧 = 20𝑥 + 25𝑦+0𝑠1 + 0𝑠2 + 0𝑠3 +M𝐴1 + 𝑀𝐴2 + 𝑀𝐴3
s.t 2𝑥 + 3𝑦 − 𝑠1 + 𝐴1 = 18
𝑥 + 3𝑦 − 𝑠2 + 𝐴2 = 12 1
4𝑥 + 3𝑦 − 𝑠3 + 𝐴3 = 24 marks
𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 , 𝑠3 , 𝐴1 , 𝐴2 , 𝐴3 ≥ 0
In the tableau, we have
𝐶𝑗 20 25 0 0 0 M M M
𝐶𝐵 𝑋𝐵 𝑥 𝑦 𝑠1 𝑠2 𝑠3 𝐴1 𝐴2 ̅
𝐴1 𝒙 𝜃 2 marks
M 𝐴1 2 3 -1 0 0 1 0 0 18 6
M 𝐴2 1 3 0 -1 0 0 1 0 12 4
M 𝐴3 4 3 0 0 0 0 0 0 24 8
𝑧𝑗 − 𝑐𝑗 7𝑀 − 20 9𝑀 − 25 −𝑀 −𝑀 −𝑀 0 0 0 𝑍 = 54𝑀
𝐶𝐵 𝑋𝐵 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 𝐴1 𝐴2 𝐴1 ̅
𝒙 𝜃
M 𝐴1 2 3 -1 0 0 1 0 0 18 6
2 mark
25 𝑦 1/3 1 0 -1/3 0 0 1/3 0 4 12
M 𝐴3 3 0 0 1 -1 0 -1 1 12 4
35 25 25
𝑧𝑗 − 𝑐𝑗 4𝑀 − 0 -𝑀 2𝑀 − −𝑀 0 −3𝑀 + 0 𝑍 = 18𝑀 + 100
3 3 3
𝐶𝐵 𝑋𝐵 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 𝐴1 𝐴2 𝐴1 ̅
𝒙 𝜃
M 𝐴1 0 0 -1 2/3 1/3 1 -2/3 -1/3 2 2
25 𝑦 0 1 0 -2/3 1/3 0 2/3 -1/3 0 marks
20 𝑥 1 0 0 1/3 -1/3 0 -1/3 1/3 4
2𝑀 𝑀 5 −2𝑀 −𝑀 5
𝑧𝑗 − 𝑐𝑗 0 0 −𝑀 − 10 + 0 + 10 − 𝑍 = 2𝑀 + 80
3 3 3 3 3 3
1 marks
80 | P a g e
Note that all entries in the pivot column are not positive. So, we stop the iterations and
conclude that there is no feasible solution to the lpp.
---------------------------------------------
Alternatively, if you consider the convention;
𝑀𝑎𝑥 𝑧 = 𝑐 𝑇 𝑥 𝑀𝑎𝑥 𝑧 = 𝑐 𝑇 𝑥 + ∑𝑚𝑖=1 0𝑠𝑖 + ∑𝑚𝑖=1 𝑀𝐴𝑖
s.t 𝐴𝑥 ≥ 𝑏 , 𝑏 ≥ 0 => s.t ∑𝑛𝑗=1 𝑎𝑖𝑗 𝑥𝑗 − 𝑠𝑖 + 𝐴𝑖 = 𝑏𝑖 , 𝑏 ≥ 0
𝑥≥0 𝑥≥0
and
𝑀𝑖𝑛 𝑧 = 𝑐 𝑇 𝑥 𝑀𝑖𝑛 𝑧 = 𝑐 𝑇 𝑥 + ∑𝑚𝑖=1 0𝑠𝑖 − ∑𝑚𝑖=1 𝑀𝐴𝑖
s.t 𝐴𝑥 ≥ 𝑏 , 𝑏 ≥ 0 => s.t ∑𝑛𝑗=1 𝑎𝑖𝑗 𝑥𝑗 − 𝑠𝑖 + 𝐴𝑖 = 𝑏𝑖 , 𝑏 ≥ 0
𝑥≥0 𝑥≥0
𝐶𝐵 𝑋𝐵 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 𝐴1 𝐴2 𝐴1 ̅
𝒙 𝜃
-M 𝐴1 2 3 -1 0 0 1 0 0 18 6
2 marks
25 𝑦 1/3 1 0 -1/3 0 0 1/3 0 4 12
-M 𝐴3 3 0 0 1 -1 0 -1 1 12 4
35 25 25
𝑧𝑗 − 𝑐𝑗 −4𝑀 − 0 𝑀 -2𝑀 − 𝑀 0 3𝑀 + 0 𝑍 = −18𝑀 + 100
3 3 3
𝐶𝐵 𝑋𝐵 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 𝐴1 𝐴2 𝐴1 ̅
𝒙 𝜃
-M 𝐴1 0 0 -1 2/3 1/3 1 -2/3 -1/3 2
25 𝑦 0 1 0 -2/3 1/3 0 2/3 -1/3 0 2 marks
20 𝑥 1 0 0 1/3 -1/3 0 -1/3 1/3 4
−2𝑀 −𝑀 5 2𝑀 𝑀 5
𝑧𝑗 − 𝑐𝑗 0 0 𝑀 − 10 + 0 + 10 − 𝑍 = −2𝑀 + 80
3 3 3 3 3 3
Note:
1) That all entries in the pivot column are not positive. So, we stop the iterations and conclude
1 marks
that there is no feasible solution to the lpp. And whenever an artificial variable remains in
the final tableau, no feasible solution exists.
81 | P a g e
2) Using the conventions that;
𝑀𝑎𝑥 𝑧 = 𝑐 𝑇 𝑥 𝑀𝑎𝑥 𝑧 = 𝑐 𝑇 𝑥 + ∑𝑚 𝑚
𝑖=1 0𝑠𝑖 + ∑𝑖=1 𝑀𝐴𝑖
s.t 𝐴𝑥 ≥ 𝑏 , 𝑏 ≥ 0 => s.t ∑𝑛𝑗=1 𝑎𝑖𝑗 𝑥𝑗 − 𝑠𝑖 + 𝐴𝑖 = 𝑏𝑖 , 𝑏 ≥ 0
𝑥≥0 𝑥≥0
and
𝑀𝑖𝑛 𝑧 = 𝑐 𝑇 𝑥 𝑀𝑖𝑛 𝑧 = 𝑐 𝑇 𝑥 + ∑𝑚 𝑚
𝑖=1 0𝑠𝑖 − ∑𝑖=1 𝑀𝐴𝑖
s.t 𝐴𝑥 ≥ 𝑏 , 𝑏 ≥ 0 => s.t ∑𝑛𝑗=1 𝑎𝑖𝑗 𝑥𝑗 − 𝑠𝑖 + 𝐴𝑖 = 𝑏𝑖 , 𝑏 ≥ 0
𝑥≥0 𝑥≥0
𝑚𝑖𝑛{𝑧𝑗 − 𝑐𝑗 } or 𝑚𝑎𝑥|𝑧𝑗 − 𝑐𝑗 | in order to determine the
makes it easy to use of the criterions
pivot column but may not affect the outcomes
b) Dual solution.
Primal lpp Primal lpp
Min 𝑧 = 20𝑥 + 25𝑦 Max −𝑧 = −20𝑥 − 25𝑦
S.t 2𝑥 + 3𝑦 ≥ 18 S.t −2𝑥 − 3𝑦 ≤ −18
𝑥 + 3𝑦 ≥ 12 => −𝑥 − 3𝑦 ≤ −12 ………(1)
4𝑥 + 3𝑦 ≥ 24 −4𝑥 − 3𝑦 ≤ −24
𝑥, 𝑦 ≥ 0 𝑥, 𝑦 ≥ 0
Introduce slacks;
𝑀𝑎𝑥 𝑤 = 18𝑢1 + 12𝑢2 + 24𝑢3 + 0𝑠1 + 0𝑠2
s.t 2𝑢1 + 𝑢2 + 4𝑢3 + 𝑠1 = 20
1 marks
3𝑢1 + 3𝑢2 + 3𝑢3 + 𝑠2 = 25
𝑢1 , 𝑢2 , 𝑢3 , 𝑠1 , 𝑠2 ≥ 0
In the tableau
82 | P a g e
𝐶𝑗 18 12 24 0 0
𝑿𝑩 𝒖𝟏 𝒖𝟐 𝒖𝟑 𝒔𝟏 𝒔𝟐 𝑥̅𝐵 𝜃
0 𝒔𝟏 2 1 4 1 0 20 5
0 𝒔𝟐 3 3 3 0 1 25 8.33 2 marks
𝑧𝑗 − 𝑐𝑗 −18 − 12 − 24 0 0 𝑧=0
𝑿𝑩 𝒖𝟏 𝒖𝟐 𝒖𝟑 𝒔𝟏 𝒔𝟐 𝑥̅𝐵 𝜃
24 𝒖𝟑 1/2 1/4 1 1/4 0 5 10 2 marks
0 𝒔𝟐 3/2 9/4 0 − 3/4 1 10 20/3
𝑧𝑗 − 𝑐𝑗 −6 −6 0 6 0 𝑧 = 100
𝑿𝑩 𝒖𝟏 𝒖𝟐 𝒖𝟑 𝒔𝟏 𝒔𝟐 𝑥̅𝐵 𝜃
24 𝒖𝟑 1/2 − 1/2 1 1/2 − 1/3 5/3
1 3/2 0 − 1/2 2/3 2 marks
18 𝒖𝟏 20/3
𝑧𝑗 − 𝑐𝑗 12 15 0 3 4 𝑧 = 160
83 | P a g e
ii) Or Use the dual-simplex to solve (1);
Max −𝑧 = −20𝑥 − 25𝑦
S.t −2𝑥 − 3𝑦 ≤ −18
−𝑥 − 3𝑦 ≤ −12 ………(1) 2 marks
−4𝑥 − 3𝑦 ≤ −24
𝑥, 𝑦 ≥
0
Introducing slacks 𝑠1 , 𝑠2 , 𝑠3
Max −𝑧 = −20𝑥 − 25𝑦 + 0𝑠1 + 0𝑠2 + 0𝑠3
S.t −2𝑥 − 3𝑦 + 𝑠1 = −18
−𝑥 − 3𝑦 + 𝑠2 = −12 1 marks
−4𝑥 − 3𝑦 + 𝑠3 = −24
𝑥, 𝑦, 𝑠1 , 𝑠2 , 𝑠3 ≥ 0
𝐶𝑗 -20 - 25 0 0 0
𝐶𝐵 𝑋𝐵 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 ̅
𝒙
0 𝑠1 -2 -3 1 0 0 -18
0 𝑠2 -1 -3 0 1 0 -12
0 𝑠3 -4 -3 0 0 1 -24
20 25 𝑍=0 2 marks
𝑧𝑗 − 𝑐𝑗 0 0 0
𝐶𝐵 𝑋𝐵 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 ̅
𝒙
0 𝑠1 0 -3/2 1 0 -1/2 -6
0 𝑠2 0 -9/4 0 1 -1/4 -6
2 marks
-20 𝑥1 1 3/4 0 0 -1/4 6
𝑧𝑗 − 𝑐𝑗 0 10 0 0 5 𝑍 = −120
𝐶𝐵 𝑋𝐵 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 ̅
𝒙
-25 𝑥2 0 1 -2/3 0 1/3 4 2 marks
0 𝑠2 0 0 -3/2 1 1/2 3
-20 𝑥1 1 0 1/2 0 -1/2 3
𝑧𝑗 − 𝑐𝑗 0 0 20/3 0 5/3 𝑍 = −160
84 | P a g e
4 The properties of duality
The mutual dual - dual simplex algorithm (DSA)
Post optimality analysis
85 | P a g e