0% found this document useful (0 votes)
11 views47 pages

Operations Research

بحوث العمليات 1

Uploaded by

salmaeyomi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views47 pages

Operations Research

بحوث العمليات 1

Uploaded by

salmaeyomi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 47

COURSE: OPERATIONS RESEARCH

INSTRUCTOR: Prof. Dr. AMER BOUSHAALA

CLASS HOURS: Sun (16:00-18:00) @ Wed (16:00-18:00)

REQUIRED TEXT BOOK:


OPERATIONS RESEARCH: An Introduction, By HAMDY A. TAHA

GENERAL POLICY:

- Homework problems will be assigned and should be submitted in a


week later.
- A number of unannounced quizzes will be given.
- Two Midterm exams (25% each) are scheduled

GRADING SCHEME:

H.W & Quizzes 10%


Midterm Exams 50%
Final Exam 40%
COURSE CONTENTS:

1- Introduction

2- Linear Programming

a- Graphical example
b- General definition
c- Mathematical formulations

3- Simplex Method

a- Setting up the simplex method


b- Algebra of simplex method
c- Tabular form
d- Variations
e- Matrix method

4- Duality Theory

a- Dual problem
b- Primal dual properties
c- Dual simplex method

5- Special Types of Linear Programming


a- Transportation problem
b- Assignment model

6- Integer Programming

7- Introduction to CPM/PERT models


Operations Research-I (IE 331)

Introduction

Operations research has been defined by Stafford Beer as a subject which is


concerned with the application of the principles and methods of science to the
problems of strategy. Operations research seeks the determination of the best
(optimum) course of action of a decision problem under the restriction of limited
resources.

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

Military, Industry, Business, Financial institutions, Agriculture, etc.

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.

Real world system


Assumed real
model
world system

Figure 1.1
Example: Pepsi production

Real world: availability of material, labor, capacity of machines,


distribution of products, competitive products.

Dominated factors: availability of material, labor, capacity of machines.

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:

1- Identify and formulate the manager’s decision in writing.


2- Identify the constants, parameters and variables involved.
3- Select the appear to be most influential so that the model may kept as simple.
4- State verbal relationships among the variables based on known principles,
specially gathered data, intuition, and reflection make assumptions or predictions
concerning the behavior of the non controllable variables.
5- Construct the model by combining all relationships in to a system of symbolic
relationships.
6- Perform symbolic manipulations
7- Derive solutions from the model.
8- Test the model by making predictions from it and checking against real world
data.
9- Revise the model as necessary.
Types of Models
Physical models: are those models which have the appearance of the real
thing. Examples of such models are children’s toys, sculptures, photographs, and
paintings.

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.

Heuristic methods: heuristics can be used to develop good (approximation)


solutions when the mathematical formulation may be too complex to allow an exact
solution. Heuristics are search procedures that intelligently move from one solution
point to another with the objective of improving the value of the model objective.

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.

Examples of linear programming applications

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.

Formulation of L.P Problem


For formulating an optimization problem into an L.P problem we have to satisfy
the following:

1- Objective function: An L.P problem must have an explicit objective function


in which profit or cost or any other measure of value is expressed as a linear
relationship in decision variables.
2- Decision variables: The decision variables will have to be explicitly defined.
For example, the decision variables in some cases is manpower, machine capacity,
availability of raw materials.
3- Limitation in resources: If resources were unlimited, there would have been no
problem in their allocation. The problem of optimal allocation arises only by
taking into view limitations as production capacity, manpower, money or
technological expertise, … etc.
4- Formulation of the optimization problem: The optimization problem is defined
as follows: optimize (maximize or minimize) the objective function with respect
to decision variables subject to the limitation of resources denoted by a set of
constraints (which are a set of inequalities).
5- Deterministic nature: it is assumed that all model parameters are known with
certainty. Thus the profit per unit sold or cost per unit purchased, amount of
resources available are known. There is no scope of random variation.

Construction of the Mathematical Model


The construction of a mathematical model can be initiated by answering the
following three questions:

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?

Structure of a Mathematical Model

1- Decision variables and parameters


Decision variables (unknowns to be determined from the solution of the model),
and parameters (known factors. i.e data or controllable variables).
2- Constraints (restrictions)
To account for the physical limitations of the system.
3- Objective function
The measure of effectiveness of the system as a mathematical function of the
decision variables.

General Definition of L.P Model


A L.P problem may be of maximization or minimization type. The constraints
may be of the type ( ≤ ), ( = ), or ( ≥ ) and variables may be nonnegative or
unrestricted in sign. A general linear programming model thus is usually defined
as follows:

