Operations Research
Operations Research
GENERAL POLICY:
GRADING SCHEME:
1- Introduction
2- Linear Programming
a- Graphical example
b- General definition
c- Mathematical formulations
3- Simplex Method
4- Duality Theory
a- Dual problem
b- Primal dual properties
c- Dual simplex method
6- Integer Programming
Introduction
Development of O.R
Developed during and after the World War-II (1940-1945). Dearge Dantzig
(1947), developed ―simplex method‖. Computers entered into field (1951). Actually
some work had been started in the industrial sector by Frederick W. Taylor and his
successors; which had been led to the new discipline industrial engineering.
Application Areas
Modeling
The heart of O.R is the model that provides a concise framework for analyzing
a decision problem in a systematic manner. An operations research study consists of
building a model of the physical situation. An O.R model is defined as an idealized
(simplified) representation of a real life system. Although the real world situation may
involve a substantial number of variables, generally a small number of these variables
truly dominate the behavior of the system. Assumed real world is obtained from the
real situation by concentrating on the dominate variables that control the behavior of
the system. Figure 1.1 depicts the levels of abstraction leading to the construction of a
model from a real life situation. The purpose of model is to describe, explain, or
predict the performance of a system.
Figure 1.1
Example: Pepsi production
Principles of Modeling
1- Do not build a complicated model when a simple one will suffice.
2- Beware of modeling the problem to fit the technique.
3- Models should be validated prior to implementation.
4- A model should never be taken too literally.
5- Beware of over selling a model.
6- Some of the primary benefits of modeling are associated with the process of
developing the model.
7- A model can not be any better than the information goes into it.
8- Models can not replace decision makers.
Systems Modeling
Steps of constructing models of systems:
Analog models: are more abstract than physical models, as they do not
resemble the real object. They are built by utilizing a set of properties or scheme
different from that which the object of inquiry possesses. For example, the different
colors on a map correspond to different characteristics, blue for water, brown for
deserts, etc.
Mathematical models: or symbolic models are most abstract. They employ a
set of symbols to represent the system of inquiry.
Simulation models: imitate the behavior of the system over a period of time. it
is usually possible to simulate complex systems that can not be modeled or solved
mathematically.
Linear Programming
Linear programming is a class of mathematical programming models concerned
with the efficient allocation of limited resources to known activities with the objective
of meeting a desired goal (such as maximizing profit or minimizing cost). The distinct
characteristic of linear programming models is that the functions representing the
objective and the constraints are linear.
1- Production planning.
2- Feed mix.
3- Stock cutting or slitting.
4- Water-quality management.
5- Oil drilling and production.
6- Assembly balancing.
7- Inventory.
1- What does the model seek to determine?, in other words; what are the
variables (unknowns) of the problem?
2- What constraints must be imposed on the variables to satisfy the limitations of
the modeled system?
3- What is the objective (goal) that needs to be achieved in order to determine the
optimum (best) solution from among all the feasible values of the variables?
Subject to
a11x1 + a12x2 + …… + a1nxn ( ≤, =, or ≥ ) b1
a21x1 + a22x2 + …… + a2nxn ( ≤, =, or ≥ ) b2
.
.
am1x1 + am2x2 + …… + amnxn ( ≤, =, or ≥ ) bm
1- All constraints are equations except for the non negativity constraints which
remain inequalities ( ≥0 ).
2- All right hand side element of each constraint equation is nonnegative.
3- All variables are nonnegative.
4- The objective function is of the maximization or minimization type.
Example:
Subject to
x1 + x2 + 3x3 ≤ 40
x1 + 9x2 - 7x3 ≥ 50
5x1 + 3x2 = 20
|5x2 + 8x3| ≤ 100
x1, x2 ≥0, x3 is unconstrained in sign
Re-write the above L.P model in standard form and canonical form.
Solution:
a- standard form
Subject to
x1 + x2 + 3(x`3 – x``3) + x4 = 40
x1 + 9x2 - 7(x`3 – x``3) – x5 = 50
5x1 + 3x2 = 20
5x2 + 8(x`3 – x``3) + x6 = 100
-5x2 - 8(x`3 – x``3) + x7 = 100
x1, x2, x`3, x``3, x4, x5, x6, x7 ≥0
b- Canonical form
Subject to
x1 + x2 + 3(x`3 – x``3) ≤ 40
-x1 - 9x2 + 7(x`3 – x``3) ≤ -50
5x1 + 3x2 ≤ 20
-5x1 - 3x2 ≤ -20
5x2 + 8(x`3 – x``3) ≤ 100
-5x2 - 8(x`3 – x``3) ≤ 100
x1, x2, x`3, x``3 ≥0
Example:
A company produces windows and glass doors. It has 3 plants, aluminum frames
and hardware are made in plant 1, wood of frames in plant 2, and plant 3 is used to
produce the glass and assemble the products after same reorganization, the company
decided to product 1*8 foot glass door with aluminum frame product 2 4*6 foot wood
framed window since both have to complete in plant 3, the number of units to be
made in each product so that the profit is maximum is the equestion that the
management wants to solve. The marketing department has concluded that the
company could sell as much of either products as could be produced with the
available capacity. The required data are as follows:
Solution:
Product 1 – glass door with Al. Frame.
Product 2 – wood framed window.
Let x1, x2 are the amount to be produced per unit in product 1 and product 2
respectively. Then, Decision variables are x1, x2
Profit = 3x1 + 5x2 = Z
Limitations:
Capacity of plant 1 1x1 + 0x2 ≤ 4
Capacity of plant 2 0x1 + 2x2 ≤ 12
Capacity of plant 3 3x1 + 2x2 ≤ 18
Non negativity constraint x1, x2≥0
The linear programming model is now summarized as follows:
Example:
Solve the following L.P graphically
Solution:
Since the above model is having only two variables (i.e two dimensions), it can be
solved by graphical method.
X1> 0
9 Optimum point
x1= 4
6 B C 2x2 = 12
D
Feasible
Region 3x1+2x2=18
X2 > 0
A E
4 6
The optimum solution is one of the corner points; called extreme points.
x1, x2,………, xn ≥ 0
Subject to
AX = b
X≥0
Example
Consider the following L.P problem
4
b= 6
2
1 2 1 1 0 0
A= 3 0 2 0 1 0
1 4 0 0 0 1
Subject to
Ax = b
x≥0
Example (1)
Three products are processed through three different operations. The time (in
minutes) required per unit of each product, the daily capacity of the operations (in
minutes per day) and the profit per unit sold of each product are as follows:
Solution:
Let X1, X2, and X3 be the number of daily units produced of products 1, 2, and 3.
Objective function:
Max Z = 3X1 + 2X2 + 5X3 (Total profit)
Constraints:
Operation 1: 1X1 + 2X2 + 1X3 ≤ 430
Operation 2: 3X1 + 0X2 + 2X3 ≤ 460
Operation 3: 1X1 + 4X2 + 0X3 ≤ 420
Subject to:
X1, X2, X3 ≥ 0
Example (2)
Four products are processed successively on two machines. The
manufacturing times in hours per unit of each product are tabulated below for the two
machines.
The total cost of producing a unit of each product is based directly on the machine
time. Assume the cost per hour for machines 1 and 2 are 10 L.D and 15 L.D. The total
hours budgeted for all the products on machines 1 and 2 are 500 and 380. If the sales
price per unit for products 1, 2, 3, and 4 are 65 L.D, 70 L.D, 55 L.D, and 45 L.D,
formulate the problem as a L.P model to maximize total net profit.
Solution:
Let xij = number of units to be produced from product i on machine j, where i = 1, 2,
3, 4 and j = 1, 2
Total net profit = (65-20) x11 + (70-30) x21 + (55-40) x31 + (45-20) x41
+ (65-45) x12 + (70-30) x22 + (55-15) x32 + (45-30) x42
Limitations:
2x11 + 3x21 + 4x31 + 2x41 ≤ 500
3x12 + 2x22 + x32 + 2x42 ≤ 380
Non-negativity constraints:
xij ≥ 0
Example (3)
Suppose the required daily batch of the feed mix 100 pounds. The diet must
contain:
1- At least 0.8 % but not more than 1.2 % calcium
2- At least 22 % protein
3- At most 5 % crude fiber
Suppose further that the main ingredients (or feed stuffs) used include limestone
(calcium carbonate), corn, and soybean meal. The nutritive content of these
ingredients is summarized below.
The goal of the model is to determine the optimal feed mix for meeting the nutritional
needs of an animal or a broiler at the least cost.
Solution:
Let x1, x2, and x3 be the amounts (in pounds) of limestone, corn, and soybean
meal used in producing the feed mix batch of 100 pounds. Then the L.P model
becomes:
Minimize Z = 0.0164 x1 + 0.0463 x2 + 0.1250 x3
Subject to
x1 + x2 + x3 = 100
0.380 x1 + 0.001 x2 + 0.002 x3 ≤ 0.012 * 100
0.380 x1 + 0.001 x2 + 0.002 x3 ≥ 0.008 * 100
0.09 x2 + 0.05 x3 ≥ 0.22 * 100
0.02 x2 + 0.08 x3 ≤ 0.05 * 100
x1, x2, x3 ≥ 0
Example (4)
A wealthy investor has three investment opportunities available at the
beginning of each of the next 5 years, and also has a total of 500,000 L.D available for
investment at the beginning of year one. A summary of the financial characteristics of
the three investment alternatives is presented in the following table.
This wealthy investor wishes to determine the investment plan that will maximize the
amount of money that can be accumulated by the beginning of the sixth year in the
future.
Solution:
Let xij (i=1, 2, 3 and j=1, 2, 3, 4, 5) represent the unknown amount to be
invested in alternative i at the beginning of year j. Similarly, let yj represent the
unknown amount not invested in any of the alternatives in period j.
Terminology
1- A feasible solution: is a solution for which all the constraints are satisfied.
Example:
Max Z = 3X1 + 5X2 X2
Subject to 9 optimum solution
X1 ≤4
2X2 ≤ 12 6
2- Optimal Solution: is the feasible solution that has the most favorable value of
the objective function.
Cases:
1- Unique finite optimum solution.
Opt. Sol.
O. f
(a) bounded region (b) unbounded region
3- Unbounded ( infinite ) optimum solution
O.f
Unbounded region
4- Infeasible Solution
Example
Max Z = 3X1 + 2X2
Subject to
X1 ≤4
2X2 ≤ 12
3X1 + 2X2 ≥ 27
X1 , X2 ≥ 0
Start
Any positive
contribution?
Optimum solution
Interpret results
End
Simplex Method Flow Chart
Example-1
The simplex tableau is used to record essential data and for calculations.
Objective function Z – 3X1 – 5X2 = 0
Subject to:
X1 + X3 = 4
2X2 + X4 = 12
3X1 + 2X2 + X5 = 18
X1, X2, X3, X4, X5 ≥ 0
entering
variable
Basic variables Z X1 X2 X3 X4 X5 R.H.S. Ratio
Z 1 -3 0 0 5/2 0 30
X3 0 1 0 1 0 0 4 4/1
X2 0 0 1 0 1/2 0 6 ---
X5 0 3 0 0 -1 1 6 6/3 (leaving variable}
Solution:
The standard form:
Z – 3X1 – 2X2 – 5X3 = 0
Sub. to:
X1 + 2X2 + X3 +X4 = 430
3X1 + 2X3 + X5 = 460
X1 + 4X2 + X6 = 420
X1, X2, X3, X4, X5, X6 ≥ 0
Entering
variable
Basic variables Z X1 X2 X3 X4 X5 X6 R.H.S. Ratio
Z 1 -3 -2 -5 0 0 0 0
X4 0 1 2 1 1 0 0 430 430/1
X5 0 3 0 2 0 1 0 460 460/2 leaving
X6 0 1 4 0 0 0 1 420 ----
Pivot element
Entering
variable
Basic variables Z X1 X2 X3 X4 X5 X6 R.H.S. Ratio
Z 1 9/2 -2 0 0 5/2 0 1150
X4 0 -1/2 2 0 1 -1/2 0 200 100 leaving
X3 0 3/2 0 1 0 1/2 0 230 ----
X6 0 1 4 0 0 0 1 420 105
Pivot element
M-method
Step-3- use the artificial variables as the starting basic variables. This can be achieved
by adding proper multipliers of the constrains equations to the Z-row.
Example :
Min Z = 4X1 + X2
Sub. to:
3X1 + X2 = 3
4X1 + 3X2 ≥ 6
X1 + 2X2 ≤ 3
X1, X2 ≥ 0
Solution:
Step-1- standard form
Min Z = 4X1 + X2
Sub. to:
3X1 + X2 = 3
4X1 + 3X2 – X3 = 6
X1 + 2X2 + X4 = 3
X1, X2, X3, X4 ≥ 0
Step-2- add artificial variables
Min Z = 4X1 + X2 + MR1 + MR2
Sub. to:
3X1 + X2 + R1 =3
4X1 + 3X2 – X3 + R2 = 6
X1 + 2X2 + X4 =3
X1, X2, X3, X4, R1, R2 ≥ 0
Where:
(R1, R2, X4) – are basic variables.
(X1, X2, X3) – are non basic variables.
M – very large +ve value.
Starting tableau:
Entering variable
Tableau-2
Entering variable
Tableau-3
Basic Z X1 X2 X3 X4 R1 R2 R.H.S. Ratio
Z 1 0 0 1/5 0 8/5-M -1/5-M 18/5 ---
X1 0 1 0 1/5 0 3/5 -1/5 3/5 3
X2 0 0 1 -3/5 0 -4/5 3/5 6/5 ----
X4 0 0 0 1 1 1 -1 0 0 (leaving)
Tableau-4
Basic Z X1 X2 X3 X4 R1 R2 R.H.S. Ratio
Z 1 0 0 0 -1/5 7/5-M -M 18/5
X1 0 1 0 0 -1/5 2/5 0 3/5
X2 0 0 1 0 3/5 -1/5 0 6/5
X3 0 0 0 1 1 1 -1 0
Optimum Solution:
X1=3/5 , X2=6/5 , Z=18/5
The Two-phase Method
Phase-I-
Construct a new problem by replacing the original objective function with the
sum of the artificial variables. This new function is minimized subject to the
constraints of the original problem. If the problem has a feasible space; the minimum
value of the new objective function will by zero (All artificial variables take zero
values); then go to phase II.
Phase-II-
Use the optimum basic feasible solution of phase-I as the starting solution of
phase-II and proceed with the usual simplex method.
Example :
Min Z = 4X1 + X2
Sub. to:
3X1 + X2 = 3
4X1 + 3X2 ≥ 6
X1 + 2X2 ≤ 3
X1, X2 ≥ 0
Solution:
Standard form:
Min Z – 4X1 – X2 = 0
Sub. to:
3X1 + X2 = 3
4X1 + 3X2 – X3 = 6
X1 + 2X2 + X4 = 3
X1, X2, X3, X4 ≥ 0
Phase-I
Min r = R1 + R2
Sub. to:
3X1 + X2 + R1 =3
4X1 + 3X2 – X3 + R2 = 6
X1 + 2X2 + X4 =3
X1, X2, X3, X4, R1, R2 ≥ 0
Starting tableau
Entering variable
After 3-iterations
Basic r X1 X2 X3 X4 R1 R2 R.H.S. Ratio
r 1 0 0 0 0 -1 -1 0
X1 0 1 0 1/5 0 3/5 -1/5 3/5
X2 0 0 1 -3/5 0 -4/5 3/5 6/5
X4 0 0 0 1 1 1 -1 0
Phase-II
Since r=0 use the basic feasible solution of phase-I as starting basic feasible
solution and replace r-equation by Z-equation.
Entering variable
Note:
In phase-II, the artificial variables are removed only if they are non-basic of
the optimum of phase-I. Situation may arise where r0 = 0 but artificial variables are
basic with zero level. In such cases those variables are not removed.
This section introduces some important cases often encountered in the simplex
method applications. The cases discussed here include;
1- Degeneracy 2- Unbounded solutions 3- Alternative solutions
4- Non-existing feasible solutions
1- Degeneracy
At any iteration, a tie in selecting a leaving variable is broken arbitrarily. The
problem occurs at the next iteration when the values of one or more basic variables
taken a zero value, in which case the solution is said to be degenerate.
Example:
Solve the following L.P. problem
Max. Z = 3X1 + 9X2
Sub. to: X1 + 4X2 ≤ 8
X1 + 2X2 ≤ 4
X1, X2 ≥ 0
Solution:
Starting tableau
Iteration-2
Basic Z X1 X2 X3 X4 R.H.S Raito
Z 1 0 0 3/2 3/2 18
X2 0 0 1 1/2 -1/2 2
X1 0 1 0 -1 2 0
X1= 0, X2 = 2, Z = 18
1 F.R
2 4 6 8
Example (Temporary degeneracy)
Max. Z = 2X1 + X2
Solution
Starting tableau
Basic Z X1 X2 X3 X4 X5 R.H.S Ratio
Z 1 -2 -1 0 0 0 0
X3 0 4 3 1 0 0 12 3
X4 0 4 1 0 1 0 8 2
X5 0 4 -1 0 0 1 8 2
4 F.R
1 2 3
-4
-8
degenerate non opt.
2- Unbounded Solution
In some LP models, the values of the variables may be increased
indefinitely without violating any of the constraints, meaning that the solution
space is unbounded in at least one direction. As a result, the objective value may
increase (maximization case) or decrease (minimization case) indefinitely. In this
case we say that both the solution space and the "optimum" objective value are
unbounded. The following examples show how unboundedness, both in the solution
space and the objective value, can be recognized in the simplex tableau.
Starting Iteration
Basic x1 x2 x3 x4 Solution
z -2 -1 0 0 0
x3 1 -1 1 0 10
x4 2 0 0 1 40
In the starting tableau, both x1 and x2 are candidates for entering the solution.
Since x1 has the most negative coefficient, it is normally selected as the entering
variable. Notice, however, that all the constraint coefficients under x2 are negative or
zero, meaning that x2 can be increased indefinitely without violating any of
the constraints. Since each unit increase in x 2 will increase z by 1, an infinite
increase in x 2 will also result in an infinite increase in z. Thus we conclude
without further computations that the problem has no bounded solution. This result
can be seen in the Figure below. The solution space is unbounded in the direction of
x2 and the value of z can be increased indefinitely.
The general rule for recognizing unboundedness is as follows. If at any
iteration the constraint coefficients of a nonbasic variable are nonpositive, then the
solution space is unbounded in that direction. If, in addition, the objective
coefficient of that variable is negative in the case of maximization or positive in
the case of minimization, then the objective value also is unbounded.
We next present an example which shows that the solution space can be
unbounded while the optimum objective value remains finite. Remember that this
condition also signals the possibility of an irregularity in the construction of the
model, since it implies that a variable can be increased without limit.
The following table summarizes the simplex iterations of the model. The
starting iteration shows that the solution space is unbounded in the direction of x2.
However, since x2 does not have a negative coefficient in the z-equation, we can not
conclude at this point that the objective value is unbounded. Indeed, iteration 2
shows that the optimum objective value is finite. The Figure below demonstrates
the solution graphically. It is evident that the slope of the objective function is
crucial in determining whether or not the objective value is bounded.
Iteration Basic x1 x2 x3 x4 Solution
0 z -6 2 0 0 0
(starting) x3 2 -1 1 0 2
x1 enters x4 1 0 0 1 4
x3 leaves
1 z 0 -1 3 0 6
x2 enters x1 1 -1/2 1/2 0 1
x4 leaves x4 0 1/2 -1/2 1 3
2 z 0 0 2 2 12
(optimum) x1 1 0 0 1 4
x2 0 1 -1 2 6
3- Alternative Solution
4- Infeasible Solution
If the constraints cannot be satisfied simultaneously, the model is said to have no
feasible solution. This situation can never occur if all the constraints are of the type <
(assuming nonnegative right-side constants), since the slack variable always provides a
feasible solution. However, when we employ the other types of constraints, we resort to
the use of artificial variables which, by their very design, do not provide a feasible solution
to the original model. Although provisions are made (through the use of penalty) to force
the artificial variables to zero at the optimum, this can occur only if the model has a
feasible space. If it does not, at least one artificial variable will be positive in the optimum
iteration. This is our indication that the problem has no feasible solution.
From the practical standpoint, an infeasible space points to the possibility that the
model is not formulated correctly, since the constraints are in conflict. It is also possible
that the constraints are not meant to be satisfied simultaneously. In this case, a completely
different model structure that does not admit all constraints simultaneously may be
needed. The following example illustrates the case of infeasible solution space.
Maximize z= 3 x1 + 2x2
Subject to:
2X1 + X2 ≤ 2
3X1 + 4X2 ≤ 12
X1, X2 > 0
The simplex iterations in the Table below show that the artificial variable R is
positive (= 4) in the optimal solution. This is an indication that the solution space
is infeasible. The Figure below demonstrates the infeasible solution space.
Iteration Basic Xl x2 x4 x3 R Solution
0 z -3-3M -2-4M M 0 0 -12M
(starting) x3 2 1 0 1 0 2
x2 enters
R 3 4 -1 0 1 12
x3 leaves
1 z 1+5M 0 M 2 + 4M 0 4-4M
(pseudo- x2 2 1 0 1 0 2
optimum) R -5 0 -1 -4 1 4
XB
The point X = where X B = B-1 b , XN = 0
XN
is a basic solution to the above L.P. problem. If XB ≥ 0, then X is a basic feasible
solution. This can be written as;
XB
Min Z = CX = ( C B CN )
XN
Subject to
XB
(B N) =b
XN
XB , XN ≥ 0
Where:
CB = coefficients of basic variables.
CN = coefficients of nonbasic variables.
B = basic matrix
N = non basic matrix
Z = CB XB + CN XN
Z - CB XB + CN XN = 0 (1)
B XB + N XN = b (2)
Multiply equation (2) by B -1
I XB + B-1N XN = B-1 b (3)
Multiply equation (3) by CB and add the result to equation (1)
Z + (CB B-1N - CN)XN = CB B-1 b (4)
Write equations (3) and (4) in the following table (simplex tableau).
Basic Z XB XN R.H.S
Z 1 0 CB B-1N - CN CB B-1 b
XB 0 I B-1N B-1 b
Example
Max Z = 4X1 + 14X2
Subject to
2X1 + 7X2 ≤ 21
7X1 + 2X2 ≤ 21
X1, X2 ≥ 0
Solution
Standard form:
Max Z = 4X1 + 14X2 + 0X3 + 0X4
Sub. to
2X1 + 7X2 + X3 = 21
7X1 + 2X2 + X4 = 21
X1, X2, X3, X4 ≥ 0
C = [4 14 0 0]
2 7 1 0 x1 21
A= x= x2 b=
7 2 0 1 x3 21
x4
X2 7 0 2 1
XB = C B= ( 14 0) B= N=
X4 2 1 7 0
1/7 0
B-1 =
-2/7 1
2 1/7 0 2 2/7
P1 = P’1 = B-1 P1= =
7 -2/7 1 7 45/7
1 1/7 0 1 1/7
P3 = P’3 = B-1 P3= =
0 -2/7 1 0 -2/7
1/7 0 21 3
R.H.S = B-1 b= =
-2/7 1 21 5
1/7 0 2 2/7
C’1= CB B-1 P1 – C1 = [14 0] - 4 = [14 0] -4=0
-2/7 1 7 45/7
1/7
C’3= CB B-1 P3 – C3 = CB P’3 – C3= [14 0] -0=2
-2/7
3
Z = CB B-1 b = [14 0] = 42
15
Basic Z X1 X2 X3 X4 R.H.S
Z 1 0 0 2 0 42
X2 0 2/7 1 1/7 0 3
X4 0 45/7 0 -2/7 1 15
The matrix under the starting basic variables at any iteration is equal to B-1 .
Example
Consider the following L.P.P.
Basic Z X1 X2 X3 X4 X5 R.H.S
Z 1 0 a 7 d e 150
X1 0 1 b 2 1 0 α
X5 0 0 c -8 -1 1 β
Solution
X1 1 0 1 0
XB = C B= (5 0) B= B-1 =
X5 1 1 -1 1
1 0 5 5
a= C’2= CB B-1 P2 – C2 = [5 0] - 2 = [5 0] - 2 = 23
-1 1 -5 -10
b 1 0 5 5
P’2 = = B-1 P2= =
c -1 1 -5 -10
1 0 1 1
d= C’4= CB B-1 P4 – C4 = [5 0] - 0 = [5 0] -0=5
-1 1 0 -1
1 0 30 30
R.H.S = B-1 b= =
-1 1 40 10
α = 30, β = 10
Duality Theory
Every L.P. problem has an associated L.P. problem called ―Dual‖, so that
the solution of the original problem called ―Primal‖ also gives the solution of the
dual and vice versa.
Maximize Z = ∑ cj xj
Subject to
∑ aij xj ≤ bi i = 1, 2,…., m
xj ≥ 0 j = 1, 2,….., n
Minimize W = ∑ bi yi
Subject to
∑ aij yj ≥ cj i = 1, 2,…., m
yi ≥ 0 j = 1, 2,….., n
Example
Example
Primal Dual
Maximization Minimization
Coefficient matrix Transpose of coefficient matrix
R.H.S Cost vector
Example
Example
A X0 ≤ b [1]
Y0 A ≥ c [2]
Multiply equation [1] by Y 0 the result is Y 0 A X0 ≤ Y0b [3]
Multiply equation [2] by X 0 the result is Y 0 A X0 ≥C X0 [4]
From [3] and [4], Y0b ≥Y0 A X0 ≥C X0
Then, Y0b ≥ C X0
Then we conclude that, W0 ≥ Z0
1- The value of the objective function of the maximization problem for any of
its feasible solutions is a lower bound for the minimization problem.
2- The value of the objective function of the minimization problem for any of
its feasible solutions is an upper bound for the maximization problem.
3- If the Primal solution is unbounded, the Dual solution is infeasible.
4- If the Dual solution is unbounded, the Primal solution is infeasible.
5- If the Primal solution is infeasible, the Dual solution is unbounded or
infeasible.
6- If the Dual solution is infeasible, the Primal solution is unbounded or
infeasible.
If both Primal and Dual problems are feasible, then they both have optimal
solutions such that their optimal values of the objective functions are equal.
Example
Subject to
X1 + 2X2 + X3 + X4 = 5
2X1 - X2 + 3X3 + R1= 2
X1, X2,X3, X4, R1 ≥ 0
Solution of Primal
Solution of Dual
Initial tableau
Basic W Y1 Y’2 Y‖2 Y3 Y4 Y5 Rd1 Rd2 Rd3 R.H.S
W 1 -5 -2 2 0 0 0 -M -M -M 0
Rd1 0 1 2 -2 -1 0 0 1 0 0 5
Rd2 0 2 -1 1 0 -1 0 0 1 0 12
Rd3 0 1 3 -3 0 0 -1 0 0 1 4
W proper 1 -5+4M -2+4M 2-4M -M -M -M 0 0 0 21 M
2/5 -1/5
Form optimal Primal tableau, C B = [12 5] B-1 =
1/5 2/5
2/5 -1/5
∏ = CB B-1 = [12 5] = [29/5 -2/5]
1/5 2/5
∏ = [9/5 8/5 0]
Example
Consider the following Primal problem,
Max Z= 5X1 + 12X2 + 4X3
Sub. to X1 + 2X2 + X3 ≤ 5
2X1 – X2 + X3 = 2
X1, X2, X3 ≥ 0 3/7 -1/7
-1
At the second iteration, X2 and X3 is the basic variables and B =
1/7 2/7
Find the dual solution.
3/7 -1/7
∏ = CB B-1 = [12 4] = [40/7 -4/7]
1/7 2/7
Y1= 40/7, Y2= -4/7
At any iteration in the simplex tableau, by substituting the simplex
multipliers for the corresponding variables in the Dual constraints, the
coefficients in Z-row equation of primal are given by the difference between the
left hand side and right hand side of the corresponding dual.
Example
Solution
Y2
Optimal Solution
Y1= 1.2, Y2= 0.2
1/2 W= 28
3/2
Y1
1 4/3
3
1
2 4
Y1* = 1.2, Y2* = 0.6, Z* = 28
Y3* = Y1* + 2Y2* -1 = 0.6
Y4* = 2Y1* + Y2* -2 = 0.6
Y5* = 2Y1* + 3Y2* -3 = 0
Y6* = 3Y1* + 2Y2* -4 = 0
Solving the two equations simultaneously for the X3* and X4* values, we will find,
X3*= 4 and X4* = 4 and Z* = 3(4) +4(4) = 28
At optimal solution, Z* = W* = Y* b
i.e Z* = Y1* b1 + Y2* b2 +…… Yi* bi + Ym* bm
∆Z = Yi* . ∆bi
If we increase the level of resource i by ∆bi, let the change in Z is ∆Z.
∆Z
= Yi*
∆bi
Yi* = the change in the objective function value of (Primal) when the level of
resource i is increased by 1 unit this is called [shadow price].
Dual Simplex Method
Satisfying the optimality condition of the simplex method [i.e Z-row
coefficients] implies that the Dual is feasible and if Primal is feasible [i.e when both
problems are feasible], the solution is optimal.
In the (Primal) simplex method we move from one feasible solution to another
until the optimum (i.e Dual feasibility) is reached.
In (Dual) simplex method we move from one Dual feasible solution to another
until Primal becomes feasible.
Example
Solution
By putting the constraints in (≤) form and adding the slack variables,
Basic Z X1 X2 X3 X4 X5 X6 R.H.S
Z 1 -1 -4 0 -3 0 0 0
X5 0 -1 -2 1 -1 1 0 -3 X5 leaving
X6 0 2 1 -4 -1 0 1 -2 X1 entering
Ratio 1 2 -- 3 -- --
For Minimization problems, the entering variable is the one having minimum ratio.
For Maximization problems, the entering variable is the one having minimum absolute
value of the ratio.
Using the usual pivot operations obtain the solution.
Basic Z X1 X2 X3 X4 X5 X6 R.H.S
Z 1 0 -2 -1 -2 -1 0 3
X1 0 1 2 -1 1 -1 0 3 X6 leaving
X6 0 0 -3 -2 -3 2 1 -8 X3 entering
Ratio -- 2/3 1/2 2/3 -- --
Basic Z X1 X2 X3 X4 X5 X6 R.H.S
Z 1 0 -1/2 0 -1/2 -2 -1/2 7
X1 0 1 7/2 0 5/2 -2 -1/2 7
X3 0 0 3/2 1 3/2 -1 -1/2 4
If there is no (-ve) coefficient in the row corresponds to the leaving variable, the
problem does not have feasible solution.