You are on page 1of 37

Duality aka Dual Simplex

Dr. A.R.M. Harunur Rashid


• The term 'Duality' implies that every linear programming
problem, whether of maximization or minimization, is
associated with another linear programming problem
opposite nature of it, say maximization has its dual as
minimization, based on the same data.
• The original problem in this context is called the primal
problem aka original problem, whereas the other is
called its dual problem. The formulation of the dual
linear programming is sometimes referred to as duality.
History
• Analogously, a procedure that solves a dual linear
programming problem may be called a dual simplex algorithm.
This algorithm was discovered by C. E. Lemke in 1954, seven
years after the primal simplex procedure. In 1954 Lemke
developed the dual simplex method, independently from E. M.
L. Beale.
• Carlton Edward Lemke (October 11, 1920 - April 12, 2004) was
an American mathematician. Lemke received his bachelor's
degree in 1949 at the University of Buffalo and his PhD
(Extremal problem in Linear Inequalities) in 1953 at Carnegie
Mellon University (then Carnegie Institute of Technology).
When to be used
Optimality condition in usual simplex and dual simplex:
Maximization case Cj –Zj <= 0
And Minimization case Cj- Zj >=0 , so they are optimal but
under solution column, there are one or more negative
values, so not feasible.

The Dual Simplex method is used in situations where the


optimality criterion ( in the maximization case and in
minimization case) is satisfied, but the basic solution is not
feasible because under the solution column of the simplex
table there are one or more negative values.
Why is it needed?
• Sometimes it allows to easily select an initial
basis without having to add any artificial
variable.
• It aids in certain types of sensitivity testing.
• It helps in solving integer programming
problems.
• If the primal problems contain larger number of rows
(constraints) and smaller number of columns (variables),
converting it into dual can reduce the computational
burden.
• Calculation of the dual checks the accuracy of the primal
problem.
• It establishes the interconnections for all of the sensitivity
analysis (post optimality analysis) techniques.
• It yields a number of powerful theorems, which add
substantially to our understanding of linear programming
approach.
• It is fair to say that without the dual simplex algorithm
modern computer codes could not be as reliable as they
are. At present, any respectable computer program
based on the simplex method incorporates both the
primal and the dual simplex algorithms as it helps to
check the accuracy in both ways. The reason for the
importance of the dual simplex algorithm has its source
in the duality and symmetry of linear programming. That
it took seven years to discover it is somewhat of a
mystery given the obvious symmetry of linear
programming
• Say we have two things profit and cost. So if we
could get a solution that is optimal for both
maximization profit and minimization of cost.
• To do so, actually max problem will be
converted to minimization by changing some
coefficients and similarly the constraints.
Usually constraints RHS value becomes
objective function and column wise value
become row wised constraints.
Dual Problem theoretical formulation
Minimize z = 3x1 + 3x2
subject to
2x1 + 4x2 ≥ 40
3x1 + 2x2 ≥ 50

x1 , x 2 ≥ 0
Solution.
Maximize z = 40w1 + 50w2
subject to
2w1 + 3w2 ≤ 3
4w1 + 2w2 ≤ 3

w1, w2 ≥ 0
Primal Dual Relationship
The number of constraints in the primal problem is equal to the number of dual
variables, and vice versa.

If the primal problem is a maximization problem, then the dual problem is a


minimization problem and vice versa.

If the primal problem has greater than or equal to type constraints, then the dual
problem has less than or equal to type constraints and vice versa.

The objective function coefficients of the primal problem appear on the right-hand
side of the dual problem.

The rows in the primal become columns in the dual and vice versa.

All primal and dual variables must be non-negative (>0).