Maximize or minimize Z = c1x1 + c2x2 + ….. + cnxn

Subject to
a11x1 + a12x2 + …… + a1nxn ( ≤, =, or ≥ ) b1
a21x1 + a22x2 + …… + a2nxn ( ≤, =, or ≥ ) b2
.
.
am1x1 + am2x2 + …… + amnxn ( ≤, =, or ≥ ) bm

x1, x2, ……,xn ≥0

xi = decision variables i = 1,2, …., n


ci = cost coefficients
aij = technological coefficients
The Canonical Form
The characteristics of this form are:

1- All decision variables are nonnegative.


2- All constraints are of the ( ≤ ) type.
3- The objective function is of the maximization type.

The Standard Form


The characteristics of the standard form are:

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:

Consider the L.P problem

Minimize Z = 3x1 – 3x2 + 7x3

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

Minimize Z = 3x1 - 3x2 + 7(x`3 – x``3)

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

Maximize Y = (-Z) = -3x1 + 3x2 - 7(x`3 – x``3)

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:

capacity used per unit capacity


product 1 2 available
plant
1 1 0 4
2 0 2 12
3 3 2 18
unit profit (L.D) 3 5

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:

Maximize Z =3x1 + 5x2


Subject to
1x1 ≤4
2x2 ≤ 12
3x1 + 2x2 ≤ 18
x 1, x 2 ≥ 0

Graphical (Geometric) Solution

Example:
Solve the following L.P graphically

Maximize Z =3x1 + 5x2


Subject to
1x1 ≤4
2x2 ≤ 12
3x1 + 2x2 ≤ 18
x 1, x 2 ≥ 0

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.

Point (X1,X2) Z value


A (0,0) 0
B (0,6) 30
C (2,6) 36 (optimum value)
D (4,3) 30
E (4,0) 12
The optimal solution is:

x1= 2, x2 = 6 and Z = 3*(2) + 5*(6) = 36

Linear Programming in Matrix Form

L.P Model is defined as:


Minimize Z = c1x1 + c2x2 + ……. + cnxn
Subject to
a11x1 + a12x2 + ……+ a1nxn = b1
a21x1 + a22x2 + ……+ a2nxn = b2
:
:
am1x1 + am2x2 + ……+ amnxn = bm

x1, x2,………, xn ≥ 0

This can be re-written as;


Minimize Z = ∑cj xj
Subject to
∑ aij xj = bi I = 1, 2,…., m
xj ≥ 0 j = 1, 2,….., n
Denote;
c = [c1 ,c2 ,….., cn]

a11 a12 ….. a1n x1 b2


A= a21 a22 ….. a2n x= x2 b= b2
: : :
am1 am2 …. amn xn bm

Then L.P Model in Matrix Form is;


Minimize Z = CX

Subject to
AX = b
X≥0
Example
Consider the following L.P problem

Maximize Z = 3x1 + 2x2 + 5x3


Subject to
x1 + 2x2 + x3 + x4 =4
3x1 +2x3 + x5 =6
x1 + 4x2 + x6 = 2

x1, x2, x3, x4, x5, x6 ≥ 0

This can be re-written as;


c = [3, 2, 5, 0, 0, 0]

4
b= 6
2

1 2 1 1 0 0
A= 3 0 2 0 1 0
1 4 0 0 0 1

Then L.P Model in Matrix Form is:


Maximize Z = cx

Subject to
Ax = b
x≥0

Examples of Mathematical Formulations

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:

Time per unit (minutes) operation capacity


operation product 1 product 2 product 3 (minutes/day)
1 1 2 1 430
2 3 0 2 460
3 1 4 0 420
profit/unit 3 2 5
The goal of the model is to determine the optimum daily production for the three
products that maximizes profit.

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

Because it is nonsensical to produce negative quantities, the additional non negativity


constraints X1 ≥ 0, X2 ≥ 0, and X3 ≥ 0 must be added.

The linear programming model is now summarized as follows:

Max Z = 3X1 + 2X2 + 5X3

Subject to:

1X1 + 2X2 + 1X3 ≤ 430


3X1 + 2X3 ≤ 460
1X1 + 4X2 ≤ 420

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.

Time per unit (hours)


Machine product 1 product 2 product 3 product 4
1 2 3 4 2
2 3 2 1 2

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

The L.P model is now summarized as follows:

Maximize Z = 45 x11 + 40 x21 + 15 x31 + 25 x41


