You are on page 1of 25

Lectures on Linear Programming

by Dr. Brendan Browne


(1)Introduction
(2)Graphical olution
(!) Geometric imple" #ethod
($)imple" %lgorithm
(&) 'wo(tage imple" %lgorithm
()) Duality 'heory
1

Lecture 1
Lecture on Linear Programming
by Dr. Brendan Browne
Linear Programming is concerned with solving just one mathematical problem, namely
maximizing or minimizing a linear function of
n
variables(called the objective function)
subject to
m
linear constraints, that is
imize or imize min max
n n
x c x c x c x c z + + + +
3 3 2 2 1 1
subject to
1 , 1 3 3 , 1 2 2 , 1 1 1 , 1
b x a x a x a x a
n n
> + + + +
2 , 2 3 3 , 2 2 2 , 2 1 1 , 2
b x a x a x a x a
n n
> + + + +
3 , 3 3 3 , 3 2 2 , 3 1 1 , 3
b x a x a x a x a
n n
> + + + +

>


>

m n n m m m m
b x a x a x a x a
, 3 3 , 2 2 , 1 1 ,
> + + + +
and trivial constraints , !
1
x , !
2
x , !
3
x
""
" !
n
x
#n matrix terms a linear programming model is
imize or imize min max x c z
T

subject to
b x A

< ! x

where Ais an
n m
matrix

,
_

n m m m
n
n
n
a a a
a a a
a a a
a a a
A
, 2 , 1 ,
, 3 2 , 3 1 , 3
, 2 2 , 2 1 , 2
, 1 2 , 1 11

,
_

m
b
b
b
b
b

3
2
1
,

,
_

n
x
x
x
x
x

3
2
1
and

,
_

n
c
c
c
c
c

3
2
1
*ote$ %he coefficients
1
c ,
2
c , 3
c
,", n
c
are called cost coefficients"

