You are on page 1of 3

UNIVERSITY OF KARACHI

DEPARTMENT OF COMPUTER SCIENCE


(MORNING PROGRAMME)
BACHELOR OF SCIENCE IN COMPUTER SCIENCE
SEMESTER FIRST SEMESTER 2016
COURSE BSCS-507 OPERATIONS RESEARCH I
HANDOUT IV
DUALITY IN LINEAR PROGRAMMING
In the context of linear programming, duality implies that each linear programming
problem can be analysed in two different ways but would have equivalent solutions.
Any linear programming problem (either maximization or minimization) can be stated
in another equivalent form based on the same data. The new linear programming
problem is called dual linear programming problem or, in short, dual. In general, it is
immaterial which of the two problems is called primal or dual, since the dual of the dual
is primal. The main focus of a dual problem is to find for each resource its best
marginal value (also called shadow price, fictitious cost or resource price). The format
of the simplex method is such that solving one type of problem (primal) is equivalent to
solving the other (dual) simultaneously. Thus, if the optimal solution to one (primal) is
known, the optimal solution of the other (dual) can also be read from the final simplex
table. In some cases, considerable computing time can be reduced by solving the dual.
A summary of the general relationship between primal and dual linear programming
problems is given in the following table.
Primal / Dual
Objective: To Max
Objective: To Min
jth Standard-Problem Constraint
(i.e. for a Max problem
or
for a Min problem)
jth Non-Standard-Problem Constraint
(i.e. for a Max problem
or
for a Min problem)
jth Non-Standard-Problem Constraint
(i.e. a Binding or Tight Constraint)
(i.e. having = sign)
ith Decision Variable Standard
(i.e. non-negative)
(i.e. xi 0)
ith Decision Variable Non-Standard
(i.e. non-positive)
(i.e. xi 0)
ith Decision Variable Non-Standard
(i.e. unrestricted in sign)
(i.e. xi urs)

Dual / Primal
Objective: To Min
Objective: To Max
jth Decision Variable Standard
(i.e. non-negative)
(i.e. yj 0)
jth Decision Variable Non-Standard
(i.e. non-positive)
(i.e. yj 0)
jth Decision Variable Non-Standard
(i.e. unrestricted in sign)
(i.e. yj urs)
ith Standard-Problem Constraint
(i.e. for a Max problem
or
for a Min problem)
ith Non-Standard-Problem Constraint
(i.e. for a Max problem
or
for a Min problem)
ith Non-Standard-Problem Constraint
(i.e. a Binding or Tight Constraint)
(i.e. having = sign)
Page 1 of 3

UNIVERSITY OF KARACHI
DEPARTMENT OF COMPUTER SCIENCE
(MORNING PROGRAMME)
BACHELOR OF SCIENCE IN COMPUTER SCIENCE
SEMESTER FIRST SEMESTER 2016
COURSE BSCS-507 OPERATIONS RESEARCH I
HANDOUT IV
The above table can be used as a guideline for both conversions, that is, primal-to-dual
conversion or dual-to-primal conversion.
Following rules are used for primal-to-dual and/or dual-to-primal conversions.
1. Number of decision variables in dual = Number of constraints in primal.
2. Number of constraints in dual = Number of decision variables in primal.
3. Coefficients in the objection function of dual = RHS values of the
constraints of primal.
4. RHS values of the constraints of dual = Coefficients in the objective
function of primal.
5. Matrix of coefficients of variables in the constraints of dual = Transpose of
the matrix of coefficients of variables in the constraints of primal.
Hence, the dual for any primal linear programming problem can be determined by
following the rules given above, for writing the objective function, the constraints and
the decision variables (and their restrictions) of the dual problem, under the guideline
provided in the table given above.

(PLEASE PROCEED TO THE NEXT PAGE


FOR A RELATED SAMPLE PROBLEM)
Page 2 of 3

UNIVERSITY OF KARACHI
DEPARTMENT OF COMPUTER SCIENCE
(MORNING PROGRAMME)
BACHELOR OF SCIENCE IN COMPUTER SCIENCE
SEMESTER FIRST SEMESTER 2016
COURSE BSCS-507 OPERATIONS RESEARCH I
HANDOUT IV
PROBLEM 1
M/s Goldstar Watch Company produces three types of wall clocks, for which they have
three departments assembly, polishing and packing. Type I wall clock requires one
hour of assembly, 40 minutes of polishing and 20 minutes of packing time. Similarly,
type II wall clock requires 80 minutes, 20 minutes and one hour of assembly,
polishing and packing time, respectively; and type III wall clock requires 40 minutes
each of assembly, polishing and packing times. The total time available at assembly,
polishing and packing departments is 600 hours, 400 hours and 800 hours,
respectively. The unit profit for Types I, II and III wall clocks is 40, 80 and 60
monetary units, respectively. Management of M/s Goldstar Watch Company wants to
determine the number of each type of wall clocks that should be produced in order
to maximize the profit.
Now, suppose that the management of M/s Goldstar Watch Company is thinking of
renting the production capacities of the three departments to another organization, M/s
Galaxy Watch Company. Management of M/s Galaxy Watch Company is interested in
minimizing the rental charges. On the other hand, the management of M/s Goldstar
Watch Company would like to know the worth of production hours to them, in each
of the departments, in order to determine the rental rates.
The problems mentioned above require formulation of the (primal) linear
programming problem along with its dual.
We know how to make the linear programming model from the narration given in the
form of a problem. We know how to solve a linear programming model problem. We
know how to interpret the results obtained from the solution to produce the conclusion.
We know how to formulate the dual of some (primal) linear programming model
problem (this is the main topic of this handout). We know that the dual problem can be
solved using the same algorithm(s) as for any (primal) linear programming model
problem, for example, the simplex method (or the two-phase simplex method,
whatsoever).
BUT, can we understand how to obtain the solution of the primal linear
programming problem using the final optimal simplex table (or the final
solution) of the dual problem?
AND, can we understand how we can help the managements of both of the
organizations mentioned above by providing them the information they are
interested in?
SOLUTION
LEFT AS A CHALLENGE FOR THE STUDENTS!
WISH YOU THE BEST OF LUCK
*******************************
Page 3 of 3

You might also like