+ 20 x12 + 40 x22 + 40 x32 + 15 x42
Subject to
2x11 + 3x21 + 4x31 + 2x41 ≤ 500
3x12 + 2x22 + x32 + 2x42 ≤ 380
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.

Pounds per pound of ingredient


Ingredient Calcium Protein Fiber Cost per pound
Limestone 0.380 0.00 0.00 0.0164
Corn 0.001 0.09 0.02 0.0463
Soybean meal 0.002 0.05 0.08 0.1250

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.

Investment Allowable size of Return (%) Timing of return


initial investment
1 100,000 9 1 year later
2 Unlimited 6 2 years later
3 50,000 10 3 years later

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.

The L.P model of this problem is;

Maximize Z = 1.09 x15 + 1.06 x24 + 1.10 x33 + y5


Subject to
(year 1) x11 + x21 + x31 + y1 = 500,000
(year 2) - y1 – 1.09 x11 + x12 + x22 + x32 + y2 = 0
(year 3) - y2 – 1.06 x21 - 1.09 x12 + x13 + x23 + x33 + y3 = 0
(year 4) - y3 – 1.10 x31 – 1.06 x22 - 1.09 x13 + x14 + x24 + x34 + y4 = 0
(year 5) - y4 – 1.10 x32 – 1.06 x23 - 1.09 x14 + x15 + x25 + x35 + y5 = 0
x11 ≤ 100,000
x12 ≤ 100,000
x13 ≤ 100,000
x14 ≤ 100,000
x15 ≤ 100,000
x31 ≤ 50,000
x32 ≤ 50,000
x33 ≤ 50,000
x34 ≤ 50,000
x35 ≤ 50,000
xij ≥ 0, yj ≥ 0
Simplex Method

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

3X1 + 2X2 ≤ 18 3 feasible


region
X1 , X2 ≥ 0 X1
4 5 6 o.f

Any point within the feasible region corresponds to feasible solution

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. Opt. Sol.

(a) bounded region (b) unbounded region

2- Alternative finite optimum solution

Opt. Sol.

Opt. Sol. O.f

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

Set up L.P problem in standard form

Insert slack variables and set up initial


tableau

Any positive
contribution?

ٍ ٍ Select highest contribution and


identify pivot element with minimum
R.H.S ratio

Make pivot element in to unity

By row operations make elements in


pivot element column in to zeros

Set up new tableau

Optimum solution

Interpret results

End
Simplex Method Flow Chart
Example-1

Solve the following L.P. problem


Max Z = 3X1 + 5X2
Subject to :
X1 ≤ 4
2X2 ≤ 12
3x1 + 2X2 ≤ 18
X1, X2 ≥ 0
Solution

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

Initial (starting) table:


Pivot
column
Basic variables Z X1 X2 X3 X4 X5 R.H.S. Ratio
Z 1 -3 -5 0 0 0 0
X3 0 1 0 1 0 0 4 ---
X4 0 0 2 0 1 0 12 12/2 (Pivot row)
X5 0 3 2 0 0 1 18 18/2
Pivot element

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}

Basic variables Z X1 X2 X3 X4 X5 R.H.S. Ratio


Z 1 0 0 0 3/2 1 36
X3 0 0 0 1 -2/3 -1/3 2
X2 0 0 1 0 1/2 0 6
X1 0 1 0 0 -1/3 1/3 2

The optimum solution is :


X1 = 2, X2 = 6
Z = 3(2) + 5(6) =36
Example-2
Solve the following L.P. problem
Max Z = 3X1 + 2X2 + 5X3
Sub. to:
X1 + 2X2 + X3 ≤ 430
3X1 + 2X3 ≤ 460
X1 + 4X2 ≤ 420
X1, X2, X3 ≥ 0

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

Basic variables Z X1 X2 X3 X4 X5 X6 R.H.S. Ratio


Z 1 4 0 0 1 2 0 1350
X2 0 -1/4 1 0 1/2 -1/4 0 100
X3 0 3/2 0 1 0 1/2 0 230
X6 0 2 0 0 -2 1 1 20

The optimal solution is:


X1 = 0, X2 = 100, X3 = 230
Z = 3(0) + 2(100) + 5(230) = 1350
Artificial variables technique

When at least one constraint is of the type ( ≥ or = ); a starting solution can be


obtained using artificial variables. There are two methods to handle artificial
variables:
(1) M-method (2) Two-phase method

M-method

Step-1- express the problem in to the standard form.

Step-2- add artificial variables ( non-negative ) to the constraints of the type ( ≥ ) or