2
&any management decisions involve trying to ma'e the most effective use of an
organization(s resources" )esources typically include machinery, labour, money, time,
warehouse space and raw materials" %hese resources may be used to produce
products(such as machinery, furniture, food or cloths etc) or services(such as schedules
for airlines, shipping or production, advertising policies or investment decisions)"*inear
+rogramming is a widely used mathematical techni,ue designed to help managers and
engineers in planning and decision ma'ing relative to resource allocation"
%he reason why linear programming is so important, is that so many different problems
in many diverse fields are modelled mathematically by the mathematical problem of
*inear +rogramming, namely
imize or imize min max x c z
T

subject to
b x A

< ! x

"
#ndeed the solution of *inear +rogramming problems in industry, government and
academic institutions all over the world represents one of the greatest amount of
computing time in scientific computing (as distinct from data processing)"
%he following are some of the main fields in which *inear +rogramming has been widely
and successfully applied"
(1)-il refinery optimization"
(2)+roduction allocation
(3).lending of mixtures
(/)0istribution problems
(1)2inancial and economic planning
% hort +istory o, Linear Programming
3lthough the problem of solving a system of linear ine,ualities goes bac' to at least
4oseph 2ourier(15678173!) after whom the method of 2ourier8&otz'in elimination is
named, it was not until before the 9econd :orld war that linear programming was
developed" #ndeed 2ourier and the .elgian mathematician ;allee +oussin in 1<11 each
wrote a research paper describing todays methods of linear programming %he founders
of the subject are *eonid =antorovich( 1<1281<76 )a )ussian mathematician(who also
won the >obel +rize for economics in 1<51) who developed linear programming
problems, ?eorge ."0antzig(1<1/82!!1) who published the 9implex method in 1</5
"*inear programming was extensively used in the 9econd :orld war to solve problems of
finding the most economical and effective strategies for developing aircraft, submarines,
troops and so on" #ndeed ?eorge ."0antzig(1<1/82!!1) during the 9econd :orld war
was employed as a @"9" 3ir 2orce mathematician in the -ffice of 9tatistical Aontrol
where he developed an interest in linear programming problems" #nterest in the
techni,ues of linear programming continued after the war, where they were applied to
industrial and government planning and flourished with the development of powerful
computers, which enabled large8scale linear programming problems to be solved with
comparative ease"
3
3n early application of linear programming was by 9tigle in 1</6 in solving the diet
problem by a process of trial and error" *inear programming problems were first shown
to be solvable in polynomial time in 1<5< by *eonid =hachiyan" #n 1<7/ a larger and
practical brea'through in the field occurred with the introduction of >arendra
="=armarhar(s(1<158) new interior point method for solving linear programming
problems"
General #athematical Programming %o put linear programming into context we
should realize that it is part of a much bigger area, namely general mathematical
programming" %he figure below summarizes briefly the different areas of mathematical
programming and their relationship"
/
-.er.iew
#athematical or *on(Linear Programming
) , , , , (
3 2 1 n
x x x x f
Min
Max

'

888non8linear objectivr function


subject to m non8linear constraints

{
{ ! ) , , , , (
! ) , , , , (
3 2 1 2
3 2 1 1

n
n
x x x x g
x x x x g


888888888888888888888888888888
8888888888888888888888888888888

{
{ ! ) , , , , (
! ) , , , , (
3 2 1
3 2 1 1

n m
n m
x x x x g
x x x x g


/uadratic Programming Linear Programming
2 2
2
2
1 1
, ) (
n n
x x x x x f
Min
Max
+ +

'


n n n
x c x c x c x x f
Min
Max
+ + +

'


2 2 1 1 1
) (
>on8linear objective function linear objective function
subject to m linear constrains subject to m linear constraints
1 , 1 2 2 , 1 1 1 , 1
b x a x a x a
n n
+ + +
1 , 1 2 2 , 1 1 1 , 1
b x a x a x a
n n
+ + +
2 , 2 2 2 , 2 1 1 , 2
b x a x a x a
n n
+ + +

2 , 2 2 2 , 2 1 1 , 2
b x a x a x a
n n
+ + +
8888888888888888888888888888888888888888888888888 8888888888888888888888888888888888888888888888888
m n n m m m
b x a x a x a + + +
, 2 2 , 1 1 ,

m n n m m m
b x a x a x a + + +
, 2 2 , 1 1 ,

Geometric Programming Integer Programming
(arises in Bngineering 0esign same as *inear programming
2ind vector t

such that except variables


n
x x x , , ,
2 1

&in function ) (
!
t g

must be integer"
9ubject to ! , , ! , !
1 1
> > >
n
t t t
and 1 ) (
1
t g

,
1 ) (
2
t g

88888888888888
1 ) ( t g
n

where
) ( ) (
1
t P t g
k
j
j k

and

j
i
G
i j j
j i
t c t P
1
,
) (

"
>ote different areas of mathematical programming re,uire different methods"
1
ome imple Linear Programming Problems and their ,ormulations
:e will introduce linear programming, by considering a few simple linear programming
problems and their formulations"
0"ample I 'able #anu,acturing problem
3 small co8operative craft wor'shop ma'es two types of table $ a standard rectangular
table and a deluxe circular table" %he mar'et can absorb as many of either types of table
as the wor'shop can product, so we can assume unlimited demand" Bach type of table is
made from the same wood and once the wood has been cut, each table has to go through
3 processes $ joinery, pre8finishing and final finishing (in that order)" 9ufficient cut wood
is always available" Bach rectangular tables ta'es 2 hours for joinery, /! minutes for pre8
finishing and 1 hours 2! minutes for final finishing" Bach circular table re,uires 3 hours
for joinery, 2 hours for pre8finishing, and / hours for final finishing" %he wor'shop
employs five joiners, two sanders and eight polishers" %he joiners each wor' a fixed six8
hour day while the sanders and polishers each wor' a fixed eight8hour day on the pre8
finishing and final finishing respectively" >o overtime is wor'ed and full six8hour or
eight8hour days are wor'ed by each employee irrespective of whether there is wor' for
that employee to do" 3ll running costs, including wages are fixed" %he co8operative sells
each rectangular table for C12! and each circular table for C11!" Dow many of each type
of table should the wor'shop produce each day in order to maximise its profitE
2ormulate this linear programming problem"
olution
*et x
1
F number of rectangular tables made per day
x
2
F number of circular tables made per day
z F daily income in Buro"
>ow we have to derive for the objective function and the constraints and tables such as
table 1 below is very useful in this respect"
%able 1
)ectangular %ables Aircular %ables @pper *imit per
day
#ncome C12! C11!
4oinery(hours) 2 3 3!
+refinishing(hours) 2G3 2 16
2inal
finishing(hours)
1 1G3 / 6/
6
#t is clear that there is a linear relationship between the daily income and the numbers of
tables sold given by

2 1
11! 12! + x z
%he numbers of hours spent daily on each of joinery, pre8finishing and final finishing are
given using table above by simple linear expressions"
) ( 3 2
2 1
joinery x x +

) ( 2
3
2
2 1
ng prefinishi x x +

) ( /
3
16
2 1
finishing final x x +
"
%he upper limits on the number of hours available for each of these processes each day
can be combined with these expressions to give the following constraints$
) ( 3! 3 2
2 1
joinery x x +

) ( 16 2
3
2
2 1
ng prefinishi x x +

) ( 6/ /
3
16
2 1
finishing final x x +
2inally, we must, as so often in mathematics state the obvious $ the co8operative cannot
ma'e a negative number of tables" 9o we must also include the constraints !
1
x and
!
2
x "
%hus our complete linear programming model is$
&aximise
2 1
11! 12! + x z
subject to
3! 3 2
2 1
+ x x

16 2
3
2
2 1
+ x x

6/ /
3
16
2 1
+ x x
with !
1
x and !
2
x (It is .ital that all ,inal linear programming models ha.e
these tri.ial constraints).
*ote1 3ll linear programming models are of similar form to above" %hey consist of$
(1) an objective function z which is linear that is to be maximised or minimised
(2) subject to linear constraint"
(3) all variables are always restricted to be non8negative"
5
0"ample 2
3n oil company owns two refineries, say refinery 3 and refinery ." )efinery 3 is
capable of producing 2! barrels of gasoline and 21 barrels of fuel oil per day" )efinery .
is capable of producing /! barrels of gasoline and 2! barrels of fuel oil per day" %he
company re,uires at least 1!!! barrels of gasoline and at least 7!! barrels of fuel oil" #f it
costs C3!! per day to operate refinery 3 and C1!! per day to operate refinery ., how
many days should each refinery be operated by the company so as to minimize costsE
2ormulate this problem as a linear programming model"
olution
*et
1
x the number of days operating refinery 3"
*et
2
x the number of days operating refinery ."
%hen z total cost"
:e wish to minimize
2 1
1!! 3!! x x z + subject to the following constraints"
>ote that the company must incur some positive costs since it is constrained by
minimum petroleum re,uirements" )efinery 3 is capable of producing 2! barrels of
gasoline per day and )efinery . is capable of producing /! barrels of gasoline per day"
Dence the total amount of gasoline produced per day is
2 1
/! 2! x x + " 3s at least 1!!!
barrels of gasoline is re,uired we have the ine,uality
1!!! /! 2!
2 1
+ x x
9imilarly )efinery 3 is capable of producing 21 barrels of fuel oil per day and" )efinery
. is capable of producing 2! barrels of fuel oil per day"
Dence the total amount of fuel oil produced per day is
2 1
2! 21 x x + " 3s at least 7!!
barrels of fuel oil is re,uired we have the ine,uality
7!! 2! 21
2 1
+ x x "
Dence our linear programming model is
minimize
2 1
1!! 3!! x x z +
subject to
1!!! /! 2!
2 1
+ x x
7!! 2! 21
2 1
+ x x "

and !
1
x and !
2
x since negative days cannot be operated by the refineries"
7
0"ample !(Production Plan Problem)
#n a given factory there are three machines
1
M ,
2
M and 3
M
used in ma'ing two
products
1
P and
2
P respectively" -ne unit of
1
P occupies
1
M for 1 minutes,
2
M for
3 minutes and
3
M
for / minutes respectively" %he corresponding figures for one unit
of
2
P are for
1
M 1 minute ,
2
M / minutes and for 3
M
3 minutes respectively"
%he net
profit per unit of
1
P produced is C 3! and for per unit of
2
P produced is
C 2!(independent of whether the machines are used to full capacity or not)" :hat
production plan gives the most profitE 2ormulate this linear programming problem
Dint$ translate all times into hours"

olution

*et
1
x number of units of
1
P produced per hour and
let
2
x number of units of
2
P produced per hour"
Dence profit z is given by
2 1
2! 3! x x z +
%here are restrictions on
1
x and
2
x obtained as follows$
1 unit of
1
P occupies
1
M
12
1
hours,
2
M
2!
1
hours and
3
M
for
11
1
hours"
Dence
1
x units of
1
P occupies
1
M
12
1
x
hours,
2
M
2!
1
x
hours and 3
M
for
11
1
x
hours"
9imilarly
2
x units of
2
P occupies
1
M
6!
2
x
hours,
2
M
11
2
x
hours and
3
M
for
2!
2
x
hours"
%herefore for each machine we must have that
1
6! 12
2 1
+
x x
for machine
1
M

1
11 2!
2 1
+
x x
for machine
2
M
1
2! 11
2 1
+
x x
for machine 3
M
9implifying ,our ine,ualities are
6! 1
2 1
+ x x for machine
1
M
6! / 3
2 1
+ x x for machine
2
M
<
6! 3 /
2 1
+ x x for machine 3
M
%hus our programming model for the production plan above is
&aximize
2 1
2! 3! x x z +
subject to
6! 1
2 1
+ x x
6! / 3
2 1
+ x x
6! 3 /
2 1
+ x x
and the trivial constraints !
1
x and !
2
x since we cannot produce negative
number of either units"
>"." %hese trivial constraints must always be stated as linear programming modals
always have non8negative variables and this insures that the feasible regions of linear
programming models always lie in the first ,uadrant"
1!


#t is important that you should be able to formulate mathematically a linear programming
problem or model from a description of the linear problem as we have done in the
examples above"
%he following is a guide for doing such formulations$
2ormulating linear programming models
?iven a precise statement of a linear programming problem, including a specified
purpose and any appropriate data and assumptions, the problem may be formulated as a
linear programming model as follows$
(i) #dentify the objective of the model (for example maximising profit or minimising
cost) and decide on the units the objective functions to be measured (for example
units of currencies)"
(ii) #dentify the variables and decide on the units in which each is to be measured"
(iii) #dentify the constraints and parameters for the problem"
(iv) 3ssign algebraic symbols to the objective function (usually z) and to the variables
(usually n
x x x x , , , ,
3 2 1

) and write down precise definitions including units
of measurement, for all of these"
(v) @sing a table of parameter values or otherwise, identify the linear relationships
between the objective function and the variables and between the constraints and
the variables, being careful to use consistent units when identifying these
relationships"
(vi) :rite down the objective of the problem in the form
optimise
n n
x c x c x c x c z + + + +
3 3 2 2 1 1
(vii) :rite down the non8trivial constraints where the i
th
non8trivial constraint is a
linear relationship of one of the following forms$
i n n i i i
b x a x a x a x a + + + +
, 3 3 , 1 2 2 , 1 1 ,

i n n i i i
b x a x a x a x a + + + +
, 3 3 , 1 2 2 , 1 1 ,

i n n i i i
b x a x a x a x a + + + +
, 3 3 , 1 2 2 , 1 1 ,

(viii) :rite down the non8negativity or trivial constraints
n i x
i
, , 3 , 2 , 1 , !
*.B. 3ou must always write down the tri.ial constraints
n i x
i
, , 3 , 2 , 1 , !
as
they are always an important part o, all linear programming models.
*ote1 %he constraints and the objective function need to be dimensionally consistent"
11
0"ercise 1
3 wor'shop in a ?ree' village ma'es small and large inlaid trays" +roduction involves
three processes$ cutting, firing and polishing" %he following table gives the time in hours
for each process for each type of tray and the total number of hours available in a day
together with the sale price in euros for each tray"
+rocess 9mall trays *arge trays Dours available
Autting(hours) 1 1 6
2iring(hours) 1 2 7
+olishing(hours) 2 3 13
9ale price(euros) 16 27
%he wor'shop wishes to maximize its sales receipts for its daily production, given
that it can sell all the trays it ma'es"
(a)2ormulate the wor'shop(s problem as a linear programming model"
(b) @se graphical methods to solve this model and interpret the solution
(c) %he polisher is prepared to wor' up to two hours longer each day for extra money"
0etermine whether it is worthwhile for the wor'shop to employ the polisher for
longer" #f so, how does it change your solution in (b)E Dow much longer should this
polisher wor', and for what maximum payE
0"ercise 2 (% *utritionist4s Linear Programming #odel)
%he next problem is an example of a special case of linear programming problems
'nown as ingredient or blending problems"
3 nutritionist is planning a menu in a hospital consisting of two foods A and B " Bach
ounce of Acontains 2 units of fat, 1 unit of carbohydrate and / units of protein" Bach
ounce of B contains 3 units of fat, 3 units of carbohydrates and 3 units of protein" %he
nutritionist wants the meal to provide at least 17 units of fat, at least 12 units of
carbohydrates and at least 2/ units of protein" #f an ounce of A costs 2! cent and an
ounce of B costs 21 cent, how many ounces of each food should be served to minimize
the cost of the meal and yet satisfy the nutritionist(s re,uirementsE" 2ormulate the linear
programming problem and solve graphically"
12
ome Important De,initions
.efore we study the graphical solution of linear programming problems we need a few
very important definitions"
De,inition1 %he general form of a linear programming model consists of$
(i) an objective to maximise or minimise some ,uantity z, 'nown as the objective
function, which is expressed as a linear combination of the variables
n
x x x x , , , ,
3 2 1

"
(ii) non8trivial constraints on the variables which are ine,ualities or e,uation
involving linear combinations of the variables"
(iii) %rivial or non8negative constraints on the variables to ensure that each one is
positive or zero"
#t can be expressed mathematically as follows$
optimise
n n
x c x c x c x c z + + + +
3 3 2 2 1 1
subject to
1 1 , 1 3 3 , 1 2 2 , 1 1 1 , 1
G G b b x a x a x a x a
n n
+ + + +
2 2 , 2 3 3 , 2 2 2 , 2 1 1 , 2
G G b b x a x a x a x a
n n
+ + + +

i i n n i i i i
b b x a x a x a x a + + + + G G
, 3 3 , 2 2 , 1 1 ,


n n n n n n n n
b b x a x a x a x a + + + + G G
, 3 3 , 2 2 , 1 1 ,

"
where
n i x
i
, , 3 , 2 , 1 , ! , ,
%he
) , 3 , 2 , 1 ( n j c
j

(called the cost coefficients),
) , , 2 , 1 , , , 2 , 1 (
,
n j m i a
j i


and
) , , 2 , 1 ( m i b
i

are the parameters of the model"
:e should include the running costs
c
(which are assumed to be constant though it is
often convenient to omit them) in the objective function" Dowever we are effectively
changing the objective function from the actual profit (or cost) say z say to
c z x c z
j
n
j
j

1
where c represents the total of the constant terms" #t is important, therefore, when solving
linear programming problems to remember to add the value of any constant terms
13
omitted from the objective function to the maximum (or minimum) value of z in order to
determine the correct value of the maximum profit (or minimum cost)"
>ow it is very important that we are able to convert the general ,orm of a linear
programming problem into the standard ,orm of a linear programming problem because
if we have a linear programming problem in standard form we can obtain some very
powerful theoretical results, namely the Duality 'heorem"
De,inition1 3 linear programming model is in standard ,orm if it is expressed in the
form$
&aximise x c z
T

subject to b x A

, ! x

"
*ote1 >o restriction put on the sign of b

"
%o convert a linear programming model to standard form we proceed as follows$
(1) )emove any constant term c from the objective function by replacing
c x c z
T
+

by x c z
T

where c z z "
(2) #f the problem is a minimisation problem
&inimise
x c z
T


,
rewrite it as
maximise x c z
T

where z z and c c "


(3) )emove any free variables j
x
by setting
+

j j j
x x x
where
!
+
j
x
and
!

j
x
and replacing j
x
by
+

j j j
x x x
where it occurs in the objective function and the
constraints"
(/) )emove any e,uality constraint such as
i n n i i i i
b x a x a x a x a + + + +
, 3 3 , 2 2 , 1 1 ,

