Sie sind auf Seite 1von 263

Programming

- Dr. Nita H. Shah

Unit - 1
-Modelling with Linear programming
- Simplex method
- Dual Linear Programming
- Integer Programming
Name : Kasim M. Gora
Roll No. : 37
 Introduction
 Model Component
 Properties of Linear Programming Models
 Formulating Linear programming Problem
(LPP)
 Linear programming is not a programming language
like C++, Java, or Visual Basic.
 A Linear programming problem (LPP) is a special
case of a mathematical programming.
 A linear program consists of a set of variables, a
linear objective function indicating the contribution of
each variable to the desired outcome, and a set of
linear constraints describing the limits on the values
of the variables.
 The "answer" to a linear program is a set of values for
the problem variables that results in the best --
largest or smallest -- value of the objective function
and yet is consistent with all the constraints.
 Formulation is the process of translating a real-world
problem into a linear program.
 Once a problem has been formulated as a linear
program, a computer program can be used to solve
the problem.
 In this regard, solving a linear program is relatively
easy. The hardest part about applying linear
programming is formulating the problem and
interpreting the solution.
 A model consists of linear relationships representing
a firm’s objectives and resource constraints.
◦ Decision variables
 Mathematical symbols representing levels of activities
◦ Objective function
 A linear mathematical relationship describing an objective of the
firm, in terms of decision variables, that is maximized or
minimized.
◦ Constraints
 Restrictions placed on the firm by the operating environment
stated in the relationship of the decision variables.
◦ Parameters/cost coefficients
 Numerical coefficients and constants used in the objective
function and constraint equations.
◦ Non-negative
 The variables of linear programs must always non-negative
value.
 Proportionality
◦ The rate of change of the objective function and the
constraint equation with respect to the perticular
decision variables is contant.
 Additivity
◦ Terms in the objective function and constraint equation
must be a dditive.
 Divisability
◦ Decision variables can take on any fractional value and
are therefore continuous as opposed to integer in
nature.
 Certainty
◦ Values of all the model parameters are assumed to be
know with certainty.
 The following steps are involved in the
formulation of linear programming problem
(LPP).
◦ Step 1: Identify the decision variables of the problem.
◦ Step 2: Construct the objective function as a linear
combination of the decision variables.
◦ Step 3: Identify the constraints of the problem such as
resources, limitations, inter-relation between
variables, etc. Formulate these constraints as
linear equations or inequations in terms of the
non-negative decision variables.
 Thus, LPP is a collection of the objective function,
the set of constraints and the set of the non-
negative constraints.
A manufacturer produces two types of models M and N. Each M Model requires 4 hours of grinding and
2 hours of polishing, whereas each N model requires 2 hours of grinding and 5 hours of polishing. The
manufacturer has 2 grinders and 3 polishers. Each grinder works for 40 hours a week and each
polishers works for 60 hours a week. Profit on model M is Rs. 3 and model N is Rs. 4. Whatever is
produced in a week is sold in the market. How should the manufacturer allocate his production
capacity to the two types of models so that he may make the maximum profit in a week?

A calculator company produces of handheld calculator and a scientific calculator . Long- term projections
indicate an expected demand of at-least 150 scientific and 100 handheld calculator each day.
Because of limitation on production of capacity no more 250 scientific and 200 handheld can be made daily.
To satisfy a shipping contract minimum of 250 calculators must be shipped each day. If each scientific calculator
sold result in 20 Rs. loss, but each handheld calculator produced a 50 Rs. profit then how many of each type
should be manufactured daily to maximized the net profit?
Name : Kinjal B. Prajapati
Roll No. : 38
The general LPP can be described as follow:
◦ Given a set of m-linear inequalities or equalities in n-variables, we want to find non-
negative values of these variables which will satisfy the constraints and optimize
(maximize or minimize) linear function of these variables (Objective function).
Mathematically, we have m-linear inequalities or equalities in n-variables (m can be
greater than, less than or equal to n) of the form

a k 1 x 1  a k 2 x 2  ...  a kn x n{ ,  , }b k , k  1, 2 ,..., m (1)


◦ Where for each constraints, one and only one of the signs holds, but the sign
may vary from one constraints to another. The aim is to find the values of the
variables satisfying (1) and , which maximize or minimize a
linear function:

Z  c 1 x 1  c 2 x 2  ...  c nx n (2)
The akj, bk and ck are assumed to be known constants. It is assumed that the variables xj
can take any non-negative values allowed by Eqs. (1) and (2). These non-negative values
can be any real number. If the additional restriction is imposed that the variables must
be integer, then linear programming problem is regarded as integer programming
problem.
Thus, LPP is
Optimize Z  c 1 x 1  c 2 x 2  ...  c nx n ( 3)
subject to the constraints
a k 1 x 1  a k 2 x 2  ...  a kn x n{ ,  , }b k , k  1, 2 ,..., m (4)
and
(5)
In General,  constraints will be associated with maximization LPP and  constraints
with minimization LPP. Let us write canonical form of maximization problem
Maximize
Z  c 1 x 1  c 2 x 2  ...  c nx n
subject to the constraints
a k 1 x 1  a k 2 x 2  ...  a kn x n  b k , k  1, 2 ,..., m
and
The canonical form of minimization problem is
Minimize Z  c 1 x 1  c 2 x 2  ...  c nx n

subject to the constraints


a k 1 x 1  a k 2 x 2  ...  a kn x n  b k , k  1, 2 ,..., m

and
For solving any LPP by algebraic or analytic method, it is necessary to convert inequalities
(inequations) into equality (equations). This can be done by introducing the so-called slack
and surplus variables.
Consider an inequality of the form a k 1 x 1  a k 2 x 2  ...  a kn x n  b k . Introduce a variable
n n
s n  k  b k   a kj x j  0 . So that s n  k   a kj x j  b k
j 1 j 1

Such a variable sn  k is known as a slack variable.

Similarly, consider an inequality of the form a k 1 x 1  a k 2 x 2  ...  a kn x n  b k. Introduce a


variable. n


n
a kj x j  s n  k  b k .
sn  k   bk   a kj x j  0 . So that
j 1
j 1

sn
Such a variable  k is known as a surplus variable.
After introducing slack/surplus variables, any given LPP can be expressed as under:

Maximize Z  c 1 x 1  c 2 x 2  ...  c nx n

Subject to the constraints


a k 1 x 1  a k 2 x 2  ...  a kn x n  b k , k  1, 2 ,..., m
and

Using matrix notations, above LPP in canonical form as well as standard form can be
expressed as follows:
Canonical form :Maximize (Minimize) Z  c x Subject to Ax   b , x  0 .
T
 
Standard form: Maximize (Minimize) Z  c T x Subject to Ax  b , x  0 .

where c , x  R n , b  R m and A  a ij m  n is a real valued matrix with rank equal to


m  n. Thus,
A will have m-linearly independent columns.
(1) Solution:
Any x  R n which satisfies Ax  b is a solution.
(2) Feasible Solution:
Any x  R which satisfies Ax  b , x  0 is called a feasible solution to the given
n

LPP
 
The set S  x  R n : Ax  b , x  0 is known as the set of all feasible solutions.
F
(3) Basic Solution:
Any solution x
in which at most m-variables are non-zero is called a basic solution.
(4) Basic feasible Solution:
 
Any feasible solution x  R in which k  m variables have positive values and
n

 
the rest n  k have zero values is called a basic feasible solution.
If k=m, the basic feasible solution is called non-degenerate.
If k<m, the basic feasible solution is called degenerate.
(5) Optimum Solution:
Any feasible solution, x  R which optimizes the objective function Z  c x is
n T

known as the optimum solution to the given LPP.


(6) Optimum Basic feasible Solution :
A basic feasible solution is said to be optimum if it optimizes the objective function
(7) Unbounded Solution :
If the value of the objective function can be increased or decreased infinitely without
violating the constraints, then the solution is known as the unbounded solution.
Consider LPP :
Maximize(Minimize) Z  cT x subject to Ax  b , x  0 .
Let S F  x  R n : Ax  b , x  0 denote the set of all feasible solution.

Theorem 1: S F is a convex set.


Theorem 2: Suppose the set S F of feasible solutions to the given LPP is non empty, then
the basic feasible solution to the LPP (if it is exist) lies at the vertex of a convex
polygon.
Theorem 3: The set of optimal solutions to the LPP is convex.
Theorem 4: If the convex set of the feasible solution of Ax  b , x  0 is a convex
polyhedron, then at least on of the extreme points gives a basic feasible
solution.
If the basic feasible solution occurs at more than one extreme point, the value
of the objective function will be same for all convex combinations of these
extreme points.
Theorem 5: If there exists a feasible solution to the LPP, the there exists a basic feasible
solution to a given LPP.
Name : Mayuri A. Makwana
Roll No. : 39
 Extreme point approach
 Iso-profit (cost) approach
Formulate the Plot all constraints on
problem in the graph and shade
mathematical model the feasible region.

Evaluate the values of the List all extreme


objective function at points of the
each extreme point feasible region.

The extreme point of the


feasible region that
optimize(maximum or
minimize) the objective function
value is the required basic
feasible solution.
Solve the following LPP graphically using extreme point method.
Maximize
Z  10000 x  8500 y
Subject to the constraints
x  y  11
6000 x  5000 y  60000
and
x  0, y  0
Solve the following LPP graphically using extreme point method.
Maximize
Z  5 x1  6 x2
Subject to the constraints
2 x1  5 x2  10
4 x1  x2  12
x1  x2  4
x1  0, x2  0
Name : Mehul H. Darji
Roll No. : 40
 How to get an optimal solution to a linear programming model using Iso
profit (or Iso cost method) ?

 The various steps involved in this method are given below.


1. Identify the problem- the decision variables, the objective and the restrictions.
2. Set up the mathematical formulation of the problem.
3. Plot a graph representing all the constraints of the problem and identify the
feasible region. The feasible region is the intersection of all the regions
represented by the constraint of the problem and is restricted to the first
quadrant only.
4. Draw an Iso-pofit (iso-cost) line for small value of the objective function
without violating any of the constraints of the given LPP.
5. Move Iso-profit (iso-cost) lines parallel in the direction of
increasing(decreasing) objective function.
6. The feasible extreme point for which the value of iso-profit(iso-cost) is
maximum(minimum) in the optimal solution. This means that while moving iso-
profit(iso-cost) line in the required direction, the last point after which we move
out of the feasible region is the required optimal solution.
Solve the following LPP graphically using ISO profit method.
maximize
Z  120 x  100 y
Subject to the constraints

10 x  5 y  80
6 x  6 y  66
4 x  8 y  24
5 x  6 y  90
x  0, y  0
Solve the following LPP graphically using ISO profit method.
Maximize
Z  5x  6 y
Subject to the constraints

x  y  10
x y3
5 x  4 y  35
x  0, y  0
Name : Miti S. Suthar
Roll No. : 41
Special Case in LP
1 Alternative (or multiple) Optimal Solution
2 An Unbounded Solution
3 Infeasible Solution
4 Redundant Constraint
1. Alternative (or multiple) Optimal Solution
 Example :
Solve the following LLP by Graphical method
2. An Unbounded Solution
Example :
Solve the following LPP by graphical method
Example :
Solve the following LPP by Graphical method
Name : Neha P. Parecha
Roll No. : 43
The step of simplex method are

 Step 1. determine a starting basic feasible solution


 Step 2. select an entering variable using the optimality
condition. Stop if there is no entering variable , the last
solution is optimal. Else , go to step 3
 Step 3. Select a leaving variable using the feasibility
condition.
 Step 4. determine the new basic solution by using the
appropriate Gauss-Jordan computations. Go to step 2.
Example 1
Use the simplex method to maximize,

Z  5 x1  4 x 2

Subject to the constraints:


4 x 1  5 x 2  10
3 x1 2 x2  9
8 x 1  3 x 2  12
x1, x2  0
Solution : Writing the given LPP in the standard form, we need to add slack
variables s1, s 2 , s 3 in the constraints.

Thus LPP is maximize

Z  5 x1  4 x 2  0 s1  0 s 2  0 s 3

Subject to the constraints


4x1  5x2  s1  10
3x1  2x2  s2  9
8x1  3x2  s3  12