Types of duality
• Mixed Constraints Duality : greater than and
less than both types of inequalities are there
as constraints.
• Unrestricted Constraints: Duality Concepts:
only equal equations constraints are there.
Here equal is replaced with two inequalities
like greater than equal and less than equal.
• For maximization, if possible make all
constraints less than equal to except non
negativity constraints. The opposite goes for
minimization problem.
• If the ith primal constraint is = (equality) type,
then the ith dual variables is unrestricted in
sign and vice versa. It means that this variable
could be positive or negative or zero.
Example 5.3 Sharma
• Obtain the dual LP problem of the following
primal LP problem: Minimize Z = x1 + 2x2
subject to the constraints (i) 2x1 + 4x2 ≤ 160,
(ii) x1 – x2 = 30, (iii) x1 ≥ 10 and x1, x2 ≥ 0
• Minimize Zx = x1 + 2x2 subject to the constraint (i) – 2x1 – 4x2 ≥ –160, (ii)
x1 – x2 ≥ 30 (iii) x1 – x2 ≤ 30 or – x1 + x2 ≥ – 30, (iv) x1 ≥ 10 and x1, x2 ≥ 0
• Here second constraint is made to two sub constraints. Again to make it
all greater than one sub constraint is multiplies by -1 on both sides.
• Let y1, y2, y3 and y4 be the dual variables corresponding to the four
constraints in the given order. The dual of the given primal LP problem
can then be formulated as follows: Maximize Zy = – 160y1 + 30y2 – 30y3
+ 10y4 subject to the constraints (i) – 2y1 + y2 – y3 + y4 ≤ 1, (ii) – 4y1 –
y2 + y3 ≤ 2 and y1, y2, y3, y4 ≥ 0
• Let y = y2 – y3 (y2, y3 ≥ 0). The above dual problem then reduces to the
form Maximize Zy = – 160y1 + 30y + 10y4 subject to the constraints (i) –
2y1 + y + y4 ≤ 1, (ii) – 4y1 – y ≤ 2 and y1, y4 ≥ 0; y unrestricted in sign [if
preferred, this reduced form could be written directly in the first place]
Example 5.6 Sharma
• Write the dual of the following primal LP
problem Maximize Z = 3x1 + x2 + 2x3 – x4
subject to the constraints (i) 2x1 – x2 + 3x3 +
x4 = 1, (ii) x1 + x2 – x3 + x4 = 3 and x1, x2 ≥ 0
and x3, x4 unrestricted in sign
• If y1 and y2 are dual variables corresponding
to the two primal constraints in the given
order, the dual of the given primal can be
written as: Minimize Zy = y1 + 3y2 subject to
the constraints (i) 2y1 + y2 ≥ 3, (ii) – y1 + y2 ≥
1, (iii) 3y1 – y2 = 2 (iv) y1 + y2 = – 1 and y1, y2
unrestricted in sign.
Finding solution from one another
• The principle of complementary slackness establishes the
relationship between the optimal value of the main
variables in one problem with their counterpart slack or
surplus variables in other problem. Thus, this principle
can also be helpful in obtaining the primal LP problem
solution when only the dual solution is known.
• Optimized objective function value is the same in both
primal and dual.
• One optimal table’s Cj-zj value of slack or surplus variables
would be the value of main variables for other problem.
Example 5.9 Sharma
• Exa 5.9 Sharma:: A firm manufactures two
products A and B on machines I and II as
shown below. The total time available is 300
hours and 110 hours on machines I and II,
respectively. Products A and B contribute a
profit of Rs 6 and Rs 8 per unit, respectively.
Determine the optimum product mix. Write
the dual of this LP problem and give its
economic interpretation
Primal and dual solutions respectively
• The optimal value of the objective function is
the same for primal and dual LP problems.
• The dual variable yi represents the worth
(dual price or shadow price) of one unit of
resource i. For example, for y1 the worth of
time on machine I, equals Rs 1/10 and for y2,
the worth of time on machine II, equals Rs
6/10, as shown in Table
Shadow price
• The shadow price is also defined as the rate of
change in the optimal objective function value
with respect to the unit change in the
availability of a resource. To be more precise
for any constraint, we have Shadow price =
Change in optimal objective function value
Unit change in the availability of resource
General Steps to solve dual simplex problem
• No change to be made in objective function whether maximization or
minimization.
• Find initial basic feasible solution using standard procedure of simplex.
However, to avoid the need of using big M method, convert more than
equal to constraints to less than equal by multiplying by minus one in both
sides. Having minus in RHS is ok in dual simplex, though it is not ok in usual
simplex method. Alternatively, minimization problem may be converted to
maximization problem by multiplying with -1 on both sides of the
minimization objective function. In this case, in later stage use
(Cj-zj)/leaving variable aka key row's coefficient, here no minus in front of
(Cj-Zj)
• If in initial basic feasible solution, there is no negative value under solution
column, there is no need to use dual simplex, then just use normal simplex.
• Determination of key row and key column are different
than usual simplex method.
• Determine the key row aka leaving variable:Select the
smallest (most) negative value under the Solution
column. The row that indicates the smallest negative
value is the key row.
• Determine the key column aka entering variable : Select
the values of the non basic variables in the index row –
(Cj – Zj) and divide these values by the corresponding
values of the key row determined in the previous step.
• The most negative value corresponding row will be
leaving variable row. write down –(Cj-zj) and then below
it write down leaving variable coefficients in the table as
it is. Now get the ratio of –(Cj-zj)/leaving variable aka key
row's coefficient. If the denominator comes up as
positive or zero , leave that one. Now from the ratio,
take the least Positive value. Column wise that would
show the entering variable aka key column.
• Now continue like this until you get a feasible solution,
all zero or positive value under solution column.
Tips
• By procedure, all slack,surplus, artificial
variables are assumed as non negative[ may be
zero or positive].
• Dual simplex may be used like just another
simplex method for solving problem. Also,
when stuck like optimality condition is reached
but one or more variables solution value come
up as negative, then it may be used from that
onward.
Example Problem
Minimize z = 80x1 + 100x2
subject to
80x1 + 60x2 ≥ 1500
20x1 + 90x2 ≥ 1200
x 1, x 2 ≥ 0
80

100
Sensitivity Analysis (Post-optimality Analysis): Linear Programming

• In linear programming, all model parameters


are assumed to be constant; but in real life
situations, the decision environment is always
dynamic.
• Therefore, it is important for the management
to know how profit would be affected by an
increase or decrease in the resource level, by a
change in the technological process, and by a
change in the cost of raw materials.
• Such an investigation is known as sensitivity
analysis or post-optimality analysis. The results
of sensitivity analysis establish upper and lower
bounds for input parameter values within which
they can vary without causing violent changes in
the current optimal solution.
• The main goal of the management is to know
how sensitive the solution is to the original data.
Tips
• Minimization problem , greater than equal to
• Maximization, less than equal to
Stopping Criterion

You might also like