either by eliminating one of the variables j
x
say, by writing
) (
1
,
,
k
n
j k
k i i
j i
j
x a b
a
x


where
) ! (
,

j i
a
1/
and replacing j
x
whenever it occurs in the objective function and the constraints, by
this combination of the other ( 1 n ) variables
or
by replacing it by the following two ine,ualities
i n n i i i i
b x a x a x a x a + + + +
, 3 3 , 2 2 , 1 1 ,

i n n i i i i
b x a x a x a x a
, 3 3 , 2 2 , 1 1 ,

(1) Ahange each constraint, such as
i n n i i i i
b x a x a x a x a + + + +
, 3 3 , 2 2 , 1 1 ,

to a constraint by changing all the signs, to give
i n n i i i i
b x a x a x a x a
, 3 3 , 2 2 , 1 1 ,

(6) #f necessary and if desired, rename the variables"
0"ample 1 Aonvert the table manufacturing problem, namely
&aximise
2 1
11! 12! x x z +
subject to
3! 3 2
2 1
+ x x

16 2
3
2
2 1
+ x x

6/ /
3
16
2 1
+ x x
where !
1
x and !
2
x to matri" standard ,orm"
olution %his is already in standard form and we just have to put it into matrix form as
follows$
&aximise x c z
T

subject to b x A

where

,
_

/
3
16
2
3
2
3 2
A
,

,
_

6/
16
3!
b

,
_

11!
12!
c

and
!
1

,
_

x
x
x

"
0"ample 2 Aonvert the our oil refinery linear programming model above,
namely
&inimize
2 1
1!! 3!! x x z +
subject to
1!!! /! 2!
2 1
+ x x
11
7!! 2! 21
2 1
+ x x "

and !
1
x and !
2
x into matri" standard ,orm"
olution 2irst we must turn the minimisation model to a maximisation model by simply
changing sign
&aximise z z 2 1
1!! 3!! x x "
>ext we change the ine,ualities into ine,ualities by multiplying them across by
1 to get
1!!! 8 /! 2!
2 1
x x
7!! 8 2! 21
2 1
x x
"
+utting above into matrix form we get the matrix standard form of the oil refinery model
namely,
&aximise x c z
T


subject to b x A

where

,
_

2! 21
/! 2!
A
,

,
_

7!
1!!!
b

,
_

1!!
3!!
c

and
!
2
1

,
_

x
x
x

"
*ote @nli'e canonical ,orm as we will see later, the standard ,orm does not insist that
! b

"#ndeed as in this case ! < b

" Dowever we must ha.e ! x

always in the standard


form"
16
0"ample ! Aonvert the our production plan linear programming model above
namely ,
&aximize
2 1
2! 3! x x z +
subject to
6! 1
2 1
+ x x
6! / 3
2 1
+ x x
6! 3 /
2 1
+ x x
and !
1
x and !
2
x into matri" standard ,orm"
olution
%his is already in standard form so all we have to do is to put it into matrix form, namely
Maximize x c z
T

subject to
b x A

,
! , x

where

,
_

3 /
/ 3
1 1
A
,

,
_

6!
6!
6!
b

,
_

2!
3!
c

and
!
!
!
2
1

,
_

,
_

x
x
x
>ote$ #n problems where we are maximizing income the parameters j
c
often represent
the contribution made to income by selling price of some product j
x
so c

is sometimes
called the price .ector" #n minimization problems the parameters j
c
often represent
costs, so c

is instead 'nown as the cost .ector" #ndeed, as any maximization problem


x c z imize
T

max can be regarded as a minimization problem by rewriting it in the
form
x c z imize
T

) ( min we often regard the components of a price vector as negati.e
costs and use the term cost .ector for both ma"imi5ation and minimi5ation problems
0"ample $ Bxpress the following linear programming model in standard form
15
&inimise 6 2
2 1
+ + x x z
subject to

5
3 2 1
x x x
7 2
/ 1
x x

! 2
/ 3 2
+ x x x
"
where , !
1
x !
3
x
and !
/
x "
olution$ 3 number of points to notice
(i) %here is a constant term in the objective function
(ii)
2
x is a free variable since
2
x is not given as !
2
x "
(iii) we have an e,uality constraint e,uation"
:e ignore the 6 in the objective function and turn minimisation into maximisation
problem
&aximise
2 1
2x x z
>o constraint on the
2
x so it is ,ree .ariable" :e could let
+

2 2 2
x x x
where !
2

+
x and !
2

x or we could just put 1 2 2


x x x
where !
2
x and
!
1
x
so objective function becomes

1 2 1
2 2 x x x z +
and first and third constraints become

85
1 3 2 1
+ x x x x

! 2
1 / 3 2
+ x x x x
"
%o treat the e,uality constraint" 9ince we have no information about the problem that led
to the model, we can have no good reason for choosing to replace it by two ine,uality
constraints" :e shall therefore substitute for
1
x
,
or
/
x
"
:e choose
/
x for then we
only have to substitute into one non8trivial and one trivial constraint, compared with one
non8trivial constraint, one trivial constraint and the objective function if we choose
1
x "
:e have from the e,uality constraint
7 2
/ 1
x x 7 2
1 /
x x "
9ubstituting for
/
x in the (new) third non8trivial constraint gives

16 /
1 3 2 1
+ x x x x
and the non8negativity constraint for
/
x becomes
!
/
x 7 2
1
x that is /
1
x "
:e must change the signs in the last (new) non8trivial constraint to give

16 /
1 3 2 1
+ + x x x x
and in /
1
x to give /
1
x "
Daving replaced
2
x by 1 2
x x
and eliminated
/
x we now have four variables
3 2 1
, , x x x
and 1
x
" #t can often help to reduce confusion, in such circumstances to
renumber the variable from 1 to / for example by relabelling 1
x
as
/
x
17
9o renumbering we recast above problem as

&aximize
/ 2 1
2 2 x x x z +
subject to

5
/ 3 2 1
+ x x x x

16 /
/ 3 2 1
+ + x x x x
/
1
x
where , !
1
x !
2
x ,
!
3
x
and !
/
x "
*ote1 Dere b

is negative"
1<
6anonical 2orm. %he standard ,orm is important since it allows us to access some
powerful theoretical results namely, the duality theorem" Dowever another very
important form of the linear programming problem is the canonical ,orm which leads to
the general method of solution of linear programming problems namely the simpler
method or algorithm" #n the canonical ,orm the ine,ualities are transformed to e,ualities
by the introduction of additional variables"
De,inition 3 linear programming model is in canonical ,orm if it is expressed in the
form
&aximise x c z
T

subject to b x A

, ! x

, ! b "
*.B %ll the signs must be chosen so that ! b .-, course x

must be ! x

"
%o express a linear programming model in canonical form
(i) )emove any constant term c from the objective function by replacing
c x c z
T
+