and x1, x2 , s1, s2 , s3  0.


Putting x1  x2  0 , we get the first iteration as given below

cj 5 4 0 0 0 RR
cB B xB x1 x2 s1 s2 s3
0 s1 10 4 5 1 0 0 10/4
0 s2 9 3 2 0 1 0 9/3
0 s3 12 8 3 0 0 1 12/8 
z 0 zj  cj
 -5 -4 0 0 0
cj 5 4 0 0 0 RR
cB B xB x1 x2 s1 s2 s3
0 s1 4 0 7/2 1 0 -1/2 8/7
0 s2 9/2 0 7/8 0 1 -3/8 36/7
5 x1 3/2 1 3/18 0 0 1/8 4
z 15/2 z j  c j 0 -17/8  0 0 5/8
5 4 0 0 0
cj

cB B xB x1 x2 s1 s2 s3
4 8/7 0 1 2/7 0 -1/7
x2
0 7/2 0 0 -1/4 1 -2/8
s2
5 x1 15/14 1 0 -3/28 0 5/28

z 139/14 zj  cj 0 0 17/20 0 9/28

Since all z j  c j  0 , the solution x1  15 / 14 , x 2  8 / 7

Maximizes z  139 / 14
Example 2
Use the simplex method to maximize,

Z  10 x 1  x 2  2 x 3

Subject to the constraints:

x 1  x 2  2 x 3  10
4 x 1  x 2  x 3  20
x1 , x 2 , x 3  0
Solution : Writing the given LPP in the standard form, we need to add slack
variables s1 , s 2 in the constraints.

Thus LPP is maximize

Z  10 x1  x 2  2 x 3  0 s1  0 s 2

Subject to the constraints


x1  x2  2x3  s1  10
4x1  x2  x3  s2  20

and x1, x2 , x3, s1, s2  0.


Putting x1  x2  x3  0 , we get the first iteration as given below

cj 10 1 2 0 0 RR
cB B xB x1 x2 x3 s1 s2
0 s1 10 1 1 -2 1 0 10
0 s2 20 4 1 1 0 1 5 
z 0 z j  c j -10 -1 -2 0 0

cj 10 1 2 0 0
cB B xB x1 x2 x3 s1 s2
0 s1 5 0 3/4 -9/4 1 -1/4
10 x1 5 1 1/4 1/4 0 1/4

z 0 zj  cj 0 3/2 1/2 0 5/2

Since all z j  c j  0 , the solution x1  10, x2  0  x3


Maximizes z  50
Name :Nikhil G. Malvi
Roll No. : 44
Example:

A company produces two products A and B. These products require three type
of processing. The processing time required for each unit and profit per unit are
given in the following table :

Process 1 Process 2 Process 3 Profit


per unit
Product A 1 1 2 50
(in hours/unit)
Product B 1 2 1 70
(in hours/unit)
capacity 70 100 120
(in hours/day)

How many units of each products should be produced to get


maximum profit ?
Solution

Suppose x1 units of product A


Suppose x 2 units of product B are produced by company.

The problem then can be represented as


Maximize Z  50 x1  70 x 2
Subject to constraints: x 1  x 2  70
x 1  2 x 2  100
2 x 1  x 2  120
and x1 , x2  0
Writing the given LPP in the standard form, we need to add slack variables s 1 , s 2
and s 3 In the constraints. Thus , LPP is

Maximize Z  50 x1  70 x 2  0 s1  0 s 2  0 s3
Subject to constraints: x1  x 2  s1  70
x1  2 x 2  s 2  100
2 x1  x 2  s 3  120
and x1 , x 2 , s1 , s 2 , s 3  0

Putting x1  x 2  0 We get a first iteration as given below.

c j
50 70 0 0 0
cB B xB x1 x2 s1 s2 s3 R.R
0 s1 70 1 1 1 0 0 70
0 s2 100 1 2 0 1 0 50
0 s3 120 2 1 0 0 1 120
Z 0 zj cj -50 -70 0 0 0

x 2 will entre into the basis and s 2 will leave to the basis. The new iterative
table is as given below.
c j 50 70 0 0 0
cB B xB x1 x2 s1 s2 s3 R.R
0 s1 20 1/2 0 1 -1/2 0 40
70 x2 50 1/2 1 0 1/2 0 100
0 s3 70 3/2 0 0 -1/2 1 140/3
Z 3500 zj cj -15 0 0 35 0

For obtain first row of new table divide all the element of key row by key
element 2.
Now to obtain the other row of a table use following formula
(respective elements of old row)-(element of key column in that row)
(respective new elements of key row)=(new row element)

1 1 1 1
For second row ( 70 ,1,1,1, 0 , 0 )  (1)( 50 ,
,1, 0 , , 0 )  ( 20 , , 0 ,1, ,0 )
2 2 2 2
1 1 3 1
For third row (120 , 2,1,0,0,1)  (1)( 50 , ,1,0, ,0 )  ( 70 , ,0,0, ,1)
2 2 2 2
x 1 will entre into the basis and s 1 will leave to the basis. The new iterative
table is as given below.
c j
50 70 0 0 0
cB B xB x1 x2 s1 s2 s3 R.R
50 x1 40 1 0 2 -1 0
70 x2 30 0 1 -1 1 0
0 s3 10 0 0 -3 1 1
z 4100 zj cj 0 0 30 20 0

As all z j  c j  0 The solution is optimum

x 1  40
x 2  30
Z max  4100
 Company should produce 40 units of A and 30 units of B to get
maximum profit of Rs.4100


Example:

Maximize Z  x1  2x2
Subject to constraints: x1  x 2  4
x1  5 x 2  8
and x1 , x2  0
Solution:

Writing the given LPP in the standard form, we need to add slack variables s 1
and s 2 in the constraints. Thus , LPP is

Maximize Z  x1  2 x 2  0 s1  0 s 2

Subject to constraints: x1  x 2  s1  4
x1  5 x 2  s 2  8

and x1 , x2 , s1 , s2  0
Putting x1  x 2  0 We get a first iteration as given below

c j 1 2 0 0
cB B xB x1 x2 s1 s2 R.R
0 s1 4 1 -1 1 0 -
0 s2 8 1 -5 0 1 -
Z 0 zj cj -1 -2 0 0

Here z j  c j  0 For x 2 but coefficients in that column are negative, so

given LPP has unbounded solution.


Example
The company is producing three type of product P, Q and R. Each unit of P
required 3 hours in cutting, 4 hours in assembling and 2 hours in packaging
department. While each unit of Q required 5 hours in cutting , 4 hours in
assembling and 4 hours in packaging department. Similarly , each unit of R
takes 2 hours in cutting , 4 hours in assembling and 5 hours in packaging
department. Maximum 60 hours in cutting, 72 hours in assembling and 100
hours in packaging department is available. The profit on product P , Q and R
are respectively Rs. 5, Rs. 10 and Rs. 8 then how many number of each
product are produce to get maximum profit.

Solution

suppose x 1 Units of product P


suppose x 2 Units of product Q and
suppose x 3 Units of product R

The problem then can be represented as

Maximize Z  5 x 1  10 x 2  8 x 3
Subject to constraints: 3 x 1  5 x 2  2 x 3  60
4 x 1  4 x 2  4 x 3  72
2 x 1  4 x 2  5 x 3  100

and x1 , x2 , x3  0
Writing the given LPP in the standard form, we need to add slack variables

s1 , s 2
and s 3 in the constraints. Thus , LPP is

Maximize Z  5 x1  10 x 2  8 x3  0 s1  0 s 2  0 s3

Subject to constraints: 3 x1  5 x 2  2 x 3  s1  60
4 x1  4 x 2  4 x 3  s 2  72
2 x1  4 x 2  5 x 3  s 3  100
and x 1 , x 2 , x 3 , s 1 , s 2 , s 3  0
Putting x1  x 2  x 3  0 we get a first iteration as given below.

c j 5 10 8 0 0 0
cB B xB x1 x2 x3 s1 s2 s3 R.R
0 s1 60 3 5 2 1 0 0 12
0 s2 72 4 4 4 0 1 0 18
0 s3 100 2 4 5 0 0 1 25
Z 0 zj cj -5 -10 -8 0 0 0

x 2 entre into the basis and s 1 leaves the basis. the new iterative table is
given below.
c j 5 10 8 0 0 0
cB B xB x1 x2 x3 s1 s2 s3 R.R
10 x2 12 3/5 1 2/5 1/5 0 0 30
0 s2 24 8/5 0 12/5 -4/5 1 0 10
0 s3 52 -2/5 0 17/5 -4/5 0 1 260/17
Z 120 zj cj 1 0 -4 2 0 0
x3 entre into the basis and s 2 leaves the basis. The new iterative table is

given below.

c j 5 10 8 0 0 0
cB B xB x1 x2 x3 s1 s2 s3 R.R
10 x2 8 1/3 1 0 1/3 -1/6 0
8 x3 10 2/3 0 1 -1/3 5/12 0
0 s3 18 -8/3 0 0 1/3 -17/12 1
Z 160 zj cj 11/3 0 0 2/3 5/3 0

As all z j  c j  0 The solution is optimum.

x1  0
x2  8
x 3  10 Z max  160

 Company should produce 8 units of Q and 10 units of R to get


maximum profit of Rs.160
Example Use the simplex method to
Maximize Z  2 x1  3 x2
Subject to constraint:  x1  2 x 2  4
x1  x 2  6
x1  3 x 2  9
and x1 , x2 are unrestricted.

Solution :

Writing the given LPP in the standard form, we need to add slack variable
s1 , s 2 and s 3 in the constraints. Since x1 , x2 are unrestricted, we introduce
the non negative variables x 1  0 , x 1  0 and x 2  0 , x 2  0 So that
' " ' "

x1  x1'  x1" and x2  x2'  x2"


There for