(=). And assigning a very large per unit penalty to those artificial variables in the
objective function by (-M ) for maximization problem and (+M ) for minimization
problem.

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.

Step-4- proceed with regular steps of the simplex method.

Example :

Solve the following L.P. problem

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.

Steps-3@4- regular simplex method.

Starting tableau:

Entering variable

Basic Z X1 X2 X3 X4 R1 R2 R.H.S. Ratio


Z 1 -4 -1 0 0 -M -M 0 ---
R1 0 3 1 0 0 1 0 3 1 (leaving)
R2 0 4 3 -1 0 0 1 6 3/2
X4 0 1 2 0 1 0 0 6 3
Z (proper) 1 7M-4 4M-1 -M 0 0 0 9M ---

Tableau-2
Entering variable

Basic Z X1 X2 X3 X4 R1 R2 R.H.S. Ratio


Z 1 0 (1+5M)/3 -M 0 (4 -7M)/3 0 4+2M ---
X1 0 1 1/3 0 0 1/3 0 1 3
R2 0 0 5/3 -1 0 -4/3 1 2 6/5 (leaving)
X4 0 0 5/3 0 1 -1/3 0 2 6/5

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

Consists of two phases:

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 :

Solve the following L.P. problem

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

Basic r X1 X2 X3 X4 R1 R2 R.H.S. Ratio


r 1 0 0 0 0 -1 -1 0 ---
R1 0 3 1 0 0 1 0 3 1 (leaving)
R2 0 4 3 -1 0 0 1 6 3/2
X4 0 1 2 0 1 0 0 6 3
r (proper) 1 7 4 -1 0 0 0 9 ---

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

Basic Z X1 X2 X3 X4 R.H.S. Ratio


Z 1 -4 -1 0 0 0
X1 0 1 0 1/5 0 3/5 3
X2 0 0 1 -3/5 0 6/5 -----
X4 0 0 0 1 1 0 0 (leaving)
Z proper 1 0 0 1/5 0 18/5

Basic Z X1 X2 X3 X4 R.H.S. Ratio


Z 1 0 0 0 -1/5 0
X1 0 1 0 0 -1/5 3/5 3
X2 0 0 1 0 3/5 6/5 -----
X3 0 0 0 1 1 0 0 (leaving)

The optimal solution:


X1= 3/5 , X2=6/5 , Z=18/5

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.

Variants of the Simplex Method Applications

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

Basic Z X1 X2 X3 X4 R.H.S Raito


Z 1 -3 -9 0 0 0
X3 0 1 4 1 0 8 2
X4 0 1 2 0 1 4 2
Pivot element
Iteration-1
Basic Z X1 X2 X3 X4 R.H.S Raito
Z 1 -3/4 0 9/4 0 18
X2 0 1/4 1 1/4 0 2
X4 0 1/2 0 -1/2 1 0
Pivot element
X4 = 0, degenerate basic feasible solution

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

Degenerate optimum solution

2 when ever, a redundant constraint is passing through


a basic feasible solution that solution degenerates.

1 F.R

2 4 6 8
Example (Temporary degeneracy)

Max. Z = 2X1 + X2

Sub. to: 4X1 + 3X2 ≤ 12


4X1 + X2 ≤ 8
4X1 – X2 ≤ 8
X1, X2 ≥ 0

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

Basic Z X1 X2 X3 X4 X5 R.H.S Ratio


Z 1 0 -1/2 0 1/2 0 4
X3 0 0 2 1 -1 0 4 2
X1 0 1 1/4 0 1/4 0 2 8
X5 0 0 -2 0 -1 1 0 -
Degenerate non opt. Solution X1 = 2, X3 = 4, Z = 4

Basic Z X1 X2 X3 X4 X5 R.H.S Ratio


Z 1 0 0 1/4 1/4 0 5
X2 0 0 1 1/2 -1/2 0 2
X1 0 1 0 -1/8 3/8 0 3/2
X5 0 0 0 1 -2 1 4

Non degenerate opt. Solution X1 = 3/2, X2 = 2, Z = 5

8 non degenerate opt. Sol.

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.

Example (Unbounded Objective Value)


Maximize z= 2 x1 + x2
Subject to:
X1 - X2 ≤ 10
2X1 ≤ 40
X1, X2 > 0

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.

Example (Unbounded Solution Space but Finite Optimum Objective Value)


Maximize z= 6x1 -2x2
Subject to:
2X1 - X2 ≤ 2
X1 ≤4
X1, X2 > 0

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

When the objective function is parallel to a binding constraint (i.e., a


constraint that is satisfied in the equality sense by the optimal solution), the
objective function will assume the same optimal value at more than one solution
point. For this reason they are called alternative optima. The next example
shows that normally there is an infinity of such solutions .

Example (Infinity of Solutions)


Maximize z= 2 x1 + 4x2
Subject to:
X1 + 2 X2 ≤ 5
X1 + X2 ≤ 4
X1, X2 > 0
The Figure below demonstrates how alternative optima can arise in LP
model when the objective function is parallel to a binding constraint. Any point
on the line segment BC represents an alternative optimum with the same
objective value z = 10.

Algebraically, we know that the simplex method is capable of encountering


corner-point solutions only. The table below shows that the optimum (X1= 0,
X2 = 5/2, Z = 10) is encountered in iteration 1 at point B. How do we know
from this tableau that alternative optima exist? Look at the coefficients of the
nonbasic variables in the z-equation of iteration 1. The coefficient of (nonbasic) X1
is zero, indicating that X1 can enter the basic solution without changing the
value of Z, but causing a change in the values of the variables. Iteration 2 does
just that—letting X1 enter the basic solution, which will force x 4 to leave. This
results in the new solution point at C (xi = 3, x 2 = 1, z = 10).

Iteration Basic X1 X2 X3 X4 Solution


0 Z -2 -4 0 0 0
(starting)
x2 enters X3 1 2 1 0 5
x3 leaves X4 1 1 0 1 4
1 Z 0 0 2 0 10
(optimum)
x1 enters X2 1/2 1 1/2 0 5/2
x4 leaves
X4 1/2 0 -1/2 1 3/2
2 Z 0 0 2 0 10
(alternate)
optimum) X2 0 1 1 1 1
X1 1 0 -1 2 3

AS expected, the-simplex method determines only the two corner points B


and C. Mathematically, we can determine all the points (x l , x2 ) on the line
segment BC as a nonnegative weighted average of the points B and C. That is,
given 0 ≤ α ≤ 1 and
B: x l = 0, x 2 = 5/2
C: x1 = 3, x2 = 1
then all the points on the line segment BC are given by
x 1 = α (0) + (1 - α) (3) = 3 - 3 α
x 2 = α (5/2) + (1 - α) (1) = 1 + 3 α /2
Observe that when α = 0, (x1, x 2 ) = (3, 1), which is point C.
When α =1, (x1, x 2 ) = (0, 5/2), which is point B. For values of α between 0
and 1, (x1, x 2 ) lies between B and C.

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.

Example (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

Simplex Tableau in Matrix Notation


In matrix notation, the L.P. problem can be defined as,
Min Z = CX
Subject to: AX = b
X≥0

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

c = [c1 ,c2 ,….., cn], A = [ B N]

a11 a12 ….. a1n x1 b2


A= a21 a22 ….. a2n x= x2 b= b2
: : :
am1 am2 …. amn xn bm

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

Let Xj = non basic variable; and let Pj Є A is the column corresponds to Xj in A.


P’j = column corresponds to Xj in the current tableau.
Let C’j = coefficient in Z raw of Xj
C’j= CB B-1 Pj - Cj = CB P’j - Cj P’j = B-1 Pj

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

Let X2, X4 are basic variables

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.

Max Z = 5X1 + 2X2 + 3X3


Subject to
X1 + 5X2 + 2X3 ≤ 30
X1 - 5X2 - 6X3 ≤ 40
X1, X2, X3 ≥ 0

The optimal solution is:

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 β

Find the values of: a, b, c, d, e, α, and β.

Solution

The standard form is,


Max Z = 5X1 + 2X2 + 3X3 + 0X4 + 0X5
Subject to
X1 + 5X2 + 2X3 + X4 = 30
X1 - 5X2 - 6X3 + X5 = 40
X1, X2, X3, X4, X5 ≥ 0

Let X1, X5 are basic variables)

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

e= C’5= 0 because X5 is basic variable.

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.

Definition of Dual Problem

1- When the primal is in (symmetric) form.

Maximize Z = ∑ cj xj

Subject to
∑ aij xj ≤ bi i = 1, 2,…., m
xj ≥ 0 j = 1, 2,….., n

Then the Dual is defined as,

Minimize W = ∑ bi yi
Subject to
∑ aij yj ≥ cj i = 1, 2,…., m
yi ≥ 0 j = 1, 2,….., n

Rules to Construct Dual (when Primal is Symmetric form)

1- Each constraint in one problem corresponds to a variable in other problem.


2- The elements of the right hand side (R.H.S) of the constraints in one
problem appear as the elements of the objective function coefficients in
the other problem.
3- One problem seeks maximization, while the other seeks minimization.
4- The maximization problem has (≤) type of constraints while the
minimization has (≥) type.
5- The variables of both problems are non negative.

Example

Consider the following primal problem

Max Z = X1 + 2X2 - 3X3 + 4X4


Subject to
X1 + 2X2 + 2X3 - 3X4 ≤ 25
2X1 + X2 - 3X3 + 2X4 ≤ 15
X1, X2, X3, X4 ≥ 0
The Dual problem is,

Min W = 25Y1 + 15Y2


Sub. to
Y1 + 2Y2 ≥ 1
2Y1 + Y2 ≥ 2
2Y1 - 3Y3 ≥ -3
-3Y1 + 2Y2 ≥ 4
Y1, Y2 ≥ 0

2- When the primal is not in (symmetric) form.

Example

Consider the following primal problem

Max Z = 4X1 + 5X2


Subject to
3X1 + 2X2 ≤ 20
4X1 - 3X2 ≥ 10
X1 + X2 = 5
X1 ≥ 0, X2 unrestricted in sign

Convert the problem in to symmetric form

Let X2 = X2’ – X2‖ then X2’ and X2‖≥0

Max Z = 4X1 + 5X2 - 5X2‖


Subject to
3X1 + 2X2’ - 2X2‖ ≤ 20
4X1 - 3X2’- 3X2‖ ≤ -10
X1 + X2’ - X2‖ ≤ 5
-X1 - X2’ + X2‖ ≤ -5
X1, X2’, X2‖ ≥ 0

The Dual become

Min W = 20Y1 - 10Y2’ + 5(Y3’ – Y3‖)


Subject to
3Y1 - 4Y2‖ + (Y3’ - Y3‖) ≥ 4

2Y1 + 3Y2‖ + (Y3’ - Y3‖) ≥ 5


-2Y1 - 3Y2‖ - (Y3’ - Y3‖) ≥ -5
Y1, Y2’, Y3’, Y3‖ ≥ 0

Let Y2 = Y2’ and Y3 = Y3’ - Y3‖


The Dual become:
Min W = 20Y1 + 10Y2 + 5Y3
Subject to
3Y1 + 4Y2 + Y3 ≥ 4
2Y1 - 3Y2 + Y3 = 5
Y1 ≥ 0, Y2 ≤ 0, Y3 unrestricted in sign

Primal Dual Correspondence

Primal Dual

Maximization Minimization
Coefficient matrix Transpose of coefficient matrix
R.H.S Cost vector

Profit vector R.H.S

ith constraint equation Y unrestricted in sign


i
ith constraint (≤) type Yi ≥ 0

ith constraint (≥) type Yi ≤ 0

Xj unrestricted in sign jth constraint equation

Xj ≥ 0 jth constraint (≥) type

Xj ≤ 0 jth constraint (≤) type

Example

Consider the following primal problem

Max Z = X1 + 4X2 + 3X3


Subject to
2X1 + 3X2 – 5X3 ≤ 2
3X1 - X2 +6X3 ≥ 1
X1 + X2 + X3 = 4
X1 ≥ 0, X2 ≤ 0, X3 unrestricted in sign

The Dual become:

Min W = 2Y1 + Y2 + 4Y3


Subject to
2Y1 + 3Y2 + Y3 ≥ 1
3Y1 - Y2 + Y3 ≤ 4
-5Y1 + 6Y2 + Y3 = 3
Y1 ≥ 0, Y2 ≤ 0, Y3 unrestricted in sign

Example

Consider the following primal problem

Min Z = 2X1 + X2 - 3X3


Subject to
X1 + X2 – X3 =1
X1 - X2 +X3 ≥ 2
X2 + X3 ≤ 3
X1 ≥ 0, X2 ≤ 0, X3 unrestricted in sign

The Dual become:

Max W = Y1 + 2Y2 + 3Y3


Subject to
Y1 + Y2 + Y3 ≥ 2
Y1 - Y2 + Y3 ≤ 1
-Y1 + Y2 + Y3 = -1
Y1 unrestricted in sign, Y2 ≤ 0, Y3 ≥ 0

Weak Duality Theorem

Theorem: the value of the objective function of the minimization problem is


always greater than or equal to the value of the objective function
of the maximization problem.

Consider the following problems

Primal Max Z = CX Dual Min W = Yb


Sub. to AX ≤ b Sub. to YA ≥ c
X≥0 Y≥0

Proof: let X0 and Y0 are feasible solutions to Primal and Dual


respectively.

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

Results of the Weak Duality Theorem

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.

Main Duality Theorem

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.

Primal Max Z= CX AX ≤ b X≥0


Dual Min W= Yb YA ≥ c Y≥0
Z* = W*

Example

Consider the following primal problem

Max Z = 5X1 + 12X2 + 4X3


Subject to
X1 + 2X2 + X3 ≤ 5
2X1 - X2 + 3X3 = 2
X1, X2,X3 ≥ 0

The standard form;

Max Z = 5X1 + 12X2 + 4X3 - MR1


Max Z - 5X1 - 12X2 - 4X3 + MR1=0

Subject to
X1 + 2X2 + X3 + X4 = 5
2X1 - X2 + 3X3 + R1= 2
X1, X2,X3, X4, R1 ≥ 0

Dual problem is,


Min W = 5Y1 + 2Y2
Sub. to
Y1 + 2Y2 ≥5
2Y1 - Y2 ≥12
Y1 + 3Y2 ≥ 4
Y1 ≥ 0, Y2 unrestricted in sign

The standard form is,

Min W = 5Y1 + 2(Y2’ - Y2’’) + MRd1 + MRd2+ MRd3


Sub. to
Y1 + 2(Y2’ - Y2’’) - Y3 + Rd1=5
2Y1 - (Y2’ - Y2’’) - Y4 + Rd2 =12
Y1 + 3(Y2’ - Y2’’) - Y5 + Rd3 = 4
Y1, Y2’, Y2’’, Y3, Y4, Y5, Rd1, Rd2, Rd3 ≥ 0

Solution of Primal

Basic Z X1 X2 X3 X4 R1 R.H.S Ratio


Z 1 -5 -12 -4 0 M 0
X4 0 1 2 1 1 0 5 5/1 X3 entering
R1 0 2 -1 3 0 1 2 2/3 R1 leaving
Z proper 1 -5-2M -12+M -4-3M 0 0 -2M
Z 1 -7/5 -40/3 0 0 4/3 +M 8/3
X4 0 1/3 7/3 0 1 -1/3 13/3 13/7 X2 entering
X3 0 2/3 -1/3 1 0 1/3 2/3 ----- X4 leaving
Z 1 -3/7 0 0 40/7 - 4/7 +M 192/4
X2 0 1/7 1 0 3/7 -1/7 13/7 13 X1 entering
X3 0 5/7 0 1 1/7 2/7 9/7 9/5 X3 leaving
Z 1 0 0 3/5 29/5 - 2/5 +M 28 1/5
X2 0 0 1 -1/5 2/5 -1/5 8/5
X1 0 1 0 7/5 1/5 2/5 9/5

Optimal Solution is, X1= 9/5, X2= 8/5, X3= 0, Z= 28 1/5

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

Optimal tableau (After 5 iterations)


Basic W Y1 Y’2 Y‖2 Y3 Y4 Y5 Rd1 Rd2 Rd3 R.H.S
W 1 0 0 0 -9/5 -8/5 0 9/5-M 8/5-M -M 28 1/5
Y5 0 0 0 0 -7/5 1/5 1 7/5 -1/5 -1 3/5
Y‖2 0 0 -1 1 2/5 -1/5 0 -2/5 1/5 0 2/5
Y1 0 1 0 0 -1/5 -2/5 0 1/5 2/5 0 29/5
Optimal Solution is, Y1= 29/5, Y‖2= 2/5,
Y2= Y’2 – Y‖2= 0 - 2/5 = -2/5, W = 28 1/5

Comparing above results Z* = W* = 28 1/5

Optimal Dual Solution is given by Optimal Simplex Multipliers [∏ = CB B-1] of


Primal, and Optimal Primal Solution is given by Optimal Simplex Multipliers of
the Dual.

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

Y1=29/5, Y2= -2/5


7/5 -1/5 -1
Form optimal tableau of Dual, C B = [0 -2 5] B= -2/5 1/5 0
1/5 2/5 0

∏ = [9/5 8/5 0]

X1= 9/5, X2= 8/5, X3= 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.

Complementary Slackness Theorem

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.

Consider the following problems

Primal Max Z = CX Dual Min W = Yb


Sub. to AX ≤ b Sub. to YA ≥ c
X≥0 Y≥0

let X* and Y* are the optimal solutions to Primal and Dual