by x c z
T

where c z z "
(ii) #f the model is a minimisation model, i"e" minimise
&inimize
x c z
T


)ewrite as maximize x c z
T


maximise
where z z and c c

(iii) )emove any free variables j


x
by setting
+

j j j
x x x
where
!
+
j
x
and
!

j
x
and replacing j
x
by
+

j j j
x x x
wherever it occurs in the objective function and
the constraints"
(iv) 2or any
! <
i
b
, change all the signs in the corresponding constraint and reverse
the direction of any ine,uality sign"
(v) (i) Aonvert any constraint of the form
i n n i i i i
b x a x a x a x a + + + +
, 3 3 , 2 2 , 1 1 ,

to an e,uality by adding a slac' variable i n
x
+ to give
i i n n n i i i i
b x x a x a x a x a + + + + +
+ , 3 3 , 2 2 , 1 1 ,

where
!
+i n
x
"
(iii) Aonvert any constraint of the form
i n n i i i i
b x a x a x a x a + + + +
, 3 3 , 2 2 , 1 1 ,

to an e,uality by subtracting a surplus variable i n
x
+ to give
i i n n n i i i i
b x x a x a x a x a + + + +
+ , 3 3 , 2 2 , 1 1 ,

where
!
+i n
x
(iv) Bxtend c

to include zero elements i n


c
+

for the slac' and surplus


variables i n
x
+ " #f necessary and if desired renumber the variables"
0"ample 1 Aonvert the table manufacturing linear programming problem namely
2!
&aximise
2 1
11! 12! x x z +
subject to
3! 3 2
2 1
+ x x

16 2
3
2
2 1
+ x x

6/ /
3
16
2 1
+ x x
where !
1
x and !
2
x to canonical form"
olution :e must first convert the ine,ualities to e,ualities by the introduction of slac'
variable
!
3
x
, !
/
x and
!
1
x
to give

3! 3 2
3 2 1
+ + x x x

16 2
3
2
/ 2 1
+ + x x x

6/ /
3
16
1 2 1
+ + x x x
>ow ! 3!
1
> b , ! 16
2
> b and
! 6/
3
> b
and are all of the correct form and need
no changing but we must incorporate the slac' variables into the objective function thus
1 / 3 2 1
! ! ! 11! 12! x x x x x z + + + +

so that

,
_

1
/
3
2
1
c
c
c
c
c
c

,
_

!
!
!
11!
12!
%hus our linear programming model in matrix canonical form is
&aximise x c z
T

subject to b x A

, ! x

, ! b "
where

,
_

1 ! ! /
3
16
! 1 ! 2
3
2
! ! 1 3 2
A
,
!
1
/
3
2
1

,
_

x
x
x
x
x
x

,
_

!
!
!
11!
12!
c

and
!
6/
16
3!
>

,
_

21
0"ample 2 Aonvert the oil refinery, linear programming model,
namely
minimize
2 1
1!! 3!! x x z +
subject to
1!!! /! 2!
2 1
+ x x
7!! 2! 21
2 1
+ x x "

and !
1
x and !
2
x into matri" canonical ,orm"
olution 2irst we must turn the minimisation model to a maximisation model by simply
changing sign
&aximise z z 2 1
1!! 3!! x x "
>ext we turn the ine,ualities into e,ualities by subtracting surplus .ariables
!
3
x
and !
/
x to give

1!!! /! 2!
3 2 1
+ x x x
7!! 2! 21
/ 2 1
+ x x x
with !
1
x , !
2
x ,
!
3
x
and !
/
x "
3lso we have to add these surplus to the objective function
z 1 / 3 2 1
! ! ! 1!! 3!! x x x x x + + +
"
%he
s
i
b
H
are of the correct form namely, ! 1!!!
1
> b and ! 7!!
2
> b "
Dence our oil refinery linear programming model in matri" canonical ,orm is
&aximise x c z
T

subject to b x A

, ! x

, ! b "
where

,
_

1 ! 2! 21
! 1 /! 2!
A
,
!
/
3
2
1

