All Unit Notes
All Unit Notes
Charcteristics:
The objective function is of maximization type
All constraints are of ≤ type
All variables xiare non-negative
16 What is sensitivity analysis?
Sensitivity analysis investigates the changes in the optimal solution resulting from making changes in
CS6704-Resource Management Techniques Department of CSE 2016-2017
parameters of the LP model. Sensitivity analysis is also called post optimality analysis.
17 What are the characteristics of LPP in standard form?
The general linear programming problem in the form
Maximize or Minimize Z = c1 x1 + c2 x2 + …..+ cnxn
Subject to constraints
a11x1 + a12 x2 +…………+ a1nxn = b1
a21x1 + a22 x2 +…………+ a2nxn = b2
……………………………………………….
……………………………………………….
am1x1 + am2 x2 +…………+ amnxn = bm
and the non-negativity restrictions x1, x2,….xn ≥ 0 is known as standard form.
In matrix notation the standard form of LPP can be expressed as:
Maximize Z = CX (objective function)
Subject to constraints AX = b and X ≥ 0
Characteristics:
The objective function is of maximization type.
All the constraint equation must be of equal type by adding slack or surplus variables
RHS of each constraint must be positive type.
All variables are non-negative.
18 List all possible cases that can arise in sensitivity analysis with their actions to obtain new solution.
Condition resulting from the changes Recommended action
Current solution remains optimal and feasible No further action is necessary
Current solution becomes infeasible Use dual simplex to recover feasibility
Current solution becomes non-optimal Use primal simplex to recover optimality
Current solution becomes both non-optimal and Use the generalized simplex method to obtain a new
infeasible solution
19 What are the changes that affect feasibility?
There are two types of changes that could affect feasibility of the current solution:
Changes in resources availability (or right side of the constraints or requirement vector b) and
Addition of new constraints.
20 What are the changes that affect optimality?
There are two particular situations that could affect optimality of the current solution:
Changes in the original objective coefficients.
Addition of new economic activity (variable) to the model.
UNIT-I / PART-B
1 Solve the following LPP by graphical method:
Max Z = 3x1 + 2x2 subject to -2x1 + x2 ≤ 1, x1 ≤ 2, x1 + x2 ≤ 3 and x1, x2 ≥ 0.
Solution: First consider the inequality constraints as equalities.
-2x1 + x2 = 1 (1)
x1 = 2 (2)
x1 + x2 = 3 (3)
x1 = 0 (4)
x2 = 0 (5)
From the line -2x1 + x2 = 1
Put x1 = 0 x2 =1 (0,1)
Put x2 =0 -2x1 = 1 x1 = -0.5 (-0.5, 0)
So the line (1) passes through the points (0,1) and (-0.5, 0). The points on this line satisfy the equation
-2x1 + x2 = 1. Now origin (0, 0) on substitution, gives -0 + 0 = 0 < 1; hence it also satisfies the inequality -2x 1 +
x2 ≤ 1. Thus all points on the origin side and on this line satisfy the inequality -2x 1 + x2 ≤ 1. Similarly
interpreting the other constraints, the feasible solution is OABCD. The feasible region is also known as
solution space of the LPP. Every point in this area satisfies all the constraints.
Now the aim is to find vertices of the solution space. B is the point of intersection of x1 = 2 and x1 +
CS6704-Resource Management Techniques Department of CSE 2016-2017
x2 = 3. Solving these two equations, x1 = 2 and x2 = 1. Therefore the vertex B( 2,1). Similarly C is the
Therefore the vertices solution space are O(0,0), A(2,0), B(2,1), C( , ) and D(0,1). The value of
C( , )
D(0,1) 2
Since the problem is of maximization type, the optimum solution to the LPP is
Maximum Z = 8, x1 = 2 and x2 = 1
2 A company manufactures two types of printed circuits. The requirements of transistors, resistors
and capacitors for each type of printed circuits along with other data are given below:
Circuit Stock
A B Available
Transistor 15 10 180
Resistor 10 20 200
Capacitor 15 20 210
Profit Rs. 5 Rs. 8
How many circuits of each type should the company produce from the stock to earn maximum profit?
Solution: Let x1 be the number of type A circuits and x2 be the number of type B circuits to be produced. To
produce these units of type A and type B the company requires
Transistors = 15x1 +10x2
Resistor = 10x1 + 20x2
Capacitor = 15x1 + 20x2
Since the availability of these transistors, resistors and capacitors are 180, 200 and 210 respectively, the
constraints are
15x1 +10x2 ≤ 180
10x1 + 20x2 ≤ 200
15x1 + 20x2 ≤ 210
and x1 ≥ 0, x2 ≥ 0
Since the profit from type A is Rs. 5 and from type B is Rs. 8 per units, the total profit is 5x1 + 8x2.
Therefore the complete formulation of the LPP is
Maximize Z = 5x1 + 8x2
Subject to
15x1 +10x2 ≤ 180
10x1 + 20x2 ≤ 200
15x1 + 20x2 ≤ 210
and x1 ≥ 0, x2 ≥ 0
By using graphical method the solution space is given with the shaded area OABCD with vertices
O(0,0), A(12,0), B(10,3), C(2,9) and D(0,10). The values of Z of these vertices are given by Z=5x1+8x2
Vertex Value of Z
O(0,0) 0
A(12,0) 60
B(10,3) 74
C(2,9) 82
D(0,10) 80
CS6704-Resource Management Techniques Department of CSE 2016-2017
Since there are 3 equations with 5 variables, the initial basic feasible solution is obtained by equating (5-3)=2
variables to 0.
Therefore the initial basic feasible solution is s1 = 50, s2 = 100, s3 = 90.
(x1 = 0, x2 = 0, non-basic)
First Iteration:
Cj (4 10 0 0 0)
CB YB XB x1 x2 s1 s2 s3
0 s1 30 8/5 0 1 -1/5 0
10 x2 20 2/5 1 0 1/5 0
0 s3 30 4/5 0 0 -3/5 1
Zj - Cj 200 0 0 0 2 0
Since all Zj - Cj ≥ 0, the current basic feasible solution is optimal. Therefore the optimal solution is
Max Z = 200, x1 = 0, x2 = 20
5 Use simplex method to Minimize Z = x2 - 3x3 + 2x5
Subject to 3x2 - x3 + 2x5 ≤ 7, -2x2 + 4x3 ≤ 12, -4x2 + 3x3 + 8x5 ≤ 10 and x2 , x3 , x5 ≥ 0
Solution: Since the objective function is of minimization type, convert it into mazimization type as follows:
Maximize (-Z) = Maximize Z* = -x2 + 3x3 - 2x5
Subject to
3x2 - x3 + 2x5 ≤ 7
-2x2 + 4x3 ≤ 12
-4x2 + 3x3 + 8x5 ≤ 10
x2 , x3 , x5 ≥ 0
By introducing non-negative slack variables s1, s2 and s3, the standard form of the LPP becomes
Maximize Z* = -x2 + 3x3 - 2x5 + 0s1 + 0s2 + 0s3
Subject to constraints
3x2 - x3 + 2x5 + s1 + 0s2 + 0s3 = 7
-2x2 + 4x3 +0s1 + s2 + 0s3 = 12
-4x2 + 3x3 + 8x5 +0s1 + 0s2 + s3 = 10
x2 , x3 , x5, s1, s2, s3 ≥ 0
Initial Iteration:
Cj (-1 3 -2 0 0 0)
CB YB XB x2 x3 x5 s1 s2 s3
0 s1 7 3 -1 2 1 0 0 -
0 s2 12 -2 (4) 0 0 1 0 12/4 = 3*
0 s3 10 -4 3 8 0 0 1 10/3 = 3.33
*
Zj - Cj 0 1 -3 2 0 0 0
Since Z2* - C2 < 0, the current basic feasible solution is not optimal. The non-basic variable s2 leaves the basis.
Second Iteration:
Cj (-1 3 2 0 0 0)
CB YB XB x2 x3 x5 s1 s2 s3
-1 x2 4 1 0 4/5 2/5 1/10 0
3 x3 5 0 1 2/5 1/5 3/10 0
0 s3 11 0 0 10 1 -1/2 1
Zj* - Cj 11 0 0 12/5 1/5 4/5 0
Since all (Zj* - Cj) ≥ 0, the current basic feasible solution is optimal. Therefore the solution is given by
CS6704-Resource Management Techniques Department of CSE 2016-2017
Maximize Z* = 11, x2 = 4, x3 = 5, x5 = 0
But Minimize Z = -Maximize Z* = -11
Minimize Z = -11, x2 = 4, x3 = 5, x5 = 0
6 A gear manufacturing company received an order for three specific types of gear for regular supply.
The management is considering to devote the available excess capacity to one or more of the
three types A, B and C. The available capacity on the machines which might limit output and the
number of machine hours required for each unit of the respective gear is also given below:
Productivity in machine hours/ unit
Machine Type Available machine hours/week
Gear A Gear B Gear C
Gear Hobbing m/c 250 8 2 3
Gear Shaping m/c 150 4 3 0
Gear Grinding m/c 50 2 - 1
The unit profit would be Rs. 20, Rs. 6 and Rs. 8 respectively for the gears A, B and C. Find how much of
each gear the company should produce in order to maximize profit?
Solution: Let x1, x2 and x3 be the number of units of gear A, B and C produced respectively to maximize the
profit. The mathematical formulation of the LPP is given by
Maximize Z = 20x1 + 6x2 + 8x3
Subject to
8x1 + 2x2 + 3x3 ≤ 250
4x1 + 3x2 ≤ 150
2x1 + x3 ≤ 50
And x1, x2, x3 ≥ 0
By introducing non-negative slack variables s1, s2 and s3 the standard form of the LPP becomes
Maximize Z* = 20x1 + 6x2 + 8x3 + 0s1 + 0s2 + 0s3
Subject to
8x1 + 2x2 + 3x3 s1 + 0s2 + 0s3 = 250
4x1 + 3x2 0s1 + s2 + 0s3 = 150
2x1 + x3 +0s1 + 0s2 + s3 = 50
And x1, x2, x3, s1, s2, s3 ≥ 0
Initial Iteration:
Cj (20 6 8 0 0 0)
CB YB XB x1 x2 x3 s1 s2 s3
0 s1 250 8 2 3 1 0 0 250/8
0 s2 150 4 3 0 0 1 0 150/4
0 s3 50 (2) 0 1 0 0 1 50/2*
Zj - Cj 0 -20 -6 -8 0 0 0
Third Iteration:
Introduce x3 and drop x1
Cj (20 6 8 0 0 0)
CB YB XB x1 x2 x3 s1 s2 s3
0 s1 0 -2/3 0 0 1 -2/3 -3
6 x2 50 4/3 1 0 0 1/3 0
8 x3 50 2 0 1 0 0 1
Zj - Cj 700 4 0 0 0 2 8
Since all Zj - Cj ≥ 0, the current feasible solution is optimal. Therefore the optimal solution is
Maximize Z = 700, x1 = 0, x2 = 50, x3 = 50
CS6704-Resource Management Techniques Department of CSE 2016-2017
Therefore the company should produce 50 units of gear B, 50 units of gear C and none of gear A in order to
have maximum profit of Rs. 700.
7 Consider the LPP Max Z = 2x1 + x2 + 4x3 - x4 subject to x1 + 2x2 + x3 - 3x4 ≤ 8, - x2 + x3 + 2x4 ≤ 0, 2x1 + 7x2 -
5x3 - 10x4 ≤ 21 and x1 , x2 , x3 , x4 ≥ 0.
a) Solve the LPP.
b) Discuss the effect of change of b2 to 11.
c) Discuss the effect of change of b to [3-2,4].
Solution: a) By using regular simplex method, the optimal simplex table is displayed below:
Cj (2 1 4 -1 0 0 0)
CB YB XB x1 x2 x3 x4 s1 s2 s3
1 x2 0 0 1 -1 -2 0 -1 0
2 x1 8 1 0 3 1 1 2 0
0 s3 5 0 0 -4 2 -2 3 1
Zj - Cj 16 0 0 1 1 1 3 0
Cj (2 1 4 -1 0 0 0)
CB YB XB x1 x2 x3 x4 s1 s2 s3
1 x2 -11 0 1 -1 (-2) 0 -1 0
2 x1 30 1 0 3 1 1 2 0
0 s3 38 0 0 -4 2 -2 3 1
Zj - Cj 49 0 0 1 1 2 3 0
Cj (2 1 4 -1 0 0 0)
CB YB XB x1 x2 x3 x4 s1 s2 s3
1 x2 -3 1 1 0 0 0 5/2 ½
0 s1 14 -2 0 0 -5 1 -17/2 -3/2
4 x3 -5 1 0 1 2 0 7/2 ½
Zj - Cj -23 3 0 0 9 0 33/2 5/2
Since x3 leaves the basis and all a3j ≥ 0, the new problem poses no feasible solution.
8 Consider the LPP Max Z = 3x1 + 4x2 + x3 + 7x4 subject to 8x1 + 3x2 + 4x3 + x4 ≤ 7, 2x1 + 6x2 + x3 + 5x4 ≤ 3,
x1 + 4x2 + 5x3 + 2x4 ≤ 8 and x1 , x2 , x3 , x4 ≥ 0
a) Solve the LPP.
b) If a new constraint 2x1 + 3x2 + x3 + 5x4 ≤ 4 is added to the above LPP, discuss the effect of change
in the optimal solution of the original problem.
c) If a new constraint 2x1 + 3x2 + x3 + 5x4 ≤ 2 is added (or) if the upper limit of the above constraint
is reduced to 2, discuss the effect of change in the optimum solution of the original problem.
CS6704-Resource Management Techniques Department of CSE 2016-2017
Solution: a) By introducing the non-negative slack variables s1, s2 and s3 and then solving the problem by
simplex method, the optimal simplex table is given by:
Cj (3 4 1 7 0 0 0)
CB YB XB x1 x2 x3 x4 s1 s2 s3
3 x1 16/19 1 9/38 1/2 0 5/38 -1/38 0
7 x4 5/19 0 21/19 0 1 -1/19 4/19 0
0 s3 126/19 0 59/38 9/2 0 -1/38 -15/38 1
Zj - Cj 83/19 0 169/38 1/2 0 1/38 53/38 0
First iteration:
Drop s4 and introduce s2
Cj (3 4 1 7 0 0 0 0)
CB YB XB x1 x2 x3 x4 s1 s2 s3 s4
3 x1 33/38 1 12/38 1/2 0 5/38 0 0 -1/38
7 x4 1/19 0 9/19 0 1 -1/19 0 0 4/19
0 s3 267/38 0 52/19 9/2 0 -1/38 0 1 -15/38
0 s2 1 0 3 0 0 0 1 0 -1
Zj - Cj 113/38 0 5/19 1/2 0 1/38 0 0 53/38
Solution: a) By introducing the non-negative slack variables s1 and s2 and using regular simplex method, the
optimal simplex table is displayed below:
Cj (5 3 0 0)
CB YB XB x1 x2 s1 s2
0 s1 9 0 7/5 1 -3/5
CS6704-Resource Management Techniques Department of CSE 2016-2017
5 x1 2 1 6/5 0 1/5
Zj - Cj 10 0 3 0 1
b) If a new variable x5 is added to this problem with a column and C5 = 7, find the change in
ā5 = = = ā5
and Z5 – C5 = CB ā5 – C5 = (0, 5) – 7 = -2. The optimality of the solution is affected. The change in the
Since all Zj - Cj ≥ 0, the current solution is optimal. The optimal solution to the new problem is
Max Z = 53, x1 = 0, x2 = 5, x5 = 4.
CS6704-Resource Management Techniques Department of CSE 2016-2017
Where cij is the cost of assigning ith machine to the jth job subject to the constraints
xij =
=1, j = 1, 2, … , n
15 Give the difference between transportation problem and assignment problem.
Transportation Problems Assignment Problems
Supply at any source may be any positive Supply at any source will be 1. ie) ai = 1
quantity ai.
Demand at any destination maybe a positive Demand at any destination will be 1.
quantity bj. ie) bj = 1
One or more source to any number of One source to one destination.
destinations.
16 How do you identify alternative solution in assignment problem?
If the final cost matrix contains more than required number of zeroes at the independent position. This
implies that there is more than one optimal solution with some optimum assignment cost.
17 Define unbounded assignment problem and what are the rules to recognize it?
In some LP models, the values of the variables may be increased indefinitely without violating any of the
CS6704-Resource Management Techniques Department of CSE 2016-2017
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.
The rule for recognizing unboundedness is that if at any iteration all the constraint coefficients of any non
basic variable are zero or negative, then the solution space is unbounded in that direction. The objective
coefficient of that variable is negative in the case of maximization or positive in the case of minimization,
then the objective value is unbounded as well.
18 What is a travelling salesman problem?
A salesman normally must visit a number of cities starting from his head quarters. The distance between every
pair of cities are assumed to be known. The problem of finding the shortest distance if the salesman starts
from his head quarters and passes through each city exactly once and returns to the headquarters is
called Travelling Salesman problem.
19 Define transshipment model.
A problem in which available commodity frequently moves from one or more number of sources to any
number of destinations before reaching its actual destination is called as transshipment problems. The
transshipment model recognizes that it may be cheaper to ship through intermediate or transient nodes
before reaching the final destination.
20 What are the algorithms that are used to solve shortest-route problem?
The two algorithms for solving both cyclic and acyclic networks:
Dijikstra’s algorithm
Floyd’s algorithm
UNIT-II / PART-B
1 Use duality to solve the following LPP. Minimize Z = 2x1 + 2x2 subject to 2x1 + 4x2 ≥ 1, -x1 - 2x2 ≤ -1, 2x1 +
x2 ≥ 1 and x1 , x2 ≥ 0.
Solution: Given primal LPP is Minimize Z = 2x1 + 2x2
Subject to
2x1 + 4x2 ≥ 1
x1 + 2x2 ≥ 1
2x1 + x2 ≥ 1
and x1 , x2 ≥ 0
Its dual problem is Max W = y1 + y2 + y3
Subject to
2y1 + y2 + 2y3 ≤ 2
4y1 + 2y2 + y3 ≤ 2
and y1, y2, y3 ≥ 0
By introducing the non-negative slack variables s1 and s2, the standard form of the dual LPP becomes
Max W = y1 + y2 + y3 + 0s1 + 0s2
Subject to
2y1 + y2 + 2y3 + s1 + 0s2 = 2
4y1 + 2y2 + y3 +0s1 + s2 = 2
and y1, y2, y3, s1, s2 ≥ 0
The initial basic feasible solution is s1 = 2, s2 = 2.
First iteration:
bj (1 1 1 0 0)
CB YB XB y1 y2 y3 s1 s2
0 s1 2 2 1 2 1 0 2/2
0 s2 2 (4) 2 1 0 1 2/4
Wj - bj 0 -1 -1 -1 0 0
Since all Wj - bj ≥ 0, the current basic solution is optimal. The optimal solution to the dual LPP is
Max W = 4/3, y1 =0, y2= 2/3, y3 = 2/3
Here it is observed that the primal variables x1 and x2 respectively correspond to the slack variables s1 and s2
of the dual problem. As seen from the above table, the net evaluations W j - bj corresponding to the slack
variables s1 and s2 are 1/3 and 1/3 respectively.
By introducing the slack variables s1, s3 and surplus variable s2 and an artificial variable R1, the standard form
of the dual LPP is
Max W = 4y1 + 3y2 + 0s1 + 0s2 + 0s3 – MR1
Subject to
y1 + y2 + s1 + 0s2 + 0s3 = 1
0y1 + y2 + 0s1 – s2 + 0s3 + R1 = 1
-y1 + 2y2 + 0s1 + 0s2 + s3 = 1
and y1, y2, s1, s2, s3, R1 ≥ 0
Initial iteration
bj (4 3 0 0 -M 0)
1 2 s3
CB YB X s1 R1
s2
0 s1 1 1 1 0 1 0 0 1
-M R1 1 0 1 -1 0 1 0 1
0 s3 1 -1 (2) 0 0 0 1 ½*
Wj - bj -M -4 -M-3 M 0 0 0
By introducing the non-negative slack variables s1, s2 and s3, the LPP becomes
Max Z* = -2x1 - x2 + 0s1 + 0s2 + 0s3
Subject to
-3x1 - x2 + s1 = -3
-4x1 - 3x2 + s2 = -6
-x1 - 2x2 + s3 = -3
and x1 , x2, s1, s2, s3 ≥ 0.
Initial iteration
Cj (-2 -1 0 0 0)
CB YB XB x1 x2 s1 s2 s3
0 s1 -3 -3 -1 1 0 0
0 s2 -6 -4 (-3) 0 1 0
0 s3 -3 -1 -2 0 0 1
Zj* - Cj 0 2 1 0 0 0
Since Zj* - Cj ≥ 0 and all X Bi < 0, the current solution is not an optimum basic feasible solution. Since X B2=-6
is the most negative, the corresponding basic variable s2 leaves the basis.
Since all Zj* - Cj ≥ 0, and all X Bi ≥ 0, the current solution is an optimum basic feasible solution. The optimal
solution is
Max Z* = -12/5, x1 = 3/5, x2 = 6/5
But Min Z = -Max Z* = -(-12/5) = 12/5
Min Z = 12/5, x1 = 3/5, x2 = 6/5
CS6704-Resource Management Techniques Department of CSE 2016-2017
4 Determine basic feasible solution to the following transportation problem using North West
Corner rule:
Sink
A B C D E Supply
P 2 11 10 3 7 4
Origin Q 1 4 7 2 1 8
R 3 9 4 8 12 9
Demand 11 10 3 7
3 3 4 5 6 1 1
4 7 2 1
Solution: Since ai = bj = 21, the given problem is 8
balanced. Therefore there exists a feasible solution to the
transportation problem. 9 4 8 12
9
2 11 10 3 7
3 4 3 4 5 6
1 4 7 2 1
8
3 9 4 8 12
9
3 3 4 5 6
Following North West Corner rule, the first allocation is made in the cell (1,1)
Here x11 =min {a1, b1} = min {4,3} = 3
Therefore allocate 3 to cell (1,1) and decrease 4 by 3 ie., 4-3 = 1
As the first column is satisfied cross out the first column and the resulting reduced transportation table is
Finally the initial basic feasible solution is shown in the following table.
2 11 10 3 7
3 1
1 4 7 2 1
2 4 2
3 9 4 8 12
3 6
Solution: Since ∑ai = ∑bj = 340, the given transportation problem is balanced. By using least cost method the
initial solution is shown in the table:
4 1 2 6 9
50 50
6 4 3 5 7
10 20 90
5 2 6 4 8
30 90
For optimality: Since the number of non-negative independent allocations is (m+n-1) apply MODI method:
The new basic feasible solution is displayed in the following table:
4 1 2 6 9
10 50 40
6 4 3 5 7
30 90
5 2 6 4 8
30 90
The above table satisfies the rim conditions so apply the MODI method.
4 1 2 6 3 9 6
10 50 40 u1=0
3 3
6 5 4 2 3 5 4 7
30 90 u2=1
1 2 1
5 2 2 6 3 4 8 7
30 90 u3=1
0 3 1
The optimum allocation schedule is given by x11 = 10, x12 = 50, x13 = 40, x23 = 30, x25 = 90, x31 = 30, x34
CS6704-Resource Management Techniques Department of CSE 2016-2017
= 90 and the optimum transportation cost Rs. 1400/-
6 Find the non-degenerate basic feasible solution for the following transportation problem using:
a) North west corner approach
b) Least cost method
c) Vogel’s approximation method.
To Supply
10 20 5 7 10
13 9 12 8 20
From 4 5 7 9 30
14 7 1 0 40
Demand 3 12 5 19 50
60 60 20 10
Solution: Since ∑ai = ∑bj = 150, the transportation problem is balanced. There exist a basic feasible solution to
this problem.
a) The starting solution by NWC rule is shown in the table
10 20 5 7
10
13 9 12 8
20
4 5 7 9
30
14 7 1 0
40
3 12 5 19
20 20 10
13 9 12 8
20
4 5 7 9
10 20
14 7 1 0
10 20 10
3 12 5 19
50
Since the number of non-negative allocations at independent positions is (m+n-1)=8, the solution is non-
degenerate basic feasible.
The initial transportation cost = Rs. 760/-
13 9 12 8
20
4 5 7 9
30
14 7 1 0
10 20 10
3 12 5 19
50
J1 9 22 58 11 19
J2 43 78 72 50 63
Jobs J3 41 28 91 37 45
J4 74 42 27 49 39
J5 36 11 57 22 25
43 78 72 50 63
41 28 91 37 45
74 42 27 49 39
36 11 57 22 25
Since the number of rows is equal to the number of columns in the cost matrix, the given assignment problem
is balanced.
Select the smallest cost element in each row and subtract from all elements in corresponding row
and get a reduced matrix.
0 13 49 2 10
0 35 29 7 20
13 0 63 9 17
47 15 0 22 12
25 0 46 11 14
Select the smallest cost element in each column and subtract from all elements in corresponding
CS6704-Resource Management Techniques Department of CSE 2016-2017
column. The reduced matrix is
0 13 49 0 0
0 35 29 5 10
13 0 63 7 7
47 15 0 20 2
25 0 46 9 4
0 13 49 0 0
0 35 29 5 10
13 0 63 7 7
47 15 0 20 2
25 0 46 9 (4)
The optimal assignment schedule is J1 M4, J2 M1, J3 M2, J4 M3, J5 M5 and the optimum
processing time is
= 11 + 43 + 28 + 27 + 25 hours
= 134 hours
8 A company has four machines to do three jobs. Each job can be assigned to one and only one
machine. The cost of each job on each machine is given in the following table. What are the job
assignments which will minimize the cost?
Machines
1 2 3 4
A 18 24 28 32
Jobs B 8 13 17 19
C 10 15 19 22
18 24 28 32
8 13 17 19
10 15 19 22
Since the number of rows is less than the number of columns in the cost matrix, the given assignment problem
is unbalanced. To make it balanced, add a dummy job D (row) with 0 cost elements. The balanced cost matrix
is given by:
CS6704-Resource Management Techniques Department of CSE 2016-2017
18 24 28 32
8 13 17 19
10 15 19 22
0 0 0 0
Now select the smallest cost element in each row (column) and subtract this from all the elements of
corresponding row (column), the reduced matrix is given as:
0 6 10 14
0 5 9 11
0 5 9 12
0 0 0 0
Cover the all zeros by drawing minimum number of straight lines. Choose the smallest cost
element not covered by these straight lines.
0 6 10 14
0 5 9 11
0 (5) 9 12
0 0 0 0
(0) 1 1 5
0 (0) 0 2
0 0 (0) 3
9 4 0 (0)
The optimum assignment schedule is given by A 1, B 2, C 3, D 4 and the optimum assignment cost
= 18 + 13 + 19 + 0 = 50/- units of cost.
9 A company has a team of four salesmen and there are four districts where the company wants to
start its business. After taking into account the capabilities of salesman and the nature of districts,
the company estimates that the profit per day in rupees for each salesman in each district is as
below. Find the assignment of salesmen to various districts which will yield maximum profit.
Districts
CS6704-Resource Management Techniques Department of CSE 2016-2017
1 2 3 4
A 16 10 14 11
B 14 11 15 15
Salesmen C 15 15 13 12
D 13 12 14 15
Solution: The cost matrix of the given assignment problem is
(16) 10 14 11
14 11 15 15
15 15 13 12
13 12 14 15
Convert to equivalent minimization problem by subtracting all cost elements in the cost matrix
by the highest cost element 16.
0 6 2 5
2 5 1 1
1 1 3 4
3 4 2 1
1 4 0 0
0 0 2 3
2 3 1 0
Since each row and each column contains at least one zero, make the assignment in rows and
columns having single zero.
(0) 6 2 5
1 4 (0) 0
0 (0) 2 3
2 3 1 (0)
3 ∞ 5 2 3
6 5 ∞ 6 4
2 2 6 ∞ 6
3 3 4 6 ∞
Subtract the smallest cost element in each row (column) from all the elements of the
corresponding row (column) we get:
∞ 1 3 0 1
1 ∞ 2 0 1
2 1 ∞ 2 0
0 0 3 ∞ 4
0 0 0 3 ∞
∞ 1 3 (0) 1
1 ∞ 2 0 1
2 1 ∞ 2 (0)
0 (0) 3 ∞ 4
0 0 (0) 3 ∞
Since some rows and columns are without assignments, the current assignment is not optimal. Cover all the
zeros by drawing minimum number of straight lines.
∞ (1) 3 0 1
1 ∞ 2 0 1
2 1 ∞ 2 0
CS6704-Resource Management Techniques Department of CSE 2016-2017
0 0 3 ∞ 4
0 0 0 3 ∞
Mixed IPP: In a linear programming problem, if only some of the variables in the optimal solution are
restricted to assume non-negative integer values, while the remaining variables are free to take any non-
negative values, then it is called mixed IPP.
4 List out some of the applications of IPP?
IPP occur quite frequently in business and industry.
All transportation, assignment and travelling salesman problems are IPP, since the decision
variables are either zero or one.
All sequencing and routing decisions are IPP as it requires the integer values of the decision
variables.
Capital budgeting and production scheduling problem are IPP. In fact, any situation involving
decisions of the type either to do a job or not to do can be treated as an IPP.
All allocation problems involving the allocation of goods, men, machines, give rise to IPP since such
commodities can be assigned only integer and not fractional values.
5 What is the importance of Integer Programming?
In linear programming problem, all the decision variables allowed to take any non-negative real values, as it is
quite possible and appropriate to have fractional values in many situations. In many situations, like business
and industry, these decision variables make sense only if they have integer values in the optimal solution.
Hence a new procedure has been developed in this direction for the case of LPP subjected to additional
restriction that the decision variables must have integer values.
6 What is the strategy used in integer programming algorithms?
The ILP algorithms are based on exploiting the computational success of LP. The strategy of these algorithms
involves three steps.
Step 1: Relax the solution space of ILP by deleting the integer restriction on all integer variables and replacing
any binary variable y with the continuous range 0 ≤ y 1. The result of the relaxation is a regular LP.
Step 2: Solve the LP and identify its continuous optimum.
Step 3: Starting from the continuous optimum point, add special constraints that iteratively modify the LP
solution space in a manner that will eventually render an optimum extreme point satisfying the integer
requirements.
7 What are the methods for generating the special constraints in ILP?
Two general methods have been developed generating the special constraints:
Branch and Bound (B&B) Method: It starts with the continuous optimum, but systematically
CS6704-Resource Management Techniques Department of CSE 2016-2017
partitions the solution space into sub problems that eliminate parts that contain no feasible integer
solution.
Cutting Plane Method: This method solves the IPP as ordinary LPP by ignoring the integer
restriction and then introducing additional constraints one after the other to cut (eliminate)
certain part of the solution space until an integral solution is obtained.
8 Write an algorithm for Gomory’s Fractional Cut algorithm?
Step 1: Convert the minimization IPP into an equivalent maximization IPP and all the coefficients and
constraints should be integers.
Step 2: Find the optimum solution of the resulting maximization LPP by using simplex method.
Step 3: Test the integrity of the optimum solution.
Step 4: Rewrite each XBi
Step 5: Express each of the negative fractions if any, in the kth row of the optimum simplex table as the sum of
a negative integer and a non-negative fraction.
Step 6: Find the fractional cut constraint.
Step 7: Add fractional cut constraint at the bottom of optimum simplex table obtained in step 2.
Step 8: Go to step 3 and repeat the procedure until an optimum integer solution is obtained.
9 Mention some suggestions that are helpful in computation in ILP.
The most important factor affecting computation in ILP is the number of integer variables and the feasible
range in which they apply. It may be advantageous to reduce the number of integer variables in the ILP
model as much as possible. The following suggestions may provide helpful:
Approximate the integer variables by continuous ones whenever possible.
For the integer variables, restrict their feasible ranges as much as possible.
Avoid the use of nonlinearity in the model.
10 What is a fractional cut?
In the cutting plane method, the fractional cut constraints cut the unused area of the feasible region in the
graphical solution of the problem. i.e. cut that area which has no integer-valued feasible solution. Thus these
constraints eliminate all the non-integral solutions without loosing any integer-valued solution. A desired cut
which represents a necessary condition for obtaining an integer solution is referred to as the fractional cut
because all its coefficients are fractions.
11 What is mixed integer problem?
In the mixed integer programming problem only some of the variables are integer constrained, while other
variables may take integer or other real values. The problem is first solved as a continuous LPP by ignoring the
integer condition. If the values of the integer constrained variables are integers then the current solution is an
optimal solution to the given mixed IPP. Otherwise select the source row which corresponds to the largest
fractional part fk among those basic variables which are constrained to be integers. Then construct Gomorian
constraint from the source row.
12 What is dynamic programming?
Dynamic programming is the mathematical technique of optimization using multistage decision process. It is
a process in which a sequence of interrelated decisions has to be made. It provides a systematic procedure for
determining the combination of decisions which maximize overall effectiveness.
13 Specify the need for dynamic programming.
Decision making process consists of selecting a combination of plans from a large number of alternative
combinations. This involves lot of computational work and time. Dynamic programming deals with such
situations by dividing the given problem into sub problems or stages. Only one stage is considered at a time
and the various infeasible combinations are eliminated with the objective of reducing the volume of
computations. The solution is obtained by moving from one stage to the next and is completed when the final
stage is reached.
14 What is forward and backward recursion?
Forward recursion is one in which the computation proceed from stage 1 to stage n. The same can be solved
by backward recursion starting at stage n and ending at stage 1. Both yield the same solution. Although
forward appears more logical, DP invariably uses backward recursion. The reason for this preference is that, in
general backward recursion may be more efficient computationally.
15 State Bellman’s principle of optimality.
CS6704-Resource Management Techniques Department of CSE 2016-2017
An optimal policy (set of decisions) has the property that whatever be the initial state and initial decisions, the
remaining decisions must constitute an optimal policy for the state resulting from the first decision.
16 List some characteristics of dynamic programming problems.
The characteristics of dynamic programming problems may be outlined as:
Each problem can be divided into stages, with a policy decision required at each stage.
Each stage has number of states associated with it.
The effect of the policy decision at each stage is to transform the current state into a state associated
with the next stage.
The current state of the system is described by state variables.
17 State Markovian property.
For dynamic programming problem, in general, the knowledge of the current state of the system conveys all
of the information about its previous behaviour necessary for determining the optimal policy hence forth.
This is the Markovian property.
18 Define stage. A stage may be defined as the portion of the problem that possesses a set of mutually exclusive
alternatives from which the best alternative is to be selected. If we are to take six sequential decisions then we
have six stages.
19 Mention some applications of dynamic programming.
Used for production, scheduling and employment smoothening problems.
Used to determine the inventory level and formulating inventory recording.
Applied for allocating scarce resource to different alternative uses.
Used to determine the optimal combination of advertising media.
Applied in replacement theory to determine at which age the equipment is to be replaced for optimal
return from the facility.
20 What are the steps involved in dynamic programming algorithm?
Step 1: Identify the decision variables and specify objective function to be optimized.
Step 2: Decompose the given problem into smaller sub problems. Identify state variables a t each stage.
Step 3: Write the general recursive relationship for computing the optimal policy.
Step 4: Write the relation giving the optimal decision function for one stage sub-problem and solve it.
Step 5: Solve the optimal decision function for 2-stage, 3-stage, ....(n-1)-stage and n-stage problem.
UNIT-III / PART-B
1 Find the optimum integer solution to the following LPP. Maximize Z = x1 + x2 subject to constraints 3x1
+ 2x2 ≤ 5, x2 ≤ 2 and x1 > 0, x2 ≥ 0 and are integers.
Solution: Ignoring the integrality condition and introducing non-negative slack variables x3 and x4, the
standard form of the continuous LPP becomes
Maximize Z = x1 + x2 + 0x3 + 0x4
Subject to
3x1 + 2x2 + x3 + 0x4 = 5
0x1 + x2 + 0x3 + x4 = 2
and x1, x2, x3, x4 ≥ 0
The initial basic feasible solution is given by x3 = 5, x4 = 2, (x1 = x2 = 0, non-basic)
Initial iteration:
Cj (1 1 0 0)
CB YB XB x1 x2 x3 x4
0 x3 5 (3) 2 1 0 5/3
0 x4 2 0 1 0 1 -
Zj - Cj 0 -1 -1 0 0
Third iteration:
Cj (1 1 0 0 0)
CB YB XB x1 x2 x3 x4 s1
1 x1 0 1 0 0 -1 1
1 x2 2 0 1 0 1 1
0 x3 1 0 0 1 1 -3
Zj - Cj 2 0 0 0 0 1
CS6704-Resource Management Techniques Department of CSE 2016-2017
For the above LPP the feasible regions OABC, the optimum solution is
Max Z = 7/3, x1 = 1/3, x2 = 2
Since this solution is not an integer optimum solution, introduce the secondary Gomorian constant.
+ ≥
5 – 3x1 – 2x2 + 2 – x2 ≥ 1
-3x1 – 3x2 + 7 ≥ 1 -3x1 – 3x2 ≥ -6
3x1 + 3x2 ≤ 6 x1 + x2 ≤ 2
The required optimal integer valued solution is
Max Z = 2, x1 = 0, x2 = 2 (or)
Max Z = 2, x1 = 1, x2 = 1
2 Using Gomory’s cutting plane method maximize Z = 2x1 + 2x2 subject to 5x1 + 3x2 ≤ 8, 2x1 + 4x2 ≤ 8 and
x1 , x2 ≥ 0 and are all integers.
Solution: Ignore the integrality condition and introducing the non-negative slack variables x3 and x4 the
standard form of the continuous LPP becomes
Maximize
Z = 2x1 + 2x2 + 0x3 + 0x4
Subject to
5x1 + 3x2 + x3 + 0x4 = 8
2x1 + 4x2 + 0x3 + x4 = 8
and x1 , x2, x3, x4 ≥ 0
Initial iteration:
Cj (2 2 0 0)
CB YB XB x1 x2 x3 x4
0 x3 8 (5) 3 1 0 8/5*
0 x4 8 2 4 0 1 8/2
Zj - Cj 0 -2 -2 0 0
Maximize
Z*= 2x1 + 3x2
Subject to
2x1 + 2x2 ≤ 7
x1 ≤ 2
x2 ≤ 2
x1 , x2 ≥ 0 and integers.
Ignoring the integrality condition and introducing the non-negative slack variables x3, x4, x5 the standard form
of the continuous LPP becomes.
Maximize
Z*= 2x1 + 3x2 +0x3 + 0x4 + 0x5
Subject to
2x1 + 2x2 + x3 + 0x4 + 0x5 = 7
x1 + 0x2 + 0x3 + x4 + 0x5 = 2
0x1 + x2 + 0x3 + 0x4 + x5 = 2
x1 , x2, x3, x4, x5 ≥ 0 and integers.
Initial iteration:
Cj (2 3 0 0 0)
CB YB XB x1 x2 x3 x4 x5
0 x3 7 2 2 1 0 0 7/2
0 x4 2 1 0 0 1 0 -
0 x5 2 0 (1) 0 0 1 2*
Zj*- Cj 0 -2 -3 0 0 0
Cj (2 3 0 0 0)
CB YB XB x1 x2 x3 x4 x5
0 x3 3 (2) 0 1 0 -2 3/2*
CS6704-Resource Management Techniques Department of CSE 2016-2017
0 x4 2 1 0 0 1 0 2
3 x2 2 0 1 0 0 1 -
Zj*- Cj 6 -2 0 0 0 3
Cj (2 3 0 0 0 0)
CB YB XB x1 x2 x3 x4 x5 s1
2 x1 1 1 0 0 0 -1 1
0 x4 1 0 0 0 1 1 -1
3 x2 2 0 1 0 0 1 0
0 x3 1 0 0 1 0 0 -2
Zj*- Cj 8 0 0 0 0 1 2
Initial iteration:
Cj (1 1 0 0)
CB YB XB x1 x2 x3 x4
0 x3 5 (3) 2 1 0 5/3
0 x4 2 0 1 0 1 -
Zj - Cj 0 -1 -1 0 0
Initial iteration:
Cj (-1 3 0 0)
CB YB XB x1 x2 x3 x4
0 x3 5 1 1 1 0 5/1
0 x4 11 -2 (4) 0 1 11/4
Zj - Cj 0 1 -3 0 0
By using the graphical method the solution space in given by the region OABC. The optimum solution of this
problem is
Max Z = 7, x1=0, x2=7/2
Sub-problem (3)
Maximize
Z = x1 + 4x2
Subject to
2x1 + 4x2 ≤ 7
5x1 + 3x2 ≤ 15
x2 ≤ 1
x1 ≤ 1
and x1 , x2 ≥ 0
Its solution space is given and its optimal solution is
Max Z = 5, x1=1, x2=1
CS6704-Resource Management Techniques Department of CSE 2016-2017
7 Use branch and bound to solve the following IPP. Max Z = 3x1 + 4x2 subject to 7x1 + 16x2 ≤ 52, 3x1 - 2x2 ≤
18 and x1 , x2 ≥ 0 and are all integers.
Solution: Ignoring the integrality condition and introducing the non-negative slack variables x3, x4, the
standard form of the continuous LPP becomes
Max
Z = 3x1 + 4x2 + 0x3 + 0x4
Subject to
7x1 + 16x2 + x3 + 0x4 = 52
3x1 - 2x2 + 0x3 + x4 = 18
x1 , x2 , x3, x4 ≥ 0
The initial basic feasible solution is given by x3 = 52, x4 = 18 (basic)
(x1= x2= 0, non-basic)
Initial Iteration:
Cj (3 4 0 0)
CB YB XB x1 x2 x3 x4
0 x3 52 7 (16) 1 0 52/16
-
0 x4 18 3 -2 0 1
Zj - Cj 0 -3 -4 0 0
Since all (Zj –Cj) 0, the current basic solution is optimal, but non-integer.
x2 = 15/31 = 0 + 15/31
x1 = 196/31 = 6 + 10/31
Applying these two conditions separately in the continuous LPP, the two sub-problems are:
Sub-problem 1
Max
Z = 3x1 + 4x2
Subject to
7x1 + 16x2 ≤ 52
3x1 - 2x2 ≤ 18
x2 ≤ 0
x1 , x2 ≥ 0
The optimal solution is given by Max Z= 18, x1=6, x2=0. Since the solution is in integers this sub-problem is
fathomed. The lower limit of the objective function is 18.
Sub-problem 2
CS6704-Resource Management Techniques Department of CSE 2016-2017
Max
Z = 3x1 + 4x2
Subject to
7x1 + 16x2 ≤ 52
3x1 - 2x2 ≤ 18
x2 ≥ 1
x1 , x2 ≥ 0
The optimal solution is given by Max Z=19.43, x1=5.14, x2=1
Also in sub-problem (2) since x1=5.14
5 < x1 < 6
x1 ≤ 5 or x1 ≥ 6
Applying these two conditions separately in sub-problem (2), solve sub-problem (3) and sub-problem (4).
Sub-problem 3
The optimal solution is given by Max Z= 19.25, x1 = 5, x2 = 1.063
Sub-problem 4
This sub-problem has no feasible solution. So this sub-problem is fathomed.
From the available integer optimal solutions, the best optimal solution is Max Z=19, x1=5, x2=1, which is the
required optimal solution.
8 Solve the following by dynamic programming. Min Z = y1 + y2 + ......+ yn subject to constraints y1 y2...... yn
= b and y1 y2...... yn ≥ 0 (or) factorize a positive quantity b into n factors in such a way so that their sum
is a minimum.
Solution: To develop the recursive equation:
Let fn(b) be the minimum attainable sum y1 + y2 + ......+ yn when the positive quantity b is factorized into n
factors y1, y2, …, yn.
f2(b) = {y1+y2}
= {x + }
= {x + f1 (b/x)}
f3(b) = {y1+y2+y3}
= {x + f2 (b/x)}
9 By dynamic programming technique, solve the problem. Min Z = x12 + x22 + x32 subject to constraints x1 +
x2 + x3 ≥ 15 and x1 , x2, x3 ≥ 0.
Solution: To develop the recursive equation
It is a three stage problem. The decision variables are x1, x2, x3 and the state variables are s1, s2 and s3 are
defined as
s3 = x1+x2+x3 ≥15
s2 = x1+x2 = s3-x3
s1 = x1 = s2-x2
= {x22 + f1(s2-x2)}
The function {2x22 – 2s2x2 + s22} will attain minimum when x2 = s2/2
From (3)
= {x32 + f2(s3-x3)}
= {x32 + (s3-x3)2/2}
The function x32 + (s3-x3)2/2 will attain its minimum when x3 = s3/3
= (s3/3)2 + (s3-s3/3)2/2
= s32/3
But s2 = s3 – x3 = 15 – 5 = 10
Therefore x2 = s2/2 = 10/2 = 5
Also s1 = s2 –x2 = 10 -5 =5
Therefore x1 = s1 = 5
F2(B12,B22)= {5x2} =
Since Max{x2} which satisfies 0≤x2≤B12, 0≤x2≤B22/2 is the minimum of B12, B22/2
x2*=Max{x2} = Min{B12,B22/2} → (1)
f2 (B12,B22) = 5Min{B12,B22/2} → (2)
From (2)
F2(B11-2x1,B21)= 5 Min {B11-2x1,B21/2}
From (3)
= Max {
Duration
6 5 10 3 4 6 2 9
(Days)
3 Construct PERT networks and find the critical path and find all floats.
Activity 1-2 1-3 2-4 3-4 3-5 4-9 5-6 5-7 6-8 7-8 8-10 9-10
Time 4 1 1 1 6 5 4 8 1 2 5 7
Duration 10 8 9 8 16 7 7 7
Duration 8 5 12 10 15 8 5
7 Draw the network for the following project and compute the earliest and latest times for each event and
also find the critical path.
Activity Imme.predecessor Time (days)
1-2 - 5
1-3 - 4
2-4 1-2 6
3-4 1-3 2
4-5 2-4 1
4-6 2-4 & 3-4 7
5-7 4-5 8
6-7 4-6 4
7-8 6-7&5-7 3
8 Draw the network model of the problem and carry out the critical path computations.
Immediate
A A B,C D D D G H D
Predecessor
Duration(days) 21 14 14 3 70 70 14 1 1
Immediate
J D L D N O E,F,P Q,I,K M,R
Predecessor
Duration(days) 1 1 7 7 7 14 1 1 1
9 A small project consists of jobs as given in the table below. Each job is listed with its normal time and a
minimum or crash time (in days). The cost (in Rs.per day) for each job is also given: