Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
7 views

MTH 3202 Linear Programming Notes-summary-2024

The document provides an overview of linear programming as an optimization technique within Operations Research (OR), detailing its historical context, methodology, and applications. It outlines the steps involved in OR, including problem identification, mathematical modeling, solution testing, and implementation, while emphasizing the importance of optimization algorithms and simulation. Additionally, it highlights various use cases for OR, such as scheduling, resource management, and risk assessment, and discusses related disciplines that contribute to solving complex problems.

Uploaded by

anywar jimmy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

MTH 3202 Linear Programming Notes-summary-2024

The document provides an overview of linear programming as an optimization technique within Operations Research (OR), detailing its historical context, methodology, and applications. It outlines the steps involved in OR, including problem identification, mathematical modeling, solution testing, and implementation, while emphasizing the importance of optimization algorithms and simulation. Additionally, it highlights various use cases for OR, such as scheduling, resource management, and risk assessment, and discusses related disciplines that contribute to solving complex problems.

Uploaded by

anywar jimmy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 85

MTH 3202: LINEAR PROGRAMMING

Chapter 1: The General Linear Programming Problem


1.0 Introduction
 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)

Operations Research (OR)


 Operations research (OR) is an analytical method of problem-solving and decision-
making that is useful in the management of organizations.
 In OR, problems are broken down into basic components and then solved in defined
steps by mathematical analysis.

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;

 Modifying and verifying the model using different suitable experimentations.


 Establish controls over the situation. In obtaining the solution to the model, some
conditions are constantly changing in the real world. So changes might occur that
would indeed invalid this model and hence the solution obtained sometime back has
to be controlled. For instance by changing the values of the parameters representing
the conditions.
5. Implementations. This involves putting the solution to work.

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.

The three key items of any Operations Research topic:


1. Optimization Algorithms and Statistics
Operations Research relies heavily on algorithms, mathematics and statistics. A very important
family of algorithms in Operations Research are Optimization Algorithms: algorithms that try
to find a maximum or a minimum, given a certain set of possibilities.

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.

 So in short, Operations Research is applying mathematics to business questions with a goal


of optimization and/or simulation.
 I hope this article has clarified things for you. Thanks for reading and don’t hesitate to stay
tuned for more!

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

Importance/Use of Operations Research


 The field of operations research provides a more powerful approach to decision making
than ordinary software and data analytics tools. Employing operations research
professionals can help companies;

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.

 Operations research can be applied to a variety of use cases, including:


 Scheduling and time management.
 Urban and agricultural planning.
 Enterprise resource planning (ERP) and supply chain management (SCM).
 Inventory management.
 Network optimization and engineering.
 Packet routing optimization.
 Risk management.

 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.

1.1 Examples of Mathematical models of real problems


1) The transportation problem.
A manufacturer of Goodwill floor tiles has two plants, one located at Kapeeka and the other
at Zirobwe. There are three distributing warehouses; one in Mbarara, and another in Lira,
and the third is in Gulu. The Kapeeka plant can supply 120 tons of the product per week
whereas the Zirobwe plant can supply 140 tons per week. The Mbarara warehouse needs
100 tons weekly to meet its demand, the Lira warehouse needs 60 tons weekly and the
Gulu warehouse needs 80 tons weekly. The following table gives the road transport cost (in
dollars) per tone of the tiles.
From To
Mbarara Lira Gulu
Kapeeka 5 7 9
Zirobwe 6 7 10
How many tons of tiles should be transported from each plant to every warehouse to
minimize the total transportation cost while meeting the demand?
Solution Mbarara

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.

Tons of tiles sent from plants to ware houses;


The total amount of tile tons sent from 𝑷𝟏 is: 𝒙𝟏𝟏 + 𝒙𝟏𝟐 + 𝒙𝟏𝟑 .
Since 𝑃1 can supply only 120 tons, we must have

4|Page
𝑥11 + 𝑥12 + 𝑥13 ≤ 120 … … … (𝑖)
Similarly, since 𝑷𝟐 can supply only 140 tons, we must have
𝑥21 + 𝑥22 + 𝑥23 ≤ 140 … … … (𝑖𝑖)

Tons of tiles received at ware houses;


The total amount of tiles received at 𝑤1 is: 𝒙𝟏𝟏 + 𝒙𝟐𝟏 .
Since the demand at 𝑤1 is 100 tons, we would like to have
𝑥11 + 𝑥21 ≥ 100 … … … … … . (𝑖𝑖𝑖)

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 … … . … (𝑣)

Of course we must have 𝑥𝑖𝑗 ≥ 0 … … (𝑣𝑖 ) 𝑓𝑜𝑟 𝑖 = 1,2 𝑎𝑛𝑑 𝑗 = 1,2,3

Transport costs to ware houses


The total cost which we want to minimize is
𝒛 = (𝑐11 𝑥11 + 𝑐12 𝑥12 + 𝑐13 𝑥13 ) + (𝑐21 𝑥21 + 𝑐22 𝑥22 + 𝑐23 𝑥23 )
3
= ∑2𝑖=1 ∑3𝑗=1 𝑐𝑖𝑗 𝑥𝑖𝑗 = ∑2𝑖=1 𝑐𝑖𝑗 𝑥𝑖𝑗
𝑗=1

Thus our mathematical model is;


Find the values of 𝑥11 , 𝑥12 , 𝑥13 , 𝑥21 , 𝑥22 , 𝑥23 that will minimize the total cost
3
𝑧 = ∑2𝑖=1 ∑3𝑗=1 𝑐𝑖𝑗 𝑥𝑖𝑗 = ∑2𝑖=1 𝑐𝑖𝑗 𝑥𝑖𝑗
𝑗=1
Subject to the constraints
∑2𝑖=1 𝑥𝑖𝑗 ≤ 𝑆𝑖 , 𝑖 = 1,2; 𝑗 = 1,2,3
∑3𝑗=1 𝑥𝑖𝑗 ≥ 𝑑𝑗 , 𝑖 = 1,2; 𝑗 = 1,2,3
𝑥𝑖𝑗 ≥ 0
Where supplies are 𝑠1 = 120, 𝑠2 = 140 and the required demands are
𝑑1 = 100, 𝑑2 = 60, 𝑑3 = 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)

Of course, we also require that 𝑥 ≥ 0 … . (4)


𝑦 ≥ 0 … . (5)
The cost of the meal which is to be minimized is 𝑧 = 20𝑥 + 25𝑦 … . (6)

Thus, the mathematical model is:


Find the values of 𝑥 and 𝑦 that will minimize 𝑧 = 20𝑥 + 25𝑦
subject to the constraints: 2𝑥 + 3𝑦 ≥ 18
𝑥 + 3𝑦 ≥ 12
4𝑥 + 3𝑦 ≥ 24
𝑥≥0
𝑦≥0
----------------------------------------------------

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)

Thus, our mathematical model is:


Find the values of 𝑥 and 𝑦 that will maximize 𝑧 = 0.07𝑥 + 0.09𝑦
Subject to the constraints: 𝑥 + 𝑦 = 100000
𝑥 − 2𝑦 ≥ 0
𝑦 ≤ 30000
𝑥 ≥ 0, 𝑦 ≥ 0
-------------------------------------------------------

4) Activity analysis for products


A lumber mill saws both finish-grade and construction-grade boards from the logs that it
receives. Suppose that it takes 2 hours to rough-saw each 1000 board feet of the finish-grade
boards and 5 hours to plane each 1000 board feet of these boards. Suppose also that it takes 2
hours to rough-saw each 1000 board feet of the construction –grade boards, but it takes only 3
hours to plane each 1000 board feet of these boards. The saw is available 8 hours per day, and
the plane is available 15 hours per day. If the profit on each 1000 board feet of a finish-grade
board is $120 and the profit on each 1000 board feet of construction-grade boards is $100, how
many board feet of each type of lumber should be sawed to maximize the profit?

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)

Thus, our mathematical model is:


Find the values of 𝑥 and 𝑦 that will maximize 𝑧 = 120𝑥 + 100𝑦
Subject to the constraints: 2𝑥 + 2𝑦 ≤ 8
5𝑥 + 3𝑦 ≤ 15
𝑥≥0,𝑦≥0

5) The blending problem


The manufacturer of artificial sweetener blends 14kg of saccharin and 18kg of dextrose to
prepare two new products: SWEET and LO-SUGAR. Each kilogram of SWEET contains 0.4kg
of dextrose and 0.2kg of saccharin whereas each kilogram of LO-SUGAR contains 0.3kg of
dextrose and 0.4kg of saccharin. If the profit on each kilogram of SWEET is 20 cents and the
profit on each kilogram of LO-SUGAR is 30 cents, how many kilogram of each product should
be made to maximize each product?

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)

Of course, we require that 𝑥 ≥ 0 … . . (3)


𝑦 ≥ 0 … . . (4)
The total profit (in cents) which we seek to maximized is
𝑧 = 20𝑥 + 30𝑦 … … (5)

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)

The total profit (in dollars) to maximize is


𝑧 = 50𝑥 + 30𝑦 … … (3)
Of course, we require that 𝑥 ≥ 0 … . . (4)
𝑦 ≥ 0 … . . (5)

Thus, our mathematical model is:


Find the values of 𝑥 and 𝑦 that will maximize 𝑧 = 50𝑥 + 30𝑦
Subject to the constraints: 150𝑥 + 100𝑦 ≤ 10000
𝑥 + 𝑦 ≤ 100
𝑥≥0
𝑦≥0
------------------------------------------------
7) A garage owner wishes to buy a number of new cars for stock. Assume that he has two models
A and B to choose from, and model A costs $300 each and model B costs $500 each. He has a
show room for only 20 cars and he has $7000 capital to spend. If he can expect to make a profit
of $100 on model A and $40 on type B, how many of each model should he buy to make as
large a total profit as possible?
Solution
Formulation (Mathematical model)
Let 𝑥 and 𝑦 denote the number of model of cars A and B, respectively to be bought.
The total cost of cars is 300𝑥 + 500𝑦 ≤ 7000 … . (1)
The space limitation is 𝑥 + 𝑦 ≤ 20 … . . (2)
The profit (in dollars) to maximize is 𝑧 = 100𝑥 + 140𝑦 … … (3)
Of course, we require that 𝑥 ≥ 0 … . . (4)

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
---------------------------------------------------

8) A feed mixture problem


A farmer wishes to find an economical feed for his livestock. The feed has to contain four kinds
of nutrients A,B,C and D. The feed industry already produces three feeds L,M and N that
contain the four ingredients. The contents and the cost of one kilogram of each feed and the
minimum daily requirement per head for each ingredient, are given in the table below

Nutrients L M N Min requirement of the ingredients in


kg/day
A 0.05 0.15 0 0.55
B 0.1 0 0.12 0.7
C 0.17 0.11 0.2 3.5
D 0.13 0.2 0.15 2.1
Cost(shs/kg) 9 12 7
What mixture of feed L,M and N should be supplied per day per head to get the least expensive
feed blend?

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.

Thus, our mathematical model is:


Find the values of 𝑥1, 𝑥2 and 𝑥3 that will minimize the cost (in shs) 𝑧 = 9𝑥1 +
12𝑥2 + 7𝑥3
Subject to the constraints: 0.05𝑥1 + 0.15𝑥2 + 0𝑥3 ≤ 0.55
0.1𝑥1 + 0𝑥2 + 0.12𝑥3 ≤ 0.7
0.17𝑥1 + 0.11𝑥2 + 0. 2𝑥3 ≤ 3.5
0.15𝑥1 + 0.2𝑥2 + 0.15𝑥3 ≤ 2.1
𝑥1, 𝑥2 , 𝑥3 ≥ 0
------------------------------------------------

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;

Find the values of 𝑥1 , 𝑥2 , … , 𝑥𝑛 that will minimize or maximize (optimize)


𝑧 = 𝑐1 𝑥1 + 𝑐2 𝑥2 + ⋯ + 𝑐𝑛 𝑥𝑛 .........(1)

Subject to constraints / 𝑎11 𝑥1 + 𝑎12 𝑥2 + ⋯ + 𝑎1𝑛 𝑥𝑛 ≤ (≥)(=)𝑏1


Restrictions 𝑎21 𝑥1 + 𝑎22 𝑥2 + ⋯ + 𝑎2𝑛 𝑥𝑛 ≤ (≥)(=)𝑏2
.
. …(2)
.
𝑎𝑚1 𝑥1 + 𝑎𝑚2 𝑥2 + ⋯ + 𝑎𝑚𝑛 𝑥𝑛 ≤ (≥)(=)𝑏𝑚

𝑥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

Can be written in a matrix form as:


𝑥1 𝑥1
𝑥
Find a vector 𝑋 = ( 2 ) ∈ ℛ 3 , that will Min 𝑧 = (1 2 ) 𝑥
−1 ( 2 )
𝑥3 𝑥3

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.

1.3 The proper general ,standard and Canonical forms of 𝒍𝒑 problems


a) A 𝑙𝑝 problem is in a proper general form if it is in any of the following forms;
Either
Max 𝑧 = ∑𝑛𝑗=1 𝑐𝑗 𝑥𝑗
Subject to the constraints ∑𝑛𝑗=1 𝑎𝑖𝑗 𝑥𝑗 ≤ 𝑏𝑖 , i=1,2,3,…,m
𝑥𝑗 ≥ 0, j=1,2,3,…,n
OR
Min 𝑧 = ∑𝑛𝑗=1 𝑐𝑗 𝑥𝑗
Subject to the constraints ∑𝑛𝑗=1 𝑎𝑖𝑗 𝑥𝑗 ≥ 𝑏𝑖 , i=1,2,3,…,m
𝑥𝑗 ≥ 0, j=1,2,3,…,n
OR in a matrix form
Max/min 𝑧 = 𝑐 𝑇 𝑋
Subject to the constraints/restrictions
𝐴𝑋 ≤ (≥)𝑏
𝑋≥0
---------------------------------------------------------------------------------

b) The Standard form


Standard form of LPP must have following three characteristics:
1. Objective function must be of maximization type
2. All the constraints should of equality type
3. All the decision variables should be nonnegative

And we say that a 𝑙𝑝 problem is in a standard form if it is in the form;


Max 𝑧 = ∑𝑛𝑗=1 𝑐𝑗 𝑥𝑗
Subject to the constraints ∑𝑛𝑗=1 𝑎𝑖𝑗 𝑥𝑗 = 𝑏𝑖 , i=1,2,3,…,m
𝑥𝑗 ≥ 0, j=1,2,3,…,n
OR in a matrix form
Max 𝑧 = 𝑐 𝑇 𝑋
Subject to the constraints/restrictions
𝐴𝑋 = 𝑏
𝑋≥0
------------------------------------------

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.

2. Min 𝑧 = 20𝑥 + 25𝑦


Subject to the constraints: 2𝑥 + 3𝑦 ≥ 18
𝑥 + 3𝑦 ≥ 12
𝑥,𝑦 ≥ 0 In proper general form
3. Max 𝑧 = 20𝑥 + 30𝑦
Subject to the constraints: 0.4𝑥 + 0.3𝑦 = 18
0.2𝑥 + 0.4𝑦 = 14
𝑥, 𝑦 ≥ 0 In standard form.
4. Min 𝑧 = 20𝑥 + 25𝑦
Subject to the constraints: 2𝑥 + 3𝑦 ≥ 18
𝑥 + 3𝑦 ≥ 12
4𝑥 + 3𝑦 ≥ 24
𝑥,𝑦 ≥ 0
Not in proper general minimum form because 𝑚 > 𝑛.
5. Min 𝑧 = 3𝑥 + 2𝑦
Subject to the constraints: 8𝑥 + 𝑦 ≤ 4
3𝑥 − 2𝑦 ≤ 6
𝑥 ≥ 0,𝑦 ≥ 0
Not in general minimum form because of the wrong symbols in constraints. The symbols in
constraints should be ≥. Else, the objective should be converted to
Max 𝑧 = −3𝑥 − 2𝑦
s.t: 8𝑥 + 𝑦 ≤ 4
3𝑥 − 2𝑦 ≤ 6
𝑥 ≥ 0,𝑦 ≥ 0

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

8. Max 𝑧 = 0.07𝑥 + 0.09𝑦


s.t: 𝑥 + 𝑦 = 100000
𝑥 − 2𝑦 ≥ 0
𝑦 ≤ 30000
𝑥, 𝑦 ≥ 0. Not in proper general form due to symbols =, ≥ in the first and second
constraints nor standard form due to ≥, ≤ symbols in the second and third constraints

9. Max 𝑧 = 50𝑥 + 30𝑦


s.t: 150𝑥 + 100𝑦 ≤ 10000
𝑥 + 𝑦 ≤ 100
𝑥 , 𝑦 ≥ 0 In proper general form.

10. Min 𝑧 = 2𝑥1 + 3𝑥2 + 4𝑥3


S.t: 3𝑥1 + 2𝑥2 − 3𝑥3 ≤ 4
2𝑥1 + 3𝑥2 + 2 ≤ 6
3𝑥1 − 𝑥2 + 2𝑥3 ≥ −8
𝑥1, 𝑥2 , 𝑥3 ≥ 0 Not in proper general form because of the symbol ≤ in the first
and second constraints.

11. Min 𝑧 = 9𝑥1 + 12𝑥2 + 7𝑥3


Subject to the constraints: 0.05𝑥1 + 0.15𝑥2 + 0𝑥3 ≤ 0.55
0.1𝑥1 + 0𝑥2 + 0.12𝑥3 ≤ 0.7
0.17𝑥1 + 0.11𝑥2 + 0. 2𝑥3 ≤ 3.5
0.15𝑥1 + 0.2𝑥2 + 0.15𝑥3 ≤ 2.1
𝑥1, 𝑥2 , 𝑥3 ≥ 0
Not in proper general form because of the symbol ≤ in the constraints and 𝑚 > 𝑛

12. Min 𝑧 = 100𝑥 + 140𝑦


s.t: 3𝑥 + 5𝑦 ≤ 70
𝑥 + 𝑦 ≤ 20
𝑥, 𝑦 ≥ 0
Not in proper general form due to the symbol ≤ in the constraints. Either the objective
should be Max or the symbols in the constraints be changed to ≥

13. Min 𝑧 = ∑2𝑖=1 ∑3𝑗=1 𝑐𝑖𝑗 𝑥𝑖𝑗


subject to the constraints ∑2𝑖=1 𝑥𝑖𝑗 ≤ 𝑆𝑖 𝑖 = 1,2
∑3𝑗=1 𝑥𝑖𝑗 ≥ 𝑑𝑗 𝑗 = 1,2,3
Where supplies are 𝑠1 = 120, 𝑠2 = 140 and the required demands are 𝑑1 = 100, 𝑑2 =
60, 𝑑3 = 80. Not in proper general form due to symbol ≤ in the first constraint.

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 𝑧.”

1.4.1 Changing the sense of the objective function “Max/Min 𝑧 = ∑𝑛𝑗=1 𝑐𝑗 𝑥𝑗 ”


i) Given 𝑀𝑖𝑛 𝑧 = ∑𝑛𝑗=1 𝑐𝑗 𝑥𝑗 => −𝑀𝑖𝑛(∑𝑛𝑗=1 𝑐𝑗 𝑥𝑗 ) = 𝑀𝑎𝑥(− ∑𝑛𝑗=1 𝑐𝑗 𝑥𝑗 )
i.e given a minimize objective function 𝑧, then negating 𝑧 becomes a maximize objective
Example 𝑀𝑖𝑛 𝑧 = 100𝑥 + 140𝑦 => 𝑀𝑎𝑥 (– 𝑧) = −100𝑥 − 140𝑦 = 𝑀𝑎𝑥 𝑤 = −100𝑥 − 140𝑦

ii) Given 𝑀𝑎𝑥 𝑧 = ∑𝑛𝑗=1 𝑐𝑗 𝑥𝑗 => −𝑀𝑎𝑥 ∑𝑛𝑗=1 𝑐𝑗 𝑥𝑗 ) = 𝑀𝑖𝑛 − 𝑧 = − ∑𝑛𝑗=1 𝑐𝑗 𝑥𝑗 )


i.e given a maximize objective function 𝑧, then negating 𝑧 becomes a minimize
objective.

Examples 𝑀𝑎𝑥 𝑧 = 3𝑥 + 2𝑦 + 3𝑣 − 2𝑤 => 𝑀𝑖𝑛(−𝑧) = −3𝑥 − 2𝑦 − 3𝑣 + 2𝑤


-------------------------------------------------------------------------------------------------------

1.4.2 Reversing an inequality to suit the objective function


Multiplying (−1) by a given inequality ∑𝑛𝑗=1 𝑎𝑖𝑗 𝑥𝑗 ≤ 𝑏𝑖 becomes ∑𝑛𝑗=1 −𝑎𝑖𝑗 𝑥𝑗 ≥ −𝑏𝑖 .
Or
if given ∑𝑛𝑗=1 𝑎𝑖𝑗 𝑥𝑗 ≥ 𝑏𝑖 , becomes ∑𝑛𝑗=1 −𝑎𝑖𝑗 𝑥𝑗 ≤ −𝑏𝑖

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

NB. Use a weighing scale to illustrate slack and surplus variables.


--------------------------------------------------------------------------

1.4.4 Changing an equation (equality) into an inequality constraint


Observe that we can write 𝑥 = 6 as a pair of inequalities:
Either as the pair: 𝑥 ≤ 6 and 𝑥 ≥ 6,
Or as the pair: 𝑥 ≤ 6 and −𝑥 ≤ −6 (suits Max z)
Or as the pair: −𝑥 ≥ −6 and 𝑥 ≥ 6 (suits Min z)

In general, the equation ∑𝑛𝑗=1 𝑎𝑖𝑗 𝑥𝑗 = 𝑏𝑖 can be written as a pair of inequalities


∑𝑛𝑗=1 𝑎𝑖𝑗 𝑥𝑗 ≤ 𝑏𝑖 or ∑𝑛𝑗=1 𝑎𝑖𝑗 𝑥𝑗 ≥ 𝑏𝑖
∑𝑛𝑗=1 −𝑎𝑖𝑗 𝑥𝑗 ≤ −𝑏𝑖 ∑𝑛𝑗=1 −𝑎𝑖𝑗 𝑥𝑗 ≥ −𝑏𝑖

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

Hence, the 𝑙𝑝 problem then becomes

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.
--------------------------------------------------------------------------------------

1.4.5 Unconstrained variables


Some 𝑙𝑝 problems may have decision variables that are not constrained (unconstrained
decision variables) to be non-negative. Suppose that 𝑥𝑗 is not constrained to be non-
negative, we replace every 𝑥𝑗 with a linear combination of two new variables 𝑥𝑗 + ≥ 0
and 𝑥𝑗 − ≥ 0 , or 𝑥𝑗 ′ and 𝑥𝑗 ′′ , or 𝑥1 and 𝑥2 such that 𝑥𝑗 = 𝑥𝑗 + − 𝑥𝑗 − or 𝑥𝑗 = 𝑥1 −𝑥2
(because any number can be a difference of two non-negative numbers).
Note that;
 if 𝑥𝑗 + < 𝑥𝑗 − , 𝑥𝑗 = 𝑥𝑗 + − 𝑥𝑗 − will be negative
 if 𝑥𝑗 + > 𝑥𝑗 − , 𝑥𝑗 = 𝑥𝑗 + − 𝑥𝑗 − is positive and
 𝑖𝑓 𝑥𝑗 + = 𝑥𝑗 − , then 𝑥𝑗 = 𝑥𝑗 + − 𝑥𝑗 − can be 0.
So using the denotation 𝑥𝑗 = 𝑥𝑗 + − 𝑥𝑗 − or 𝑥𝑗 = 𝑥1 −𝑥2 , we introduce constraints on
unconstrained variables.

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.

1.5.1 Canonical form of a set of linear equations


Let us consider the following set of three equations with three variables for ease of discussion.
Later, the method will be generalized. Consider the set of equations below,
3𝑥 + 2𝑦 + 𝑧 = 10 …E1
𝑥 − 2𝑦 + 3𝑧 = 6 …E2
2𝑥 + 𝑦 − 𝑧 = 1 …E3
This system of equations can be transformed in such a way that a new set of three different
equations are obtained, each having only one variable with nonzero coefficient. This can be
achieved by some elementary operations.

The following operations are known as elementary operations.


1) Any equation Er can be replaced by kEr, where k is a nonzero constant.
2) Any equation Er can be replaced by Er + kEs, where Es is another equation of the
system and k is as defined above.

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

Finally, z is eliminated form E7 and E8 as follows, considering E9 as pivotal equation.


x 0 0 1 …E10
0 y 0 2 …E11
0 0 z 3 …E12
Or

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.

1.5.2 Canonical form of a set of LPP


Similar procedure can be followed in the case of a standard form of LPP. Objective function and
all constraints for such standard form of LPP constitute a linear set of equations. In general this
linear set will have m equations with n variables ( n ≥m). The set of canonical form of equations
obtained from this set of equations is known as canonical form of LPP.

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 𝐻.

Graph a closed / half space in ℝ2


We can graph a closed half space in ℝ2 by graphing the line and then using a test point to
describe which side of the line is included in the half space (wanted side).
 A simple way to graph the line is to find and plot its intercepts (𝑥 and 𝑦 intercepts).
 To describe the side of the line included in the closed half space, choose a test point.
The easiest test point to use is the origin (0, 0) and we check whether it is on the line.
If the origin is on the line, some other point must be selected as a test point. If the origin
is not on the line, we use it as a test point. If it satisfies the inequality, then the side of
the line containing the origin is the closed half space H. If it does not satisfy the
inequality, then the opposite side of the line becomes the closed half space.
Example 1
2𝑥 + 3𝑦 ≤ 6

𝑓(𝑥)

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-

3- Extreme Optimal value


𝑧 = 3𝑥 + 𝑦
point
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 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)

 The line segment joining 𝑥1 , 𝑥2 ∈ ℝ𝑛 is defined as a set of points


𝑥1
𝑥2
𝑥 = . ∈ ℝ𝑛 : 𝑥 = 𝜆𝑥1 + (1 − 𝜆)𝑥2 , 0 ≤ 𝜆 ≤ 1
.
{ (𝑥𝑛 ) }
Note that;
 when 𝜆 = 0, 𝑥 = 𝑥2 ∈ ℝ𝑛 and when 𝜆 = 1, 𝑥 = 𝑥1 ∈ ℝ𝑛 , yet 𝑥1 and 𝑥2 are end
points/extreme points of the line segment.
 The other points on the line segment at which 0 < 𝜆 < 1 are interior points on the
line segment.

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

1.6.3 Definition ( A convex set )


 A feasible region S of ℝ𝑛 is said to be convex if for any two points 𝑥1 and 𝑥2 in S,
the line segment joining them also lies in S.
 Thus, S is convex if whenever 𝑥1 , 𝑥2 ∈ 𝑆 , so does 𝜆𝑥1 + (1 − 𝜆)𝑥2 , 0 ≤ 𝜆 ≤ 1.
 Then a Convex set is a feasible region.
 Convex sets are of two types; namely Bounded and unbounded convex sets.
Examples of convex sets

However, the following sets/ feasible regions are not convex;

The following theorems help us to identify a convex set/feasible region;


𝑥1 𝑥1
𝑥2 𝑥2
1.6.4 Theorem. A closed half spaces 𝑥 = . : 𝑎𝑇 𝑥 ≤ 𝑏 and 𝑥 = . : 𝑎𝑇 𝑥 ≥ 𝑏 are convex sets.
. .
{ (𝑥𝑛 ) } { (𝑥𝑛 ) }
𝑥1
𝑥2
1.6.5 Theorem. A particular hyperplane 𝑥 = . : 𝑎𝑇 𝑥 = 𝑏 is convex
.
{ (𝑥𝑛 ) }
1.6.6 Theorem. The set of solutions to a system of linear equations 𝑥 = 𝑏𝑖 , 𝐴, 𝑏𝑖 ∈ ℝ𝑚 is
𝑥1
𝑥2
convex if it is not empty. Thus, 𝑥 = . : 𝐴𝑥 = 𝑏𝑖 is convex.
.
{ (𝑥𝑛 ) }
1.6.7 Theorem. The intersection of convex sets is convex

31 | P a g e
1.6.8 Corollary
The intersection of finite convex sets is convex

1.6.9 Definition (convex linear combination).


The point 𝑥 ∈ ℝ𝑛 given by 𝑥 = 𝜆1 𝑥1 + 𝜆2 𝑥2 + ⋯ + 𝜆𝐾 𝑥𝐾 = ∑𝑘𝑖=1 𝜆𝑖 𝑥𝑖 for
∑𝑘𝑖=1 𝜆𝑖 = 1, 𝜆𝑖 ≥ 0 is called a convex linear combination of the points 𝑥𝑖 , 𝑖 =
1,2, . . , 𝑘

E.g: 𝑥 = 𝜆𝑥1 + (1 − 𝜆)𝑥2 , 0 ≤ 𝜆 ≤ 1 is a clc of 𝑥1 and 𝑥2 .

From the definition of a convex set S, 𝑥𝑖 ∈ 𝑆 => ∑𝑘𝑖=1 𝜆𝑖 𝑥𝑖 ∈ 𝑆, 𝜆𝑖 ≥ 0,


∑𝑘𝑖=1 𝜆𝑖 = 1, then we can say that S is convex if it contains a linear combination of
points 𝑥𝑖 ∈ 𝑆.

1.6.10 Definition. A rectangle in ℝ𝑛 is a set 𝑅 = {𝑥 ∈ ℝ𝑛 ; 𝑎𝑖 ≤ 𝑥𝑖 ≤ 𝑏𝑖 }, where


𝑎𝑖 < 𝑏𝑖 ; 𝑖 = 1,2, . . , 𝑛 𝑎𝑟𝑒 𝑟𝑒𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟𝑠.

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.11 The extreme/vertex/ corner point theorem.


 Extreme points or corner points in a feasible region are the potential feasible solutions
to the described lp problems geometrically.
 Recall that a point 𝑈 in a convex set S (feasible region) is an extreme point of S if it is
not an interior point of any boundary line segment is S. Thus, it is an extreme point of S
if there are two distinct points 𝑥1 , 𝑥2 ∈ 𝑆 such that 𝑈 ≠ 𝜆𝑥1 + (1 − 𝜆)𝑥2 , 0 < 𝜆 < 1.
An extreme point of a convex set S does not lie in the line segment joining two points
of S.

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

The feasible region is unbounded thus no optimal solution exists.

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

In the feasible region, the graph of 𝑧 = 8𝑥 + 2𝑦 is parallel with the constraint


4𝑥 + 𝑦 ≤ 4 which is one of the boundary lines 4𝑥 + 𝑦 = 4. In this case we have an infinite
number of optimal points that maximize 𝑧, hence the solution is not unique.
------------------------------------

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.

Consider a standard lp problem


Max 𝑧 = 𝑐 𝑇 𝑥
s.t 𝐴𝑥 = 𝑏
𝑥≥0
 The solution 𝑥 ≥ 0 to a system of equations 𝐴𝑥 = 𝑏 is a single boundary point (an
extreme point).
 The constraints 𝐴𝑥 = 𝑏 form a system of 𝑚 equations in 𝑛 unknowns
𝑎11 𝑎12 … 𝑎1𝑚 𝑎1𝑚+1 … 𝑎1𝑛
𝑎21. 𝑎22 … 𝑎2𝑚 𝑎2𝑚+1 … 𝑎2𝑛
where 𝑨=[ .. ]
.
𝑎𝑚1 𝑎𝑚2 … 𝑎𝑚𝑚 𝑎𝑚𝑚+1 𝑎𝑚𝑛

and the constraints 𝐴𝑥 = 𝑏 can bewritten as;

 Supposing that the first 𝑚 column vectors 𝐴1 , 𝐴2 , … , 𝐴𝑚 of 𝐴 that correspond to the


positive 𝑥𝑖 ≥ 0 , form a linearly independent set of vectors 𝐴𝑖 , then the rank of 𝐴 is
𝑚 and so the 𝑚 rows of 𝐴 are also linearly independent.
 The matrix 𝑩 of order 𝑚𝑥𝑚 forms the basis of 𝐴 and is invertible, and the remaining
𝑛 − 𝑚 columns of 𝐴 are not linearly independent, forming a singular matrix 𝑅 of
order 𝑚𝑥(𝑛 − 𝑚).
 And let the variables corresponding to the matrices 𝐵 and 𝑅 be 𝑋𝐵 and 𝑋𝑅
respectively. Then we have the constraints 𝐴𝑥 = 𝑏 written as;

𝑋
[𝐵 𝑅 ] [𝑋𝐵 ] = 𝑏, where 𝐵 is invertible/a non-singular, 𝑅 is singular/non-invertible
𝑅
𝐵𝑋𝐵 + 𝑅𝑋𝑅 = 𝑏

Setting the variables 𝑋𝑅 equal to zero, then


𝐵𝑋𝐵 = 𝑏,
𝑋𝐵 = 𝐵 −1 𝑏

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.

1.6.1 Definition (A basic feasible solution)


A basic feasible solution to the lp problem
𝑀𝑎𝑥 𝑧 = 𝑐 𝑇 𝑥 Max 𝑧 = 𝑐 𝑇 𝑥
s.t 𝐴𝑥 ≤ 𝑏 => s.t 𝐴𝑥 = 𝑏
𝑥≥0 𝑥≥0
is a basic solution which is also feasible.

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.

1.6.3 Theorem (Optimal solution)

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;
𝑟 𝑟 𝑟 𝑟

𝑧 = 𝑐 𝑥 = 𝑐 ∑ 𝜆𝑖 𝑥𝑖 = ∑ 𝜆𝑖 𝑐 𝑥𝑖 ≤ ∑ 𝜆𝑖 𝑐 𝑥𝑟 = 𝑐 𝑥𝑟 ∑ 𝜆𝑖 = 𝑐 𝑇 𝑥𝑟 = 𝑧𝑟
𝑇 𝑇 𝑇 𝑇 𝑇

𝑖=1 𝑖=1 𝑖=1 𝑖=1


=> 𝑧 ≤ 𝑧𝑟
=> 𝑧𝑟 = 𝑚𝑎𝑥{𝑐 𝑇 𝑥}
Hence,
1. The maximum value of 𝑧 is attained at the extreme point
2. The minimum value is attained at the extreme point
3. If the optimal solution exists, then there exists an optimal basic feasible solution to
the lp problem.

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)

where 𝐴 is the 𝑚 x (𝑛 + 𝑚) matrix


𝑎11 𝑎12 … 𝑎1𝑚 … 𝑎1𝑛 1 0 … 0
𝑎21. 𝑎22 … 𝑎2𝑚 … 𝑎2𝑛 0 1 … 0
𝐴 = [ .. ]
.
𝑎𝑚1 𝑎𝑚2 … 𝑎𝑚𝑚 … 𝑎𝑚𝑛 0 0 … 1

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)
𝒛 = 𝑪𝑩 𝒙

̅ = 𝑧̅, 𝑪𝑩 𝒚𝒋 = 𝑧𝑗 , then (6) becomes


Now letting 𝑪𝑩 𝒙
𝑧 = 𝑧̅ + ∑𝑗∈𝐽(𝑐𝑗 − 𝑧𝑗 )𝑥𝑗
𝒛 = 𝒛̅ − ∑𝒋∈𝑱(𝒛𝒋 − 𝒄𝒋 )𝒙𝒋 ………….(7)

 When 𝑋𝑅 = 0, i.e 𝑥𝑗 = 0, then 𝑧 = 𝑧̅ = 𝐶𝐵 𝑥̅ = 𝐶𝐵 𝐵 −1 𝑏 the optimal value


(max/mim) of 𝑧 w.r.t the basic solution 𝑋𝐵 = 𝐵 −1 𝑏 = 𝑥̅ (which is an extreme
point).
 (𝒛𝒋 − 𝒄𝒋 ) is called the optimality condition. If (𝒛𝒋 − 𝒄𝒋 ) ≥ 𝟎, this implies
optimization is finite and can be reached.
----------------------------------------------

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.
…………………………………………………

2.2 Definition (Adjacent extreme point)


Two distinct extreme points are aid to adjacent if as feasible solutions, they have all basic
variables but one basic variable is common.
Eg consider the example
Max 𝑧 = 120𝑥 + 100𝑦
s.t 2𝑥 + 2𝑦 + 𝑢 = 8
5𝑥 + 3𝑦 + 𝑣 = 15
𝑥, 𝑦, 𝑢, 𝑣 ≥ 0

𝒙 𝒚 𝒖 𝒗 Type of solution Optimal value of 𝒛


0 0 8 15 Basic feasible 0
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

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.

The simplex method algorithm consists of mainly two major steps;


a) Finding out whether the some/given initial basic feasible solution/basic feasible
solution/extreme point/ is the optimal solution. If not, the method proceeds
b) finding an adjacent point basic feasible solution with the same or larger value of 𝑧

2.4 The primal simplex method/ algorithm


Consider a general lp problem
Max 𝑧 = 𝑐 𝑇 𝑥
s.t 𝐴𝑥 ≤ 𝑏, 𝒃≥𝟎
𝑥≥0
This transformed into a standard lp problem, we have
Max 𝑧 = 𝑐 𝑇 𝑥
s.t 𝐴𝑥 = 𝑏
𝑥≥0
whose basic form is
Max 𝒛 = 𝒛̅ − ∑𝒋∈𝑱(𝒛𝒋 − 𝒄𝒋 )𝒙𝒋
s.t 𝑋𝐵 + ∑𝑗∈𝐽 𝑦𝑗 𝑥𝑗 = 𝑥̅ 𝒐𝒓 𝑥𝑠 + ∑𝑗∈𝐽 𝑦𝑗 𝑥𝑗 = 𝑥̅
𝑥𝐵 ≥ 0
where 𝑩−𝟏 𝒃 = 𝑥̅ , 𝑪𝑩 𝒙
̅ = 𝑧̅, 𝑩−𝟏 𝑹 = 𝑌 = {𝑦𝑗 }, 𝑪𝑩 𝒚𝒋 = 𝑧𝑗 , 𝑪𝑩 𝒚𝒋 − 𝒄𝒋 = 𝑧𝑗 − 𝑐𝑗 , 𝑗 ∈
𝐽
This can conveniently be put in a tableau below called the primal simplex tableau as below;
𝐶𝑗 𝑐1 𝑐2 . . . 𝑐𝑛 𝒄𝒏+𝟏 𝒄𝒏+𝟐 . . . 𝒄𝒏+𝒎 𝐵 −1 𝑏=𝑥̅ =b
𝐶𝐵 𝑋𝐵 𝑥1 𝑥2 . . . 𝑥𝑛 𝒙𝒏+𝟏 𝒙𝒏+𝟐 . . . 𝒙𝒏+𝒎 ̅
𝒙
𝑐𝑛+1 𝑥𝑛+1 𝑎11 𝑎12 . . . 𝑎1𝑛 1 0 . . . 0 𝑥̅1
𝑐𝑛+2 𝑥𝑛+2 𝑎21 𝑎22 . . . 𝑎2𝑛 0 1 . . . 0 𝑥̅2
. . . .
. . . .
. . . .
𝑐𝑛+𝑚 𝑥𝑛+𝑚 𝑎𝑚1 𝑎𝑚2 . . . 𝑎𝑚𝑛 0 0 . . . 1 𝑥̅𝑚
𝒛𝒋 − 𝒄𝒋 𝑧1 − 𝑐1 𝑧2 − 𝑐2 . . . 𝑧𝑛 − 𝑐𝑛 0 0 . . . 0 𝑧̅ = 0 = 𝑧

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

Introducing slack variables 𝑥3 , 𝑥4 , we have;


Max 𝑧 = 𝑥1 + 2𝑥2 + 0𝑥3 + 0𝑥4
s.t 3𝑥1 + 𝑥2 + 𝑥3 = 10
𝑥1 + 3𝑥2 + 𝑥4 = 6
𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 ≥ 0
The initial simplex tableau for the lp problem
𝐶𝑗 1 2 0 0 𝐵 −1 𝑏
𝐶𝐵 𝑋𝐵 𝑥1 𝑥2 𝒙𝟑 𝒙𝟒 ̅
𝒙
0 𝒙𝟑 3 1 1 0 10
0 𝒙𝟒 1 3 0 1 6
𝑧𝑗 − 𝑐𝑗 −1 − 2 0 0 𝑧 = 𝑧̅ = 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 = 𝑧

2.8 Selecting the Entering variable


Suppose now that the objective row (𝑧𝑗 − 𝑐𝑗 ) has a negative entry (𝑧𝑘 − 𝑐𝑘 ) < 0, 𝑘 ∈ 𝐽 in
the column labeled 𝑥𝑘 , and 𝒂𝒔𝒌 ≥ 0, ∀ 1 < 𝑠 < 𝑚, then the solution in the tableau is not
optimal. Therefore, some adjustment must be made in order to use the next adjacent
extreme point such that the objective function 𝑧 increases.
 If the negative entry (𝑧𝑘 − 𝑐𝑘 ) < 0, 𝑘 ∈ 𝐽 in the objective row occurs under the 𝑥𝑘
column, then the variable 𝑥𝑘 becomes the entering variable, since it will enter the set of
basic variables in the next iteration.
 And the 𝑥𝑘 headed column under which the negative entry (𝑧𝑘 − 𝑐𝑘 ) < 0, 𝑘 ∈ 𝐽 in the
objective row occurs, is called the pivotal /key column, marked by placing an arrow ↓
above the entering variable 𝑥𝑘 or marked by placing an arrow ↑ below the negative
entry (𝑧𝑘 − 𝑐𝑘 ) < 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.

2.9 Selecting the departing variable (exit criterion)


The basic variable which the entering variable replaces is called the departing variable
because it has departed from the set of basic variables and it is no longer a basic variable.
The row labeled with the departing variable is called the pivotal /key row.

We now examine carefully the selection of the departing variable


Entries 𝒂𝒔𝒌 in the pivotal column may be positive, negative or zero.
Positive 𝒂𝒔𝒌 in the column.
 Assume (𝒛𝒌 − 𝒄𝒌 ) < 𝟎 and that 𝒙𝒌 is the label of the pivotal column and that all key
column entries are positive, 𝒂𝒔𝒌 > 0, ∀ 1 < 𝑠 < 𝑚 , 𝑘 ∈ 𝐽. Then;
 For each 𝒂𝒔𝒌 of the pivotal column ,determine the ratio of 𝑥̅ entries to the entries
𝑥̅
𝒂𝒔𝒌 i.e 𝒂𝑥̅ , 𝑎𝑠𝑘 > 0. These rations are called 𝜽 − 𝒓𝒂𝒕𝒊𝒐𝒔. If 𝒂𝒔𝒌 > 0, 𝒂𝑥̅ > 0
𝒔𝒌 𝒂𝒔𝒌 𝒔𝒌

 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 𝜽 − 𝒓𝒂𝒕𝒊𝒐𝒔,
𝒂𝒔𝒌

2.11 Summary of the steps of the primal simplex algorithm/pivoting


1)Ensure that the lp problem is a maximum general proper with 𝑏 ≥ 0.
2)Introduce slacks to form a standard lp problem.
3)Draw the initial tableau to determine the initial basic feasible solution by setting the
slack variables to be the basic variables and the original/decision variables to be the
non-basic variables. Each basic variable (solution) must have coefficient 1.
4) Calculate the entries in the objective row (𝒛𝒋 − 𝒄𝒋 ).Test the entries 𝑧𝑗 − 𝑐𝑗 using the
optimality criterion 𝑧𝑗 − 𝑐𝑗 ≥ 0;
i) If all entries 𝑧𝑗 − 𝑐𝑗 ≥ 0 ∀ 𝑗 ∈ 𝐽 under non-basic columns are positive , stop the
iterations and the present solution of the basic variables coefficient 1 becomes
the optimal solution.
ii) If under non-basic columns, for some ∈ 𝐽, 𝑧𝑘 − 𝑐𝑘 < 0, then test whether all
entries 𝑎𝑠𝑘 ≤ 0 , for ∀ 𝑠 in that column. If all entries 𝑎𝑠𝑘 ≤ 0, ∀ 𝑠 , then no
finite optimal solution exists.
iii) If 𝑧𝑘 − 𝑐𝑘 < 0 for some 𝑘 ∈ 𝐽, 𝑎𝑠𝑘 > 0 ∀ 𝑠, use the entry criterion
𝑚𝑖𝑛{zj − cj } or 𝑚𝑎𝑥|𝑧𝑗 − 𝑐𝑗 | to determine the pivot column (entering variable)
and if the negative 𝑧𝑘 − 𝑐𝑘 entries are the same, 𝑎𝑠𝑘 > 0 ∀ 𝑠 take the left most
to determine the pivot column.
iv) Use the exit criterion 𝒂𝑥̅ = 𝑚𝑖𝑛 {𝒂̅̅̅̅
𝑥𝑠
} to determine the departing variable. And
𝒔𝒌 𝒔𝒌
𝑥̅
if the ratios are the same, consider the uppermost ratio 𝒂 .
𝒔𝒌
v) If the pivot column and pivot row are got, locate the pivot and circle it.
1
5) If the pivot is some entry 𝑎𝑠𝑘 , multiply the entire row by 𝑎 making the entry in the
𝑠𝑘
pivot position in the new tableau equal to 1. Then add suitable multiples of the new
pivotal row to all other rows (including the objective row) so that all other elements in
the pivotal column become zero. These elementary row operations are called row
reductions to transform the given row matrix to reduced row echelon form (canonical
form) to gain a final solution (optimal).
6) In the new tableau, replace the label on the pivotal row by the entering variable.

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

Complete the iterations


-----------------------------

Example 2
Given the lp problem
Max 𝑧 = 𝑥1 + 2𝑥2
s.t 3𝑥1 + 𝑥2 ≤ 10
𝑥1 + 3𝑥2 ≤ 6
𝑥1 , 𝑥2 ≥ 0

Introducing slack variables 𝑥3 , 𝑥4 , we have;


Max 𝑧 = 𝑥1 + 2𝑥2 + 0𝑥3 + 0𝑥4
s.t 3𝑥1 + 𝑥2 + 𝑥3 = 10
𝑥1 + 3𝑥2 + 𝑥4 = 6
𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 ≥ 0
The initial simplex tableau for the lp problem
𝐶𝑗 1 2 0 0 𝐵 −1 𝑏
𝐶𝐵 𝑋𝐵 𝑥1 𝑥2 𝒙𝟑 𝒙𝟒 ̅
𝒙
0 𝒙𝟑 3 1 1 0 10
0 𝒙𝟒 1 3 0 1 6
𝑧𝑗 − 𝑐𝑗 −1 − 2 0 0 𝑧 = 𝑧̅ = 0

Complete the iterations

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

Since ∀ 𝑗 ∈ 𝐽, 𝑧𝑗 − 𝑐𝑗 ≥ 0, the optimal solution has been reached which is


2 21 17
𝑥1 = 0, 𝑥2 = 5 , 𝑥3 = and the optimal value is 𝑧 = .
5 5
17
Verify 𝑧 = 𝑥1 − 2𝑥2 + 𝑥3 + 0𝑥4 + 0𝑥5 + 0𝑥6 = 5

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

𝑧𝑗 − 𝑐𝑗 0 − 3/2 0 9/8 0 5/8 𝑧 = 𝑧̅ = 4



Since the pivotal column has no positive entry, no optimal solution exists.
……………………………………………….

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

5. Max 𝑧 = 2𝑥1 − 3𝑥2 + 𝑥3


s.t 𝑥1 − 2𝑥2 + 4𝑥3 ≤ 5
2𝑥1 + 3𝑥2 + 4 𝑥3 ≤ 5
3𝑥1 + 𝑥2 − 𝑥3 ≤ 7
𝑥1 , 𝑥2 , 𝑥3 ≥ 0

6. Max 𝑧 = 3𝑥1 + 3𝑥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

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

Set up the initial tableau

Are there any NO Initial


negative entries solution is STOP
in the objective optimal
row (𝑧𝑗 − 𝑐𝑗 )?

YES

Get a pivotal column

Are there any There is


NO
positive entries in no finite
the pivotal column STOP
optimal
above the objective solution
row?

YES

Get a pivotal row

Get a new tableau


using the pivoting
technique

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

b) If a tie occurs in computing the 𝜃 − 𝑟𝑎𝑡𝑖𝑜𝑠 𝒂𝑥̅ = min {𝒂̅̅̅̅


𝑥𝑠
} , consequently the tie among
𝒔𝒌 𝒔𝒌
the 𝜃 − 𝑟𝑎𝑡𝑖𝑜𝑠 leads to one of the basic variables to assume a zero value during the
row operations. When there is degeneracy, there may be no change in the value of z.
And if degeneracy persists in successive iterations, there is a possibility of cycling
where the original solution re-occurs in later iterations without a change in z.

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
=>

Transforming the problem into a max lp gives


Max −𝑧 = −4𝑥1 − 𝑥2
s.t −3𝑥1 − 4𝑥2 ≤ −20
−𝑥1 − 5𝑥2 ≤ −15
𝑥1 , 𝑥2 ≥ 0

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),

Transforming into a standard form gives; Max −𝑧 = −4𝑥1 − 𝑥2 + 0𝑠1 + 0𝑠2


Max −𝑧 = −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

Alternatively, introducing negative slacks in (2) i.e

=>
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

s.t 𝐴𝑥 ≥ 𝑏 , 𝑏 ≥ 0 => 𝑠. 𝑡 ∑𝑛𝑗=1 𝑎𝑖𝑗 𝑥𝑗 − 𝑠𝑖 + 𝐴𝑖 = 𝑏𝑖 , 𝑏𝑖 ≥ 0,

𝑥≥0 𝑥𝑗 , 𝑠𝑖 , 𝐴𝑖 ≥ 0, 𝑗 = 1,2, … , 𝑛 , 𝑖 = 1,2, … , 𝑚

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. 𝑀𝑖𝑛 𝑧 = 𝑐 𝑇 𝑥 𝑛 𝑚 𝑚

s.t 𝐴𝑥 ≥ 𝑏 , 𝑏 ≥ 0 => 𝑀𝑖𝑛 𝑧 = ∑ 𝑐𝑗 𝑥𝑗 + ∑ 0𝑠𝑖 + ∑ 𝑀𝐴𝑖


𝑗=1 𝑖=1 𝑖=1
𝑥≥0 𝑠. 𝑡 ∑𝑛 𝑎 𝑥 − 𝑠 + 𝐴 = 𝑏 , 𝑏 ≥ 0,
𝑗=1 𝑖𝑗 𝑗 𝑖 𝑖 𝑖 𝑖

𝑥𝑗 , 𝑠𝑖 , 𝐴𝑖 ≥ 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.

Using convention (2) 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
makes it easy to use of the criterions 𝑚𝑖𝑛{𝑧𝑗 − 𝑐𝑗 } or 𝑚𝑎𝑥|𝑧𝑗 − 𝑐𝑗 | in order to
determine the pivot column but may not affect the outcomes

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

Introduce slack and artificial variables (using convention 2)


Min = 4𝑥1 + 𝑥2 + 0𝑠1 + 0𝑠2 − 𝑀𝐴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 𝟏𝟓
−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 𝟏𝟓

11𝑀−19 4𝑀−1 −4𝑀+1


(𝑧𝑗 − 𝑐𝑗 ) 0 −𝑀 0 𝑧̅ = 11𝑀
5 5 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 ←
11 11 11 11 11

−19 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 𝟏𝟏
1 𝑠1 0 11 1 −3 1 −3 25
51 −106 535
(𝑧𝑗 − 𝑐𝑗 ) 0 30 1 -7 11
−𝑀
11
−𝑀 𝑧 = 𝑧̅ = 11

𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝑠1 𝑠2 𝐴1 𝐴2 ̅
𝒙 𝑥̅
𝒂𝒔𝒌
4 𝑥1 11 55 0 1 10 − 19 𝟔𝟓
0 𝑠2 33 176 1 0 31 − 60 220
(𝑧𝑗 − 𝑐𝑗 ) 40 219 0 4 40−𝑀 𝑀−76 𝑧̅ = 260

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

(using convention 1) gives


=>
Max𝑧 = 2𝑥1 + 5𝑥2 + 0𝑠1 + 0𝑠2 − 𝑀𝐴1
s.t 2𝑥1 − 𝑥2 + 𝑠1 = 8
6𝑥1 + 4𝑥2 − 𝑠2 + 𝐴1 = 24
𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 , 𝐴1 ≥ 0

Initial tableau is;


𝐶𝑗 2 5 0 0 −𝑀 𝑥̅ =b 𝜽 − 𝒓𝒂𝒕𝒊𝒐𝒔
̅
𝑥
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒔𝟐 𝐴1
𝒂𝒔𝒌
0 𝑠1 2 −1 1 0 0 8
−𝑀 𝐴1 6 4 0 −1 1 24
𝑧𝑗 − 𝑐𝑗 −6𝑀 − 2 − 4𝑀 − 5 0 𝑀 0 𝑧 = −24𝑀

Complete the iterations

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;

𝑀𝑎𝑥 𝑧 = 𝑥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 + 𝒙𝟔 = 18
3𝑥1 + 6𝑥2 + 2𝑥3 + 𝑥4 + 3𝑥5 + 𝑨𝟑 = 24
𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 , 𝑥5 , 𝑥6 , 𝐴1 , 𝐴3 ≥ 0

Run the tableaux, using 𝑥6 , 𝐴1 , 𝐴2 as basic variables to yield


𝑥1 = 6, 𝑥2 = 0, 𝑥3 = 3, 𝑥5 = 0, 𝑥6 = 9, 𝑥6 = 0, 𝐴1 = 0, 𝐴3 = 0
……………………………….

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.

 Now consider a pair of lp problem in the general forms;


𝑀𝑎𝑥 𝑧 = 𝑐 𝑇 𝑥 𝑀𝑖𝑛 𝑧 ′ = 𝑏 𝑇 𝑤
s.t 𝐴𝑥 ≤ 𝑏 ……..(1) s.t 𝐴𝑇 𝑤 ≥ 𝑐 ……..(2)
𝑥≥0 𝑤≥0
 Where 𝑨 is an 𝑚𝑥𝑛 matrix, 𝑨 is an 𝑛𝑥𝑚 matrix,
𝑻

 𝑐 and 𝑥 are 𝑛𝑥1 column vectors,


 𝑏 and 𝑤 are 𝑚𝑥1 column vectors and 𝑏 𝑇 is a 1𝑥𝑚 row vector.
 These lp problems are called Dual lp problems. The lp problem given by (1)
is called a Primal problem and the problem given by (2) is called a Dual
problem. The variables 𝑤𝑖 are called dual /shadow variables.
Example 1
If the Primal problem is; The Dual problem is;
𝑤1
𝑥1
𝑀𝑎𝑥 𝑧 = (2 3) [𝑥 ] => ′
𝑀𝑖𝑛 𝑧 = (2 5 1) [ 2 ] 𝑤
2
𝑤3
3 2 𝑥 2 𝑤 1
1 3 −1 4 𝑤 2
s.t (−1 2) (𝑥 ) ≤ [5] s.t ( ) [ 2] ≥ [ ]
2 2 2 1 𝑤 3
4 1 1 3
𝑥1 , 𝑥2 ≥ 0 𝑤1 , 𝑤2 , 𝑤3 ≥ 0

In forming dual lp problems, we observe the following;


1) The number of dual variables 𝑤𝑖 in the dual problem will depend on the number
(𝑚) of constraints in the primal problem. When constraints in the primal problem
don’t exist, dual variables 𝑤𝑖 also don’t exist.
2) The coefficients in the 𝑖 𝑡ℎ constraint in the primal problem become the coefficients of
dual variable 𝑤𝑖 in the dual problem. E.g, the coefficients 3, 2 to the first constraint in
the primal problem, are the coefficients of the first variable 𝑤1 in the dual problem.
3) The coefficients of variable 𝑥𝑖 in the primal problem become the coefficients in the 𝑖 𝑡ℎ
constraint in the dual problem. E.g, And the coefficients 3,-1,4 of the first decision
variable 𝑥1 in the primal problem, become the coefficients to the first constraint in 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.

Therefore, the primal lp problem becomes

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

𝑀𝑎𝑥 − 𝑧 = −2𝑥1 + 3𝑥2 − 𝑥3


s.t 𝑥1 + 2𝑥2 + 𝑥3 ≤ 7 𝑀𝑖𝑛 𝑧 ′ = 7𝑤1 + 5𝑤2 + 3𝑤3
𝑥1 + 4𝑥2 − 𝑥4 = 5 s.t 𝑤1 + 𝑤2 + 𝑤3 ≥ −2
𝑥2 + 𝑥3 + 5𝑥4 ≥ 3 2𝑤1 + 4𝑤2 + 𝑤3 ≥ 3
𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 ≥ 0 𝑤1 − 𝑤2 + 5𝑤3 ≥ −1
𝑤1 , 𝑤3 ≥ 0

The Dual problem is ;

𝑀𝑎𝑥 − 𝑧 ′ = −7𝑤1 − 5𝑤2 − 3𝑤3


s.t −𝑤1 − 𝑤2 − 𝑤3 ≤ 2
−2𝑤1 − 4𝑤2 − 𝑤3 ≤ −3
−𝑤1 + 𝑤2 − 5𝑤3 ≤ 1
𝑤1 , 𝑤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

We can rewrite (1) as a Max lp


Dual 1 Dual 2 of Dual 1
𝑀𝑎𝑥 − 𝑧 ′ = −𝑏 𝑇 𝑤
𝑀𝑖𝑛 (− 𝑧 ′ )′ = (−𝑐)𝑇 𝑥
s.t −𝐴𝑇 𝑤 ≤ −𝑐 ……..(2) => s.t (−𝐴𝑇 )𝑇 𝑥 ≥ (−𝑏 𝑇 )𝑇
𝑤≥0 𝑥≥0

(Is the Primal problem) <= 𝑀𝑖𝑛 −𝑧 = (−𝑐 )𝑇 𝑥


𝑀𝑎𝑥 𝑧 = 𝑐 𝑇 𝑥
s.t −𝐴𝑥 ≥ −𝑏
s.t 𝐴𝑥 ≤ 𝑏
𝑥≥0
𝑥≥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
𝑇
𝑀𝑎𝑥 𝑧 = 𝑐 𝑥 𝑀𝑖𝑛 𝑧 = 𝑏 𝑇 𝑤

s.t 𝐴𝑥 ≤ 𝑏 ……..(1) s.t 𝐴𝑇 𝑤 ≥ 𝑐


𝑥≥0 𝑤≥0

Recall that: 𝑨 is an 𝑚𝑥𝑛 matrix, 𝑨𝑻 is an 𝑛𝑥𝑚 matrix,


𝑐 and 𝑥 are 𝑛𝑥1 column vectors,
𝑤 are 𝑚𝑥1 column vectors and
𝑏 𝑇 is a 1𝑥𝑚 row vector.

Now, from 𝐴𝑥 ≤ 𝑏 and from 𝐴𝑇 𝑤 ≥ 𝑐


𝒘𝑻 𝐴𝑥 ≤ 𝒘𝑻 𝑏 = 𝑏 𝑇 𝑤 𝑤𝑇𝐴 ≥ 𝑐𝑇
𝑤 𝑇 𝐴𝑥 ≤ 𝒃𝑻 𝒘 ………(i) 𝑤 𝑇 𝐴𝑥 ≥ 𝑐 𝑇 𝑥
𝒄𝑻 𝒙 ≤ 𝑤 𝑇 𝐴𝑥 .…(ii)

Combining (i) and (ii), gives 𝑐 𝑇 𝑥 ≤ 𝑤 𝑇 𝐴𝑥 ≤ 𝑏 𝑇 𝑤 => 𝒄𝑻 𝒙 ≤ 𝒃𝑻 𝒘

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.

2.6.5 Duality theorem


Given a pair of dual lp problems (P and D), the necessary and sufficient conditions for a
feasible solution 𝑥̅ (𝑜𝑓 𝑃𝑟𝑖𝑚𝑎𝑙) or 𝑤 ̅ (𝑜𝑓 𝑑𝑢𝑎𝑙) to be optimal, is that there should exist
̅=𝒘
a feasible solution of the other problem such that 𝒄𝒙 ̅ 𝒃.

2.6.6 Complementariness of dual problems


Combining Lemma 1 and the Duality Theorem , if 𝑥 ∗ and 𝑤 ∗ (𝒙̅ and 𝒘
̅ ) are optimal
feasible solutions, then
𝑐𝑥 ∗ = 𝑤 ∗ 𝐴𝑥 ∗ = 𝑤 ∗ 𝑏
=> 𝑐𝑥 ∗ − 𝑤 ∗ 𝐴𝑥 ∗ = 0 and 𝑤 ∗ 𝐴𝑥 ∗ − 𝑤 ∗ 𝑏 = 0
(𝑐 − 𝑤 ∗ 𝐴)𝑥 ∗ = 0 and (𝐴𝑥 ∗ − 𝑏)𝑤 ∗ = 0
When (𝑐 − 𝑤 ∗ 𝐴) > 0, then 𝑥 ∗ = 0 and when (𝐴𝑥 ∗ − 𝑏) > 0 then 𝑤 ∗ = 0

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

its corresponding dual problem is


𝑀𝑖𝑛 𝑤 = 2𝑢1 + 𝑢2 + 5𝑢3
s.t 𝑢1 − 𝑢2 + 3𝑢3 ≥ 2
𝑢1 + 𝑢2 − 2𝑢3 ≥ −1 ……..(ii)
𝑢1 , 𝑢2 , 𝑢3 ≥ 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

The initial tableau is

𝐶𝑗 −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.

So using the Primal 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
Introduce slacks
𝑀𝑎𝑥 𝑧 = −2𝑥1 − 3𝑥2 − 5𝑥3 − 6𝑥4 + 0𝑥5 + 0𝑥6
S.t −𝑥1 − 2𝑥2 − 3𝑥3 − 𝑥4 + 𝑥5 = −2
−𝑥1 + 𝑥2 − 𝑥3 +3𝑥4 + 𝑥6 = −3
𝑥1 , 𝑥2 , 𝑥3 ,𝑥4 , 𝑥5 , 𝑥6 ≥ 0
In a tableau
𝐶𝑗 −2 −3 −5 −6 0 0
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒 𝒙𝟓 𝒙𝟔 𝑥̅𝐵
0 𝒙𝟓 −1 −2 −3 −1 0 0 −2
0 𝒙𝟔 −1 1 −1 3 0 1 −3
𝑧𝑗 − 𝑐𝑗 2 3 5 6 0 0 𝑧=0
|(𝑧𝑗 − 𝑐𝑗 )/𝑦𝑖𝑘 | 2 5

𝐶𝑗 −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

Introduce slack variables;


𝑀𝑎𝑥 − 𝑧 = −𝑥1 − 2𝑥2 + 0𝑥3 + 0𝑥4
s.t −3𝑥1 − 2𝑥2 + 𝑥3 = −6
−𝑥1 − 6𝑥2 + 𝑥4 = −3
𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 ≥ 0
In a tableau form;
𝐶𝑗 −1 −2 0 0
𝑪𝑩 𝑿𝑩 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒 𝑥̅𝐵
0 𝒙𝟑 −3 −2 1 0 −6
0 𝒙𝟒 −1 −6 0 1 −3
𝑧𝑗 − 𝑐𝑗 1 2 0 0 𝑧=0
1
|(𝑧𝑗 − 𝑐𝑗 )/𝑦𝑖𝑘 |
3
1

𝐶𝑗 −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

Then, introducing negative slacks and artificial variables, gives


𝑀𝑖𝑛 𝑧 = 20𝑥 + 25𝑦+0𝑠1 + 0𝑠2 + 0𝑠3 −M𝐴1 − 𝑀𝐴2 − 𝑀𝐴3
s.t 2𝑥 + 3𝑦 − 𝑠1 + 𝐴1 = 18
𝑥 + 3𝑦 − 𝑠2 + 𝐴2 = 12
1 marks
4𝑥 + 3𝑦 − 𝑠3 + 𝐴3 = 24
𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 , 𝑠3 , 𝐴1 , 𝐴2 , 𝐴3 ≥ 0
In the tableau, we have
𝐶𝑗 20 25 0 0 0 -M -M -M
𝐶𝐵 𝑋𝐵 𝑥1 𝑥2 𝑠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 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

And the dual of (1) is: Dual lpp


𝑀𝑖𝑛 𝑤 = −18𝑢1 − 12𝑢2 − 24𝑢3
s.t −2𝑢1 − 𝑢2 − 4𝑢3 ≥ −20
−3𝑢1 − 3𝑢2 − 3𝑢3 ≥ −25 …..(2)
𝑢1 , 𝑢2 , 𝑢3 ≥ 0
Converting (2) to Max gives; Dual lpp
𝑀𝑎𝑥 𝑤 = 18𝑢1 + 12𝑢2 + 24𝑢3
s.t 2𝑢1 + 𝑢2 + 4𝑢3 ≤ 20
3𝑢1 + 3𝑢2 + 3𝑢3 ≤ 25 ……..(3) 2 marks
𝑢1 , 𝑢2 , 𝑢3 ≥ 0
i) Either solve the dual (3) using the simplex since 𝒃 ≥ 𝟎

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

̅ ≥ 𝟎, we stop and the dual solution is 𝑢1 = 20/3, 𝑢2 = 0, 𝑢3 = 5/3 and


Since 𝑧𝑗 − 𝑐𝑗 ≥ 0, 𝒙
the dual optimal value is 𝑧 = 160 1 marks

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

|(𝑧𝑗 − 𝑐𝑗 )/𝑦𝑖𝑘 | 5 8.33

𝐶𝐵 𝑋𝐵 𝑥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

|(𝑧𝑗 − 𝑐𝑗 )/𝑦𝑖𝑘 | 20/3 10

𝐶𝐵 𝑋𝐵 𝑥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

̅ ≥ 𝟎, we stop and the dual solution is 𝑠1 = 20/3, 𝑠2 = 0, 𝑠3 = 5/3 and


Since 𝑧𝑗 − 𝑐𝑗 ≥ 0, 𝒙
the dual optimal value is −𝑧 = −(−160) = 160 1 marks
Conclusion
What do you conclude in this case, where a primal solution is infeasible but the dual solution
exists?

84 | P a g e
4 The properties of duality
 The mutual dual - dual simplex algorithm (DSA)
 Post optimality analysis

5. The two phase method

85 | P a g e

You might also like