,
_

x
x
x
x
x

,
_

7!
1!!!
b

and

,
_

!
!
1!!
3!!
c

"
22
0"ample ! Aonvert the our production plan linear programming model above
namely ,
&aximize
2 1
2! 3! x x z +
subject to
6! 1
2 1
+ x x
6! / 3
2 1
+ x x
6! 3 /
2 1
+ x x
and !
1
x and !
2
x into matri" canonical ,orm"
olution
2irst we turn the ine,ualities into e,ualities by adding slac7s .ariables
!
3
x
, !
/
x
and
!
1
x
to give

6! 1
3 2 1
+ + x x x
! 6 / 3
/ 2 1
+ + x x x

! 6 3 /
1 2 1
+ + x x x
with !
1
x , !
2
x ,
!
3
x
, !
/
x "and
!
1
x
"
>ext the objective function has to be changed to accommodate the slac' variables" %hus


1 / 3 2 1
! ! ! 2! 3! x x x x x z + + + +
"
%he
s
i
b
H
are of the correct form namely, ! 6!
1
b , ! 6!
2
b and
! 6!
3
b
"
%hus the production plan linear programming model in matri" canonical ,orm is
&aximise x c z
T

subject to b x A

, ! x

, ! b "
where

,
_

1 ! ! 3 /
! 1 ! / 3
! ! 1 1 1
A
,
!
1
/
3
2
1

,
_

x
x
x
x
x
x

,
_

!
!
!
2!
3!
c

and
!
6!
6!
6!

,
_

23
0"ercise ! Aonvert the ?ree' wor'shop linear programming problem , namely
&aximize
2 1
27 16 x x z +
subject to
6
2 1
+ x x
7 2
2 1
+ x x
13 3 2
2 1
+ x x
and !
1
x and !
2
x
into (1) standard form and (2) canonical form"
0"ercise $ Aonvert the nutritionist(s linear programming namely,
&inimize
2 1
21 2! x x z +
subject to
17 3 2
2 1
+ x x
12 3
2 1
+ x x
2/ 3 /
2 1
+ x x
!
1
x and !
2
x ,
into (1) standard form and (2) canonical form"

2/
21

You might also like