respectively.
Then (Y*A-c) X* = Y*(b-AX*) = 0
u1
Proof: let u = u 2 represents the slack vector of primal and,
.. the v = [v1 v2 ……vn] be the slack vector of dual
un

Since X* and Y* are feasible solutions,


AX* + u* = b [1]
Y*A - v* = c [2]
Multiply equation [1] by Y*
Y*AX* + Y*u* = Y*b [3]
Multiply equation [2] by X*
Y*A X*- v*X* = c X* [4]
Subtracting equation [4] from equation [3] we get,
Y*u* + v*X* = Y*b - c X*
At optimal solution W* - Z* = 0 then, Y*b - c X* = 0 and,
Y*u* + v*X* = 0
Y*u* = v*X* = 0
Y* (b - AX*) X* = 0
Y* u* = 0
Yi * ui * = 0
vj * Xj * = 0

1- If a primal variable (X5) at the optimum is positive, the corresponding


dual constraint is satisfied in equation form.
vj * Xj * = 0
Xj * > 0 then vj * = 0
2- If the primal constraint is strict in equality at optimum, the dual variable
corresponding must be zero at optimum.
Y* u* = 0
u* > 0 then Y* = 0
Y* > 0 then u*= 0

Applications of Complementary Slackness Theorem

Example

Consider the following L.P.P.


Max Z = X1 + 2X2 + 3X3 + 4X4
Sub. to X1 + 2X2 + 2X3 + 3X4 ≤ 20
2X1 + X2 + 3X3 + 2X4 ≤ 20
X1, X2, X3, X4 ≥ 0
Solve the above problem using the Dual and Complementary slackness theorem.

Solution

Dual problem is, The standard form is,


Min W = 20Y1 + 20Y2 Min W = 20Y1 + 20Y2
Sub. to Sub. to
Y1 + 2Y2 ≥1 Y1 + 2Y2 - Y3 = 1
2Y1 + Y2 ≥2 2Y1 + Y2 - Y4 = 2
2Y1 + 3Y2 ≥ 3 2Y1 + 3Y2 - Y5 = 3
3Y1 + 2Y2 ≥ 4 3Y1 + 2Y2 - Y6 = 4
Y1, Y2 ≥ 0 Y1, Y2, Y3, Y4, Y5, Y6 ≥ 0

Graphical technique can be used to solve the Dual problem

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

Primal in standard form

Max Z = X1 + 2X2 + 3X3 + 4X4


Sub. to X1 + 2X2 + 2X3 + 3X4 + X5 = 20
2X1 + X2 + 3X3 + 2X4 + X6 = 20
X1, X2, X3, X4, X5, X6 ≥ 0

Complementary slackness theorem

X1*.Y3* = 0 Y3* ≠ 0 X1* = 0


X2*.Y4* = 0 Y4* ≠ 0 X2* = 0
X3*.Y5* = 0 Y5* = 0 X3* = ?
X4*.Y6* = 0 Y6* = 0 X4* = ?
X5*.Y1* = 0 Y1* ≠ 0 X5* = 0
X6*.Y2* = 0 Y2* ≠ 0 X6* = 0

Substituting the values of Xi* in the Primal constraints equations


2X3* + 3X4* = 20
3X3* + 2X4* = 20

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

Interpretation of Dual Solutions as Shadow Prices

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

Solve the following L.P.P.


Min Z = X1 + 4X2 + 3X4
Sub. to X1 + 2X2 - X3 + X4 ≥ 3
-2X1 - X2 + 4X3 + X4 ≥ 2
X1, X2, X3, X4 ≥ 0

Solution
By putting the constraints in (≤) form and adding the slack variables,

Min Z = X1 + 4X2 + 3X4


Sub. to
-X1 - 2X2 + X3 - X4 + X5 ≤ 3
2X1 + X2 - 4X3 - X4 + X6 ≤2
X1, X2, X3, X4, X5, X6 ≥ 0

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 -- --

Solution is Dual feasible (Primal optimal). This is a typical situation where


Dual simplex method can be applied.
Leaving variable: the variable with the most negative value in (R.H.S) can be
taken as the leaving variable.
Entering variable: take the ratio between Z-row coefficients and the (- ve)
coefficients in the row corresponding to the leaving variable.

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 -- --

Repeat the above steps until we get a feasible solution.

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

Optimal solution is, X1* = 7, X2* = 0, X3* = 4, X4* = 0, Z* = 7

If there is no (-ve) coefficient in the row corresponds to the leaving variable, the
problem does not have feasible solution.

You might also like