Maximize Z  2( x1'  x1" )  3( x2'  x2" )


Subject to constraint:
 ( x 1'  x 1" )  2 ( x 2'  x 2" )  4
( x 1'  x 1" )  ( x 2'  x 2" )  6
( x 1'  x 1" )  3 ( x 2'  x 2" )  9

and x 1' , x 1" , x 2' , x 2"  0


Writing the given LPP in the standard form, we need to add slack variables
s1 , s 2
and s 3 in the constraints. Thus , LPP is

Maximize Z  2 x1'  2 x1"  3 x 2'  3 x 2"  0 s1  0 s 2  0 s3


Subject to constraint:  x 1'  x 1"  2 x 2'  2 x 2"  s 1  4
x 1'  x 1"  x 2'  x 2"  s 2  6
x 1'  x 1"  3 x 2'  3 x 2"  s 3  9

x 1' , x 1" , x 2' , x 2" , s 1 , s 2 , s 3  0

Putting x1'  x1"  x2'  x2"  0 we get first iteration as given below.

c j
2 -2 3 -3 0 0 0
cB B xB x 1' x 1" x 2' x "
2 s1 s2 s3 R.R
0 s1 4 -1 1 2 -2 1 0 0 2
0 s2 6 1 -1 1 -1 0 1 0 6
0 s3 9 1 -1 3 -3 0 0 1 3
Z 0 zj cj -2 2 -3 3 0 0 0
x 2' entre in the basis and s 1 leave the basis. The iterative table is as follows.
c j
2 -2 3 -3 0 0 0
cB B xB x 1' x 1" x 2' x "
2
s1 s2 s3 R.R
3 x 2' 2 -1/2 1/2 1 -1 1/2 0 0 -
0 s2 4 3/2 -3/2 0 0 -1/2 1 0 8/3
0 s3 3 5/2 -5/2 0 0 -3/2 0 1 6/5
Z 6 zj cj -7/2 7/2 0 0 3/2 0 0

x 1' entre in the basis and s 3 leave the basis. The iterative table is as follows.

c j
2 -2 3 -3 0 0 0
cB B xB x 1' x 1" x 2' x "
2 s1 s2 s3 R.R
3 x 2' 13/5 0 0 1 -1 1/5 0 1/5 13
0 s2 11/5 0 0 0 0 2/5 1 -3/5 11/2
2 x 1' 6/5 1 -1 0 0 -3/5 0 2/5 -
Z 51/5 zj cj 0 0 0 0 -3/5 0 7/5
s 1 entre in the basis and s 2 leave the basis. The iterative table is as follows.

c j
2 -2 3 -3 0 0 0
cB B xB x 1' x 1" x 2' x "
2
s1 s2 s3 R.R
3 x 2' 3/2 0 0 1 -1 0 -1/2 1/2
0 s1 11/2 0 0 0 0 1 5/2 -3/2
2 x 1' 9/2 1 -1 0 0 0 3/2 -1/2
Z 27/2 zj cj 0 0 0 0 0 3/2 1/2

since z j  c j  0 the optimum solution x 1'  9 / 2 and x 2'  3 / 2 with


maximum Z=27/2 is obtained. Therefore

x1  x1'  x1"  9 / 2  0  9 / 2
x2  x2'  x2"  3 / 2  0  3 / 2 Is the required basic feasible solution

Maximum Z  2 x1  3 x2  2(9 / 2)  3(3 / 2)  27 / 2


Name :Nilam G. Chavda
Roll No. : 45
Consider LPP
m

minimize Z=  ci xi
i 1
Subject to the constraints:
n

a
j 1
ij x j  bi , x j  0

The inequality of  -type should be transformed in


equality by subtracting surplus variables, i.e.
n

a x
j 1
ij j  si  b1 , x j , si  0
In this, to preserve the non-negativity of surplus
variables,we add artificial variables Ai , i  1,2,......., m
to get initial basic feasible solution. Thus we have
constraint equations as,
n

a x
j 1
ij j  si  Ai  bi , x j , si , Ai  0

 For constraints with equality, we will add only the


artificial variable.

Now , we will discuss the following two methods to


remove artificial variables first from the optimal
solution,
1. Two-Phase Method
2. Big-M Method
 In phase-1 of this method, we will try to minimize
the sum of the artificial variable subjcted to the
constarints of the given LPP.
 Phase-2 minimizes the original objective function
with initial iteration as the final iteration of phase-1.

Let us study steps to be performed in solving LPP by


two-phase method.
 Step 1: Check the non-negativity of the b i .If some of them
are negative,make them positive by multiplying those
constraints by -1.
 Step 2: Subtract surplus variabls and add artificial variables
to reformulate inequality constraints into equation.
 Step 3: Initialize iterative step by taking Ai  bi .
 Step 4: Assign a cost ‘-1’ to each artificial variables for a
maximization problem(‘1’ for min problem) and a cost ‘0’ to
all other variables o LPP in the objective function.
 Step 5: Solve the problem written in step 4 until either of
the following three cases does arise.

1. If all zj cj 0 and at least one artificial variable occurs in


the optimum basis and hence max z *  0, then LPP has
infeasible solution.
2. If all z j  c j  0, max z *  0 and at least one artificial
variable occurs in the optimum basis, then go to
phase 2.
3. If all zj cj  0 and no artificial variable appears in the
optimum basis.

 Step 6: Use the optimum basic feasible solution of


phase 1 as an initial solution for the given LPP.
Assign actual costs to the original variables an ‘0’ to
other variables in the objective function. Use the
simplex method to improve the solution.
Use the two-phase method to minimize
Z  x1  x 2
Subject to the constraints:
2 x1  x2  4
x1  7 x2  7
x1 , x 2  0
In order to get constraints equation, introduce surplus
variables s1, s2  0 and artificial variables
A1 , A2  0. Then LPP converted to the maximization
form is,
Maximize Z   x1  x2  0s1  0s2  A1  A2

subject to the constraints:

2x1  x2  s1  A1  4
x1  7x2  s2  A2  7
x1, x2 , s1, s2 , A1, A2  0
Here the objective function is Maximize
Z *  0 x1  0 x2  0 s1  0 s2  A1  A2
subject to the constraints:
2x1  x2  s1  A1  4
x1  7x2  s2  A2  7
x1, x2 , s1, s2 , A1, A2  0
Initialize the solution by putting x1  x2  s1  s2  0
then A1  4 and A2  7.
The simplex table is as follows.
Cj 0 0 0 0 -1 -1
CB BV xB x1 x2 s1 s2 A1 A2 RR
-1 A1 4 2 1 -1 0 1 0 4
A2 
-1 7 1 7 0 -1 0 1 1
*
z -11 zj cj -3  -8 1 1 -1 -1

x2 enters into the basis and A2 leaves the basis. The new iterative table is,
Cj 0 0 0 0 -1 -1

CB BV xB x1 x2 s1 s2 A1 A2 RR
-1 A1 3 13/7 0 -1 1/7 1 -1/7 21/13

0 x2 1 1/7 1 0 -1/7 0 1/7 7

z * -3 zj cj -13/7 0 1 -1/7 -1 8/7



x1 enters into the basis and A 1 leaves the basis. The new iterative table is,

Cj 0 0 0 0 -1 -1

CB BV xB x1 x2 s1 s2 A1 A2
0 x1 21/13 1 0 -7/13 1/13 7/13 -1/13

0 x2 10/13 0 1 1/13 -2/13 -1/13 2/13

z * 0 zj cj 0 0 0 0 1 1

Since z j  c j are all non-negative and no artificial variable appears


in the basis, the optimum basic feasible solution to the objective
function of phase 1 is obtained and go to phase 2.
Consider the objective function with the original cost associated
to the decision variables,
i.e. Maximize Z   x 1  x 2  0 s 1  0 s 2
Here we will initialize the solution with the last table of phase 1.

Cj -1 -1 0 0
CB BV xB x1 x2 s1 s2
-1 x1 21/13 1 0 -7/13 1/13
-1 x2 10/13 0 1 1/13 -2/13
z * -31/13 zj cj 0 0 6/13 1/13

Since, zj cj  0 . The optimum basic feasible solution is,


x1  21 / 13
x2  10 / 13
Minimum z  31 / 13
Use the two-phase method to

Minimize Z  x1  x 2  x 3

Subject to the constraints:


x1  3 x 2  4 x 3  5
x1  2 x 2  3
2 x 2  x3  4

and x1 , x2  0, x3 is unrestricted.
Since x 3 is unresticted, put x3  x x where x , x  0.
' " ' "
3 3 3 3
Introduce slack variable s1 in the second constraint,
Surplus variable s2 in the third constraint and artificial
Variable A1 and A2 in the first and third constraints.
The resultant LPP is
Maximize Z *   x1  x 2  x3  0 s1  0 s 2  A1  A2

Subject to the constraints:


x1  3 x 2  4 ( x 3'  x 3" )  A1  5
x1  2 x 2  s1  3
2 x 2  ( x 3'  x 3" )  s 2  A2  4
x1 , x 2 , x 3' , x 3" , s1 , s 2 , A1 , A2  0
Now,
Maximize Z *   x1  x 2  x3  0 s1  0 s 2  A1  A2
Subject to the constraints:
x1  3 x 2  4 x3'  4 x3"  A1  5
x1  2 x 2  s1  3
2 x 2  x3'  x3"  s 2  A2  4
x1 , x 2 , x3' , x3" , s1 , s 2 , A1 , A2  0
•Phase-1:
Assigning a cost -1 to artificial variables and 0 to the
rest of the variables, we get s1  3, A1  5 , A2  4 .

The iterative table is,


C j 0 0 0 0 0 0 -1 -1

CB BV xB x1 x2 x3' x 3" s1 s2 A1 A2 RR
-1 A1 5 1 -3 4 -4 0 0 1 0 5/4

0 s1 3 1 -2 0 0 1 0 0 0 -
-1 A2 4 0 2 -1 1 0 -1 0 1 -
z * -9 zj cj -1 1 -3 3 0 1 0 0

x3' enters the basis and A1 leaves the basis.The new iterative table is,
Cj 0 0 0 0 0 0 -1 -1

CB BV xB x1 x2 x3' x 3" s1 s 2 A 1 A2 RR
0 x3' 5/4 1/4 -3/4 1 -1 0 0 1/4 0 -

0 s1 3 1 -2 0 0 1 0 0 0 -

-1 A2 21/4 1/4 5/4 0 0 0 -1 1/4 1 21/5



z * -21/4 zj cj -1/4 -5/4 0 0 0 1 3/4 0

x2 enters the basis and A2 leaves the basis.The new iterative table is,

Cj 0 0 0 0 0 0 -1 -1

CB BV xB x1 x2 x3' x 3" s1 s2 A1 A2
0 x3' 22/5 2/5 0 1 -1 0 -3/5 2/5 3/5
0 s1 57/5 7/5 0 0 0 1 -8/5 2/5 8/5
0 x2 21/5 1/5 1 0 0 0 -4/5 1/5 4/5

z * 0 zj cj 0 0 0 0 0 0 1 1

Since, z j  cj  0 . The optimum basic feasible solution to the reduced is


attained. Move to the next phase.
Consider LPP with original cost coefficients associated with
each variable and start with the last table as the initial
iteration.
Cj -1 -1 -1 1 0 0
CB BV xB x1 x2 x3' x 3" s1 s2
-1 x3' 22/5 2/5 0 1 -1 0 -3/5

0 s1 57/5 7/5 0 0 0 1 -8/5


-1 x2 21/5 1/5 1 0 0 0 -4/5

z *
-43/5 zj cj 2/5 0 0 0 0 7/5

Thus, the optimal solution is x1  0


x2  21/ 5
x3  x3'  x3"  22/ 50  22/ 5

Minimum Z  43 / 5
Show that there does not exist any feasible
solution to the following LPP.
Maximize Z  2x  3x  5x
1 2 3

Subject to the constraints:


3x1  10 x2  5 x3  15
33x1  10 x2  9 x3  33
x1  2 x2  x3  4
x1 , x2 , x3  0
Maximize Z  2x1  3x2  5x3  0s1  0s2  0s3  A1

Subject to the constraints:


3x1  10x2  5x3  s1  15
33x1 10x2  9x3  s2  33
x1  2x2  x3  s3  A1  4
x1 , x2 , x3 , s1 , s2 , s3 , A1  0
Maximize Z  0x1  0x2  0x3  0s1  0s2  0s3  A1
Subject to the constraints:
3 x 1  10 x 2  5 x 3  s 1  15
33 x 1  10 x 2  9 x 3  s 2  33
x 1  2 x 2  x 3  s 3  A1  4
x 1 , x 2 , x 3 , s 1 , s 2 , s 3 , A1  0

Cj 0 0 0 0 0 0 -1
CB BV xB x1 x2 x3 s1 s2 s3 A1 RR
0 s1 15 3 10 5 1 0 0 0 15/10

0 s2 33 33 -10 9 0 1 0 0 -
-1 A1 4 1 2 2 0 0 -1 1 2
z *
-4 zj cj -1 -2  -1 0 0 1 0
x2 enters the basis and s1 leaves the basis.The new iterative table is,

Cj 0 0 0 0 0 0 -1

CB BV xB x1 x2 x3 s1 s2 s3 A1 RR
0 x2 3/2 3/10 1 1/2 1/10 0 0 0 5

0 s2 48 36 0 14 1 1 0 0 4/3

-1 A1 1 2/5 0 0 -1/5 0 -1 1 5/2

z * -1 zj cj -2/5 0 0 1/5 0 1 0



x1 enters the basis and s2 leaves the basis.The new iterative table is,
Cj 0 0 0 0 0 0 -1
CB BV xB x1 x2 x3 s1 s2 s3 A1
0 x2 11/10 0 1 23/60 11/120 -1/120 0 0
0 x1 4/3 1 0 7/18 1/36 1/36 0 0
-1 A1 7/15 0 0 -7/45 -2/9 -2/9 -1 1
z * -7/15 zj cj 0 0 7/45 95/18 5/18 1 0

Since, zj cj  0 and max Z  0 and artificial variable A1 appear in


*

the basis at a positive level, so the given LPP does not possess any
feasible solution.
Name :Nirali M. Patel
Roll No. : 46
 The Big-M method is an alternative method to solve the LPP involving artificial variables. In
this method we assign a very high penalty (say M) to the artificial variables in the objective
function.
 The computational algorithm is as follows
 Step-1:
Write the given LPP in the standard form maximization. Add slack, surplus and artificial
variables in the constraints as stated in previous two section but assign a very high value
‘-M’ as a coefficient of the artificial variable in the objective function.

 Step -2 :
Apply simplex method
z j  cto the modified LPP following cases may arise.
j

(a) Net evaluations (j = 1, 2, 3, …, n) are non-negative and the artificial variables


z j  cj
are not to be present in the basis.

(b) Net evaluation (j = 1, 2, 3, …, n) are non-negative and there is at least one


artificial variable in the basis and the objective function value z contains M. Then the
LPP has no solution, i.e. infeasible solution.
 (c) At least one net evaluation zj cj (j = 1, 2, 3…, n) is negative indicating that some variable is
trying to enter the basis, but if all replacement ratio (RR) entries are negative or undefined then the
problem has an unbounded solution.

EXAMPLE (1)
Use Big-M method to maximize z  3 x1  x 2
subject to the constraints:
2 x1  x 2  2
x1  3 x 2  3
x2  4
and x1 , x2  0.

Solution: Standard form


Maximize z  3 x1  x2  0 s1  0 s2  0 s3  MA1
Subject to the constraints:

2 x 1  x 2  s 1  A1  2
x1  3 x 2  s 2  3
x2  s3  4
and x1 , x 2 , s 1 , s 2 , s 3 , A1  0 .
Putting x1  x2  s1  0 gives the initial iterate as A1  2, s2  3 and s3  4.
The iterative table is as follows.

cj 3 -1 0 0 0 -M

B.V cB xB x1 x2 s1 s2 s3 A 1 RR

A 1 -M 2 2 1 -1 0 0 1 1→

s2 0 3 1 3 0 1 0 0 3

s3 0 4 0 1 0 0 1 0 -

z=-2M -2M-3 -M+1 M 0 0 0



x1 enters into the basis and A1 leaves the basis. The new iterative table is
as follows.

cj 3 -1 0 0 0

B.V cB xB x1 x2 s1 s2 s3 RR

x 1 3 1 1 ½ -½ 0 0 -

s2 0 2 0 5/2 ½ 1 0 4→

s3 0 4 0 1 0 0 1 -

Z=3 0 5/2 -3/2 0 0



s1 enters into the basis and s2 leaves the basis. The new iterative table is
as follows.

cj 3 -1 0 0

B.V cB xB x1 x 2 s1 s3
x 1 3 3 1 3 0 0

s1 0 4 0 5 1 0

s3 0 4 0 1 0 1

z=9 0 10 0 0

The optimal basic feasible solution is x1  3 , x 2  0 and maximum z=9


EXAMPLE (2)
Use Big-M method to maximize z  3 x1  2 x2
Subject to the constraints:
2 x1  x2  2
3x1  4 x2  12
and x1 , x 2  0 .

Solution: Standard form

Maximize z  3 x1  2 x2  0 s1  0 s2  MA1
subject to the constraints :
2 x1  x 2  s 1  2
3 x1  4 x 2  s 2  A1  12
and x1 , x2 , s1 , s2 , A1  0.
Putting x1  x2  s2  0 gives the initial iterate as A1  12 and s1  2.
The iterative table is as follows.

cj 3 2 0 0 -M

B.V cB xB x1 x2 s1 s 2 A 1 RR

s1 0 2 2 1 1 0 0 2

A1 -M 12 3 4 0 -1 1 3

z=-12M -3M-3 -4M-2 0 M 0


x2 enters into the basis and s1 leaves the basis. The new iterative table is
as follows.

cj 3 2 0 0 -M

B.V cB xB x1 x2 s1 s2 A 1

x 2 2 2 2 1 1 0 0
s1 

A1 -M 4 -5 0 -4 -1 1

z=-4M+4 5M+1 0 4M+2 M 0

Here the coefficients of M in each zj cj are non negative and the artificial variable appears at the
zero level. Thus, the LPP has an infeasible solution.
EXAMPLE (3)
Use Big-M method to maximize z  3 x1  2 x2  x3
Subject to the constraints:
2 x1  5 x2  x3  12
3x1  4 x2  11

and x 2 , x3  0 ; x1 unrestricted.
' '' ' ''
Solution: Since x1 is unrestricted, we write x1  x1  x1 . where x1 and x1  0.
Standard form
' ''
Maximize z  3 x1  3 x1  2 x2  x3  MA1

subject to the constraints :


' ''
2 x1  2 x1  5 x 2  x 3  12
' ''
3 x1  3 x1  4 x 2  A1  11
' ''
and x1 , x1 , x2 , x3 , A1  0.
cj 3 -3 2 1 -M

B.V cB xB x1
'
x1
''
x 2 x3 A 1
RR

x 3 1 12 2 -2 5 1 0 12/5

A1 -M 11 3 -3 4 0 1 11/4

z=-11M+12 -3M-1 3M+1 -4M+3 0 0

x2 enters into the basis and x3 leaves the basis. The new iterative table is
as follows.
cj 3 -3 2 1
-M

''
B.V cB xB x1
'
x1 x 2 x3 A 1
RR

x 2 12/5 2/5 -2/5 1 1/5 0 6


2

A1 -M 7/5 7/5 -7/5 0 -4/5 1 1→

z=-7M/5+24/5 -7M/5-11/5 7M/5+11/5 0 4M/5-3/5 0


x1' enters into the basis and A1 leaves the basis. The new iterative table is
as follows.
cj 3 -3 2 1

B.V cB xB x1
'
x1
''
x 2 x3 RR

x 2 2 2 0 0 1 3/7 14/3

' 3 1 1 -1 0 -4/7 -
x1
Z=7 0 0 -13/7

x3 enters into the basis and x2 leaves the basis. The new iterative table is
as follows.
cj 3 -3 2 1

B.V cB xB x1
'
x1
''
x 2 x3

x 3 1 14/3 0 0 7/3 1

'
x1 3 11/3 1 -1 4/3 0

Z=47/3 0 0 0

Since all z j  c j  0 ,the optimum basic feasible solution is x1 '  11 / 3, x2  0, x3  14 / 3 i.e.


x1  11 / 3, x2  0, x3  14 / 3 and maximum z=47/3.
EXAMPLE (4)
Solve the following LPP by Big-M method:
Minimize z  x1  x2
Subject to the constraints:
2 x1  x 2  4
x1  7 x 2  7

and x1 , x2  0.

Solution: Standard form


Maximize z   x1  x 2  0 s1  0 s2  MA1  MA2
Subject to the constraints:
2 x 1  x 2  s 1  A1  4
x1  7 x 2  s 2  A 2  7

and x1 , x 2 , s 1 , s 2 , A1 , A2  0 .
Putting x1  x2  s1  s2  0 gives the initial iterate as A1  4 and A2  7.
The iterative table is as follows.

cj -1 -1 0 0 -M -M

B.V cB xB x1 x2 s1 s2 A 1 A2 RR

A 1 -M 4 2 1 -1 0 1 0 4

A2 -M 7 1 7 0 -1 0 1 1

z=-11M -3M+1 -8M+1 M M 0 0


x2 enters into the basis and A2 leaves the basis. The new iterative table is
as follows.

cj -1 -1 0 0 -M

B.V cB xB x1 x 2 s1 s2 A 1
RR

A 1 -M 3 13/7 0 -1 1/7 1 21/13

x2 -1 1 1/7 1 0 -1/7 0 7

z=-3M-1 -13M/7+6/7 0 M -M/7+1/7 0


x1 enters into the basis and A1 leaves the basis. The new iterative table is
as follows.

cj -1 -1 0 0

B.V cB xB x1 x2 s1 s2

x 1
-1 21/13 1 0 -7/13 1/13

x2 -1 10/13 0 1 1/13 -2/13

z=-31/13 0 0 6/13 1/13

Since all z j  c j  0 , the optimum basic feasible solution is x1  21 / 13, x2  10 / 13 with


Minimize z=31/13.
Name :Nrupa D. Vankar
Roll No. : 47
 Sometimes we come across one of situations (1) At least one basic variable is zero in the initial
iteration or (2) at subsequent iteration of simplex method more than one vector leaves the basis.
The solution so obtained called degenerate solution. In this case, we do not improve value of the
objective function in the next iteration.

 Step-1: Let x r enter the basis and min i


{ x Bi
x ir : x ir  0 } is not unique.

 Step-2: Rearrange the column vector of A so that initial basis can be chosen by the first m-column
vectors of A.

 Step-3: Compute the non-negative ratios min


i
{ x Bi
x ir : x ir  0 } for those values of i for
which min
i { x Bi
x ir
: x ir  0 } have a tie. If this minimum is unique for i=k, then the vector xk
leaves the basis. Otherwise go to step 4.
 Step-4: continue step-3 until a unique minimum non-negative ratio is obtained.
EXAMPLE (1)
Maximize z  2 x1  x 2

subject to the constraints:


4 x1  3 x 2  12
4 x1  x 2  8
4 x1  x 2  8

and x1 , x 2  0 .

Solution: We need to add slack variables s 1 , s 2 , s 3 in the constraints.


Maximize z  2 x1  x 2  0 s1  0 s 2  0 s3
Subject to the constraints:
4 x 1  3 x 2  s 1  12
4 x1  x 2  s 2  8
4 x1  x 2  s 3  8

and x1 , x 2 , s 1 , s 2 , s 3  0 .
Putting x1  x2  0 we get first iteration as shown below.
cj 2 1 0 0 0

cB B.V xB x1 x2 s1 s2 s3 RR

0 s1 12 4 3 1 0 0 3

0 s2 8 4 1 0 1 0 2

0 s3 8 4 -1 0 0 1 2

z 0 zj  cj -2 -1 0 0 0

Clearly most negative z1  c1 corresponds to x1 . So x1 wil enter the basis. The minimum ratio 2
occurs for both s 2 and s 3 so both tend to leave the basis. So we have degeneracy.Let us rearrange
columns corresponding to x1 , x 2 , s 1 , s 2 , s 3
In such a way that the initial identity matrix appears first.

cj 0 0 0 2 1

cB B.V xB s1 s2 s3 x1 x2 RR

0 s1 12 1 0 0 4 3 -

0 s2 8 0 1 0 4 1 0

0 s3 8 0 0 1 4 -1 0

z 0 zj  cj 0 0 0 -2 -1

The minimum ratio 0 occurs for both s
and s 3
2

both tends to leave the basis. So we have degeneracy.

cj 0 0 0 2 1

cB B.V xB s1 s2 s3 x1 x2 RR

0 s1 12 1 0 0 4 3 -

0 s2 8 0 1 0 4 1 1/4

0 s3 8 0 0 1 4 -1 0←

z 0 zj  cj 0 0 0 -2 -1

Here 0/4 =0 is minimum value so s3
leaves the basis.

cj 0 0 0 2 1

cB B.V xB s1 s 2 s3 x1 x2 RR

0 s1 4 1 0 -1 0 4 1

0
s2 0 0 1 -1 0 2 0←

2 x1 2 0 0 1/4 1 -1/4 -

z 4 zj cj 0 0 1/2 0 -3/2



cj 0 0 0 2 1

cB B.V xB s1 s2 s3 x1 x 2 RR

0 s1 4 1 -2 1 0 0 4

1 x2 0 0 1/2 -1/2 0 1 -

2 x1 2 0 1/8 1/8 1 0 16

z 4 zj  cj 0 3/4 -1/4 0 0

cj 0 0 0 2 1

cB B.V xB s1 s2 s3 x1 x 2 RR

0 s 3 4 1 -2 1 0 0

1 x2 2 1/2 -1/2 0 0 1

2 x1 3/2 -1/8 3/8 0 1 0

z 5 zj  cj 1/4 1/4 0 0 0

all z j  c j  0
An optimal solution is x1  3 / 2 x2  2
Maximize z=5
EXAMPLE (2)
Solve the following

Maximize z  5 x1  2 x 2  3 x3

Subject to the constraints: 2 x1  2 x2  x3  2


3x1  4 x2  3
x2  3x3  5
and x1 , x 2 , x 3  0 .

Solution: We need to subtract surplus variable s 1 and add artificial variable A 1 in the first
constraint and slack variables s 2 and s
in the next two constraints.
3
Maximize z  5 x1  2 x2  3 x3  0 s1  0 s2  0 s3  MA1

subject to the constraints : 2 x1  2 x 2  x 3  s1  A1  2


3 x1  4 x 2  s 2  3
x 2  3 x3  s3  5

and x1 , x2 , x3, s1 , s2 , s3, A1  0.


Putting x1  x2  x3  s1  0 gives the initial iterate as A1  2 , s 2  3 , s 3  5
cj 5 -2 3 0 0 0 -M

cB B.V xB x1 x2 x 3 s1 s2 s3 A1 RR

-M A 1 2 2 2 -1 -1 0 0 1 1→

0 s2 3 3 -4 0 0 1 0 0 1

0 s3 5 0 1 3 0 0 1 0 -

z -2M zj  cj -2M-5 -2M+2 M-3 M 0 0 0



most negative z1  c1 corresponds to x1 . So x1 wil enter into the basis. The minimum ratio 1 occurs
for both A 1 and s 2 , and so both tend to leave the basis. So we have degeneracy. But since
A1 is
an artificial variable, we first allow it to exist.

cj 5 -2 3 0 0 0

cB B.V xB x1 x2 x 3 s1 s s3 RR
2

5 x 1 1 1 1 -1/2 -1/2 0 0 -

0 s2 0 0 -7 3/2 3/2 1 0 0←

0 s3 5 0 1 3 0 0 1 5/3

z 5 zj  cj 0 7 -11/2 -5/2 0 0
cj 5 -2 3 0 0 0

cB B.V xB x1 x2 x 3 s1 s s3 RR
2

5 x 1 1 1 -4/3 0 0 1/3 0 -

3 x3 0 0 -14/3 1 1 2/3 0 -

0 s3 5 0 15 0 -3 -2 1 3→

z 5 zj  cj 0 -56/3 0 3 11/3 0

cj 5 -2 3 0 0 0

cB B.V xB x1 x2 x 3 s1 s2 s3 RR

5 x 13/9 1 0 0 -4/15 7/45 4/45 -


1

3 x3 14/9 0 0 1 1/15 2/45 14/45 1/14


0 x2 1/3 0 1 0 -1/15 -2/45 1/15 -

z 101/9 zj  cj 0 0 0 -11/15 53/45 56/45



cj 5 -2 3 0 0 0

cB B.V xB x1 x2 x 3 s1 s2 s3
5 x 23/3 1 0 4 0 1/3 4/3
1

0 s1 70/3 0 0 15 1 2/3 14/3

-2 x2 5 0 1 3 0 0 1

z 85/3 zj  cj 0 0 11 0 5/3 14/3

Since all z j  c j  0
an optimal solution is x 1  23 / 3 and x2  2 and x 3  0
with maximum z=85/3.
Every LPP always have another problem which is called as duality
of primal problem.

e.g.

Maximization of profit (Primal problem)


and
Minimization of cost (Dual problem)

(Original problem Is called Primal problem and derived problem Is


called Dual problem)
Procedure :
1. Write objective function in maximization
type [or minimization].
2. Write all constraints in ≤ sign,
[ if ≥ , multiply by -1].
3. If constraints is equality type :
e.g. : if 2x+y=5 then,
2x+y ≥ 5
2x+y ≤5.
4. All decision variables must be non-
negative,
[if unrestricted, e.g. : x is unrestricted, x=x’-x” ,where
x’, x” ≥ 0 ]

5. Write primal in standard form:


I. Objective function of maximization type with
constraints ≤ type.
II. Objective function of minimization type with
constraints ≥ type.
6. Write the dual :
I. Changing the form of objective function from
maximization to minimization.
II. Transposing the co-efficient matrix.
III. Interchanging the coefficients.
IV. Changing the sign of constraints from ≥ to ≤ and
vice versa.
PRIMAL PROBLEM DUAL PROBLEM
• NO. Of Variables. • NO. Of Constrain.
• No. Of Constrain. • No. Of Variables.
• No. of Co-efficient Objective • RHS Of Constraint.
Function.
• Max. With Constrain ≤ type. • Min. With Constrain ≥ type
• jth Constrain Of Equal type. • Jth Variable Unrestricted In
• Kth Variable Unrestricted In Sign.
Sign. • Kth Constricted Of Equal type.
• Input- Output Matrix ‘A’. • Input- Output Matrix ‘AT’.
• Max z = CX • Min z* = ( BT) W
Subject to : AX ≤ B , x ≥ 0 Subject to : (AT) W ≥ CT, w ≥ 0

Min z = CX Max z* = (BT)W


Subject to : AX = B , x ≥ 0 Subject to : (AT)W ≤ CT , w is
unrestricted.
Max z = CX
Subject to : AX = B , x ≥ 0 Min z* = (B^T)W
Subject to : (AT) W ≥ CT , w is
Max (Min) z = CX unrestricted.
Subject to : AX = B ,
x is unrestricted. Max (Min) z* = (B^T)W
Subject to : (AT) W = CT, w is
unrestricted .
Prove that the dual of dual is the primal.
Example : 1

Maximize Z = 8X + 6Y
Subject to the constraints:
X+Y≤4
4X + 5Y ≤ 3

and X,Y ≥ 0

SOLUTION : Primal is
Maximize Z = 8X + 6Y

Subject to the constraints: X+Y≤4


4X + 5Y ≤ 3 (1)
and X,Y ≥ 0.

Let A and B be dual variable corresponding to each of the primal constraint.


Then dual problem is
Minimize Z = 4A + 3B

Subject to the constraints: A + 4B ≥ 8


A + 5B ≥ 6 (2)
and A,B ≥ 0
Let W1 and W2 be dual variable corresponding to each of the primal constraint.
Then dual problem is

Maximize Z = 8W1 + 6W2

Subject to the constraints: W1 + W2 ≤ 4


4W1 + 5W2 ≤ 3 (3)
and W1 , W2 ≥ 0.

The equation (1) and (3) are same. When X and W are same.

Hence, the dual of dual is the primal.

Example : 2 Write dual of LPP:

Maximize Z = 3X₁+ 6X₂ + 7X₃

Subject to the constraints: X₁ - X₂ + X₃ ≥ 3


2X₁ + X₂ - X₃ ≤ 4
-X₁ + 2X₃ ≤ 1
and X₁,X₂,X₃ ≥ 0.
SOLUTION : Primal is
Maximize Z = 3X₁+ 6X₂ + 7X₃
Subject to the constraints: X₁ - X₂ + X₃ ≥ 3
2X₁ + X₂ - X₃ ≤ 4
-X₁ + 2X₃ ≤ 1 and X₁,X₂,X₃ ≥ 0.
First we derive primal problem in standard form

Maximize Z = 3X₁+ 6X₂ + 7X₃

subject to constrains: -X₁+ X₂ – X₃ ≤ -3


2X₁+ X₂ + X₃ ≤ 4
-X₁ + 2X₃ ≤ 1

and X₁,X₂,X₃ ≥ 0.

Let Y₁ ,Y₂ ,Y₃ be dual variable corresponding to each of the primal constraint.
Then dual problem is

Minimize Z = -3Y₁ + 4Y₂ +Y₃

subject to constrains: -Y₁ + 2Y₂ - Y₃ ≥ 3


Y₁ + Y₂ ≥ 6
-Y₁ + Y₂ + 2Y₃ ≥ 7

and Y₁,Y₂,Y₃ ≥ 0.
Example : 3 Write dual of LPP:

Minimize Z = 3X₁ – 2X₂ + 4X₃

Subject to constrains: 3X₁ + 5X₂ + 4X₃ ≥ 7


6X₁ + X₂ + 3X₃ ≥ 4
7X₁ – 2X₂ – X₃ ≤ 10
X₁– 2X₂ + 5X₃ ≥ 3
4X₁+ 7X₂ – 7X₃ ≥ 2

and X₁,X₂,X₃ ≥ 0.
SOLUTION : Primal is

Minimize Z = 3X₁ – 2X₂ + 4X₃

Subject to constrains: 3X₁ + 5X₂ + 4X₃ ≥ 7


6X₁ + X₂ + 3X₃ ≥ 4
-7X₁ + 2X₂ + X₃ ≥ -10
X₁– 2X₂ + 5X₃ ≥ 3
4X₁+ 7X₂ – 7X₃ ≥ 2

and X₁,X₂,X₃ ≥ 0.
Let Z₁ ,Z₂ ,Z₃, Z4, Z5 be dual variable corresponding to each of the primal constraint. Then dual
problem is;

Maximize Z = 7Z₁ + 4Z₂ – 10Z₃ + 3Z₄ + 2Z₅

Subject to constraints: 3Z₁ + 6Z₂ – 7Z₃ +Z₄ + 4Z₅ ≤ 3


5Z₁ + Z₂ + 2Z₃ - 2Z₄ + 7Z₅ ≤ -2
4Z₁ +3Z₂ + Z₃ + 5Z₄ – 7Z₅ ≤ 4

and Z1,Z₂,Z₃,Z₄,Z₅ ≥ 0

Example : 4 Write dual of LPP:

Maximize Z = 3X₁ + X₂ + X₃ – X₄

Subject to constraints: X₁ + 5X₂ + 3X₃ + 4X₄ ≤ 4


-X₁ – X₂ = 1
X₃ -X₄ ≤ -5

and X₁ , X₂ , X₃ , X₄ ≥ 0

SOLUTION : Primal is
Maximize Z = 3X₁ + X₂ + X₃ – X₄

Subject to constraints: X₁ + 5X₂ + 3X₃ + 4X₄ ≤ 4


-X₁ – X₂ = 1
X₃ -X₄ ≤ -5
and X₁ , X₂ , X₃ , X₄ ≥ 0
Let W1 ,W2 and W3 be dual variable corresponding in each of primal
constraint.

Then the dual problem is:

Minimize Z* = 4W₁ + W₂ - 5W₃

Subject to constrains: W₁ - W₂ ≥ 3
5W₁-W₂ ≥ 1
3W₁ + W₃ ≥ 1
4W₁ - W₂ ≥ -1

and W₁ , W₃ ≥ 0 and W2 unrestricted.


EXAMPLE: 5 Write dual of LPP:

Minimize Z = X1-3X2-2X3

Subject to constraints: 3X1 – X2 + 2X3 ≤ 7


2X1 – 4 X2 ≥ 12
-4X1 + 3X2 + 8X3 = 10

and X1 , X2 ≥ 0 and X3 unrestricted.

SOLUTION : Putting X3 = X′3-X″3

we have primal as

Minimize Z = X1-3X2-2(X′3-X″3)

Subject to constraints: -3X1 + X2 - 2(X′3-X″3) ≥ - 7


2X1 – 4 X2 ≥ 12
-4X1 + 3X2 + 8(X′3-X″3) = 10

and X1 , X2 ,X′3 , X″3 ≥ 0 .


Also , as the third constraint is an equality, we convert it into inequalities as follows:

-4X1 + 3X2 + 8(X′3-X″3) ≤ 10 and -4X1 + 3X2 + 8(X′3-X″3) ≥ 10

Rewriting primal problem as minimization problem with all constraints ≥ (-) type:

Minimize Z = X1-3X2-2(X′3-X″3)

Subject to the constraints: -3X1 + X2 - 2(X′3-X″3) ≥ -7


2X1 – 4 X2 ≥ 12
4X1 - 3X2 - 8(X′3-X″3) ≥ -10
-4X1 + 3X2 + 8(X′3-X″3) ≥ 10

and X1 , X2 ,X′3 , X″3 ≥ 0 .

Let W1 ,W2, W3 and W4 be dual variable corresponding to each of primal constraint.

Then the dual problem is


Maximize Z* = -7W1 + 12W2 – 10W3 + 10W4

Subject to the constraints: -3W1 + 2W2 + 4W3 - 4W4 ≤ 1


W1 - 4W2 - 3W3 + 3W4 ≤ -3
-2W1 - 8W3 + 8W4 ≤ -2
2W1 + 8W3 - 8W4 ≤ 2

and W1,W2 ,W3,W4 ≥ 0 .


The third and fourth constraints can be written as 2W1 + 8W3 - 8W4 = 2 .
From the objective function and the constraints, W3 and W4 can be put
together by writing
W = W3 – W4 .
So W becomes unrestricted in sign. Rewriting the dual problem as

Maximize Z* = -7W1 + 12W2 – 10W

Subject to the constraints: -3W1 + 2W2 + 4W ≤ 1


W1 - 4W2 -3W ≤-3
2W1 + 8W = 2

W1 ≥ 0 ,W2 ≥ 0 and W is unrestricted .

Instead of working out the dual in the above manner, the following way can
also be applied by using the table given below.
Primal (minimize with Dual
≥)
Minimize Z = X1-3X2-2X3 Maximize
Z* = -7W1 + 12W2 – 10W
Subject to constrains:
-3X1 + X2 - 2X3 ≥ -7 Subject to the constraints:
2X1 – 4X2≥12
4X1 - 3X2 -8X3 = -10 -3W1 + 2W2 + 4W ≤ 1
W1 - 4W2 - 3W ≤ -3
and X1 , X2 ≥ 0 and X3 2W1 + 8W = 2
unrestricted.
W1 ≥ 0, W2 ≥ 0 and W
is unrestricted .
CB Cj -3 -2 0 0 0 0

BV X1 X2 S1 S2 S3 S4 XB

0 S1 -1 -1 1 0 0 0 -1

0 S2 1 1 0 1 0 0 7

0 S3 -1 -2 0 0 1 0 -10

0 S4 0 1 0 0 0 1 3
ITEARATION TABLE : 1

CB Cj -3 -2 0 0 0 0

BV X1 X2 S1 S2 S3 S4 XB

0 S1 -1 -1 1 0 0 0 -1

0 S2 1 1 0 1 0 0 7

0 S3 -1 -2 0 0 1 0 -10

0 S4 0 1 0 0 0 1 3

Zj 0 0 0 0 0 0

Cj-Zj -3 -2 0 0 0 0
CB Cj -3 -2 0 0 0 0

BV X1 X2 S1 S2 S3 S4 XB

0 S1 -1 -1 1 0 0 0 -1
0 S2 1 1 0 1 0 0 7

0 S3 -1 -2 0 0 1 0 -10

0 S4 0 1 0 0 0 1 3

Zj 0 0 0 0 0 0
Cj-Zj -3 -2 0 0 0 0

RR 3 1 - - - -

Here, Cj – Zj ≤ 0 but XB ≤ 0.
Thus, X2 will enter into the basis and S3 will leave the
basis in the next table.
CB Cj -3 -2 0 0 0 0

BV X1 X2 S1 S2 S3 S4 XB

0 S1 -1 -1 1 0 0 0 -1

0 S2 1 1 0 1 0 0 7

-2 X2 1/2 1 0 0 -1/2 0 5

0 S4 0 1 0 0 0 1 3

Zj 0 0 0 0 0 0

Cj-Zj -3 -2 0 0 0 0

RR 3 1 - - - -
CB Cj -3 -2 0 0 0 0

BV X1 X2 S1 S2 S3 S4 XB

0 S1 -1/2 0 1 0 -1/2 0 4

0 S2 1/2 0 0 1 1/2 0 2

-2 X2 1/2 1 0 0 -1/2 0 5

0 S4 -1/2 0 0 0 1/2 1 -2

Zj -1 -2 0 0 1 0 -10
Cj-Zj -2 0 0 0 -1 0

RR 4 - - - - -

Here, all Cj – Zj ≤ 0 Optimal but XB ≤ 0


Infeasible solution.
Thus, X1 will enter into the basis and S4
will leave the basis in the next table.
CB Cj -3 -2 0 0 0 0
BV X1 X2 S1 S2 S3 S4 XB
0 S1 -1/2 0 1 0 -1/2 0 4
0 S2 1/2 0 0 1 1/2 0 2
-2 X2 1/2 1 0 0 -1/2 0 5
-3 X1 1 0 0 0 -1 -2 4
Zj -1 -2 0 0 1 0 -10
Cj-Zj -2 0 0 0 -1 0
RR 4 - - - - -

Only divide X1 by (-1/2).X1X1


CB Cj -3 -2 0 0 0 0
BV X1 X2 S1 S2 S3 S4 XB
0 S1 0 0 1 0 -1 -1 6
0 S2 0 0 0 1 1 1 0
-2 X2 0 1 0 0 0 1 3
-3 X1 1 0 0 0 -1 -2 4
Zj -3 -2 0 0 3 4 -18
Cj-Zj 0 0 0 0 -3 -4
CB Cj -2 -1 -1 0 0 0 XB
BV X1 X2 X3 S1 S2 S3

0 S1 4 6 3 1 0 0 8
0 S2 1 -9 1 0 1 0 -3
0 S3 -2 -3 5 0 0 1 -4
Zj 0 0 0 0 0 0
Cj-Zj -2 -1 -1 0 0 0
RR 1 1/3 - - - -

Here, all Cj-Zj ≤ 0 but XB ≤ 0.


Thus, X2 will enter into the basis and S3 will leave the basis in the
next table.
CB Cj -2 -1 -1 0 0 0 XB

BV X1 X2 X3 S1 S2 S3

0 S1 4 6 3 1 0 0 8
0 S2 1 -9 1 0 1 0 -3
-1 X2 2/3 1 -5/3 0 0 -1/3 4/3
Zj 0 0 0 0 0 0
Cj-Zj -2 -1 -1 0 0 0
RR 1 1/3 - - - -
CB Cj -2 -1 -1 0 0 0 XB

BV X1 X2 X3 S1 S2 S3

0 S1 0 0 13 1 0 2 0

0 S2 7 0 -14 0 1 -3 9

-1 X2 2/3 1 -5/3 0 0 -1/3 4/3

Zj -2/3 -1 5/3 0 0 1/3 -4/3

Cj-Zj -4/3 - -8/3 - - -1/3


 INTRODUCTION:

 An integer programming problem is a


mathematical optimization or feasibility
program in which some or all of the variables
are restricated to be integers .
 while solving for number of machines or
mankind , real value like 2.3 or 4.8
meaningless.
Consider the LPP:

Maximize z = 3x1+4x2

Subject to the constraints :


2x1+4x2≤13
-2x1+x2 ≤ 2
2x1 + 2x2 ≥ 1
6x1 - 4x2 ≤ 15

and x1,x2 ≥0 are integers.


• The optimum value is obtained at the point (3.5,1.5) and z = 16.5.
But since the variables have to be integers , we try to round off
(3.5,1.5) and get point as (3,2),(4,1),(4,2) and (3,1).

• But the first three points are out of the feasible region. so, if we
consider that after rounding off the solution would be (3,1),then we
would be mistaken because z=13 at (3,1) but (2,2) gives z=14,which
is a better solution than (3,1) and in this case optimal.
 FORMS OF INTEGER PROGRAMMIG PROBLEMS(IPP)
The LP can be classified in to three forms:
 Pure integer programming problem in which all decision variable are required
to have integer values.
 The standard form of IPP is:
Maximize z = cTx
subject to the constraints:
n m
Ax≤b,x≥0 are integers where x , c Є R ,A : m Х n, b Є R .

 Mixed integer programming problem in which some of the decision variables


are required to have integer values. The general form of IPP is :
Maximize z= cTx
subject to the constraints:
Ax ≤ b , x ≥ 0 , xk , k=1,2,...,r, r< n,
n m
are integers where x, c Є R , A: m Х n , b Є R
 Zero-one programming problem in which all decision variable take either ‘0’
or ‘1’
Name: Pritesh S. Prajapati

Roll no.: 52
GOMORY’S CUTTING PLANE METHOD

In 1956 , R.E. Gomory developed this method to solve IPP using dual
simplex method.
He generated a sequence of linear inequalities called cuts which reduce
a part of the feasible region of the corresponding LPP to obtain integer
solution. The method of cutting the feasible region of an LPP is called
cutting plane method.
 Step 1: Write the given LPP with objective as
maximization with all the constraints as  type.
 Step 2: Solve the problem by the simplex method.
 Step 3: If the solution obtained is integer, the
problem has obtained optimal solution. If all xBi  0
but some of them are not integers, go to step 4.
 Step 4: Choose the largest fraction of x Bi ‘s (say)
xBk . Express each of the negative fraction(if any)
in the k-th row of the optimal simplex table as a
sum of a negative integer and non-negative
fraction.
 Step 5: Construct the Gomorian constraint:
n n

f
j 1
kj x j  fk i.e g1   f k   f kj x j
j 1

where g is
1 called the Gomorian slack variable

and all f kj  0 .
 Step 6: Add the cutting plane generated in step 5
at the bottom of the optimum simplex table
obtained in step 2. Find the new optimum
solution using the dual simplex method.
 Step 7: Repeat step 3 to 6 until all integral
solution is obtained.
 EXAMPLE 1: Find the optimum integer
solution of LPP:
Maximize z  4 x1  3 x 2

Subject to the constraints:


x1  2 x 2  4
2 x1  x 2  6

and x1, x2  0 are integers.


Solution: Using simplex method, the optimum
solution of the LPP without integer requirements
is given below.
 Writing the given LPP in the standard form, we
need to add slack variables s1 , s 2 in the constraints
thus, LPP is

Maximize z  4 x1  3x2  0s1  0s2


Subject to the constraints:
x1  2 x2  s1  4
2 x1  x2  s2  6
and x1 , x 2 , s1 , s 2  0 .
 Putting x1  x2  0 , we get the first iteration as given
below.
cj 4 3 0 0
cB B xB x1 x2 s1 s2 RR
0 s1 4 1 2 1 0 4
0 s2 6 2 1 0 1 3 

z 0 zj  cj -4  -3 0 0

cj 4 3 0 0
cB B xB x1 x2 s1 s2 RR
0 s1 1 0 3/2 1 -1/2 2/3 
4 x1 3 1 1/2 0 1/2 6
z 12 zj  cj 0 -1  0 2
cj 4 3 0 0
cB B xB x1 x2 s1 s2
3 x2 2/3 0 1 2/3 -1/3
4 x1 8/3 1 0 -1/3 2/3
z 38/3 z j  c j 0 0 2/3 5/3

The fractional part for both x 1 and x 2 is 2/3. so, anyone


can be selected. consider the first row for constructing a
cut, we have
2
3 x  s  s
2
2
3 1
1
3 2
 x2  2
3 s1  (  1  23 ) s 2
Taking all the integral parts on one side, the corresponding
fractional cut is given by
g1   23  23 s1  23 s2
 23   23 s1  23 s2  g1
g 1 is called the Gomorian slack variable.
Insert this constraint at the bottom of the previous optimal table.

cj 4 3 0 0 0
cB B xB x1 x2 s1 s2 g1
3 x2 2/3 0 1 2/3 -1/3 0
4 x1 8/3 1 0 -1/3 2/3 0
0 g1 -2/3 0 0 -2/3 -2/3 1 

z 38/3 z j  c j 0 0 2/3 5/3 0


RR - - -1  -5/2 0
Using the dual simplex method, g1 leaves the basis and s 1 enters.

cj 4 3 0 0 0
cB B xB x1 x2 s1 s2 g1
3 x2 0 0 1 0 -1 1
4 x1 3 1 0 0 1 -1/2
0 s1 1 0 0 1 1 -3/2
z 12 zj  cj 0 0 0 1 1

This gives an optimum integer solution x 1=3, x 2=0 and


maximum z  12 .
 EXAMPLE 2: Find the optimum integer
solution of LPP:
Maximize z  7 x1  9 x 2

Subject to the constraints:


 x1  3 x 2  6
7 x 1  x 2  35

and x1, x2  0 are integers.


Solution: Using simplex method, the optimum
solution of the LPP without integer requirements
is given below.
 Writing the given LPP in the standard form, we
need to add slack variables s1 , s 2 in the constraints
thus, LPP is

Maximize z  7 x1  9 x2  0s1  0s2


Subject to the constraints:
 x1  3 x 2  6
7 x 1  x 2  35
and x1 , x 2 , s1 , s 2  0 .
 Putting x1  x2  0 , we get the first iteration as given
below.
cj 7 9 0 0
cB B xB x1 x2 s1 s2 RR
0 s1 6 -1 3 1 0 6/3 

0 s2 35 7 1 0 1 35
z 0 zj  cj -7 -9  0 0

cj 7 9 0 0
cB B xB x1 x2 s1 s2 RR
9 x2 2 -1/3 1 1/3 0 -
0 s2 33 22/3 0 -1/3 1 9/2 
z 18 z j  c j -10 0 3 0

cj 7 9 0 0
cB B xB x1 x2 s1 s2
9 x2 7/2 0 1 7/22 1/22
7 x1 9/2 1 0 -1/22 3/22
z 63 zj  cj 0 0 28/11 15/11

The fractional part for both x 1 and x 2 is 1/2. so, anyone


can be selected. consider the first row for constructing a
cut, we have n

f
j 1
kj x j  fk
1
2 2x  7
22 1
1
22 2 s  s
Therefore, the corresponding Gomorian slack variable is
n
g1   f k   f kj x j i.e g1   12  227 s1  221 s2
j 1
 12   227 s1  221 s2  g1
Insert this constraint at the bottom of the previous optimal table.

cj 7 9 0 0 0
cB B xB x1 x2 s1 s2 g1
9 x2 7/2 0 1 7/22 1/22 0
7 x1 9/2 1 0 -1/22 3/22 0
0 g1 -1/2 0 0 -7/22 -1/22 1
z 63 zj  cj 0 0 28/11 15/11 0
RR - - -8  -30 0

Solving by the dual simplex method suggests that g 1 leaves the


basis and s1 enters into the basis. So, we get iterative table as
follows.
cj 7 9 0 0 0
cB B xB x1 x2 s1 s2 g1
9 x2 3 0 1 0 0 1
7 x1 32/7 1 0 0 1/7 -1/7
0 s1 11/7 0 0 1 1/7 -22/7
z 59 zj  cj 0 0 0 0 8

Still the solution is not integer-valued. Here, the fractional part


for both x 1 and s 1 is 4/7.So, anyone can be selected. Consider
the second row corresponding a cut. We have,
n

f j 1
kj x j  fk
4
7  x1  17 s 2  1
7 g1
 x1  1
7 s 2  (  1  76 ) g 1
Taking all the integral parts on one side, the corresponding
fractional cut is given by

g2   74  17 s2  76 g1
 74   17 s2  76 g1  g2
Adding this slack variable in the previous optimal table, we
get
cj 7 9 0 0 0 0
cB B xB x1 x2 s1 s2 g1 g2
9 x2 3 0 1 0 0 1 0
7 x1 32/7 1 0 0 1/7 -1/7 0
0 s1 11/7 0 0 1 1/7 -22/7 0
0 g2 -4/7 0 0 0 -1/7 -6/7 1
z 59 zj  cj 0 0 0 1 8 0
RR - - - -7  -28/3 -
cj 7 9 0 0 0 0
cB B xB x1 x2 s1 s2 g1 g2
9 x2 3 0 1 0 0 1 0
7 x1 4 1 0 0 0 -1 1
0 s1 1 0 0 1 0 -4 1
0 s2 4 0 0 0 1 6 -7
z 55 zj  cj 0 0 0 0 2 7

Finally we get optimal integer valued solution x1  4, x 2  3


Maximum z  55 .
 EXAMPLE 3: Solve the following IPP:
Maximize
z  2 x1  20 x 2  10 x3
Subject to the constraints:
2 x1  20 x 2  4 x 3  15
6 x1  20 x 2  4 x 3  20

and x1, x2 , x3  0 and are integers.


Solution: Introducing the slack variable s 1 in the first
constraint and the artificial variable A in the second
constraints and ignoring integer-valued
requirement, the optimal solution is given by the
simplex table.
 Writing the given LPP in the standard form
Maximize z  2 x1  20 x2  4 x3  0s1  MA
Subject to the constraints:
2 x1  20 x 2  4 x 3  s1  15
6 x1  20 x 2  4 x3  A  20

and x1 , x 2 , x 3 , s1 , A  0
cj 2 20 -10 0 -M
cB B xB x1 x2 x3 s1 A RR
0 s1 15 2 20 4 1 0 3/4 
-M A 20 6 20 4 0 1 1
z -20M z j  c j -6M-2 -20M-20 -4M+10 0 0

cj 2 20 -10 0 -M
cB B xB x1 x2 x3 s1 A RR
20 x2 3/4 1/10 1 1/5 1/20 0 15/2
-M A 5 4 0 0 -1 1 5/4 
z 15-5M zj  cj -4M  0 14 1+M 0
cj 2 20 -10 0
cB B xB x1 x2 x3 s1
20 x2 5/8 0 1 1/5 3/40
2 x1 5/4 1 0 0 -1/4
z 15 zj  cj 0 0 14 1

Since the solution is non-integer, a fractional cut is constructed from


the first row,
5
8 x 
2
1
5 3 x  3
40 1 s
The corresponding Gomorian slack variable is

g 1   85  1
5 x3  3
40 s1
 85   15 x3  403 s1  g1
Adding this slack variable in the previous optimal table , we get
cj 2 20 -10 0 0
cB B xB x1 x2 x3 s1 g1
20 x2 5/8 0 1 1/5 3/40 0
2 x1 5/4 1 0 0 -1/4 0
0 g1 -5/8 0 0 -1/5 -3/40 1
z 15 zj  cj 0 0 14 1  0
RR - - -70 -40/3 0

Solving the above table by the dual simplex method suggests that g1
exits and s 1 enters.
cj 2 20 -10 0 0
cB B xB x1 x2 x3 s1 g1
20 x2 0 0 1 0 0 1
2 x1 10/3 1 0 2/3 0 -10/3
0 s1 25/3 0 0 8/3 1 -40/3
z 20/3 zj  cj 0 0 34/3 0 40/3
Since the solution is non-integer, a fractional cut is constructed from
the third row,

8 1
3  (2  2
3 ) x 3  s 1  (  14  2
3 ) g1

The corresponding Gomorian slack variable is

g2  1
3  2
3 x3  2
3 g1
1
3   23 x3  23 g1  g 2
Adding this slack variable in the previous optimal table, we get
cj 2 20 -10 0 0 0
cB B xB x1 x2 x3 s1 g1 g2
20 x2 0 0 1 0 0 1 0
2 x1 10/3 1 0 2/3 0 -10/3 0
0 s1 25/3 0 0 8/3 1 -40/3 0
0 g2 -1/3 0 0 -2/3 0 -2/3 1 
z 20/3 zj  cj 0 0 34/3  0 40/3 0
RR - - -17 - -20 0

Then the dual simplex method suggests that x 3enters and g 2 leaves the basis.
cj 2 20 -10 0 0 0
cB B xB x1 x2 x3 s1 g1 g2
20 x2 0 0 1 0 0 1 0
2 x1 3 1 0 0 0 -4 1
0 s1 7 0 0 0 1 -16 4
-10 x3 1/2 0 0 1 0 1 -3/2
z 1 zj  cj 0 0 0 0 2 17
Since the solution is not integer, a third fractional cut is required. From
the last row, we have
1
2  x3  g1  (2  12 ) g2
The corresponding Gomorian slack variable is g 3   12  12 g 2
 12   12 g 2  g 3
The new iteration table is

cj 2 20 -10 0 0 0 0
cB B xB x1 x2 x3 s1 g1 g2 g3
20 x2 0 0 1 0 0 1 0 0
2 x1 3 1 0 0 0 -4 1 1
0 s1 7 0 0 0 1 -16 4 4
-10 x3 1/2 0 0 1 0 1 -3/2 -3/2
0 g3 -1/2 0 0 0 0 0 -1/2 1
z 1 zj  cj 0 0 0 0 2 17  0
RR - - - - - -34 0
Then drop g 3 and enter g 2 . The improved solution is

cj 2 20 -10 0 0 0 0
cB B xB x1 x2 x3 s1 g1 g2 g3
20 x2 0 0 1 0 0 1 0 0
2 x1 2 1 0 0 0 -4 0 2
0 s1 3 0 0 0 1 -16 0 8
-10 x3 2 0 0 1 0 1 0 -3
0 g2 1 0 0 0 0 0 1 -2
z -16 zj  cj 0 0 0 0 2 0 34

Thus, we get the optimum integer-valued solution as x1  2, x2  0, x3  2


and maximum z  16 .
Name : Rajendra Zinzala

Roll no: 53



 Example 1: Find the optimum mixed –integer
solution off LLP

Maximize
Subject to the constraints

and
where is an integer
Solution: Using simplex method, the optimum
solution of the LPP without integer requirements
is given below.
 Writing the given LPP in the standard form, we
need to add slack variables in the constraints
thus, LPP is

Maximize
Subject to the constraints:

and .
1 1 0 0

RR
0 16 2 5 1 0 8
0 30 6 5 0 1
z 0 -1 -1 0 0

1 1 0 0
RR
0 6 0 10/3 1 -1/3
1 5 1 5/6 0 1/6 6
z 5 0 -1/6 0 1/6
1 1 0 0

1 9/5 0 1 3/10 -1/10

1 7/2 1 0 -1/4 1/4


z 53/10 0 0 1/20 3/20

In the optimal solution is not an integer. Consider the


second row for constructing cute. We have

1 1 0 0 0

1 9/5 0 1 3/10 -1/10 0


1 7/2 1 0 -1/4 1/4 0

0 -1/2 0 0 -1/4 -1/4

z 53/10 0 0 1/20 3/20


RR 0 0 -1/5 -3/5
1 1 0 0 0

1 6/5 0 1 0 -2/5 6/5


1 4 1 0 0 1/2 -1
0 2 0 0 1 1 -4
z 26/5 0 0 0 1/10 1/5
 EXAMPLE 2: Solve the following LLP

Maximize
Subject to the constraints:

and and are integers


Solution: Introducing slack variables in
the constraints and ignoring integer valued
requirement the optimal solution is given by the
simplex table

 Writing the given LPP in the standard form, we


need to add slack variables in the
constraints
thus, LPP is

Maximize
Subject to the constraints:

and x1 , x2 , x3 , s1 , s2 , s3.  0
4 6 2 0 0 0
B.V RR
0 5 4 -4 0 1 0 0 -
0 5 -1 6 0 0 1 0
0 5 -1 1 1 0 0 1 5
z 0 -4 -2 0 0 0

4 6 2 0 0 0
B.V RR
0 25/3 10/3 0 0 1 2/3 0
6 5/6 -1/6 1 0 0 1/6 0 -
0 25/6 -5/6 0 1 0 -1/6 1 -
z 5 6 0 0 1 0
4 6 2 0 0 0
B.V RR
4 5/2 1 0 0 3/10 1/5 0 -
6 5/4 0 1 0 1/20 1/5 0 -
0 25/4 0 0 1 1/4 0 1
z 35 0 0 3/2 2 0

4 6 2 0 0 0
B.V RR
4 5/2 1 0 0 3/10 1/5 0
6 5/4 0 1 0 1/20 1/5 0
2 25/4 0 0 1 1/4 0 1
z 30 0 0 0 2 2 2

 Adding this slack variable in the previous optimal
table we get
4 6 2 0 0 0 0
B.V
4 5/2 1 0 0 3/10 1/5 0 0
6 5/4 0 1 0 1/20 1/5 0 0
2 25/4 0 0 1 1/4 0 1 0
0 -1/2 0 0 0 -3/10 -1/5 0
z 30 0 0 0 2 2 2 0
RR 0 0 0 -10 0 0
4 6 2 0 0 0 0
B.V
4 2 1 0 0 0 0 0 1
6 7/6 0 1 0 0 1/6 0 1/6
2 35/6 0 0 1 0 -1/6 1 5/6
0 5/3 0 0 0 1 2/3 0 -10/3
z 80/3 0 0 0 0 2/3 2 20/3



4 6 2 0 0 0 0
B.V
4 2 1 0 0 0 0 0 1 0
6 7/6 0 1 0 0 1/6 0 1/6 0
2 35/6 0 0 1 0 -1/6 1 5/6 0
0 5/6 0 0 0 1 2/3 0 -10/3 0
0 -5/6 0 0 0 0 -5/6 0 -5/6
z 80/3 0 0 0 0 2/3 2 20/3 0
RR 0 0 0 0 0 -8 0

Solving by the dual simplex method suggests drop g 2 and enter s2


4 6 2 0 0 0 0
B.V
4 2 1 0 0 0 0 0 1 0
6 1 0 1 0 0 0 0 0 1/5
2 6 0 0 1 0 0 1 1 -1/5
0 1 0 0 0 1 0 0 -4 4/5
0 1 0 0 0 0 1 0 1 -6/5
z 26 0 0 0 0 0 2 6 4/5
Name : Rajeshkumar A, Harijan
Roll No. : 54
BRANCH & BOUND METHOD

The Branch and Bound method divides the feasible region into smaller subprograms and
Examines each of the subprograms successively until a basic feasible solution is obtained.
The iterative steps are as follows :

Step 1: Solve the given LPP ignoring integer requirements.

Step 2 : If the solution obtained is integer then terminate the process, otherwise go to
step 3.

Step 3: Calculate the value of the objective function and treat it as upper bound. Obtain
the lower bound by rounding off to the integer values of the decision variables.

Step 4 : Let xj be not an integer value. The sub-divide given LPP into two subprograms.

Subprogram B : Add constraint x  [ x ] to the given LPP.


j j

Subprogram C : Add constraint x  [ x ] + 1 to the given LPP.


j j

Where [ x ] is the largest integer contained in x .


j j
Step 5: Solve the subprograms obtained in step 4. There may arise three cases:

1. If the optimum solutions of the two subprograms are integral, then the
required solution is one that gives larger value of the objective function.

2. If the optimum solution of one subprogram is integral and that of the other
has no feasible solution, then the required solution is of that subprogram
which satisfies integer requirement of the decision variables.

3. If the optimum solution of one subprogram is integral and that of the other
is non-integral, then repeat steps 3 and 4 for the non-integer valued sub-
program only.

Step 6 : Repeat steps 3 to 5 until all-integer valued solution is obtained.

Step 7 : Choose the solution amongst the obtained integer valued solutions that gives
an optimum value of the objective function.
Example :1 Find the optimum integer solution of LPP using B & B method.

Minimize z = 4x1 + 3x2

Subject to the constraints : 5x1  3x2  30


x1  4
x2  6
x1, x2  0 are integers.

Solution: Ignoring the restriction of integers, then we will get optimum solution is

x1  4, x2 10 and minimum z = 26.


3
10
Here x2  ,which is non-integer.
3
So , two new branches are , x  3 (subprogram B) and
2
x2 4 (subprogram C),

Added in the original set of constraints.

Subprogram B : Minimize Z = 4 x1  3 x2

Subject to the constraints:

5 x1  3 x2  30
x1  4
x2  6
x2  3
x1, x2  0
There is no feasible solution, so the optimum solution of subprogram B is infeasible

Now,

Subprogram C:
Minimize z = 4 x1  3x2

Subject to the constraints:

5x1  3x2  30
x1  4
x2  6
x2  4
x1, x2  0
So , 18 132
x1  , x2  4 and minimum z =
5 5

Here, x2  4 is integer but x1  185 is not integer.

So, there is need branching of subprogram C .

We add two new branches, x1  3 (Subprogram D) and x1 4 (Subprogram E),


In the original set of constraints.

Subprogram D : Minimize z = 4x1 + 3x2


5x1  3x2  30
Subject to the constraints:
x1  4
x2  6
x2  4
x1, x2  0 x1  3
The optimum solution of subprogram D is

x1  3, x2  5 and minimum z = 27

Subprogram E :
Minimize z = 4 x1  3 x2

Subject to the constraints:

5x1  3x2  30
x1  4
x2  6
x2  4
x1  4
x1, x2  0
The optimum solution of subprogram E is x1  4, x 2  4
and minimum z = 28.

Therefore , the minimum value of z = 27 and

Maximum value of z = 28.

The tree diagram for the optimal integral solution is given in bellow figure.
Example 2: Find the optimum integer solution of LPP using B & B method:

Maximize z = 8 x1  5 x2
Subject to the constraints:
9 x1  5 x2  45
x1  x2  6
and x1 , x2  0 & integers.

Solution : Ignoring the restriction of integers, then we will get optimum solution is

x1  15 4 , x2  9 4 and z = 165
4
Here , x1  15 4 , x2  9 4
Both are non-integral but x1  x2
Then there is two new branches, x1  3 (Subprogram B) and x1  4 (subprogram C)

Added in the original set of constraints.


Subprogram B: Maximize z = 8 x1  5 x2

Subject to the constraints:

x1  4, x2  9
5

x1 , x2  0
The optimum solution of subprogram B is x1 3, x2  3
and maximize z = 39

Subprogram C: Maximize z = 8 x1  5 x2

Subject to the constraints:

9 x1  5 x2  45
x1  x2  6
x1  4

x1 , x2  0
Here , x1  4, x2  9
5 which is not integer

So , we add two new branches, x2  1 (subprogram D) and x2  2 (subprogram E)


In the original set of constraints.

Subprogram D: Maximize z = 8 x1  5 x2

Subject to the constraints:


9 x1  5 x2  45
x1  x2  6
x1  4
x2  1
x1 , x2  0
So, here x1  40
9  4.44, x2  1 and z = 365/9

Subprogram E: Maximize z = 8 x  5 x
1 2

Subject to the constraints:

9 x1  5 x2  45
x1  x2  6
x1  4
x2  2
x1 , x2  0
So, we need to have branching of subprogram D because x1  40
9  4.44 is not integer.

We add two new branches, x1  4 (subprogram F) and x1 5 (subprogram G),


In the original set of constraints.

Subprogram F: Maximize z = 8 x1  5 x2
Subject to the constraints:

9 x1  5 x2  45
x1  x2  6
x1  4
x2  1
x1  4
x1 , x2  0
The optimum solution of the subprogram F is x1  4, x2  1 and maximize z = 37

Subprogram G: Maximize z = 8 x  5 x
1 2

Subject to the constraints:

9 x1  5 x2  45
x1  x2  6
x1  4
x2  1
x1  5

x1 , x2  0
The optimum solution of subprogram G is x1  5, x2  0
and maximum z = 40.

The tree diagram for the optimal integral solution is given in bellow figure
a. limitations;

b. requirements;

c. balanced conditions;

d. all of the above.


a. a constrained optimization model;

b. a constrained decision – making model;

c. a mathematical programming model;

d. all of the above.


a. the objective function is maximized;

b. the objective function is maximized and then it is

determined whether or not this occurs at an


allowable decision;

c. the objective function is maximized over the

allowable set of decisions;

d. all of the above.


a. the intersection of two constraint lines;

b. some subset of constraint lines and non-negativity

conditions;

c. basic solution of the LPP;

d. all of the above.


a. at least one constraint (not including non-

negativity conditions) is active at the point;

b. exactly one constraint (not including non-

negativity conditions) is active at the point;

c. all of the above;

d. none of the above.


a. means that the objective function cannot be

optimized;

b. means that the objective function is unbounded;

c. (a) or (b);

d. (a) and (b) both.


a. at least one decision variable can be arbitrarily large in

the feasible region;

b. the value of the objective function can be made as large

as desired, in the optimization direction, and still have at

least one point in the constraint set;

c. (a) or (b);

d. (a) and (b) both.


a. cj – zj - row;

b. optimal column;

c. quantity column;

d. none of the above.


a. a larger per unit profitability as shown in the cj -

row;

b. a positive cj – zj value;

c. the smallest cj – zj value;

d. any negative cj – zj value.


a. exhibits a solution to the given equations;

b. exhibits a basic feasible solution to the equations in

the standard equality form of the problem;

c. corresponds to an extreme point of the constraint

set;

d. exhibits a set of transformed equations.


a. cj – zj ≤ 0, for all j;

b. zj ≥ 0, for all j;

c. zj ≤ 0, for all j;

d. cj – zj ≥ 0, for all j.
a. are used to find an initial solution;

b. are used in phase I of Two-phase method;

c. can be used to find optimal dual prices in the final

iterative table;

d. all of the above.


a. in computing the entering variable;

b. in computing the leaving variable;

c. artificial variable remains in the basis;

d. none of the above.


a. can always be controlled;

b. need not worry about;

c. will cause more pivots to occur before

termination;

d. none of the above .


a. by choosing the variable with the largest cj – zj value;

b. by choosing the variable with the smallest cj – zj

value

c. by choosing the variable which yields the minimum

positive replacement ratio;

d. by choosing it randomly.
a. n constraints and m non-negative variables;

b. is a minimization model;

c. both (a) and (b);

d. neither (a) nor (b).


 Ans.
1(d), 2(d), 3(c), 4(b),
5(a), 6(b), 7(b), 8(b),
9(b), 10(d), 11(a), 12(d),
13(c), 14(c), 15(c), 16(c)
MCQ on
Integer Programming Problems
1.In a mixed-integer PP

a. all of the decision variables require


integer solutions.
b. few of the decision variables require
integer solutions.
c. different objective functions are mixed
together.
d. none of the above.
2. The use of cutting plane method

a. reduces the number of constraints in the


given problem.
b. yields better value of the objective
function.
c. require use of standard LP approach
between each cutting plane application.
d. all of the above.
3. The 0 – 1 IPP

a. requires the decision variables to have


values between 0 and 1.
b. requires the constraints all have
coefficients between 0 and 1.
c. requires that the decision variables have
coefficients between 0 and 1.
d. all of the above.
4. The part of the feasible solution space
eliminated by plotting a cut contains

a. only non-integer solutions.


b. only integer solutions.
c. both (a) and (b).
d. none of the above.
5. While solving IPP any non-integer
variable in the solution is picked up to

a. obtain the cut constraint.


b. enter the solution.
c. leave the solution.
d. none of the above.
6. B&B method divides the feasible solution
space into smaller parts by

a. branching.
b. bounding.
c. enumerating.
d. all of the above.
7. Rounding off solution values of decision
variables in an LPP may not be acceptable
because

a. it does not satisfy constraints.


b. it violates non-negativity conditions.
c. objective function value is less than the
objective value of LPP.
d. none of the above.
8. In the B&B approach to maximize IPP, a
node is terminated if

a. a node has an infeasible solution.


b. a node yields a solution that is feasible
but not an integer.
c. upper bound is less than the current sub-
program’s lower bound.
d. all of the above.
9. Which of the following is the consequence
of adding a new cut constraint to an optimal
simplex table

a. addition of a new variable to the


constraint.
b. makes the previous optimal solution
infeasible.
c. eliminates non-integer solution from the
solution space.
d. all of the above.
10. In B&B minimization tree, the lower
bounds on objective function value

a. do not decrease in value.


b. do not increase in value.
c. remains constant.
d. none of the above.
11. Which of the following is true?

a. A LPP with only one d.v. restricted to


integer value is not an IPP.
b. An IPP is an LPP with d.vs. restricted to
integer values.
c. A mixed IPP is one where mixed
constraints are involved.
d. A pure IPP is one where all the d.vs. are
either 0 or 1.
12. In cutting plane algorithm, each cut
involves the introduction of an

a. an equality constraint.
b. less than or equal to constraint.
c. greater than or equal to constraint.
d. an artificial variable.
13. The use of cutting plane method

a. require the use of standard LP approach


between each cutting plane application.
b. yields better vale of the objective
function.
c. reduces the number of constraints in the
given problem.
d. both (b) and (c).
14. In a mixed IPP

a. different objective functions are mixed


together.
b. all of the d.v.s require integer solutions.
c. only few of the d.v.s require integer
solutions.
d. none of the above.
15. Which of the following is not correct?

a. An IPP where all the variables must be


equal to 0 or 1 is called a “0-1” IPP.
b. An LPP in which all the d.v. are non-
negative integers is called a pure IPP.
c. Variables in an IPP that are not integer
restricted are called discontinuous varis.
d. Variables in an IPP that are not integer
restricted are called continuous Variables
16. Which of the following is not correct?

a. An IPP that has no constraint is known as


a Knapsack problem.
b. An IPP that have only one constraint is
called Knapsack problem.
c. Capital budgeting problems may be
considered as a “0-1” type IPP.
d. A travelling salesman problem can be
solved using B&B method.
Solutions:

1. b 8. d 15. c
2. c 9. d 16. a
3. a 10. b
4. a 11. b
5. a 12. b
6. a 13. a
7. d 14. c

Das könnte Ihnen auch gefallen