Mechanical Engineering Operation-Research Linear-Programming Notes
Mechanical Engineering Operation-Research Linear-Programming Notes
com
OPERATIONS RESEARCH
Unit 1: Linear Programming
1. INTRODUCTION
1.1 TERMINOLOGY
The British/Europeans refer to "operational research", the Americans to "operations
research" - but both are often shortened to just "OR" (which is the term we will use).
Another term which is used for this field is "management science" ("MS"). The
Americans sometimes combine the terms OR and MS together and say "OR/MS" or
"ORMS".
Yet other terms sometimes used are "industrial engineering"("IE"), "decision science"
("DS"), and “problem solving”.
In recent years there has been a move towards a standardization upon a single term for
the field, namely the term "OR".
1
www.getmyuni.com
organization choose the decision maker(s) choose the one that best meets her/his/their
needs.
After presenting the results of the OR study to the decision maker(s), the analyst may find
that s/he does not (or they do not) approve of the recommendations. This may result from
incorrect definition of the problem on hand or from failure to involve decision maker(s)
from the start of the project. In this case, the analyst should return to Step 1, 2, or 3.
Step 7. Implement and Evaluate Recommendation: If the decision maker(s) has
accepted the study, the analyst aids in implementing the recommendations. The system
must be constantly monitored (and updated dynamically as the environment changes) to
ensure that the recommendations are enabling decision maker(s) to meet her/his/their
objectives.
1.3 HISTORY OF OR
OR is a relatively new discipline. Whereas 70 years ago it would have been possible to
study mathematics, physics or engineering (for example) at university it would not have
been possible to study OR, indeed the term OR did not exist then. It was only really in the
late 1930's that operational research began in a systematic fashion, and it started in the
UK.
Early in 1936 the British Air Ministry established Bawdsey Research Station, on the east
coast, near Felixstowe, Suffolk, as the centre where all pre-war radar experiments for
both the Air Force and the Army would be carried out. Experimental radar equipment
was brought up to a high state of reliability and ranges of over 100 miles on aircraft were
obtained.
It was also in 1936 that Royal Air Force (RAF) Fighter Command, charged specifically
with the air defense of Britain, was first created. It lacked however any effective fighter
aircraft - no Hurricanes or Spitfires had come into service - and no radar data was yet fed
into its very elementary warning and control system.
It had become clear that radar would create a whole new series of problems in fighter
direction and control so in late 1936 some experiments started at Biggin Hill in Kent into
the effective use of such data. This early work, attempting to integrate radar data with
ground based observer data for fighter interception, was the start of OR.
The first of three major pre-war air-defense exercises was carried out in the summer of
1937. The experimental radar station at Bawdsey Research Station was brought into
operation and the information derived from it was fed into the general air-defense
warning and control system. From the early warning point of view this exercise was
encouraging, but the tracking information obtained from radar, after filtering and
transmission through the control and display network, was not very satisfactory.
In July 1938 a second major air-defense exercise was carried out. Four additional radar
stations had been installed along the coast and it was hoped that Britain now had an
aircraft location and control system greatly improved both in coverage and effectiveness.
Not so! The exercise revealed, rather, that a new and serious problem had arisen. This
was the need to coordinate and correlate the additional, and often conflicting, information
2
www.getmyuni.com
received from the additional radar stations. With the out-break of war apparently
imminent, it was obvious that something new - drastic if necessary - had to be attempted.
Some new approach was needed.
Accordingly, on the termination of the exercise, the Superintendent of Bawdsey Research
Station, A.P. Rowe, announced that although the exercise had again demonstrated the
technical feasibility of the radar system for detecting aircraft, its operational
achievements still fell far short of requirements. He therefore proposed that a crash
program of research into the operational - as opposed to the technical - aspects of the
system should begin immediately. The term "operational research" [RESEARCH into
(military) OPERATIONS] was coined as a suitable description of this new branch of
applied science. The first team was selected from amongst the scientists of the radar
research group the same day.
In the summer of 1939 Britain held what was to be its last pre-war air defense exercise. It
involved some 33,000 men, 1,300 aircraft, 110 antiaircraft guns, 700 searchlights, and
100 barrage balloons. This exercise showed a great improvement in the operation of the
air defense warning and control system. The contribution made by the OR teams was so
apparent that the Air Officer Commander-in-Chief RAF Fighter Command (Air Chief
Marshal Sir Hugh Dowding) requested that, on the outbreak of war, they should be
attached to his headquarters at Stanmore.
On May 15th 1940, with German forces advancing rapidly in France, Stanmore Research
Section was asked to analyze a French request for ten additional fighter squadrons (12
aircraft a squadron) when losses were running at some three squadrons every two days.
They prepared graphs for Winston Churchill (the British Prime Minister of the time),
based upon a study of current daily losses and replacement rates, indicating how rapidly
such a move would deplete fighter strength.
No aircraft were sent and most of those currently in France were recalled. This is held by
some to be the most strategic contribution to the course of the war made by OR (as the
aircraft and pilots saved were consequently available for the successful air defense of
Britain, the Battle of Britain).
In 1941 an Operational Research Section (ORS) was established in Coastal Command
which was to carry out some of the most well-known OR work in World War II.
Although scientists had (plainly) been involved in the hardware side of warfare
(designing better planes, bombs, tanks, etc) scientific analysis of the operational use of
military resources had never taken place in a systematic fashion before the Second World
War. Military personnel, often by no means stupid, were simply not trained to undertake
such analysis.
These early OR workers came from many different disciplines, one group consisted of a
physicist, two physiologists, two mathematical physicists and a surveyor. What such
people brought to their work were "scientifically trained" minds, used to querying
assumptions, logic, exploring hypotheses, devising experiments, collecting data,
analyzing numbers, etc. Many too were of high intellectual caliber (at least four wartime
OR personnel were later to win Nobel prizes when they returned to their peacetime
disciplines).
3
www.getmyuni.com
By the end of the war OR was well established in the armed services both in the UK and
in the USA.
OR started just before World War II in Britain with the establishment of teams of
scientists to study the strategic and tactical problems involved in military operations. The
objective was to find the most effective utilization of limited military resources by the use
of quantitative techniques.
Following the end of the war OR spread, although it spread in different ways in the UK
and USA.
You should be clear that the growth of OR since it began (and especially in the last 30
years) is, to a large extent, the result of the increasing power and widespread availability
of computers. Most (though not all) OR involves carrying out a large number of numeric
calculations. Without computers this would simply not be possible
1.4WHAT IS OPERATIONS RESEARCH?
Operations
• The activities carried out in an organization.
Research
• The process of observation and testing characterized by the scientific method.
Situation, problem statement, model construction, validation, experimentation,
candidate solutions.
Model
• An abstract representation of reality. Mathematical, physical, narrative, set of rules in
computer program.
Systems Approach
• Include broad implications of decisions for the organization at each stage in analysis.
Both quantitative and qualitative factors are considered.
Optimal Solution
• A solution to the model that optimizes (maximizes or minimizes) some measure of
merit over all feasible solutions.
Team
• A group of individuals bringing various skills and viewpoints to a problem.
4
www.getmyuni.com
Formulate the
Problem
Situation Problem
Implement a Solution Statement
Data
Construct
a Model
Implement
the Solution
Model
Solution
Find
a Solution
Establish
a Procedure
5
www.getmyuni.com
The Situation
• May involve current operations or proposed expansions due to expected market shifts
• May become apparent through consumer complaints or through employee
suggestions
• May be a conscious effort to improve efficiency or response to an unexpected crisis.
Situation
Data
Example: Internal nursing staff not happy with their schedules; hospital using too many
external nurses.
Formulate the
Problem
Situation Problem
Statement
Data
• Describe system
• Define boundaries
• State assumptions
• Select performance measures
• Define variables
• Define constraints
• Data requirements
6
www.getmyuni.com
L o n g -te rm p la n n in g
– FT R s, P T R s, P T Fs
– S h if ts
– D ays o ff
W e e k ly s c h e d u lin g
– V a c a tio n s , le a v e
– O v e rtim e
– P T F s , c a s u a ls
– T a s k a s s ig n m e n ts
R e a l-tim e c o n tr o l
– E m e rg e n c ie s
– D a ily a d ju s tm e n ts
– S ic k le a v e
– O v e rtim e
Situation Problem
statement
Formulate the
Problem
Data
Construct
a Model
Model
7
www.getmyuni.com
Model
Find a
solution
Solution Tools
Example: Read nurse profiles and demand requirements, apply algorithm, post-processes
results to get monthly schedules.
1.6.6 Implementation
• A solution to a problem usually implies changes for some individuals in the
organization
• Often there is resistance to change, making the implementation difficult
• User-friendly system needed
• Those affected should go through training
Situation
Implement
the Procedure
Procedure
8
www.getmyuni.com
Example: Implement nurse scheduling system in one unit at a time. Integrate with
existing HR and T&A systems. Provide training sessions during the workday.
Real World
Situation
TP LP DS
Problems
Models
LP NFP TP
Methods
Simplex interior
9
www.getmyuni.com
10
www.getmyuni.com
1. Problem Formulation
2. Model building
3. Data collection
4. Data Analysis
5. Coding
8. Analysis of results
11
www.getmyuni.com
12
www.getmyuni.com
Guessing
To explore the Two Mines problem further we might simply guess (i.e. use our judgment)
how many days per week to work and see how they turn out.
Solution
What we have is a verbal description of the Two Mines problem. What we need to do is
to translate that verbal description into an equivalent mathematical description.
In dealing with problems of this kind we often do best to consider them in the order:
.. Variables
.. Constraints
.. Objective
This process is often called formulating the problem (or more strictly formulating a
mathematical representation of the problem).
Variables
These represent the "decisions that have to be made" or the "unknowns".
Let
x = number of days per week mine X is operated
y = number of days per week mine Y is operated
Note here that x >= 0 and y >= 0.
Constraints
13
www.getmyuni.com
It is best to first put each constraint into words and then express it in a mathematical
form.
ore production constraints - balance the amount produced with the quantity required
under the smelting plant contract
Ore
High 6x + 1y >= 12
Medium 3x + 1y >= 8
Low 4x + 6y >= 24
days per week constraint - we cannot work more than a certain
maximum number of days a week e.g. for a 5 day week we have
x <= 5
y <= 5
Inequality constraints
Note we have an inequality here rather than an equality. This implies that we may
produce more of some grade of ore than we need. In fact we have the general rule: given
a choice between an equality and an inequality choose the inequality
For example - if we choose an equality for the ore production constraints we have the
three equations 6x+y=12, 3x+y=8 and 4x+6y=24 and there are no values of x and y
which satisfy all three equations (the problem is therefore said to be "over-constrained").
For example the values of x and y which satisfy 6x+y=12 and 3x+y=8 are x=4/3 and
y=4, but these values do not satisfy 4x+6y=24.
The reason for this general rule is that choosing an inequality rather than an equality
gives us more flexibility in optimizing (maximizing or minimizing) the
objective(deciding values for the decision variables that optimize the objective).
Implicit constraints
Constraints such as days per week constraint are often called implicit constraints because
they are implicit in the definition of the variables.
14
www.getmyuni.com
Objective
Again in words our objective is (presumably) to minimize cost which is given by 180x +
160y
Hence we have the complete mathematical representation of the problem:
minimize 180x + 160y
subject to 6x + y >= 12
3x + y >= 8
4x + 6y >= 24
x <= 5
y <= 5
x,y >= 0
Some notes
The mathematical problem given above has the form
all variables continuous (i.e. can take fractional values)
a single objective (maximize or minimize)
the objective and constraints are linear i.e. any term is either a constant or a constant
multiplied by an unknown (e.g. 24, 4x, 6y are linear terms but xy is a non-linear term)
Any formulation which satisfies these three conditions is called a linear program (LP).
We have (implicitly) assumed that it is permissible to work in fractions of days -
problems where this is not permissible and variables must take integer values will be
dealt with under Integer Programming (IP).
Discussion
This problem was a decision problem.
We have taken a real-world situation and constructed an equivalent mathematical
representation - such a representation is often called a mathematical model of the real-
world situation (and the process by which the model is obtained is called formulating the
model).
Just to confuse things the mathematical model of the problem is sometimes called the
formulation of the problem.
Having obtained our mathematical model we (hopefully) have some quantitative method
which will enable us to numerically solve the model (i.e. obtain a numerical solution) -
such a quantitative method is often called an algorithm for solving the model.
Essentially an algorithm (for a particular model) is a set of instructions which, when
followed in a step-by-step fashion, will produce a numerical solution to that model.
15
www.getmyuni.com
Our model has an objective that is something which we are trying to optimize. Having
obtained the numerical solution of our model we have to translate that solution back into
the real-world situation.
"OR is the representation of real-world systems by mathematical models together with
the use of quantitative methods (algorithms) for solving such models, with a view to
optimizing."
16
www.getmyuni.com
Definition:
Linear programming (LP) or Linear Programming Problem (LPP)
The general LPP calls for optimizing (MAX/MIN) a linear function of variables called
the OBJECTIVE FUNCTION subject to a set of linear equations and or inequalities
called for CONSTRAINTS or RESTRICTIONS.
Linear programming problem arises whenever two or more candidates or activities are
competing for limited resources.
Art of Modeling:
Models are developed as exact representation of real situations in the sense that no
approximations are used.
The figure below depicts the level of abstraction from the real situation by concentrating
on the dominant variables that control the behavior of the real system.
Abstract
Real MODEL
World
Real
System
17
www.getmyuni.com
A first level defining the boundaries of the assumed real world and the two dominate
variables
1. Production rate.
2. Consumption rate.
Mathematical formulation:
A mathematical program is an optimization problem in which the objective and
constraints are given as mathematical functions and functional relationships.
The procedure for mathematical formulation of a LPP consists of the following steps
Step3: formulate the other conditions of the problem such as resource limitation, market,
constraints, and interrelations between variables etc., linear in equations or equations in
terms of the decision variables.
The objective function set of constraint and the non-negative constraint together form a
Linear Programming Problem.
18
www.getmyuni.com
cj ( j = 1,2----n) is the objective function in equations (a) are called cost coefficient (max
profit or min cost)
bi (i= 1,2,----m) defining the constraint requirements or available in equation(b) or
available in equation (b) is called stipulations and the constants aij (i=1,2,----m; j= 1,2,---
n)are called structural co-efficient in equation (c) are known as non-negative restriction
Matrix form
19
www.getmyuni.com
Problem 1
A Manufacture produces two types of models M1 and M2 each model of the type M1
requires 4 hrs of grinding and 2 hours of polishing, where as each model of the type M2
requires 2 hours of grinding and 5 hours of polishing. The manufactures have 2 grinders
and 3 polishers. Each grinder works 40 hours a week and each polishers works for 60
hours a week. Profit on M1 model is Rs. 3.00 and on Model M2 is Rs 4.00. Whatever
produced in week is sold in the market. How should the manufacturer allocate is
production capacity to the two types models, so that he may make max in profit in week?
Solutions:
No of grinders are 2 and the hours available in grinding machine is 40 hrs per week,
therefore, total no of hours available of grinders is 2 X 40 = 80 hours
No of polishers are 3 and the hours available in polishing machine is 60 hrs per week,
therefore, total no of hours available of polishers is 3 X 60 = 180 hours
20
www.getmyuni.com
Problem 2:
Egg contains 6 units of vitamin A per gram and 7 units of vitamin B per gram and cost 12
paise per gram. Milk contains 8 units of vitamin A per gram and 12 units of vitamin B
per gram and costs 20 paise per gram. The daily requirements of vitamin A and vitamin B
are 100 units and 120 units respectively. Find the optimal product mix.
Problem 3: A farmer has 100 acre. He can sell all tomatoes. Lettuce or radishes he raise
the price. The price he can obtain is Re 1 per kg of tomatoes, Rs 0.75 a head for lettuce
and Rs 2 per kg of radishes. The average yield per acre is 2000kg tomatoes, 3000 heads
of lettuce and 1000 kgs of radishes. Fertilizer is available at Rs 0.5 per kg and the amount
required per acre 100 kgs each for tomatoes and lettuce, and 50 kgs for radishes. Labor
required for sowing, cultivating and harvesting per acre is 5 man-days for tomatoes and
radishes, 6 man-days for lettuce. A total of 400 man days of labor available at Rs 20 per
man day formulate the problem as linear programming problem model to maximize the
farmers’ total profit.
Formulation:
Farmer’s problem is to decide how much area should be allotted to each type of crop. He
wants to grow to maximize his total profit.
Let the farmer decide to allot X1, X2 and X3 acre of his land to grow tomatoes, lettuce and
radishes respectively.
So the farmer will produce 2000 X1 kgs of tomatoes, 3000 X2head of lettuce and 1000 X3
kgs of radishes.
Profit= sales – cost
= sales – (Labor cost +fertilizer cost)
Sales = 1x 2000 X1 + 0.75 x 3000 X2 + 2 x 1000 X3
Labor cost = 5x 20 X1 + 6 x 20 X2 + 5 x 20 X3
Fertilizer cost = 100x0.5 X1 + 0.5x 100 X2 + 0.5x50 X3
21
www.getmyuni.com
Problem 4:
A Manufacturer of biscuits is considering 4 types of gift packs containing 3 types of
biscuits, orange cream (oc), chocolate cream (cc) and wafer’s(w) market research study
conducted recently to assess the preferences of the consumers shows the following types
of assortments to be in good demand.
Assortments Contents Selling Price per kg
in Rs
A Not less than 40% of OC 29
Not more than 20% of CC
Any quantity of W
For the biscuits the manufacture capacity and costs are for given below.
Biscuits variety Plant Capacity Kg/ day Manufacture cost Rs / Kg
OC 200 8
CC 200 9
W 150 7
Formulate a LP model to find the production schedule which maximizes the profit
assuming that there are no market restrictions.
Formulation: the company manufacturer 4 gift packs which oc, cc and w. the quantity of
ingredients in each pack is not known.
Let x11 denotes the quantities OC of gift pack A
x12 denotes the quantities CC of gift pack A
x13 denotes the quantities W of gift pack A
x21 denotes the quantities OC of gift pack B
x22 denotes the quantities CC of gift pack B
x23 denotes the quantities W of gift pack B
x31 denotes the quantities OC of gift pack C
x32 denotes the quantities CC of gift pack C
x33 denotes the quantities W of gift pack C
x41 denotes the quantities OC of gift pack D
x42 denotes the quantities CC of gift pack D
x43 denotes the quantities W of gift pack D
22
www.getmyuni.com
Max Z = 20(x11 +x12 +x13) + 25(x21 +x22 +x23 )+ 22(x31 +x32 +x33 )
+ 12(x41 +x42 +x43 ) – 8(x11+x21+x31+ x41) - 9(x12+x22+x32 +x42 ) - 7(x13
+x23+x33+x43 )
STC
Gift pack A
x11 >= 0.4 (x11 +x12 +x13)
x12 <= 0.2 (x11 +x12 +x13)
Gift pack B
x21 >= 0.2 (x21 +x22 +x23 )
x12 <= 0.2 (x21 +x22 +x23 )
Gift pack C
x31 >= 0.2 (x31 +x32 +x33 )
x32 <= 0.2 (x31 +x32 +x33 )
Graphical Method:
The graphical procedure includes two steps
1. Determination of the solution space that defines all feasible solutions of the
model.
2. Determination of the optimum solution from among all the feasible points in the
solution space.
23
www.getmyuni.com
In the minimization case, this line will stop nearest to the origin and passing
through at least one corner of the feasible region.
Find the co-ordination of the extreme points selected in step 6 and find the
maximum or minimum value of Z.
Problem 1
Max Z =3x1 + 5x2
STC
x1 <= 4
2x2 <=12
3x1 + 2x2 <= 18
x1, x2 >= 0
Solution
x1 <= 4 x1 = 4 2x2 <=12 2x2=12, x2 =6
x2 x2
4 4
x1 x1
9
x2
6 c
b
O a
X1 4 6
By extreme Point method
O=(0,0) Z=0
A=(4,0) Z=12
B=(4,3) Z=12+15=27
C=(2,6) Z= 6+30 =36
D= (0,6) Z= 30
24
www.getmyuni.com
Z
II constraints
II constraints
Z I constraint
Z1
Z1
By objective function line method,
To find the point of Max value of Z in the feasible region we use objective function line
as ZZ1 , same type of lines are used for different assumed Z value to find the Max Z in
the solution space as shown in the above figure.
Let us start = 10
Max Z=10 =3x1 + 5x2 this will show the value as (3.33,2) by plotting this points in the
solution space it explains that Z must be large as 10 we can see many points above this
line and within the region.
When Z=20
Max Z=20 =3x1 + 5x2 this will show the value as (6.66, 4) by plotting this points in the
solution space z must be at least 20. The trial and error procedure involves nothing more
than drawing a family of parallel lines containing at least one point in the permissible
region and selecting the distance from the origin. This lines passes through the points
(2,6) or Z=36
Max Z = 36= 3x1 + 5x2 the points are (12, 7.2) this points lies at the intersection of the 2
lines 2x2 =12 and 3x1 + 2x2 = 18. so, this point can be calculated algebraically as the
simultaneous solutions of these 2 equation.
Conclusions:
The solution indicates that the company should produce products 1 & 2 at the rate of 2
per minute an d6 / minute respectively with resulting profitable of 36 / minute.
25
www.getmyuni.com
X2
4/3 A
B
O
2 C 8/3
X1
At point O (0,0) Z=
C (2,0) Z=
B (1.8,1) Z=
A (0,4/3) Z=
26
www.getmyuni.com
Solution space
Solutions mean the final answer to a problem
Solutions space to a LPP is the space containing such points. The co-ordinates of which
satisfy all the constraints simultaneously. The region of feasibility of all the constraints
including non-negativity requirements.
Solution space
Feasible:
The feasible region for an LP is the set of all points that satisfies all the LPs constraints
and sign restrictions.
Feasible
Region
Basic feasible
A basic feasible solution is a basic solution which also satisfies that is all basic variables
are non-negative.
Example:
4x1 + 2x2 <= 80 we add x3 as slack variable
2x1 + 5x2 <= 180 we add x4 as slack variable
4 2 1 0 1 0
2 5 0 1 0 1 is unit matrix is called basic feasible solution
27
www.getmyuni.com
Optimal
Any feasible solution which optimizes (Min or Max) the objective function of the LPP is
called its optimum solution.
Redundancy;
A set of constraint is said to be redundant if one or more of them are automatically
satisfied on the basis of the requirement of the others.
Ex:
2x1 + x2 <= 20 (10,20)
2x1 + x2 <= 35 (17.5, 35)
x1 + 2x2 <= 20 (20,10)
A redundant constraint system is one in
which deletion of at least one of the
constraint will not alter the solution
space.
28
www.getmyuni.com
Degeneracy
A basic feasible solution is said to degenerate if one or more basic variable are zero.
The values of the variables may be increases indefinitely without violating any of the
constraint i.e., the solution space is unbounded in at least one direction.
As result the objective function value may increase or decrease indefinitely.
Ex;
x1 - x2 <= 10 (10,-10)
2x1 <=40 (20,0)
I constraint
Unbounded solutions
II constraint Space
Standard form
The standard form of a linear programming problem with m constraints and n variables
can be represented as follows:
Now, considering how a LPP can be formulated in the standard form will be as follows:
Case (a): if a problem aims at minimizing the objective function. Then it can be
converted into a maximization problem simply by multiplying the objective by (-1)
29
www.getmyuni.com
Case (b): if a constraint is of <= type , we add a non negative variable called slack
variables is added to the LHS of the constraint on the other hand if the constraint is of >=
type, we subtract a non-negative variable called the surplus variable from the LHS.
Case (c) when the variables are unrestricted in sign it can be represented as
Xj = X1 j – X11 j or X1 = X1 1 – X11 1
It may become necessary to introduce a variable that can assume both +ve and –ve
values. Generally, unrestricted variable is generally replaced by the difference of 2 non -
ve variables.
Problem 1:
Rewrite in standard form the following linear programming problem
Min Z =12x1 + 5x2
STC
5x1 + 3x2 >= 15
7x1 + 2x2 <= 14
x1 , x2 >= 0
Solution:
Since, the given problem is minimization then it should be converted to maximization by
just multiply by (-1) and the first constraint is >= type it is standard by adding by surplus
variable as x3>=0 and 2nd constraint is <= type it is standard by adding slack variable and
then the given problem is reformulated as follows:
5 3 -1 0 x1 15
72 01 x2 = 14
x3
x4
x1 , x2 , x3 , x4 >= 0
30
www.getmyuni.com
Problem 2:
Rewrite in standard form the following linear programming problem
Max Z =2x1 + 5x2 + 4x3
STC
-2x1 + 4x2 <= 4
x1 + 2x2+x3 >=5
2x1 + 3x3 <= 2
x1 , x2 >= 0 x3 is unrestricted in sign
Solution:
In the given problem it is maximization problem and the constraint are of in equations.
The first constraint is <= type we introduce slack variable as x4 >=0, 2nd constraint is of
>= type, we introduce surplus variable as x5 >=0 and third constraint is <= type we
introduce slack variable as x6 >=0. the x3 variable is un restricted in sign. So, this can be
written as X3 = X1 3 – X11 3
Then, the given LPP is rewritten as
Max Z =2x1 + 5x2 + 4X1 3 – 4X11 3 + 0x4 - 0x5+ 0x6
STC
-2x1 + 4x2 + x4 = 4
x1 + 2x2+ X1 3 – X11 3 - x5 =5
2x1 + 3 X1 3 – 3X11 3 + 0x6= 2
x1 , x2 , x1 3, x11 3, x4 ,x5, x6 >= 0
31
In order to develop a general solutions for LPP having more than 2 variables the LPP
must be put in the standard form.
The ideas conveyed by the graphical LP solution lay the foundation for the development
of the algebraic simplex method.
The simplex method is developed by G.B Dantzig is an iterative procedure for solving
linear programming problem expressed in standard form. In addition to this simplex
method requires constraint equations to be expressed as a canonical system form which a
basic feasible solution can be readily obtained
The solutions of any LPP by simplex algorithm the existence of an IBFS is always
assumed, the following steps help to reach an optimum solution of an LPP.
32
Procedure for Maximization
Step 1 write the given LPP in standard form
Step 2 check whether the objective function of the given LPP is to be Maximized or
minimized if its to be minimized then we convert it into a problem of maximizing using
the result.
Min z = - Max Z or ( -Z )
Step 3 check whether all bi (i=123…..m0 are non-negative. if anyone bi is –VE, then
multiply the corresponding in equation of the constraint by -1.
Step 4 Convert all the in equations of the constraint into equations by introducing slack or
surplus variable in the constraints. Put these costs equal to zero in objective cost.
Step 5 Obtain an IBFS to problem in the form identity matrix form in canonical form
1 0 0 and put it in the 1st column of simples table.
010
001
Step 7 if there are more than one –ve (Zj – Cj) then choose the most –ve of them then it
will become key column
i)if all the no’s in the key column is –ve then there is an unbounded solutions to the given
problem
ii)if at least one Xm >0 (m =123…n) then the corresponding vector Xm >=0 (m=1,2,3…n)
then the corresponding vector Xm entry the basis of solution column
33
Step 8 compute the ratios = solutions column no / key column no.
And choose the minimum of them. Let the minimum of these ratios be the key row these
variable in the basic variable column of the key row will become the leaving element or
variable.
Step 9 using the below relation to find new no of other than key row and new no for key
row also
Step 10 go to step5 and repeat the computational procedure until either an optimum
solutions is obtained or there is an indication of an unbounded solution.
Note : case 1 in case of a tie for entering basis vector. i.e., there are 2 or more Zj – Cj
which are equal and at the same time the highest –ve values then arbitrary selection of
any one of them will not alter optimality.
Case 2 in case of a tie for the leaving variable i.e., there are 2 or more min ratio column
i.e., (solution no / key column no) which are equal and greater than zero then arbitrary
select any one of them will not alter optimality. But, if the tied ratios are zeros then
charnes method of penalty should be followed.
34
Problem 1:
Use simplex method to solve the given LPP
Max Z =5x1 + 3x2
STC
x1 + x2 <= 2
5x1 + 2x2 <= 10
3x1 + 8x2 <= 12
x1, x2 >= 0
Solution:
Step 1: Since the problem is maximization problem all the constraint are <= type and the
requirements are +ve. This satisfies the simplex method procedure.
Step 2: since all the constraints are <= type we introduce the slack variables for all the
constraints as x3 >=0, x4 >=0, x5 >=0 for the I II and III constraint
35
Step 5 : since, considering sub-matrix from the matrix are which form basic variables for
the starting table of simplex
(1 0 0) (0 1 0) (0 0 1) are linearly independent column vectors of A.
Therefore, the sub Matrix is
100
B= 010
001
The corresponding variables of the sub matrix is (x3, x4 ,x5) and these variables are the
basic variables for the starting iteration of the simplex problem and there obvious initial
basic feasible solutions are (x3, x4 ,x5) = (2, 10, 12)
5 3 0 0 0
Basic Profit / soluti x2 x3 x4 x5 Min Ratio =
Variable ( Unit on x1 soln. no /key
Leaving
B V) (P/U) column No.
variable
0 2 1 1 1 0 0 2/1 = 2
xx34 0 10 5 2 0 1 0 10/5 = 2
x5 0 12 3 8 0 0 1 12/3 = 4
Max Z= =0x1 =0x1 =0x1 =0x0 =0x0
0x2+0x10 +0x5 +0x2 +0x0 +0x1 +0x0
+0x12 +0x3 +0x8 +0x0 +0x0 +0x1
-5 -3 -0 -0 -0
-5 -3 0 0 0
36
5 3 0 0 0
Basic Profit / solution x1 x2 x3 x4 x5 Min Ratio
Variable ( Unit = soln. no
B V) (P/U) /key
column
No.
x1 5 2 1 1 1 0 0
x4 0 0 0 -3 -5 1 0
x5 0 6 0 5 -3 0 1
Max Z= =5x1+ =5x1+0 =5x1 =5x0+ =5x0+
5x2+0x0+0x6 0x0 x-3 +0x-5 0x1+0 0x0+0
=10 +0x0- +0x5 -3 + 0x-3 - x0-0 x1-0
5 0
0 2 5 0 0
New Numbers for Key row other than key rows new no is
Soln.= old no / Key element found by using the following
= 2/ =2 formulae
x1 = 1/1 = 1 New No=old element – PCE*NPRE
x2 = 1/1 = 1 for x4 row new no are
x3 = 1/1 = 1 Soln. = 10-5*2= 0
x4 = 0/1 = 0 x1 = 5-5*1 = 0
x5 = 0/1 = 0 x2 = 2-5*1 = -3
x3 = 0-5*1 = -5
x4 = 1-5*0 =1
x5 = 0 -5*0 =0
for x5 row the new no are
Soln. = 12-3*2 =6
x1 =3-3*1 = 0
x2 = 8-3*1 = 5
x3 = 0-3*1 = -3
x4 = 0-3*0 = 0
x5 = 1 -3*0 = 1
37
Since, the given problems net evaluation row is +ve, then given problem as attained the
optimum
Problem no 2
Solve the given problem by simplex method
Max Z =107x1 + x2 +2 x3
STC
14x1 + x2 - 6x3 +3x4 =7
16x1 + 1/2x2 -6x3 <= 5
16x1 - 8x2 - x3 <= 0
x1, x2, x3, x4 >= 0
Solutions:
In the given problem the objective function is MaxZ and it has only three variables.
The I constraint is of standard form already slack variable is introduced as x4 >= 0 and
the value should be one but, it is having 3 due this it should be divided by three for enter
equation on both sides and II & III constraint are of <= type so we introduce x5 >= 0 x6
>= 0 as slack variable.
Then the given problem can be rewritten as
Max Z =107x1 + x2 +2 x3+ 0x4 +0 x5 +0 x6
STC
14/3x1 + 1/3 x2 – 6/3x3 +3/3x4 = 7/3
16x1 + 1/2x2 - 6x3+ x5 =5
16x1 - 8x2 - x3 + x6 =0
x1,x2,x3,x4 x5 x6 >= 0
38
The matrix form
Max Z= (107, 1, 2, 0, 0, 0) (x1, x2, x3, x4 ,x5, x6)
STC
14/3 1/3 -2 1 0 0 x1
16 1/2 -6 0 1 0 x2 7/3
16 -1 -1 0 0 1 x3 = 5
x4 0
x5
x6
x1,x2,x3,x4 x5 x6 >= 0
39
First Table 1:
107 1 2 0 0 0
Basic Profit Solu x1 x2 x3 x4 x5 x6 Min ratio
variable /unit tion =Soln. no/ Pivot
(B.V) P/U column no
x1 107 0.5 1 3/14 1 3/14 0 0
x5 0 -3 0 -41/14 -22 -48/14 1 0
x6 0 -8 0 -62/14 - 17 -48/14 0 1
Max Z = 107 =(1x107 =(107x3 = (107 x =(107x3 =(107 =(107x0
x 0.5 + 0 x -3 +0x0 /14 + 0 x 1+0x- /14 + 0 x x 0 +0 + 0x0
+0 x -8 = 0 +0x0) -41/14 + 22 + 0 -48/14 x 1+ 0 +0x1) -
-107 0x- x-17) -2 +0x- x 0) - 0
62/14) - 48/14) 0
1 -0
Max Z=53.5 0 +ve +ve +ve +ve 0
New Numbers for Key row other than key rows new no is
Soln.= old no / Key element found by using the following
= 7/3/ 14/3 =0.5 formulae
x1 = 14/3 / 14/3 = 1 New No=old element – PCE*NPRE
x2 = 1/14/3 = 3/14 for x5 row new no are
x3 = -6 / 14/3 = 1 Soln. = 5-16*0.5= -3
x4 = 1/14/3 = 3/14 x1 = 16-16*1 = 0
x5 = 0/14/3 = 0 x2 = 1/2-16*3/14 = -41/14
x6 = 0/14/3 = 0 x3 = -6-16*1 = -22
for x6 row the new no are x4 = 0-16*3/14= - 48/14
Soln. = 0-16*0.5 = -8 x5 = 1 -16*0 =1
x1 =16-16*1 = 0 x6 = 0 -16*0 =0
x2 = -1-16*3/14 = -62/14
x3 = -1-16*1 = -17
x4 = 0-16*3/14 = -48/14
x5 = 0 -16*0 =0
x6 = 1 -16*0 =1
40
Since, all the NER is positive then given problem is optimal
Therefore, x1 = 0.5, x2= 0, x3= 0, x4= 0, x5= - 3, x6= - 8
Max Z = 107*0.5 + 1*0 +2*0+ 0*0 +0*-3 +0* -8
= 53.5
Problem 3:
41
Matrix form
Starting table 4 5 9 11 0 0 0
variable unit
x5 0 7 1 1 1 1 1 0 0 7/1
x6 0 120 7 5 3 2 0 1 0 120/2
x7 0 100 3 5 10 15 0 0 1 100/15
+0x100
42
BIG M Method or Methods of Penalties
Whenever the objective function is MinZ and when all or some of the constraints are of
>= type or = type. We introduce surplus variable and a artificial variable to LHS of the
constraint when it is necessary to complete the identity matrix I.
The general practice is to assign the letter M as the cost in a minimization problem, and –
M as the profit in the maximization problem with assumption that M is a very large
positive number to the artificial variables in the objective function.
The method of solving a LPP in which a high penalty cost has been assigned to the
artificial variables is known as the method of penalties or BIG m Method.
Procedures
Step1: At any iteration of the usual simplex method can arise any one of the following
three cases:
Case b) if at least one vector corresponding to some artificial variable, in the basis is
basic variable column at the zero level i.e., corresponding entry in solution column is
zero and the co-efficient of m in each net evaluation Zj - Cj is non negative.
43
Case c) if at least one artificial vector is in the basis Yb but, not at zero level i.e., the
corresponding entry in Xb is non zero. Also co-efficient of M in each net evaluation Zj -
Cj is non negative.
In the case, the given LPP does not possess an optimum basic feasible solution. Since, M
is involved in the objective function. In such case, the given problem has a pseudo
optimum basic feasible solution.
Step 2: application of simplex method is continued until either an optimum basic feasible
solution is obtained or there is an indication of the existence of an unbounded solution to
the given LPP.
Note: while applying simplex method, whenever a vector corresponding to some artificial
variable happens to leave the basis, we drop that vector and omit all the entries
corresponding to that vector from the simplex table.
Problem 1:
Solve the give LPP by BIG M Method
Max Z =3x1 - x2
STC
2x1 + x2 >= 2
x1 + 3x2 <= 3
8x2 <= 4
x1, x2 >= 0
Since, the given problem is max z and the I constraint is >= type we introduce surplus
variable as x3 >= 0, and a artificial variable as x4 >= 0, the II & III constraint are of <=
type, so we introduce x5 >= 0 , x6 >= 0 .
44
The standard of the given LPP as follow as.
Max Z =3x1 - x2 +0x3 -M x4+0 x5+ 0x6
STC
2x1 + x2 - x3+ x4 =2
x1 + 3x2 + x5 =3
x2 + x 6 =4
x1,x2,x3, x4 x5,x6 >= 0
The Matrix form
Max Z= (3,-1, 0,-M, 0, 0) (x1,x2, x3, x4 x5,x6 )
STC
2 1 -1 1 0 0 x1 2
1 3 0 0 1 0 x2 = 3
0 1 0 0 0 1 x3 4
x4
x5
x6
45
Starting table: 3 -1 0 -M 0 0
Basic Profit / solution x1 x2 x3 x4 x5 x6 Min
Variable unit ratios
x4 -M 2 2 1 -1 1 0 0 2/2=1
x5 0 3 1 3 0 0 1 0 3/1=3
x6 0 4 0 8 0 0 0 1 4/0=∞
MaxZ= =-mx2+ =- =-mx- =- =- =-
-mx2+0x3 0x1+0x4 mx1+0x 1+0x0 mx1+0x mx0+0 mx0+0x
+0x4=-2m -3= - 3+0x0- +0x0- 0+0x0-)- x1+0x 0+0x1-
2m-3 (-1)= - 0= m m)=0 0-0=0 0=0
m+1
3 -1 0 -M 0 0
Basic Profit / solution x1 x2 x3 x4 x5 x6 Min
Variable unit ratios
x1 3 1 1 ½ -1/2 1/2 0 0 1/-1/2=-
2
x5 0 2 0 5/2 1/2 -1/2 1 0 2/1/2=4
x6 0 4 0 1 0 0 0 1 4/0=∞
MaxZ=3x1+0x2+0 =3x1+0 3x1/2+0 =3x- =3x1/2+ =3x0+ =3x0+0
x4=3 x0+0x0 x5/2+0x 1/2+0x ox- 0x1+0 x0+0x1-
–3 1-(-1) 1/2+0x 1/2+0x0 x0-0 0
0-0 – (-M)
0 5/2 -3/2 3/2+m 0 0
46
New Number for Key row is
New no for key row =old element/pivot element
Soln= 2/2=1, x1 =2/2=1, x2 =1/2, x3 = -1/2, x4 =1/2, x5 =0/2=0, x6 =0/2=0
Other than key row new no. = old element - PCE*NPRE
Soln= 3-1*1=2, x1 =1-1*1=0, x2 =3-1*1/2=5/2, x3 =0-1*-1/2=1/2, x4 =0-1*1/2=-1/2, x5
=1-1*0=1, x6 =0-1*0=0
For x6 new no are
Soln= 4-0*1=4, x1 =0-0*1=0, x2 =8-0*1/2=8, x3 =0-0*-1/2=0, x4 =0-0*1/2=0, x5 =0-
0*0=0, x6 =1-0*0=1
3 -1 0 -M 0 0
Basic Profit / solution x1 x2 x3 x4 x5 x6 Min
Variable unit ratios
x1 3 3 1 3 0 0 1 0
x3 0 4 0 5 1 -1 2 0
x6 0 4 0 1 0 0 0 1
Max Z =3x1+0 =3x3+0 =3x0+ 3x0+0x- =3x1+ =0x3+0
=3x3+0x4+0x4=9 x0+0x0- x5+0x1- 0x1+0 1+0x0-(- 0x2+0 x0+0x1-
3 (-1) x0-0 M) x0-0 0
0 10 0 M 3 0
47
Since all the NER is +ve and at zero level which is optimum.
This problem is of case A, which means no artificial vector appears at the optimal table
and therefore, the given problem as attained the optimality.
x1=3,x2 =0, x3 =4, x4 =0, x5 =0x6 =4 substitute this values in the objection function.
Max Z =3x3 - 0 +0x4 –Mx0+0x0+ 0x4 = 9
Problem:2
Solve the given problem by charnes penalty method
Max Z =3x1 + 2x2
STC
2x1 + x2 <= 2
3x1 +4x2 >= 12
x1, x2 >= 0
Solution:
Since, the given problem is max z
The I constraint is <= type we introduce slack variable as x3 >= 0 and the II constraint is
of >= type we introduce surplus variable as x4>= 0 and a artificial variable as x5 >= 0. In
the constraint the value of artificial variable will be 1 and in the objective function is –M.
Therefore, the standard form of the problem
Max Z =3x1 +2x2 +0x3 +0 x4-M x5
STC
2x1 + x2 + x3 = 2
3x1 + 4x2 - x4 + x5 = 12
x1,x2,x3, x4 x5 >= 0
The Matrix form
Max Z= (3,2, 0,0,-M) (x1,x2, x3, x4 x5 )
STC
2 1 1 0 0 2
3 4 0 -1 1 = 12
x1,x2,x3, x4 x5 >= 0
48
1 0
0 1
Canonical system. The basic variable (x3,x5) and their obvious solution
(2,12)
Starting table: 3 2 0 0 -M
Basic Profit / solution x1 x2 x3 x4 x5 Min
Variable unit ratios
x3 0 2 2 1 1 0 0 2/1=2
x5 -M 12 3 4 0 -1 1 12/4=3
Max Z=0x2+-mx12 =0x2+- =0x1+- =0x1+ =0 x 0 =0x0+
mx3-3 mx4-2 -mx0- +- mx-1- -m x1-
0 0 (-m)
-12m -3m-3 -4m-2 0 m 0
Starting table: 3 2 0 0 -M
Basic Profit / solution x1 x2 x3 x4 x5 Min
Variable unit ratios
x2 2 2 2 1 1 0 0
x5 -m 4 -5 0 -4 -1 1
Maxz= 2x2+-mx4 5m+1 0 4m+2 m 0
49
Problem:3
Solution:
Since, the given problem is max z
The I constraint is <= type we introduce slack variable as x4 >= 0 and the II constraint is
of >= type we introduce surplus variable as x5>= 0 and a artificial variable as x6 >= 0.
In the constraint the value of artificial variable will be 1 and in the objective function is –
M. Therefore, the standard form of the problem.
50
Starting table: 3 2 3 0 0 -M
Basic Profit / solution x1 x2 x3 x4 x5 x6 Min
Variable unit ratios
X4 0 2 2 1 1 1 0 0 2/1=2
x6 -M 8 3 4 2 0 -1 1 8/4=2
=0x2+- =0x1+- =0x1+ =0 x 1 =0x0+ =0x0+-
mx3-3 mx4-2 -mx2- +- mx0- -m x- mx1-(-
3 0 1- 0 m)
-3m-3 -4m-2 -2m-3 0 m 0
Starting table: 3 2 0 0 0 -M
Basic Profit / solution x1 x2 x3 x4 x5 x6 Min
Variable unit ratios
x2 2 2 2 1 1 1 0 0
x6 -m 0 -5 0 -2 -4 -1 1
maxZ=2x2+- 5m+1 1 2m+1 4m+2 m 0
mx0=4
x1 =0 x2 =2 x3 =0 x4 =0 x5 =0 x6 =0
Max Z =3x1 +2x2 +3x3 +0 x4+0 x5-M x6
=3*0+2*2+3*0+0*0+0*0-M*0
=4
51
Problem No : 4
Problem No 5
Solve the given LPP
Min Z = 4x1 + x2
STC
3x1 + 2x2 = 3
4x1 +3x2 >= 6
x1 +2x2 <= 4
x1, x2 >=0
The I constraint is already in standard form, only artificial variable is added as x3 >= 0
and II constraint is of >= type we introduce
x4 > = 0 as surplus variable and an artificial variable as x5 > = 0 and third constraint is of
<= type we introduce x6 > = 0 as slack variable.
Then, the given LPP is in standard form
Min Z = 4x1 + x2+ Mx3+ 0x4+ Mx5+ 0x6 converting MinZ= -Z
or
Max Z = -4x1 - x2- Mx3- 0x4- Mx5- 0x6
STC
3x1 + 2x2 + x3 = 3
4x1 +3x2 -x4+x5 = 6
x1 +2x2+ x6 = 4
x1,x2,x3,x4,x5,x6 > = 0
52
The matrix form
Max Z = (-4, -1, -M, 0, -M, 0) (x1,x2,x3,x4,x5,x6 )
STC
3 2 1 0 0 0 x1
4 3 0 -1 1 0 x2 3
1 2 0 0 0 1 x3 = 6
x4 4
x5
x6
Starting table: -4 -1 -m 0 -m 0
Basic Profit / solution x1 x2 x3 x4 x5 x6 Min
Variable unit ratios
X3 -m 3 3 2 1 0 0 0 3/3=1
x5 -m 6 4 3 0 -1 1 0 6/4=1.5
x6 0 4 1 2 0 0 0 1 4/1
Max z= -9m -7m+4 -5m+1 0 m 0 0
Starting table: -4 -1 -m 0 -m 0
Basic Profit / solution x1 x2 x3 x4 x5 x6 Min
Variable unit ratios
X1 -4 1 1 2/3 1/3 0 0 0 3/2
x5 -m 2 0 1/3 -4/3 -1 1 0 6
x6 0 3 0 4/3 -1/3 0 0 1 9/4
Max z= -4-2m 0 .-5-m /3 4m-4 /3 m 0 0
53
Starting table: -4 -1 -m 0 -m 0
Basic Profit / solution x1 x2 x3 x4 x5 x6 Min
Variable unit ratios
X2 -1 3/2 3/2 1 1/2 0 0 0
x5 -m 3/2 -1/2 0 -2 -1 1 0
x6 0 1 -2 0 -3 0 0 1
Max z= -3/2-3/2m 5+m/2 0 -1/2+2m m 0 0
Problem 6
Solution:
The I constraint is of <= type so add x4 >= 0 as slack variable, II constraint is of >= type
so we introduce x5 >= 0 as surplus variable and x6 >= 0 as artificial variable and III
constraint is already a standard form and right side is –ve. So it should be multiplied by -
1 both sides of the equation and x7 >= 0 as artificial variable and the standard form of the
given LPP is written below.
Min Z = -3x1 +x2 + x3 + 0x4 +m x5 + x6 +m x7
STC
x1 +-2x2+ x3 + x4 = 11
-4x1 +x2+ 2x3 + x5 + x6 =3
-2x1 + x3 + x7 =1
x1, x2, x3, x4 x5 x6 x7 >= 0
54
The matrix form
Min z = (-3,1,1,0,M,1,M) (x1, x2, x3, x4 x5 x6 x7 )
STC
1 –2 1 1 0 0 0 x1
-4 1 2 0 -1 1 0 x2
-2 0 1 0 0 0 1 x3 11
x4 = 3
x5 1
x6
x7
x1, x2, x3, x4 x5 x6 x7 >= 0
Starting table: -3 1 1 0 m 1 m
Basic Profit / solution x1 x2 x3 x4 x5 x6 x7 Min
Variable unit ratios
X4 0 11 1 -2 1 1 0 0 0 11/1
X6 M 3 -4 1 2 0 -1 1 0 3/2
x7 M 1 -2 0 1 0 0 0 1 1/1
MaxZ=0x11+3xM+ -3+6m 1-m 1-3m 0 2m 1-m 0
1xm=4m
55
First table: -3 1 1 0 m 1 m
Basic Profit / solution x1 x2 x3 x4 x5 x6 x7 Min
Variable unit ratios
X4 0 10 3 -2 0 1 0 0 -1 10/-2= -
ve
X6 M 1 0 1 0 0 -1 1 -2 1/1=1
X3 1 1 -2 0 1 0 0 0 1 1/0=0
Min Z= 0x10 + -3- 1-(0x- 1- 0- m- =1- m -(0x-
mx1 +1x1 =1+m (0x3+m 2+mx1+ (0x0+mx0 (0x1 (0x0+ (0x0+ 1+mx-
x0+1x- 1x0)=1- +1x1) = 0 +mx mx-1 mx1+1 2+1x1)
2) m 0+1x + x0) = = 3m-1
= -1 0)= 1x0)= 1-m
0 2m
The values of key row remain the same because 1 is the key element
New nos for other than key rows i.e X4
Soln= 11-1*1=10 X5,Soln= 3-2*1=1
x1= 1-1*-2 =3 x1= -4-2*-2= 0
x2= -2-1*0=-2 x2= 1-2*0=1
x3=1-1*1=0 x3= 2-2*1=0
x4=1-1*0=1 x4= 0 -2*0=0
x5=0-1*0=0 x5= -1-2*0=-1
x6=0-1*0=0 x6= 1-2*0=1
x7=0-1*1=-1 x7=0-2*1=-2
56
Third table: -3 1 1 0 m 1 m
Basic Profit / Solution x1 x2 x3 x4 x5 x6 x7 Min
Variable unit ratios
X4 0 12 3 0 0 1 2 -2 -5 12/3
X2 1 1 0 1 0 0 1 -1 -2 1/0
X3 1 1 -2 0 1 0 0 0 1 1/-2
-1 0 0 0 m-1 1 m+1
Fourth table: -3 1 1 0 m 1 m
Basic Profit / Solution x1 x2 x3 x4 x5 x6 x7 Min
Variable unit ratios
X1 -3 4 1 0 0 1/3 2/3 -2/3 -5/3
X2 1 1 0 1 0 0 1 -1 -2
X3 1 9 0 0 1 2/3 4/3 -4/5 -7/3
0 0 0 1/3 m-1/3 1/3 m-2/3
57
Duality Theory
The linear programming model we develop for a situation is referred to as the primal
problem. The dual problem can be derived directly from the primal problem.
Comparing the primal and the dual problems, we observe the following relationships.
1. The objective function coefficients of the primal problem have become the right-
hand side constants of the dual. Similarly, the right-hand side constants of the
primal have become the cost coefficients of the dual
2. The inequalities have been reversed in the constraints
3. The objective is changed from maximization in primal to minimization in dual
4. Each column in the primal correspondence to a constraint (row) in the dual. Thus,
the number of dual constraints is equal to the number of primal variables.
5. Each constraint (row) in the primal corresponds to a column in the dual. Hence,
there is one dual variable for every primal constraints
6. The dual of the dual is the primal problem.
7. if the primal constraints >= the dual constraints will be <= & vice versa
Duality is an extremely important and interesting feature of linear programming. The
various useful aspects of this property are
i) If the primal problem contains a large no of rows constraints and smaller no of columns
variables computational procedure can be considerably reduced by converting it into dual
and then solving it.
ii) It gives additional information as to how the optimal solution changes as a result of the
changes in the coefficients and the formulation of its problem.
iii) Calculations of the dual checks the accuracy of the primal solution
iv) This indicates that fairly close relationships exist between LP and theory of games
58
Primal Problem Dual Problem
Max Z = CX Min Z = bY
STC STC
Ax<=b Ay>=c
x>=0 y>=0
Max Z = CX Min Z = bY
STC ex: STC
Ax=b x1+x2<=2 Ay>=c
x>=0 -x1-x2<=-2 Y is unrestricted in sign
Max Z = CX Min Z = bY
STC STC
Ax=b Ay=c
X is unrestricted in sign y is unrestricted in sign
Note: it is not necessary that only the Max problem be taken as the primal problem we
can as well consider the minimization LPP as the primal
Formulation of dual to the primal problem
59
Problem no 1
Write the dual of the primal problem
Max Z = 3x1 +5x2
STC
2x1 +6x2 <= 50
3x1 +2x2 < = 35
5x1 - 3x2 <= 10
x2 <= 20
x1, x2, x3 >= 0
To write dual for the above primal, since the primal as 4 constraints the dual will have 4
variables as y1 y2 y3 y4 then dual for the primal will be as follows.
60
Solution:
The given problem is minimization type and all the constraint should be >= type. In the
given problem third constraint is <= type so we must convert constraint to >= type by
multiply both side of the constraint by -1, we get
-7x1 +2 x3 +x3 > = - 10
Then given the problem can be written restated
Then dual of the given problem is as follows and the dual variables are y1 ,y2 ,y3,y4 y4
61
Problem 3
Obtain the dual problem of the following LPP
Max Z = 2x1 +5x2 +6x3
STC
5x1 +6x2-4 x3 <=3
-2x1 +x2+ 4x3 <=4
x1 -5 x2 +3x3 <=1
-3x1 -3x2+7 x3 <= 6
x1, x2, x3 >= 0
Also, verify that the dual of the dual problem is the primal problem
The given primal can be restated in the matrix form
Max Z = (2,5,6) (x1, x2, x3 )
STC
5 6 -4 x1 3
-2 1 4 x2 <= 4
1 -5 3 x3 1
-3 -3 7 6
The dual of the above primal can be written as and the dual variables are (y1 ,y2 ,y3,y4 )
Min w= (y1 ,y2 ,y3,y4 ) (3.4.1.6)
STC
5 -2 1 -3 y1 2
6 1 -5 3 y2 = 5
-4 4 3 7 y3 6
y4
y1 ,y2 ,y3,y4>= 0
62
Now, we can restate this dual problem as follows
Max w = (-3.-4.-1.-6) (y1 ,y2 ,y3,y4 )
5 -2 1 -3 y1 -2
6 1 -5 -3 y2 = -5
(-1) -4 4 3 -7 y3 -6
y4
y1 ,y2 ,y3,y4>= 0
MaxZ = (-1) Minz
The dual problem in this form looks like the primal problem and this we may write down
the dual of this dual problem .
MinZ= (-2,-5, -6) (x1, x2, x3 )
STC
5 6 -4 x1 -3
-2 1 4 x2 <= -4
1 -5 3 x3 -1
(-1) -3 -3 7 -6
x1, x2, x3 >= 0
63
Problem 4
Construct the dual of the primal problem
Max Z = 3x1 +17x2 +4x3
STC
x1 - x 2 + x3 >=3
-3x1 +2x3 <=1
x1, x2, x3 >= 0
Problem 5
Construct the dual of the following primal
Max Z = x1 -2x2 +3x3
STC
-2x1 + x2 +3 x3 =2
2x1 + 3x2 +4 x3 =1
x1, x2, x3 >= 0
The given problem is 2nd variety in the duality and it is in the form of Max Z, then the
constraint in the standard form can be written as -2x1 + x2 +3 x3 <= 2
2x1 - x2 -3 x3 <= -2
and
2x1 + 3x2 +4 x3 <=1
-2x1 -3x2 - 4 x3 <= -1
Then, given primal can restated as
Max Z = x1 -2x2 +3x3
STC
-2x1 + x2 +3 x3 <= 2
2x1 - x2 -3 x3 <= -2
2x1 + 3x2 +4 x3 <=1
-2x1 -3x2 - 4 x3 <= -1
x1, x2, x3 >= 0
The dual of the above primal is written as and its dual variables are y1, y2, y3
64
Min W = 2y1 -2y2 +y3 -y4
STC
-2y1 +2y2 +2y3 -2y4 >= 1
y1 -y2 + 3y3 -3 y4 >= -2
3y1 -3y2 + 4y3 -4 y4 >= 3
y1, y2, y3 y4 >= 0
Problem 6
Write the dual of the given LPP
Max Z = 3x1 + x2 +2x3 -2x4
STC
2x1 - x2 +3 x3 +x4 =1
x1 + x2 - x3 +x4 = -3
x1, x2 >= 0, x3 & x4 are unrestricted in sign
Problem 7
Write the dual of the following LPP
Min Z = 2x1 +3x2 +4x3
STC
2x1 + 3x2 +5 x3 >= 2
3x1 + x2 +7 x3 =2
x1 + 4x2 + x3 <=5
x1, x2, >= 0 x3 are is unrestricted in sign
65
Use duality to solve the following LPP
Max Z = 3x1 +2x2
STC I constraint
2x1 + x2 <= 5 the points are (5/2,5)
x1 + x2 <= 3 (3,3)
x1, x2 >= 0
II constraint
I constraint
II constraint
66
Max Z = 2y1 +5y2
STC
y1 <=4
y2 <=3
y1 +y2<=6
y1, y2 >= 0
Using duality theory solve the following LPP by simplex method
Max Z = x1 +6x2
STC
x1 + x 2 >= 2
x1 + x 2 <=3
x1, x2 >= 0
The given problem is max Z so all the constraint should be <= type. In this problem I
constraint is of >= type so we converting by multiply b -1 both sides of the constraint the
resulting will be as
-x1 - x2 <= -2
Then, the given LPP is restated as
Max Z = x1 +6x2
STC
-x1 - x2 <= -2
x1 + x 2 <=3
x1, x2 >= 0
The dual of the above LPP will be as
Min Z = 2y1 +3y2
STC
-y1 + y2 >= 1
-y1 + y2 >=6
x1, x2 >= 0
Solving the dual using Big M method
67
Dual simplex method
Dual simplex method applies to problems which start with dual feasible solns. The
objective function may be either in the maximization form or in the minimization form.
After introducing the slack variables, if any right-hand side element is –ve and if the
optimality condition is satisfied.
Repeat the procedure until either an optimum feasible solution has been obtained or there
is an indication of the non existence of a feasible solution.
68
Use dual simplex method to solve the LPP
Min Z = x1 +x2
STC
2x1 + x2 >= 2
-x1 - x2 >=1
x1, x2 >= 0
Since, the given problem in min z form it is converted to max z and all the constraint is of
>= type it should be converted to <= type by multiplying -1 on the both sides then given
problem will be as follows
Max Z = -x1 -x2
STC
-2x1 - x2 <= -2
x1 + x 2 <= -1
x1, x2 >= 0
Now, introducing slack variable for the I and II constraint as x3>= 0, x4 >= 0
The standard form as follows
Max Z = -x1 -x2 +0 x3 + 0x4
STC
-2x1 - x2+ x3 = -2
x1 + x 2 + x4 = -1
x1, x2 , x3 x4 >= 0
The matrix form
Max Z = (-1,-1,0, 0) (x1, x2 , x3 x4)
STC
-2 -1 1 0 x1 -2 the identity matrix
1 1 0 1 x2 = -1 form are
x3 1 0 the correspond
x4 0 1 variables
x1, x2 , x3 x4 >= 0 (x3 x4) and
their solutions are -2 -1
69
starting table -1 -1 0 0
x3 0 -2 -2 -1 1 0
x4 0 -1 1 1 0 1
Max Z= =0*- =0*- =0*1+0 =0*0+0*
0*-2+0*-1 2+0*1+1 1+0*1+1 *0 -0 1-0
0 1 1 0 0
First table -1 -1 0 0
Basic Profit / solutio x1 x2 x3 x4
Variable Unit n
x1 -1 1 1 0.5 -1/2 0
x4 0 -2 0 0.5 1/2 1
Max Z= =- =0.5*- =-1*- =-1 * 0 +
-1*1=0*-2 1*1+0*0+ 1+0.5*0+ 1/2+0* 0*1-0
1 1 1/2 -0
-1 0 0.5 0 0
70
Since, all the values in NER is positive and in solution column one variable is –ve and
that is selected as key row and to select key column or pivot column at least on variable
in the row should be –ve but, no vector corresponding to that row is –ve and we cannot
find the ratios and So we cannot select the key column and the given problem does not
given any feasible solution to the LPP.
Use dual simplex table to solve the LPP
Min Z = x1 +2x2 +3 x3
STC
x1 - x 2 + x3 >= 4
x1 + x2+ 2x3 <= 8
x2 - x3 >= 2
x1, x2 , x3 >= 0
the given problem is set for the requirement of dual simplex method
Max Z = -x1 -2x2 -3 x3
STC
-x1 + x2- x3 <= - 4
x1 + x2+ 2x3 <= 8
-x2 + x3 <= - 2
x1, x2 , x3 >= 0
since, all the constraint are of <= type we introduce three slack variable for I II and III
constraint as x4>= 0, x5 >= 0, x6>= 0
the standard form
Max Z = -x1 -2x2 -3 x3 +0 x4+ 0x5+ 0x6
STC
-x1 + x2- x3 + x4 =-4
x1 + x2+ 2x3 + x5 = 8
-x2 + x3 + x6 =-2
x1, x2 , x3 x4 x5 x6 >= 0
71
The matrix form
STC
-1 1 -1 1 0 0 x1
1 1 2 0 1 0 x2 -4
0 -2 1 0 0 1 x3 = 8 1 0 0
x4 -2 0 1 0
x5 0 0 1
Starting table -1 -2 -3 0 0 0
Variable / unit
x4 0 -4 -1 1 -1 1 0 0
x5 0 8 1 1 2 0 1 0
x6 0 -2 0 -1 1 0 0 1
MaxZ =0*- 1 2 3 0 0 0
4+0*8+0*-8
72
Other than key row new nos are
x5
x5 = 1-1*0=1, x6 =0-1*0=0
x6
soln= -2-0*4=-2, all other value in the row remains the same because of corresponding
Starting table -1 -2 -3 0 0 0
For x1 row
soln=4-(-1)*2=6, x1 =1-(-1)*0=1, x2 =-1-(-1)1=0, x3 =1-(-1)-1=0, x4 =-1-(-
1)*0=-1, x5 =0-(-1)*0=0, x6 =0-(-1)*-1=-1
For x5 row
soln =4 - 0*2=4, any thing multiplied by 0 is 0 so the value in this row
remains same.
73
Starting table -1 -2 -3 0 0 0
Since all the NER and Solution column are non negative and the given problem as
attained the optimum
74
Dual Read off Technique
Solve the following the LPP and read the solution for the real problem
Min Z = 2x1 +x2
STC
x1 + x 2 >= 15
x1 - x 2 <= 3
2x1 + 5x2 >= 20
-x1 + 3x2 >= 10
x1, x2 >= 0
To write the dual of the above primal all the constraint should be of >= type, since, II
constraint is <= type we must convert it into >= type by -1, then, the given primal can be
written as follows
Min Z = 2x1 +x2
STC
x1 + x 2 >= 15
-x1 + x2 >= -3
2x1 + 5x2 >= 20
-x1 + 3x2 >= 10
x1, x2 >= 0
The dual for the above primal problem as follows
The dual variables (y1 y2 y3 y4 )
Max Z = 15y1 -3y2 +20y3 +10y4
STC
y1 - y2+2y3 - y4 <=2 y5 >= 0 as slack variable
y1 + y2+ 5y3 + 3y4 <=1 y6 >= 0 as slack variable
y1 y2 y3 y4 >=0
75
Matrix form
Max Z = (y1 y2 y3 y4 ) ( 15,-3,20,10)
STC
1 -1 2 -1 1 0 y1
1 1 5 3 0 1 y2 2
y3 = 1
y4
y5
y6
y1 y2 y3 y4 y5 y6 >=0
1 0
0 1 is identity matrix which form the basic variable (y5 y6 ) for the I table and it’s
solution is (2,1)
Starting table 15 -3 20 10 0 0
y6 0 1 1 1 5 3 0 1 1/5=
Starting table 15 -3 20 10 0 0
Max Z = 0 -11 7 0 2 0 20
76
Starting table 15 -3 20 10 0 0
Since all the NER non negative the given problem as attained optimum
77