MCA21 Mathematical Foundation For Computer Science 2
MCA21 Mathematical Foundation For Computer Science 2
MATHEMATICAL FOUNDATION
FOR COMPUTER SCIENCE 2
Unit I
1. Linear Programming Problem 1
2. Simplex Method, Big M Method And Two Phase Method 21
Unit II
3. Transportation Problem 50
Unit III
4. Assignment Model 69
Unit IV
5. Game Theory 103
6. Decision Theory 116
Unit V
7. Simulation 130
8. Queuing Models 145
*****
SYLLABUS
M.C.A. Semester – II
Course Name: Mathematical Foundation Course Code: MCA21
for Computer Science 2
*****
UNIT I
1
LINEAR PROGRAMMING PROBLEM
Unit structure
1.0 Objectives
1.1 Introduction
1.2 Formulation of Linear Programming Problem
1.3 Graphical Method
1.4 Special Cases of LPP
1.5 Summary
1.6 References
1.7 Exercise
1.0 OBJECTIVES
After going through this chapter, students will able to:
● Learn how to develop linear programming models for simple
problems.
● Formulate a given simplified description of a suitable real world
problem as a linear programming model in general, standard and
canonical forms.
● Understand the importance of extreme points in obtaining the optimal
solution.
● Solve a two-dimensional linear programming problem graphically.
1.1 INTRODUCTION
Linear programming is one of the most popular and widely used
quantitative techniques. Linear programming deals with the optimization
{maximization or minimization) of a function of variables. It consists of
linear functions which are subject to constraints in the form of linear
equations or in the form inequalities. Linear programming is considered an
important technique to find optimum resource utilization. Linear
programming has been used to solve problems involving assignment of
jobs to machines, product mix, advertising media selection, least cost diet,
transportation, investment opportunity selection and many others.
Linear programming is widely used in Mathematics and some other fields
such as economics, business, telecommunication and manufacturing fields.
In this chapter, we will learn meaning and formulation of linear
1
programming, its components and various methods to solve linear Linear Programming
Problem
programming problems i.e. LPP.
Following are important terms used in LPP:
1. Optimization: It means ‘minimization’ or ‘maximization’ of some
mathematical function of any number of variables.
2. Objective Function: Any mathematical function to be optimized is
called an Objective function
3. Decision variables: Variables appearing in an objective function are
called decision variables.
4. Optimum Solution: The set of values of the decision variables giving
the ‘maximum’ or the ‘minimum’ value of an objective function is
called the optimum solution.
5. Constrained and unconstrained Optimization: If the decision
variable are subject to some limitations (constraints) on the values
which they can take the optimization is called constrained
optimization otherwise the optimization called unconstrained
optimization.
6. Mathematical Programing: Method of finding solution of a
constrained optimization problem is called mathematical
programming.
Example 1: Find the minimum of z = 2x1 + 5x2 + 7x3
Example 2: Find the maximum of z = 2x12+ 5x23+ 3x3
Subject to x1 + x2 + 3x3 ≤ 10
2x1 + x2 + 4x3 ≤ 30
2
Mathematical Foundation 3x1 + x2 + 4x3 ≤ 30
for Computer Science 2
And x1, x2, x3 ≥ 0 Non negativity condition
Subject to
.
.
.
Am1x1 + am2x1 + -----------------+ amnxn bm
Sunject to Ax B
Where
C = , x = , A =
and B =
And C’ = Transpose of C
bi; i = 1, 2 ….m
And xj ≥ 0; j = 1, 2…n
4
Mathematical Foundation Machine Machine hrs/unit Total
for Computer Science 2
Product A Product B Available
Time
I 5 4 20
II 6 5 22
Profit/unit(Rs) 6 5 -
6x1 + 5x2 ≤ 30
And x1, x2 0
Example 5: ABC Company engaged in diet food. Two food A and B
contains three kinds of vitamins Vit A, Vit B and Vit C. One unit of A
costs Rs. 30 and B costs Rs. 60. One unit of A contains 36 unit of vit A, 3
units of vit B and 20 units of vit C. One unit of B contains 6 unit of vit A,
12 units of vit B and 10 units of vit C. Minimum requirement of vit A and
vit B ia 108 and 36 units and of vit C should not exceed 100 units.
Formulate LPP.
Solution: Given A and B are two types of food.
Cost per unit of A is Rs. 30 and that of B is Rs. 60.
Let x1 and x2 be the number of units of food A and food B. The problem
can be stated as follows:
Min z = 30 x1 + 60 x2
Subject to 36 x1 + 6 x2 108
3 x1 + 12 x2 36
20 x1 + 10 x2 ≤ 100
And x1, x2 0
Example 6: CCD at Pune runs 24 hours coffee shop. Each waiter has to
work in continuity 8 hrs. But to have continuity in work, waiter are added
5
at every 4 hrs of interval to work along those who have already completed Linear Programming
Problem
4 hrs. The requirement for different 4 hrs period are estimated as follows.
Formulate an LPP.
Subject to x6 + x1 4
x1 + x2 5
x2 + x3 7
x3 + x4
x4 + x5 7
x5 + x6 3
And x1, x2 0
6
Mathematical Foundation solution area lies below the line (towards the
for Computer Science 2
origin) and that of sign, solution area lies above the line
(that side of line not facing the origin). The area common to all the
constraints is called feasible region. This area may be bounded or
unbounded. Show the feasible region by shading.
5. Find the optimum solution.
Example 7: Solve the following LPP by graphical method.
Maximize z = 4 x1 + 7 x2
5x1 + 5x2 ≤ 30
And x1, x2 0
When x1 = 0, x2 = 5; x1 = 10, x2 = 0
When x1 = 0, x2 = 6; x1 = 6, x2 = 0
Fig 1.1
7
Find the intersection of constraints. Linear Programming
Problem
Here the point of intersection is B (2, 4).
The feasible area is shown shaded and given by the polygon OABC.
Here the feasible area is bounded/closed.
Optimum solution: Optimum solution always lies at a corner point of the
feasible region/area.
6x1 + 3x2 18
And x1, x2 0
8
Mathematical Foundation
for Computer Science 2
Fig 1.2
Find the intersection of constraints.
Here the point of intersection is B (3, 4).
Shade the feasible area. Here the feasible area is unbounded.
Find the values of the objective function z at the corner points A(7, 0),
B(3, 4). and C(0, 8).
Minimum z = 2 x1 + 3 x2
Corner Point Value of z
A (x1 = 7, x2 = 0) 2 x 7 + 3 x 0 = 14
B (x1 = 3, x2 = 4) 2 x 3 + 3 x 4 = 18
C (x1 = 0, x2 = 8) 2 x 0 + 3 x 8 = 24
Since z = 14 is minimum at (x1 = 3, x2 = 4), this is the optimum solution of
the given LPP.
Example 9: A company produces pen A and pen B. Profit is Rs. 5 and Rs.
per pen respectively. Raw material requirement of pen A is twice of pen
B. Supply of raw material is sufficient for 1000 pens of type A and B. Pen
needs special clips, 400 such clips are available for A and for B 700 clips
are available. Formulate problem of LPP and solve it for maximizing
profit by graphical method.
9
Max z = 5x1 + 4x2 Linear Programming
Problem
Subject to 2x1 + x2 ≤ 1000
x1 ≤ 400
x2 ≤ 700
And x1, x2 0
Constraint 2: x1 ≤ 400
x1 = 400
Constraint 3: x2 ≤ 700
x2 = 700
Fig 1.3
10
Mathematical Foundation Here the feasible area is bounded/closed.
for Computer Science 2
Optimum solution: Optimum solution always lies at a corner point of the
feasible region/area.
Subject to 5 x + 4 y ≤ 200
3 x + 5 y ≤ 150
5x+4y 100
And x, y 0
Constraint 1: 5 x + 4 y ≤ 200
Constraint 2: 3 x + 5 y ≤ 150
Constraint 3: 5 x + 4 y 100
When x = 0, y = 25; x = 20, y = 0
11
Linear Programming
Problem
Fig 1.4
Find the intersection of constraints.
Here the point C is the intersection of constraint 1 and constraint 2.
To find the coordinate of point C, we solve constraint 1 and constraint 2
simultaneously.
The feasible area is shown shaded and given by the polygon ABCDE.
Optimum solution: Optimum solution always lies at a corner point of the
feasible region/area.
12
Mathematical Foundation
for Computer Science 2 1.4 SPECIAL CASES IN LPP
1. Redundant Constraint: A constraint in a given programming problem
is said to be redundant if the feasible region of the problem is unchanged
by deflecting that constraint.
Example 11: Solve the following LPP by graphical method.
Max z = 25x1 + 20 x2
Subject to 6x1 + 4x2 ≤ 240
2x1 + 4x2 ≤ 200
3x1 + 4x2 ≤ 360
And x1, x2 0
Fig 1.5
13
In LPP, every constraint forms boundary of the feasible region. However Linear Programming
Problem
if any constraint does not define boundary of feasible region is called
redundant constraint. In above example third constraint does not define the
boundary of feasible region. Therefore, it is redundant constraint. It is not
necessary for the solution and can be eliminate from the problem.
2. Multiple Solution: So far we have seen that the optimal solution of any
LPP lies at corner point of the feasible region and solution is unique.
However, in certain cases a given LPP may have more than one optimal
solution
x1 ≤ 60
x2 ≤ 40
And x1, x2 0
Constraint 2: x1 ≤ 60
x1 = 6
Constraint 3: x2 ≤ 40
x2 = 40
14
Mathematical Foundation
for Computer Science 2
Fig 1.6
The feasible area is shown shaded and given by the polygon OABCD.
Optimum solution always lies at a corner point of the feasible region/area.
4x1 + x2 4
15
And x1, x2 0 Linear Programming
Problem
Solution: The non-negativity conditions x1 0 and x2 0
Constraint 2: 4x1 + x2 4
When x1 = 0, x2 = 4; x1= 1, x2 = 0
Fig 1.7
In the given graph, feasible region has no upper boundary. Hence solution
is infinitely large (as we want to find Max). This is called unbounded
solution.
4. Infeasible Solution: If it is not possible to find a feasible solution that
satisfies all the constraints, then LPP is said to have an infeasible solution
or inconsistence.
Example 14: Solve the following LPP by graphical method.
Max z = 25x1 + 35 x2
2x1 + 3x2 ≤ 6
And x1, x2 0
16
Mathematical Foundation Solution: The non-negativity conditions x1 0 and x2 0
for Computer Science 2
Solution area lies in first quadrant.
For plotting the line,
When x1 = 0, x2 = 2; x1= 3, x2 = 0
Fig 1.8
As there is no common region. There is no point that satisfies both the
quadrant. Thus, the given LPP has no feasible solution.
Limitation of Graphical Method: It is possible to find a graphic solution
of LPP, even if number of decision variables are THREE, but it will be
cumbersome. For more than THREE variable case, a graphic solution will
be impossible.
1.5 SUMMARY
Linear programming is widely used technique in various problems of
management. The problem should have well defined objective function
with decision variables. The objective function is of maximization when
we deal with profit and it is of type minimization when we deal with the
cost. The decision variable interact with each other through set of
constraints.
A linear programming problem with two-decision variable can be solved
by graphical method. Any non-negative solution which satisfies all the
constraints is the feasible solution of the problem. The collection of all
feasible solution is called feasible region. The optimum solution of LPP
always lies at a corner point of the feasible region/area. In some problems,
17
there may be more than one solution. It is also possible that LPP has no Linear Programming
Problem
finite solution, sometimes problem may have infeasible solution. . If more
than three decision variables are there in LPP then graphical method will
be impossible.
1.6 REFERENCES
Books:
1. Operations Research Techniques for Management – V. K. Kapoor
2. Operations Research – Prem Kumar Gupta and D. S. Hira
3. Quantitative Techniques in Management – Vohra
Website:
https://www.cengage.com/resource_uploads/static_resources/0324312652/
8856/chap7.html
https://web.williams.edu/Mathematics/sjmiller/public_html/BrownClasses/
54/handouts/LinearProgramming.pdf
1.7 EXERCISE
Exercise 1: A nutrition program for babies have proposed two types of
food (Food I and Food II) available in the standard packets of 50 grams.
The cost per packet are Rs. 2 and 3 respectively. Vitamin availability in
each of food per packet and minimum requirement for each type of
vitamin are given in the following table.
18
Mathematical Foundation 4 12 noon 4 pm 30
for Computer Science 2
5 4 pm 8 pm 22
6 8 pm 12 mid night 15
Formulate an LPP such that total number of nurses reporting for duty is
minimized.
Exercise 3: Five items are to be loaded on a ship. The weight, volume and
return per unit of each item are given in the table below. The ship cannot
carry a weight more than 120 units and volume more than 115 units.
Formulate an LPP.
And x1, x2 0
Exercise 5: Solve the following LPP by graphical method.
Max z = 4 x1 + 8 x2
x1 + 3x2 ≤ 42
x1 + x2 ≤ 21
And x1, x2 0
Exercise 6: Solve the following LPP by graphical method.
Minimize z = 10x1 + 20 x2
Subject to x1 + 3x2 3
x1 + x2 2
And x1, x2 0
19
Exercise 7: Solve the following LPP by graphical method. Linear Programming
Problem
Max z = 60x1 + 100 x2
Subject to x1 + x2 ≤ 9
x1 2
x2 3
30 x1 + 60 x2 ≤ 360
And x1, x2 0
*****
20
2
SIMPLEX METHOD, BIG M METHOD
AND TWO PHASE METHOD
Unit structure
2.0 Objectives
2.1 Introduction
2.2 Simplex Method
2.3 Big M Method
2.4 Two Phase Method
2.5 Summary
2.6 References
2.7 Exercise
Self-Learning Topics: Special Cases of LPP
2.0 OBJECTIVES
After going through this chapter, students will able to:
● Identify and write a linear problem in standard form.
● Convert inequality constraints to equations.
● Know the use and interpretation of slack, surplus and artificial
variables.
● Check for optimality (to determine entering and leaving variable) by
performing pivoting operations.
● Identify the optimal solution.
2.1 INTRODUCTION
Linear programming is a very well-known method in the field of
optimization theory. In last chapter we used graphical method to solve the
linear programming problem. But when numbers of decision variables are
more than two, it is very difficult to solve LPP by graphical method. To
deal with this difficulty, a highly efficient method for solving LPP is used.
This method can applied for any number i. e. more than two decision
variables and is called Simplex Method.
Some definitions:
1. Basic variable: A variable whose coefficient is “unity: in only one of
the constraints and “zero” in the remaining constraints is called a
Basic variable.
2. Basis: The set of all basic variables (= m, the number of constraints)
is called the Basis.
3. Canonical Form: If in the standard form of an LPP, each constraint
has a Basic variable, then such form of the LPP is called Canonical
Form.
4. Basic Feasible Solution: Any solution of an LPP where exactly m
(equal to number of the constraints) variables have non zero values
satisfying all the constraints, is called a Basic Feasible Solution.
5. Basic variables: The variables with non-zero values are called the
vasic variables, their constraint coefficients make Identity Matrix.
Example 1: Max Z = 6x1 +8x2
4x1 +4x2 40
And x1, x2 0
Solution:
Step 1: write the problem in standard canonical form by converting
inequalities into equations by introducing slack variables Si‟s for each
22
Mathematical Foundation inequality. The coefficient of each slack variable is unity. All these slack
for Computer Science 2
variables will also be appear in the objective function with zero
coefficient.
Max Z = 6x1 +8x2 + 0S1 + 0S2
Table 1
Variables x1 x2 S1 S2 bi
Constraints 5 10 1 0 60
4 4 0 1 40
Cj 6 8 0 0 z
From above Table 1, it is clear that the problem now amounts to solve m
equations in m + n variables (m slack variables and n decision variables)
such that z is maximum.
Here m = 2 and n = 2
Put x1 = 0 and x2 = 0 in above equations,
23
To the right of basic variables column, columns of decision variables x1 x2 Simplex Method, Big M
Method And Two Phase
, …and slack variables S1, S2, … will be there.
Method
First row contain coefficient of decision and slack variables of the first
constraint.
Second row contain coefficient of decision and slack variables of the
second constraint.
Next column is solution column which contain value of basic variable.
To find the scope of improvement, calculate row title Zj and Cj - Zj
Zj is the present contribution of the jth variable to the objective function z
where
Zj = , j = 1, 2, ….., m + n
= , j = 1, 2, ….., 4
Where is the technological coefficient of the jth variable in the ith row
(constraint).
Cj - Zj is the change in the value of the objective function per unit of the
jth variable.
In the above Table 2, all Zj = 0
Step 4: Check for optimality:
For the present problem, all (Cj - Zj) 0, therefore the current
solution is not optimal.
Max (Cj - Zj) = 8 and corresponds to x2. Hence x2 enters the solution
and the 2nd column is the key column.
24
Mathematical Foundation Selecting the leaving variable: Feasibility Conditions:
for Computer Science 2
In a basic feasible solution, number of non-zero variable must be equal to
the number of constraints. Thus, one of the basic variables has to leave the
solution and take the position of entering variable. i.e. should become
equal to 0.
The following steps to be taken:
i. For each row, find the ratio of the elements of the solution column to
the elements of the key column.
ii. The row corresponding to the smallest positive ratio will be the Key
Row and the corresponding basic variable will leave the solution.
For the above problem, the smallest +ve ratio is 6 corresponds to the 1st
row.
Hence, row 1 is the Key Row
The corresponding basic variable S1 will be the leaving variable.
Note: If there is tie in selecting Key-Column and Key-Row, the element
can be selected arbitrarily.
The intersection of Key Column and Key Row is called Key Element or
Pivot Element.
For the above example, Key Element is 10.
Step 5: Next Iteration:
i. Replace the outgoing variable by the entering variable in the basic
variable column and calculate , Key Row =
After computing New values of aij, bi and completing the entries of CBi
and Basic variable columns,
i. Compute the values of Zj
Zj = , j = 1, 2, ….., m + n
= , j = 1, 2, ….., 4
26
Mathematical Foundation a 13 = 1/10 + (1/2)1/5 = 1/5; a 14 = 0 – (1/2)1/2 = ¼;
for Computer Science 2
b1 = 6 - (1/2)8 = 2
Compute the values of Zj and Find Cj - Zj
Table 4 below gives the values of second iteration using the method for
first iteration.
Table 4: Iteration 2
Solution:
Step 1: write the problem in standard canonical form by converting
inequalities into equations by introducing slack variables Si‟s for each
inequality. The coefficient of each slack variable is unity. All these slack
variables will also be appear in the objective function with zero
coefficient.
Max Z = 4x1 + 3x2 +6x3 + 0S1 + 0S2 + 0S3
Sub to 2x1 +3x2+2x3 + S1 = 440
4x1 +3x3 + S2 = 470
2x1 +5x3 + S3 = 430
27
and x1, x2, x3 0 Simplex Method, Big M
Method And Two Phase
Here Slack variables, m = 3 and decision variables, n = 3 Method
Compute Zj = , j = 1, 2, …..
i.e. Ratio =
Zj = , j = 1, 2, …..
29
Table 2: Iteration 1 Simplex Method, Big M
Method And Two Phase
CBi Basic Variables Solution Ratio Method
Variable x1 x2 x3 S1 S2 S3 (bi)
s
0 S1 -2/3 3 0 1 -2/3 0 126.68 42.22**
6 x3 4/3 0 1 0 1/3 0 156.66
0 S3 2 5 0 0 0 1 430 86
Cj 4 3 6 0 0 0 -
Zj 8 0 6 0 2 0 936.96
Cj - Zj -4 3* 0 0 -2 0 -
i.e. Ratio =
Key Row =
Zj = , j = 1, 2, …..
Table 3: Iteration 2
CBi Basic Variables Solution Ra
Variab (bi) tio
les x1 x2 x3 S1 S2 S3
3 x2 -2/3 1 0 1/3 -2/9 0 42.22
6 x3 4/3 0 1 0 1/3 0 156.66
0 S3 28/9 0 0 -5/3 10/9 1 218.9
Cj 4 3 6 0 0 0 -
Zj 22/3 3 6 1 4/3 0 1066.62
Cj - Zj -10/3 0 0 -1 -4/3 0 -
All (Cj - Zj ) 0
31
Simplex Method, Big M
2.3 BIG M METHOD Method And Two Phase
Method
If some of the constraints are of „=‟ or „ ‟ type, then in the standard form
such constraint will not have basic variables (and we will not have a
canonical form). To overcome this difficulty the Big M Method is used,
where M is a large positive quantity. For the constraints with „=‟ or „ ‟
sign we introduce new variables called the „Artificial Variables‟. There are
two methods to deal with the artificial variables.
1. Big M Method
2. Two Phase Method
These artificial variables are fictitious and cannot have any physical
meaning.
Following points to be consider while using artificial variable:
● Only one artificial variable will appear in any constraint.
● Coefficient of an artificial variable is unity in that constraint.
● Number of artificial variable is equal to the number of constraints of
the type „=‟ or „ ‟
● Cost coefficient of an artificial variable will be (+M) for a
minimization problem and (-M) for a maximization problem.
● Once an artificial variable goes out of the solution, it is not allowed
to re-enter. For this purpose, the corresponding column is deleted
from the Simplex Table for further calculations usually.
Example 3: Min Z = 2x1 + 3x2
Sub to x1 +x2 6
7x1 +x2 14
and x1, x2 0
Solution: Write the problem in the standard form.
Min Z = 2x1 + 3x2 + 0S1 + 0S2
Sub to x1 +x2 - S1 = 6
7x1 +x2 - S2 = 14
M A2 7 1 0 -1 0 1 14 2**
Cj 2 3 0 0 M M -
Zj 8M 2M -M -M M M 20M
Cj - Zj 2- 8M* 3-2M M M 0 0 -
Compute Zj = , j = 1, 2, …..
For above
Z1 = M.1 + M.7 = 8M; Z2 = M.1 + M.1 = 2M;
Z3 = M.(-1) + M.0 = -M; Z4 = M.0 + M.(-1) = -M;
Z5 = M.1 + M.0 = M; Z6 = M.0 + M.1 = M
Compute Cj - Zj
33
Now find entries of the ratio. Simplex Method, Big M
Method And Two Phase
Method
i.e. Ratio =
Row corresponding to the smallest +ve ratio will be the key row.
Here it is 2 and corresponds to R2.
Thus, R2 is the Key Row and therefore A2 is the outgoing variable.
The key element is 7. [Element at the intersection of Key row and Key
Column]
34
Mathematical Foundation Table 2: Iteration 1
for Computer Science 2
C Basi Variables Solu Ratio
Bi c x1 x2 S1 S2 A1 A2 tion
Vari (bi)
able
s
M A1 0 6/7 -1 1/7 1 -1/7 4
14
/3 **
2 x1 1 1/7 0 -1/7 0 1/7 2 14
Cj 2 3 0 0 M M -
Zj 2 + -M + M - 4M +4
Cj - Zj 0 - * M - 0 + -
i.e. Ratio =
Row corresponding to the smallest +ve ratio will be the key row.
Here it is 14/3 and corresponds to R1.
Thus outgoing variable is A1 and key element is 6/7.
35
For above example, Simplex Method, Big M
Method And Two Phase
R2(New) = R2(old) – (1/7)R1 (New) Method
Table 3: Iteration 2
Key Row =
Table 4: Iteration 3
All (Cj - Zj ) 0
x1 + 2x2 120
x2 45
and x1, x2 0
Solution: Write the problem in the standard form.
Max Z = 10x1 + 15x2 + 0S1 + 0S2 + 0S3 + 0S4
Sub to 2x1 + 2x2 + S1 = 160
x1 + 2x2 + S2 = 120
4x1 + 2x2 + S3 = 280
37
x2 - S4 = 45 Simplex Method, Big M
Method And Two Phase
and x1, x2, S1, S2 , S3, S4 0 Method
Compute Zj = , j = 1, 2, …..
Compute Cj - Zj
i.e. Ratio =
Row corresponding to the smallest +ve ratio will be the key row.
Here it is 45 and corresponds to R4.
Thus, R4 is the Key Row and therefore A1 is the outgoing variable.
The key element is 1. [Element at the intersection of Key row and Key
Column]
Key Row =
39
Table 2: Iteration 1 Simplex Method, Big M
Method And Two Phase
C Basic Variables Solution Ratio Method
Bi Varia x1 x2 S1 S2 S3 S4 (bi)
bles
0 S1 2 0 1 0 0 2 70 = 35
0 S2 1 0 0 1 0 2 30 =
15**
0 S3 4 0 0 0 1 2 190 = 95
15 X2 0 1 0 0 0 -1 45 -ve value
Cj 10 15 0 0 0 0
Zj 0 15 0 0 0 -15 675
Cj - Zj 10 0 0 0 0 15* -
i.e. Ratio =
Row corresponding to the smallest +ve ratio will be the key row.
Here it is 15 and corresponds to R2.
Thus outgoing variable is S2 and key element is 2.
Next Iteration: Iteration 2
In the Simplex Table [Table 3], replace the outgoing variable by the
entering variable in the basic variable column
i.e. Replace S2 by S4 and and calculate
New values of the next iteration table are given by (in each row)
i.e. New ith Row = Old ith Row - (New element of Ri) x (Key Row)
For above example,
R1(New) = R1(old) – 2R2 (New)
40
Mathematical Foundation R3(New) = R3(old) – 2R2 (New)
for Computer Science 2
R4(New) = R4(old) + R2 (New)
Find Zj and Cj - Zj
Therefore, the Iteration 2 will be as follows:
Table 3: Iteration 2
i.e. Ratio =
Row corresponding to the smallest +ve ratio will be the key row.
Here it is 30 and corresponds to R2.
Thus outgoing variable is S4 and key element is 1/2.
New values of the next iteration table are given by (in each row)
i.e. New ith Row = Old ith Row - (New element of Ri) x (Key Row)
41
For above example, Simplex Method, Big M
Method And Two Phase
R1(New) = R1(old) – R2 (New) Method
Table 4: Iteration 3
Solution is optimal.
x1 = 30 and x2 = 45
Max Z = 10x1 + 15x2
= 10 (30) + 15 (45) = 975
Phase 1:
Step 1: Form the modified problem
Min z = sum of artificial variables i.e. min z = A1 + A2 + …. + An
42
Mathematical Foundation Subject to the same set of constraints and non-negativity conditions.
for Computer Science 2
Note: Whatever the original problem (max /min) the modified phase 1
problem will always be a minimization problem.
Step 2: Apply simplex method till the optimality is reached.
Step 3: Check
a) If the value of objective function (sum of artificial variables (i.e. z) is
0 in the optimal table.
Phase 2:
Step 1: From the optimal table of Phase 1, drop all the columns of
artificial variables which are non-basic.
Step 2: If some artificial variables are in the basic solution with value 0
then in the original objective function put their cost coefficient = 0
Step 3: Find the optimal solution of the original problem using the optimal
solution of the Phase 1 as the initial solution. All cost coefficients will be
originals.
Example 5: Min Z = 12x1 + 18x2 + 15x3
and x1, x2 0
Solution:
Step 0: Min z = Min Z = 12x1 + 18x2 + 15x3 + 0 S1 + 0 S2 + M A1 + MA2
Sub to 4x1 + 8x2 + 6x3 - S1 + A1 = 64
3x1 + 6x2 + 12x3 – S2 + A2 = 96
Phase 1:
Step 1: Form the modified problem
Min Zm = sum of artificial variables
Min Zm = A1 + A2 (cost coe. Of all other variables = 0)
Sub to 4x1 + 8x2 + 6x3 - S1 + A1 = 64
43
3x1 + 6x2 + 12x3 – S2 + A2 = 96 Simplex Method, Big M
Method And Two Phase
and x1, x2 , x3, S1, S2, A1, A2 0 Method
Table – 2: Iteration 1
44
Mathematical Foundation Table – 3: Iteration 2
for Computer Science 2
C Basic Variables Soluti Ratio
Bi Variabl x1 x2 x3 S1 S2 on (bi)
es
0 x2 1 /2 1 0 -1/5 1/10 16/5
0 x3 0 0 1 1/10 -2/15 32/5
Cj 0 0 0 0 0
Zmj 0 0 0 0 0 0
Cj – Zmj 0 0 0 0 0 -
Phase II:
Steps 1 and 2: [All cost coefficients will be originals]
2.5 SUMMARY
The Simplex method is an approach to solving linear programming models
by hand. After studying this chapter, students are able to introduce slack
variables, surplus variables and artificial variable to convert the
45
inequalities into equalities and able to get canonical form. Also able to Simplex Method, Big M
Method And Two Phase
find optimal solution using tableau and pivot variables (Key Element).
Method
Students are able to used Big M Method and Two Phase Method to find a
best feasible solution by adding artificial variable. In Two Phase method,
the whole procedure of solving a linear programming problem involving
artificial variables is divided into two phases. In phase I, form a new
objective function by assigning zero to every original variable. Then we
try to eliminate artificial variables. The solution at the end of phase I
serves as a basic feasible solution for Phase II. In Phase II the original
objective function is introduced and by using usual method we find an
optimal solution.
2.6 REFERENCES
Books:
1. Operations Research Techniques for Management – V. K. Kapoor
2. Operations Research – Prem Kumar Gupta and D. S. Hira
3. Quantitative Techniques in Management – Vohra
Websites:
https://www.cengage.com/resource_uploads/static_resources/0324312652/
8856/chap7.html
https://web.williams.edu/Mathematics/sjmiller/public_html/BrownClasses/
54/handouts/LinearProgramming.pdf
http://ecoursesonline.iasri.res.in/mod/page/view.php?id=2939
http://arts.brainkart.com/article/big-m-method--introduction--1123/
2.7 EXERCISE
Q.1 Solve by Simplex Method
a) Max Z = 10x1 + 4x2
b) Max Z = 25 x + 20 y
Sub to 6 x + 4 y 3600
2 x + 4 y 2000
46
Mathematical Foundation and x, y 0 [Ans: x = 400, y = 300, Max Z = 16000]
for Computer Science 2
3x1 + 2 x3 460
x1 + 4 x3 420
2x1 + x2 - x3 20
3x1 - 3x2 + 6 x3 50
5x1 + 3x2 60
2x1 + 3x2 36
47
and x1, x2 0 [ Ans: x1 = 15, x2 = 5/4, Min Z = 205] Simplex Method, Big M
Method And Two Phase
d) Min Z = 10x1 + 15x2 + 20x3 Method
and x1, x2 0
Q.2 Solve by Two Phase Method.
a) Max Z = 5x1 - 4x2 + 3 x3
Sub to 2x1 + x2 - 6 x3 20
6x1 + 5x2 + 10 x3 76
8x1 - 3x2 + 6 x3 50
Sub to x1 + x2 + x3 7
2x1 - 5x2 + x3 10
x1 x2 S1 S2
Cj - Zj -10 8 select 8 3
x1 60
48
Mathematical Foundation Example: Max Z = 4x1 + x2 + 3 x3 + 5x4
for Computer Science 2
Sub to 4x1 - 6x2 - 5 x3 - 4x4 20
Sub to x1 + x2 + x3 1
x1 + 2x2 + x3 8
Sub to x1 + 2x2 80
and x1, x2 0
*****
49
UNIT II
3
TRANSPORTATION PROBLEM
Unit Structure
3.0 Transportation Problem
3.1. Objective
3.2 Introduction
3.3. Definition of Transportation Problem
3.3.1 Balanced Transportation Problem
3.3.2 Unbalanced Transportation Problem
3.3.2 a-demand Greater than supply
3.3.2 b-Demand less than supply
3.4 Solution of Transportation Problem
3.4.1 Initial Basic feasible solution
3.4.1 a. North West Corner method
3.4.1 b. Least Cost Method
3.4.1 c.Vogel’s Approximation method
3.5 Optimum solution
3.5.1 MODI method
3.6 List of Reference
3.1 OBJECTIVE
This chapter would make you understand the following concepts:
● Discuss the concept of transportation problem
● Definition of transportation problem
● Three cases occur in transportation problem
● Method to find initial basic solution with example
● Method to find optimal solution with example
3.2 INTRODUCTION
In mathematical science "operation research" acts important role. When
we are perform any operation means perform some action to solve
problem. In this unit we are discuss transportation problem technique. In
transportation problem transport goods from setup sources /origin to set of
destination in such a way that total transportation cost is minimised.
50
Mathematical Foundation Discuss transportation concept with the help of example. Suppose a
for Computer Science 2
manufacturer of soap company has three plants situated at place A,B and
C. Suppose his buyer are located in different region P,Q and R where he
has to supply then the soap(goods).Also assume the demand in the three
region and the production in different plants per unit time period are
known and the cost out transporting one box to each center is given. The
manufacturer's problem is to determine as to how he should rate this his
product from his plant to the market place so that the total cost involved in
the transportation is minimised. In other word how many soap boxes are
deliver from A to P, Q and R; how many from B to P, Q and R; how many
from C to P,Q and R to achieve 8 and list transportation cost is minimum.
The place where the soap goods originate are called source or origin and
place where they are supplied are called destination. In the above example
the manufacturer is to decide as how many units to be transported from
different origin to different destinations so the total cost is minimum and
this is the concept of transportation problem.
Subject to
Supply/Capacity
……………..up to
Constraint
Similarly
51
Transportation Problem
Demand / Requirement
…………up to Constraint
………
1 2 3 … N Supply
1 C11 C12 C13 C1n a1
………
X11 X12 X13 …. X1n
2 C21 C22 C23 C2n a2
………
X21 X22 X23 … X2n
3 C31 C32 C33 C3n a3
………
X31 X32 X33 … X3n
………
Demand b1 b2 b3 … bn
52
Mathematical Foundation
for Computer Science 2
Demand = Supply
Consider a given example with three origin and three destination.
P Q R Supply
A 3 6 7 90
B 3 5 2 10
C 5 2 5 20
60+30+30=120 Equal to
Demand
60 30 30 90+10+20=120
P Q R Supply
A 3 6 7 90
B 3 5 2 10
C 5 2 5 20
50+50+40=140>
Demand
50 50 40 90+10+20=120
53
The problem is unbalanced transportation problem. Transportation Problem
P Q R Supply
A 3 6 7 90
B 3 5 2 10 Demand-supply
C 5 2 5 20 (40-20=20)
D1 0 0 0 20
Demand 50 50 40
P Q R Supply
A 3 6 7 90
B 3 5 2 10
C 5 2 5 20
D1 0 0 0 20
Demand 50 50 40 140=140
P Q R S Supply
A 5 4 2 6 10
B 8 3 5 7 50
C 10 11 3 1 30
D 9 12 6 3 20
Demand 30 40 20 10 100 < 110
54
Mathematical Foundation The given problem is unbalanced transportation problem.
for Computer Science 2
Demand < Supply
P Q R S S1 Supply
A 5 4 2 6 0 10
B 8 3 5 7 0 50
C 10 11 3 1 0 30
D 9 12 6 3 0 20
Demand 30 40 20 10 10 110=110
Remember:
Demand> Supply
Add a dummy row with cost zero and supply equal to (demand- supply)
Demand<Supply
Add column with cost zero and demand equal to (supply - demand)
55
3.4.1 Initial Feasible Solution: Transportation Problem
1) Rim condition-
2) Number of allocation=m+n-1
(Where m is number of rows and n number of column)
If the above condition is satisfied the solution obtained is a non-
degenerate. When number of positive allocation in initial basic solution
less than m+n-1 the solution is said to be degenerate solution.
Number of allocation< m+n-1……….. degenerate solution
Number of allocation=m+n-1…………non- degenerate solution
The initial feasible solution can be obtained by following three method
1. North West Corner Method
2. Least cost method/ Matrix minima method
3. Vogel's approximation method/ penalty method
……… Supp
1 2 3 ….. n ly
1 C11 C12 C13 C1n a1
………
X(1,1) X(1,2) X(1,3) ……. X(1,n)
2 C21 C22 C23 C2n a2
………
X(2,1) X(2,2) X(2,3) ……. X(2,n)
3 C31 C32 C33 C3n a3
………
X(3,1) X(3,2) X(3,3) …… X(3,n)
Deman ………
d b1 b2 b3 ….. bn
Consider a transportation method Xij denote the unit transportation cost
from ith origin to jth destination a1, a2, a3,………,an are respective supply
and b1,b2,b3……bn are respect demand.
56
Mathematical Foundation Steps for the methods are:
for Computer Science 2
1. Begin with the upper left hand corner X(1,1) cell of transportation
table and allocate as many unit as possible equal to minimum between
available capacity/ supply and demand/ requirement.
2. Balance the supply and demand units in the respective rows and
column allocation.
3.
a) If the supply for the first row is pending then move down (↓) to the
first sale in second row and first column 21 and locate minimum (bi-
ai, a2) then go to step to for balance the supply and demand unit.
b) If the demand for the first column is satisfied then moved horizontally
(→) to the next sale in the second column and first row and supplied
the quantity as per step 1 then go to step to for adjust the supply and
demand.
4. If for any cell supply equal demand then rim condition will occur in
this case move to next allocation can be made in sale other in the next
row or column.
5. Continue the procedure until the total available quantity is fully
allocated to the same as required hence we have basic feasible
solution with m+n-1 positive allocation.
Question-Obtained initial basic feasible solution for the following problem
using the NCWR method.
w1 w2 w3 w4 supply
A 6 7 9 3 70
B 11 5 2 8 55
C 10 12 4 7 90
demand 85 35 50 45
1 6 7 9 3 70 0
70
2 11 35 5 2 8 55 40 5 0
15 5
3 10 12 4 7 90 45 0
35 45 45
Demand 85 0 50 45
15 45 0
0 0
Check positive location m=3,n=4 we have m+n-1=3+4-1=6 positive
allocation.
Calculate total cost-70*6+15*11+35*5+5*2+45*4+45*7=1265.
w1 w2 w3 w4 supply
A 6 7 9 3 70
B 11 5 2 8 55
C 10 12 4 7 90
demand 85 35 50 45
58
Mathematical Foundation Solution:
for Computer Science 2
In given problem minimum cost is to which is unique. We select cell
(B,W3). Allocate min(50,55)=50. Requirement of w3 is satisfied and
reduced the capacity 55 by 50 and eliminate the column w3.
w1 w2 w3 w4 supply
A 6 7 9 3 70
B 11 5 2 8 55 5
50
C 10 12 4 7 90
demand 85 35 50 45
0
Search for next minimum in the remaining table. Next minimum cost is 3.
We select (A,W4) can allocate min(45,70)=45 and reduce the capacity 75
by 45. Eliminate column w4.
w1 w2 w3 w4 supply
A 6 7 9 3 70 25
45
B 11 5 2 8 55 5
50
C 10 12 4 7 90
demand 85 35 50 45
0 0
Next minimum cost element is 5. Select cell (B,w2) and allocate
min(35,5)=5. Satisfies the requirement of w2 and eliminate the row B.
w1 w2 w3 w4
A 6 7 9 3 70 25
45
B 11 5 2 8 55 5 0
5 50
C 10 12 4 7 90
59
Transportation Problem
85 35 50 45
30 0 0
Search next minimum cost element is 6. Select cell (A,w1) allocate
min(85,25)=25 and reduce the capacity 85 by 25. Eliminate row A.
w1 w2 w3 w4
A 6 7 9 3 70 25 0
25 45
B 11 5 2 8 55 5 0
5 50
C 10 12 4 7 90
85 35 50 45
60 30 0 0
60
Mathematical Foundation 85 35 50 45
for Computer Science 2
60 30 0 0
0 0
Steps:
1. Find the difference between smallest cost and next smallest cost in
particular row or column or penalty. Calculate this penalty for each
row and column in the transportation table.
2. Select largest penalty of all transportation table. Hindi rope or column
choose the sale that how the smallest cost and locate the maximum
possible quantity to the cell.
3. Adjust the row capacity and column requirement by amount a locate
to the cell in step 2.
4. If only one row or one column is left, we directly allocate the demand.
Question-solve the following transportation problem for initial basic
solution using VAM method:
w1 w2 w3 w4 supply
A 6 7 9 3 70
B 11 5 2 8 55
C 10 12 4 7 90
demand 85 35 50 45
Solution:
Calculate the difference between smallest cost and next smallest cost i.e
calculate penalty.
Penaulty
61
sup Transportation Problem
w1 w2 w3 w4 ply
A 6 7 9 3 70 0 3
70
6
B 11 5 2 8 55 20 0 3 3 ←
35 20
1
C 10 2 4 7 90 60 15 0 3 3 3 3
15 30 45
dem
and 85 35 50 45
15 0 30 0
0 0
4↑ 2 2 4
7
1 ↑ 2 1
1 2 1
1
Select largest penalty of all in above penalty 4 is the largest penalty but it
is not unique. Select any one between them within this column w1 select
smallest cost cell (A,w1) and allocate maximum possible quantity to this
cell.
Remove particular row/ column in which supply/demand is exhausted.
Similar way to calculate penalty for remaining table and allocate cost up to
one row and one cost left directly or locate the demand.
Number of allocation=m+n-1
Solution is a non- degenerate.
Total cost is:
70*6+35*5+20*2+30*4+45*7+10*15=1220
Initial solution is nearest to optimal solution.
62
Mathematical Foundation An optimality test can be applied to the feasible solution only if it satisfies
for Computer Science 2
the following conditions:
(i) It contains exactly m+n-1 allocations where m and n represent the
number of rows and columns, respectively, of the transportation table.
(ii) These allocations are independent.
This can be done by two methods:
(a) By Modified Distribution Method, or MODI method.
(b) By Stepping Stone Method
Δ𝑖𝑗=𝐶𝑖𝑗−(𝑢𝑖+𝑣𝑗)
● If all Δ𝑖𝑗>0, for all i, j; then the current basic feasible solution is an
optimal solution.
63
● (b) If all Δ𝑖𝑗≥0, for all i, j and at least one Δ𝑖𝑗 is zero Transportation Problem
then the current basic feasible solution is an optimal solution and
multiple basic initial feasible solution exists.
● (c) If some of Δ𝑖𝑗<0 for some (i, j), the current solution is not optimal.
Then select the cell having the most negative Δ𝑖𝑗 and tick it.
Question: In initial basic feasible solution is obtained by Matrix
Minimum Method and is shown in table:
Distribution Centre
D1 D2 D3 D4 Supply
Plant P1 19 30 50 7
P2 30 60 10
P3 60 18
Requirement 5 8 7 15
u1 + v4 = c14 ⇒ 0 + v4 = 12 or v4 = 12
u3 + v4 = c34 ⇒ u3 + 12 = 20 or u3 = 8
u3 + v2 = c32 ⇒ 8 + v2 = 10 or v2 = 2
u3 + v1 = c31 ⇒ 8 + v1 = 40 or v1 = 32
u2 + v1 = c21 ⇒ u2 + 32 = 70 or u2 = 38
u2 + v3 = c23 ⇒ 38 + v3 = 40 or v3 = 2
Distribution centre
D1 D2 D3 D4 Supply ui
Plant P1 19 30 50 7 0
P2 30 60 10 38
P3 60 18 8
Requirement 5 8 7 15
vj 32 2 2 12
64
Mathematical Foundation Calculating opportunity cost using cij – ( ui + vj )
for Computer Science 2
Unoccupied cells Opportunity cost
(P1, D1) c11 – ( u1 + v1 ) = 19 – (0 + 32) = –13
(P1, D2) c12 – ( u1 + v2 ) = 30 – (0 + 2) = 28
(P1, D3) c13 – ( u1 + v3 ) = 50 – (0 + 2) = 48
(P2, D2) c22 – ( u2 + v2 ) = 30 – (38 + 2) = –10
(P2, D4) c14 – ( u2 + v4 ) = 60 – (38 + 12) = 10
(P3, D3) c33 – ( u3 + v3 ) = 60 – (8 + 2) = 50
Distribution centre
D1 D2 D3 D4 Supply ui
Plant P1 7 0
P2 10 38
P3 18 8
Requirement 5 8 7 15
vj 32 2 2 12
Now choose the smallest (most) negative value from opportunity cost (i.e.,
–13) and draw a closed path from P1D1. The following table shows the
closed path.
Distribution centre
D1 D2 D3 D4 Supply ui
P1 7 0
Plant P2 10 38
P3 18 8
Requirem
5 8 7 15
ent
vj 32 2 2 12
Choose the smallest value with a negative position on the closed path(i.e.,
2), it indicates the number of units that can be shipped to the entering cell.
Now add this quantity to all the cells on the corner points of the closed
path marked with plus signs and subtract it from those cells marked with
minus signs. In this way, an unoccupied cell becomes an occupied cell.
65
Now again calculate the values for ui & vj and opportunity cost. The Transportation Problem
resulting matrix is shown below
Distribution centre
D1 D2 D3 D4 Supply ui
Plant P1 7 0
P2 10 51
P3 18 8
Requirement 5 8 7 15
vj 19 2 –11 12
Choose the smallest (most) negative value from opportunity cost (i.e., –
23). Now draw a closed path from P2,D2 .
Distribution centre
D1 D2 D3 D4 Supply ui
P1 7 0
Plant
P2 10 51
P3 18 8
Requirement 5 8 7 15
vj 19 2 –11 12
Now again calculate the values for ui & vj and opportunity cost
Distribution center
D1 D2 D3 D4 Suppl ui
y
Plant P1 7 0
P2 10 28
66
Mathematical Foundation P3 18 8
for Computer Science 2
Requirement 5 8 7 15
vj 19 2 12 12
Web References:
1. Operations Research, Prof.Kusum Deep, IIT-MADRAS,
https://nptel.ac.in/courses/111/107/111107128/
2. Introduction to Operations Research, Prof. G. Srinivasan, IIT-
ROORKEE, https://nptel.ac.in/courses/110/106/110106062/
3. Fundamentals of Operations Research, Prof. G. Srinivasan, IIT-
MADRAS, https://nptel.ac.in/courses/112/106/112106134/
67
4. Modeling and simulation of discrete event systems,Prof.P. Kumar Jha, Transportation Problem
IIT- ROORKEE, https://nptel.ac.in/courses/112107220/
5. Game Theory, Prof. K. S. MallikarjunaRao, IIT-BOMBAY,
https://nptel.ac.in/courses/110/101/110101133/
6. Decision Modelling, Prof. BiswajetMahanty, IIT-KHARGPUR,
https://nptel.ac.in/courses/110105082/
7. Karmarkar's Method:
ttps://www.youtube.com/watch?v=LWXXhBIlj0o
8. Karmarkar's Method:
https://en.wikipedia.org/wiki/Karmarkar%27s_algorithm
*****
68
UNIT III
4
ASSIGNMENT MODEL
Unit Structure
4.0 Objectives
4.1 Assignment Model
4.2 Hungarian Method for Solving Assignment Problem
4.3 Travelling Salesman Problem
4.4 Summary
4.5 References
4.6 Exercise
4.7 Self Learning Topic
4.0 OBJECTIVES
After studying the unit you should be able to:
● Formulate mathematically an assignment problem
● Optimal solution can be obtained by using Hungarian Method
● Special cases of assignment problem viz maximization case, ,
unbalanced assignment problem, restricted assignment problem,
alternate optimal solution and travelling salesman problem can be
solved.
69
C11 C12 C13……… C1n Assignment Model
Minimize Z =
Step 1:
Prepare a cost matrix of the given problem. If the number of rows and
number of columns are equal then matrix will be called as balanced
matrix. If number of rows and number of columns are not equal then
matrix is unbalanced matrix. To convert an unbalanced matrix to balance
matrix, a dummy row/column is introduced so that matrix becomes
balanced (a square matrix).The cost entries of dummy are always zero.
Step 2:
Row Reduction: Subtract the smallest element of each row from all the
elements of the row. This will result in at least one zero in each row.
Column Reduction: Subtract the smallest element of each column from
all the elements of the column. This will result in at least one zero in each
column. Now each row and column will have at least one zero.
Step3:
Investigate the rows and columns sequentially, select a row or column
with a single zero element and encircle it (or square it). Mark a X (cross)
in the cells having zero element, lying in the same column or row so that
no further assignments can be done in that particular column or row.
70
Mathematical Foundation Again select the next row and encircle (or square) the zero element and
for Computer Science 2
mark a X (cross) in the cells having zero element, lying in the same
column or row so that no further assignments can be done in that
particular column or row.
Repeat the process for the remaining rows till all the zero’s are assigned in
each row and column. Each row or column must have one encircled (or
square) zero element in it.
Step 4:
If the number of assignments (zero’s circled or squared) are equal to
number of row/column, that means we have reached an optimal solution.
The total cost of assignment is obtained by adding original cost values
from the original given cost matrix.
If the number of assignments (zero’s circled or squared) are not equal to
number of row/column that means no optimal solution is obtained. Go to
step 5.
Step5:
Draw the minimum number of horizontal or vertical straight lines to cover
all the zeroes from the reduced cost matrix (matrix obtained using step 2).
If the number of straight lines are equal to size of matrix (i.e number of
rows/columns of matrix), the present solution is optimal solution else go to
step 6.
Step 6:
Investigate the uncovered elements of the matrix (elements not covered by
any lines), find the smallest element from uncovered elements. Hence
subtract all the uncovered elements from this smallest uncovered element
and further add the smallest uncovered element to the elements at the
intersection point of two lines. Covered elements will remain unaffected,
no change in their values.
Step 7:
Perform the step 3 and repeat the entire process until optimal solution is
obtained.
Problem 1:
Solve the following assignment problem using Hungarian Method. The
given cost matrix represents the combination of 4 different jobs on 4
different machines.
71
Assignment Model
Solution:
Since the number of rows and columns are equal we can say that problem
is balanced type.
Step 1:
Choose the minimum element in each row and subtract it from every
element of that row. In this case, 20, 10, 22 and 16 are minimum element
from 1st, 2nd, 3rd and 4th row respectively. In this way we get row reduced
matrix.
Step 2:
Choose the minimum element in each column and subtract it from every
element of that column. In this case, 0, 4, 4 and 0 are minimum element
from 1st, 2nd, 3rd and 4th column respectively. In this way we get column
reduced matrix.
Step 3:
72
Mathematical Foundation Starting with the first row (Machine 1) in table A.5, we examine each
for Computer Science 2
rows until we found a row with single zero (Machine 4). We make an
assignment by encircling that cell. Then we cross other zeroes in that
particular column and row to eliminate the possibility of making further
assignments in that column and row. We repeat the process for other rows
till all the rows have exactly one encircled zero (and columns also). If all
the rows (and columns also) contains exactly one encircled zero or in other
words total number of assignments are equal to size of matrix, we can say
that we have reached an optimal solution.
From table A.5 it is evident that total number of assignments (encircled
zeroes) are 4 and size of matrix is also 4, hence we have obtained an
optimal solution.
The pattern of assignments for the combination of machine and jobs are as
follows:
Step 1:
Choose the minimum element in each row and subtract it from every
element of that row. In this case, 10, 14, 8, 6 and 8 are minimum element
from 1st, 2nd, 3rd 4th and 5th row respectively. In this way we get row
reduced matrix.
73
Assignment Model
Step 2:
Choose the minimum element in each column and subtract it from every
element of that column. In this case, 0, 0, 0,2 and 4 are minimum element
from 1st, 2nd, 3rd 4th and 5th column respectively. In this way we get
column reduced matrix.
Step 3:
Starting with the first row (Employees 1) in table B.3, we examine each
rows until we found a row with single zero (Employees 1). We make an
assignment by encircling that cell. Then we cross other zeroes in that
particular column and row to eliminate the possibility of making further
assignments in that column and row. We repeat the process for other rows
till all the rows have exactly one encircled zero (and columns also). If all
the rows (and columns also) contains exactly one encircled zero or in other
words total number of assignments are equal to size of matrix, we can say
that we have reached an optimal solution.
From table B.4 it is evident that total number of assignments (encircled
zeroes) are 4 and size of matrix is 5. The 3rd row (Employees 3) does not
have a single assignment (encircled zero), hence we have not obtained an
optimal solution.
The pattern of assignments for the combination of employees and jobs are
as follows:
74
Mathematical Foundation
for Computer Science 2
Step 4:
Consider Table B.4 and draw minimum number of lines to cover all the
zeroes. We can draw vertical or horizontal lines to cover all the zeroes. To
get minimum number of lines we start with row/column which has
maximum zeroes. Hence we draw 1st horizontal line in the 4th or 5th row as
both the rows has two zeroes. So first horizontal line is drawn on 4th row
and then on 5th row. Now column C consist of two zeroes, to cover these
zeroes we draw a vertical line to cover the zeroes. Then column B consist
of two zeroes out of which one zero ( employees 4 and job B) has
already been covered, so only remaining zero is 1 st row (employees 1 and
job B), so we can draw either vertical or horizontal line. Drawing either of
the lines (vertical or horizontal) will not affect the final outcome. Here we
are drawing a vertical line (employees 1 and job B).After drawing the
lines we will get the following matrix i.e. Table B.5
Identify the smallest value which is not covered by any line (minimum
uncovered value).From table B.5,it is evident that minimum uncovered
value is 2, this value will be subtracted from all the uncovered values and
will be added to the values at the point of intersection (where the two
lines are intersecting) and the remaining values (covered values) will
remain the same . The resultant matrix is shown in the table B.6.
75
Step 6: Assignment Model
Examine all the rows one by one and find the row which have a single
zero. The 1st row and 4th row have a single zero so we will encircle it and
cross other zeroes in that particular column to eliminate the possibility of
making further assignments in that column .Now 2nd row has a single zero
to be encircled (row-Employee-2, column-Job-C) as another zero (lying on
row-Employee-2, column-Job-E) cannot be considered because it has been
crossed. We will examine the 3rd row and 5th row in a same way and
encircle the zeroes. Make sure each row consist of only one encircled
zeroes which indicates that all the columns will have single encircled
zeroes.
From Table B.7, number of assignments are 5 and size of matrix is also 5,
hence we can say we have reached an optimal solution. The assignment
schedule is given in Table B.8
76
Mathematical Foundation Solution: The matrix consist of 3 rows (1, 2, 3) and 4 columns (I, II, III,
for Computer Science 2
IV), since the number of rows and columns are not equal, we can say that
matrix is not balanced and of minimization (as cost is given) type. To
apply Hungarian Method the matrix should be of balanced type, so we will
introduce dummy row (as one row is less than the number of columns)
under the name Dummy where all the entries will be zeroes. Refer Table
C.2 now the number of rows including dummy are 4 and number of
columns are also 4. Hence the matrix is balanced and of minimization type
(cost is given). We can now apply Hungarian Method.
Step 1:
Choose the minimum element in each row and subtract it from every
element of that row. In this case, 6, 1, 2 and 0 are minimum element from
1st, 2nd, 3rd and 4th row respectively. In this way we get row reduced
matrix.
Step 2:
Choose the minimum element in each column and subtract it from every
element of that column. In this case, 0, 0, 0 and 0 are minimum element
from 1st, 2nd, 3rd and 4th column respectively. In this way we get column
reduced matrix.
Step 3:
Starting with the first row (Job A) in table C.4, we examine each rows
until we found a row with single zero (Job A). In this case 1st has single
zero and we encircle it and marking cross on all other zeroes lying in the
77
first column. Now 2nd and 3rd row does not have zero to get encircled but Assignment Model
4th row has choice of three zeroes. We can select any zero out of the three
zeroes and encircled it. We make an assignment by encircling that cell.
Then we cross other zeroes in that particular column and row to eliminate
the possibility of making further assignments in that column and row.
From table C.5 it is evident that total number of assignments (encircled
zeroes) are 2 and size of matrix is 4. The 2nd and 3rd row (Job 2 and Job 3)
does not have a single assignment (encircled zero), hence we have not
obtained an optimal solution.
The pattern of assignments for the combination of jobs and machines are
as follows:
Consider Table C.6 and draw minimum number of lines to cover all the
zeroes. We can draw vertical or horizontal lines to cover all the zeroes. To
get minimum number of lines we start with row/column which has
maximum zeroes. Hence we draw 1st horizontal line in the Dummy row as
it has four zeroes. So first horizontal line is drawn on Dummy row and
then 1st column consist of four zeroes, to cover these zeroes we draw a
vertical line to cover the zeroes. After drawing the lines we will get the
following matrix i.e. Table C.6.
Identify the smallest value which is not covered by any line (minimum
uncovered value).From table C.6,it is evident that minimum uncovered
value is 2, this value will be subtracted from all the uncovered values and
will be added to the values at the point of intersection (where the two
lines are intersecting) and the remaining values (covered values) will
remain the same. The resultant matrix is shown in the table C.7
78
Mathematical Foundation
for Computer Science 2
Step 4:
Now we can do the assignments. Starting with the first row (Job A) in
table C.8, we examine each rows until we found a row with single zero
(Job A). In this case 1st row has single zero and we encircle it and marking
cross on all other zeroes lying in the first column. Now 2nd row has single
zero to be encircled and 3rd row does not have zero to get encircled but 4th
row has choice of two zeroes. We can select any zero out of the two zeroes
and encircled it. We make an assignment by encircling that cell. Then we
cross other zeroes in that particular column and row to eliminate the
possibility of making further assignments in that column and row.
Step 5:
Consider Table C.8 and draw minimum number of lines to cover all the
zeroes. We can draw vertical or horizontal lines to cover all the zeroes.
We draw 1st horizontal line in the Dummy row as it has three zeroes. So
first horizontal line is drawn on Dummy row and then 1st column consist
of three zeroes and 2nd column consist of two zeroes, and to cover these
zeroes we draw a vertical lines After drawing the lines we will get the
following matrix i.e. Table C.9
Step 6:
Identify the smallest value which is not covered by any line (minimum
uncovered value).From table C.9,it is evident that minimum uncovered
value is 2, this value will be subtracted from all the uncovered values and
79
will be added to the values at the point of intersection (where the two Assignment Model
lines are intersecting) and the remaining values (covered values) will
remain the same. The resultant matrix is shown in the table C.10
Step 7:
Now we can do the assignments. Starting with the first row (Job A) in
table C.11, we examine each rows until we found a row with single zero
(Job A). In this case 1st row has single zero and we encircle it and marking
cross on all other zeroes lying in the first column. Now 2nd row has two’s
zero out of which one is to be encircled, so we choose zero lying on 2nd
row and 2nd column (Job-B and Machine –II) and marking cross on the
zeroes lying in the 2nd column. 3rd row have single zero lying on 3rd row
and 3rd column (Job-C and Machine –III) to get encircled and 4th row has
also single zero lying on 4th row and 4th column (Job-Dummy and
Machine –IV) to get encircled. After, we obtained the resultant matrix i.e.
Table C.11
Number of assignments are 4 and the size of matrix is also 4, we can say
that optimal solution is obtained.
80
Mathematical Foundation generated by each salesman in each territory. Find optimum assignment of
for Computer Science 2
salesman and territory to maximize the profit.
Solution: The matrix consist of 4 rows (A, B, C.D) and 4 columns (T1,
T2, T3, T4), since the number of rows and columns are equal, we can say
that matrix is balanced and of maximization type (as profit is given) type.
To apply Hungarian Method the matrix should be of minimization type, so
we will create a regret matrix by selecting the maximum value from the
entire matrix i.e. 80 and subtracting each value by 80. The matrix so
obtained will be consider as Regret Matrix. We can now apply Hungarian
Method to the matrix given in Table D.2
Step 1:
Prepare a Row Reduced matrix by selecting a minimum element from
each row of regret matrix and subtracting it from each element of that row.
The minimum elements from each row are 6,0,10 and 16. The following
matrix will be obtained (Table D.3).
Step 2:
Prepare a Column Reduced matrix by selecting a minimum element from
each column of Row Reduced matrix (Table D.3) and subtracting it from
each element of that column. The minimum elements from each column
are 0, 0, 6 and 0. The following matrix will be obtained (Table D.4).
81
Assignment Model
Step 3:
Now we can do the assignments. Starting with the first row (Salesman A)
in table D.4, In this case 1st row has single zero and we encircle it and
marking cross on all other zeroes lying in the fourth column. 3rd row have
single zero lying on 3rd row and 1st column (Salesman -C and Territory-
T1) to get encircled and 4th row has also single zero lying on 4th row and
2nd column (Salesman –D and Territory-T2) to get encircled. After, we
obtained the resultant matrix i.e. Table D.5
Step 5:
Draw minimum number of lines to cover all the zeroes.
Step 6:
Select the minimum uncovered element from Table D.6 and subtract from
other uncovered elements and minimum uncovered element to the
elements where the two lines are intersecting. In this case minimum
uncovered element is 4. The following matrix (Table D.7) will be
obtained:
82
Mathematical Foundation Table D.7 Territory
for Computer Science 2
Asignment Matrix
T1 T2 T3 T4
A 0 16 8 0
Salesman B 20 8 12 0
C 0 22 0 8
D 16 0 8 12
Step 7:
Now we can do the assignments. Starting with the first row (Salesman A)
in table D.8, In this case 1st row has single zero and we encircle it and
marking cross on all other zeroes lying in the first column. 2nd row has
single zero to be encircled, 3rd row and 4th row have single zeroes to be
encircled.. After, we obtained the resultant matrix i.e. Table D.8
Step 8:
The assignment schedule is given in Table D.
83
Assignment Model
Solution: The matrix consist of 4 rows (I, II, III, IV) and 4 columns (A, B,
C, D), since the number of rows and columns are equal, we can say that
matrix is balanced and of minimization type (as cost is given).Since
operator II cannot perform Job A and operator III cannot perform Job B,
hence it is a prohibited or restricted problem. Cost of prohibited or
restricted problem is taken as ‘M’ which indicates infinity. The value ‘M’
will remain as it is throughout the solution. No assignments or no change
in values can happen to value ‘M’. The matrix so obtained given in Table
E.2
Step 1:
Prepare a Row Reduced matrix by selecting a minimum element from
each row of given matrix and subtracting it from each element of that row.
The minimum elements from each row are 8,12,6 and 4. The following
matrix will be obtained (Table E.3).
Step 2:
Prepare a Column Reduced matrix by selecting a minimum element from
each column of Row Reduced matrix (Table E.3) and subtracting it from
each element of that column. The minimum elements from each column
are 0, 6, 2 and 0. The following matrix will be obtained (Table E.4).
84
Mathematical Foundation
for Computer Science 2
Step 3:
Now we can do the assignments. Starting with the forth row as it has only
single zero and we encircle it and marking cross on all other zeroes lying
in the 4th column , 3rd row has single zero to be encircled, 1st row and 2nd
rows have zeroes to be encircled.. After, we obtained the resultant matrix
i.e. Table E.5
Step 4:
The assignment schedule is given in the following Table E.6.
85
Solution: The matrix consist of 4 rows (S1, S2, S3, S4) and 3 columns Assignment Model
(T1, T2, T3), since the number of rows and columns are not equal, we can
say that matrix is unbalanced and of maximization type (as profit is given)
type.
Step 1:
To apply Hungarian Method the matrix should be balanced and of
minimization type, so we have to add dummy column with all entries as
zeroes (Table F.2) and further have to create a regret matrix by selecting
the maximum value from the matrix (Table F.3) i.e. 220 and subtracting
each value by 220. The matrix so obtained will be consider as Regret
Matrix. We can now apply Hungarian Method to the matrix
Step 2:
Prepare a Row Reduced matrix by selecting a minimum element from
each row of given matrix and subtracting it from each element of that row.
The minimum elements from each row are 40, 30, 56, and 0. The
following matrix will be obtained (Table F.4).
Step 3:
Prepare a Column Reduced matrix by selecting a minimum element from
each column of Row Reduced matrix (Table F.4) and subtracting it from
each element of that column. The minimum elements from each column
are 24, 20, 0, and 164. The following matrix will be obtained (Table F.5).
86
Mathematical Foundation Table F.5 Territory
for Computer Science 2
Column Reduced Matrix
T1 T2 T3 Dummy
S1 36 26 0 16
Salesman S2 6 4 0 26
S3 0 0 0 0
S4 26 10 0 56
Step 4:
Now we can do the assignments. Starting with the first row (Salesman S1)
in table F.6, In this case 1st row has single zero and we encircle it and
marking cross on all other zeroes lying in the 3rd column. 3rd row has
single zero to be encircled, 2nd row and 4th row have no zeroes to be
encircled.. After, we obtained the resultant matrix i.e. Table F.6
Step 5:
Draw minimum number of lines to cover all the zeroes.
Step 6:
Select the minimum uncovered element from Table F.7 and subtract from
other uncovered elements and minimum uncovered element to the
elements where the two lines are intersecting. In this case minimum
uncovered element is 4. The following matrix (Table F.8) will be
obtained:
87
Assignment Model
Step 7:
Now we can do the assignments. Starting with the first row (Salesman S1)
in table F.9, In this case 1st row has single zero and we encircle it and
marking cross on all other zeroes lying in the 3rd column. 2nd row and 3rd
row has single zero to be encircled, and 4th row have no zeroes to be
encircled. After, we obtained the resultant matrix i.e. Table F.9
Step 8:
Draw minimum number of lines to cover all the zeroes.
Select the minimum uncovered element from Table F.10 and subtract from
other uncovered elements and add minimum uncovered element to the
elements where the two lines are intersecting. In this case minimum
uncovered element is 6. The following matrix (Table F.11) will be
obtained:
88
Mathematical Foundation Step 9:
for Computer Science 2
Now we can do assignments on zeroes of each row. Every row must
contain only one encircled zero.
Step 10:
The assignment schedule is given in the table F.13
89
Assignment Model
Step 1:
Choose the minimum element in each row and subtract it from every
element of that row. In this case, 12, 18, 22, 13 and 0 are minimum
element from 1st, 2nd, 3rd, 4th and 5th row respectively. In this way we get
row reduced matrix.
Step 2:
Choose the minimum element in each column and subtract it from every
element of that column. In this case, 0, 0, 0 and 0 are minimum element
from 1st, 2nd, 3rd and 4th column respectively. In this way we get column
reduced matrix.
90
Mathematical Foundation
for Computer Science 2
Step 3:
Consider Table G.6 and draw minimum number of lines to cover all the
zeroes. We can draw vertical or horizontal lines to cover all the zeroes.
Identify the smallest value which is not covered by any line (minimum
uncovered value).From table G.6,it is evident that minimum uncovered
value is 2, this value will be subtracted from all the uncovered values and
will be added to the values at the point of intersection (where the two
lines are intersecting) and the remaining values (covered values) will
remain the same. The resultant matrix is shown in the table G.7
Step 4:
Now we can do the assignments. Starting with the first row (Job 1) in table
G.8, we examine each rows until we found a row with single zero (Job 1).
In this case 1st row has single zero and we encircle it and marking cross on
all other zeroes lying in the first column. Now 2nd row and 3rd row has
single zero to be encircled but 4th row does not have zero to get encircled.
91
Assignment Model
Step 8:
Draw minimum number of lines to cover all the zeroes.
Identify the smallest value which is not covered by any line (minimum
uncovered value).From table G.9, it is evident that minimum uncovered
value is 1, this value will be subtracted from all the uncovered values and
will be added to the values at the point of intersection (where the two lines
are intersecting) and the remaining values (covered values) will remain the
same. The resultant matrix is shown in the table G.10
Step 9:
Now we can do assignments on zeroes of each row. Every row must
contain only one encircled zero.
92
Mathematical Foundation Table G.11 Machines
for Computer Science 2
Assignment Matrix
A B C D E
1 0 4 2 5 5
2 2 2 0 0 0
Jobs
3 0 0 0 M 3
4 8 6 6 4 0
Dummy 3 0 1 0 3
Step 10:
The assignment schedule is given in the table G.12
Table G.12
Assignment Schedule
Territory Cost
Jobs 1 A 12
2 C 21
3 B 25
4 E 13
Dummy D 0
Total 71
The matrix consist of 4 rows (W1, W2, W3, W4) and 4 columns (T1, T2,
T3, T4), since the number of rows and columns are equal, we can say that
matrix is balanced and of minimization (as cost is given) type.
Step 1:
Choose the minimum element in each row and subtract it from every
element of that row. In this case20, 10, 40 and 20 are minimum element
from 1st, 2nd, 3rd and 4th row respectively. In this way we get row reduced
matrix.
93
Assignment Model
Step 2:
Prepare a Column Reduced matrix by selecting a minimum element from
each column of Row Reduced matrix (Table F.4) and subtracting it from
each element of that column. The minimum elements from each column
are 24, 20, 0, and 164. The following matrix will be obtained (Table F.3)
Step 3:
Now we can do the assignments. Starting with the first row (Job 1) in table
F.4, we examine each rows until we found a row with single zero (W1). In
this case 1st row has single zero and we encircle it and marking cross on
all other zeroes lying in the 3rd column. Now 2nd row has choice of two
zeroes, we are selecting zero from 1st column (T1), 3rd row and 4th row has
single zero to be encircled. The assignment matrix is given in Table F.4
(A)
OR
1st row has single zero and we encircle it and marking cross on all other
zeroes lying in the 3rd column. Now 2nd row has choice of two zeroes, we
are selecting zero from 4th column (T4), 3rd row and 4th row has single
zero to be encircled. The assignment matrix is given in Table F.4 (B)
94
Mathematical Foundation
for Computer Science 2
Step 4:
The assignment schedule for Table F.4 (A) is:
OR
95
Assignment Model
Step 1:
Prepare a Row Reduced matrix by selecting a minimum element from
each row of given matrix and subtracting it from each element of that row.
The following matrix will be obtained (Table H.3).
Step 2:
Prepare a Column Reduced matrix by selecting a minimum element from
each column of Row Reduced matrix (Table H.3) and subtracting it from
each element of that column.
96
Mathematical Foundation
for Computer Science 2
Step 3:
Now we can do the assignments. Starting with the first row we obtained
the resultant matrix i.e. Table H.5
Step 4:
Draw minimum number of lines to cover all the zeroes.
Step 5:
Select the minimum uncovered element from Table H.6 and subtract from
other uncovered elements and minimum uncovered element to the
elements where the two lines are intersecting. In this case minimum
uncovered element is 10. The following matrix (Table H.7) will be
obtained:
97
Assignment Model
Step 6:
Draw minimum number of lines to cover all the zeroes.
Select the minimum uncovered element from Table H.9 and subtract from
other uncovered elements and minimum uncovered element to the
elements where the two lines are intersecting. In this case minimum
uncovered element is 20. The following matrix (Table H.10) will be
obtained
98
Mathematical Foundation Step 5:
for Computer Science 2
99
Assignment Model
4.5 SUMMARY
Assignment problem is a special case of transportation problem where
resources are allocated to equal number of activities to minimize the cost
or maximize the profit. A special method called Hungarian Method is used
to solve assignment problem. Hungarian Method is applied on a balanced
matrix i.e. number of resources and number of activities should be same.
If matrix is unbalanced, by introducing dummy row/column, a matrix can
be made balanced. Another type of assignment problem is Maximization
Problem (Profit/Revenue etc.) has to convert into minimization case by
creating regret matrix. In Prohibited case, no reduction or assignment can
be done in restricted cells.
4.5 REFERENCES
• Kapoor, V.K. and Kapoor, S. 2001. Operations Research Techniques
for Management. Sultan Chand and Sons, New Delhi.
• Sharma , S.D. 1999. Operations Research. Kedar Nath Ram Nath &
Co., Mereut.
• Swarup, K., Gupta, P.K. and Mohan, M. 1989. Operations Research.
Sultan Chand and Sons, New Delhi.
• Taha, H.A. 2005. Operations Research: An Introduction. Prentice Hall
of India Private Limited, New Delhi.
• Wagner, H.M. 1982. Principles of Operations Research, with
Applications to Management Decisions. Prentice Hall of India, New
Delhi.
100
Mathematical Foundation
for Computer Science 2 4.6 EXERCISE
Problem 1: Solve the following assignment problem to obtain optimal
solution.
A B C D
1 30 32 33 42
2 33 39 34 45
Employees
3 40 29 37 38
4 29 37 30 33
101
Problem 5: Solve the following assignment problem to obtain optimal Assignment Model
solution.
*****
102
UNIT IV
5
GAME THEORY
Unit structure
5.0 Objective
5.1 Introduction
5.2 Essential features of Game theory
5.3 Operating characteristics of Game theory
5.4 Classification of Game theory
5.5 Summary
5.6 References
5.7 Exercise
5.0 OBJECTIVE
After going through this chapter, students will able to:
● Understand the situation of conflict.
● Estimate the probabilities of earning profits by reducing the
probabilities of losses.
● Examine and solve the game theory problems using Maximin-
Minimax and dominance principle.
● Understand the key elements and underlying mathematical concepts
of game theory.
● Understand strengths and weaknesses of game theory.
5.1 INTRODUCTION
John Von Newman and Oscar Morgenstern developed the concept of
Game Theory in 1928. A game is a conflicting situation where two or
more than two players are involved. Game theory is a branch of Applied
Mathematics which provides devices to examine the situations where
players make decisions that are independent. The approach of game theory
to analyze the opponent’s best counter strategy to the one’s own best
strategy and to formulate the appropriate defensive measures. Game
theory deals with competitive situations of decision making under
uncertainty. A solution to game describes the optimal decisions of the
players, who may have similar, mixed or contrasts interest, and the
outcomes that may result from these decisions. The games can be
classified as two person and n person game, zero sum and non- zero sum
game, constant sum game, co-operative and non-cooperative games, pure
103
strategy and mixed strategy games etc. Any game in which the gains of the Game Theory
winners are equal the losses of losers is called a zero sum game. A game
in which there is a difference between the gains and losses is called a non-
zero sum game.
104
Mathematical Foundation 3) Payoff: Payoff is the outcome of a game. Payoff can be either gain,
for Computer Science 2
draw or loss. The payoff of a game depends upon the strategies or
course of action adopted by player. The tabular representation of
payoff of all players for all strategies gives payoff matrix.
If X and Y are two players playing a game and ‘r’ indicates the
strategies available to X and ‘n’ indicates the strategies available to Y,
then the size of payoff matrix will be r x n.
r = number of rows
n = number of columns
Interpretation:
⮚ There are two players X and Y playing a game.
⮚ X has two alternatives or strategies and Y has three alternatives or
strategies.
⮚ Elements such as 4, 7, 6 and -3, 5,-4 represents the payoff. When
player X opts for strategy I and player Y also opts for strategy I, then
payoff to X is 4. In short, the gain for player X will be of 4 units and
loss of 4 units to player B. If X opts for strategy II and player Y opts
for strategy I, then payoff to X is -4. So in this case , the gain for
player Y will be of 4 units and loss of 4 units to player X ( loss of X
and gain of Y).In other words we can say that positive values
indicates gain of player X and loss to player Y and vice versa.
4) Row Minima: The minimum payoff value from each row is Row
Minima. From Table A.1:
Row Minima for player X:
Row 1: 4
Row 2:-4
5) Column Maxima: The maximum payoff value from each column
will be Column Minima. From Table A.1:
Column Maxima for player Y:
Column 1 Column 2 Column 3
4 7 6
105
6) Maximin: Selecting the maximum value out of Row Minima. For Game Theory
player X (Row Minima are 4 and -4) maximin is 4.
7) Minimax: Selecting the minimum value out of Column Maxima.
For player Y (Column Maxima are 4, 7, 6) minimax is 7.
8) Saddle Point: The saddle points occurs when minimax of rows and
maximin of columns are equal in a payoff matrix.
Minimax of Row = Maximin of Column
9) Optimal Strategy: A strategy or course of action that puts a player
in a preferred position irrespective of the strategies followed by
opponents or competitors is called optimum strategy.
10) Value of the game: The expected outcome per play when players
follow their optimal strategies is called value of the game. The game
is fair if the value of game is zero and if the value of game is not
zero then game is considered as unfair.
11) Two-Person Zero-Sum Game: In a game, two persons or
competitors are involved where the gain of one player is equal to the
loss of another player. The payoff matrix is rectangular in form, so
two-person-sum-game is also called as react angular game or matrix.
There are two types of two-person-sum-game, if most preferred
position obtained by adopting single strategy by players then game
is called as pure strategy game and if most preferred position
obtained by adopting mixed strategies by players then game is called
as mixed strategy game. If n-person are playing and the sum of the
game is zero then such game is called as n-person –zero sum game.
The features of two-person-sum-game are:
⮚ Only two players are involved.
⮚ Each player has a finite number of strategies to use.
⮚ Each strategy results in a payoff.
⮚ Each payoff results in a payoff matrix.
⮚ Total payoff at the end of game of two-person-sum-game is always
zero.
106
Mathematical Foundation The objective of player A is to maximize his minimum gains and this
for Computer Science 2
strategy is called as maximin strategy and his corresponding gains are
called as maximin or lower value of the game. On the other hand the
strategy of player will be minimize the maximum losses incurred to him
during game. This strategy adopted by player B is called as minimax
strategy and his corresponding loss are called as minimax or upper value
of the game.
When minimax value = maximin value, we get a saddle point or
equilibrium point and the value of the game is given by this saddle point.
If maximin value = minimax value =0, then game is called as fair game
and if maximin value = minimax value ≠ 0 then game is said to be strictly
determinable.
The steps involved in finding the saddle point is:
⮚ Select a minimum element from each row and write down under the
heading of Row Minima heading prepare at the right side of matrix)
and ring the largest of them..
⮚ Select a maximum element from each column and write down under
the heading of Column Maxima heading prepare at the down side of
matrix) and ring the smallest of them.
⮚ If these two ringed elements are same, the cell corresponds to
intersection of row and column is a saddle point. The element in the
cell will be the value of the game.
⮚ If there are more than one saddle points then there will be more than
one solution.
⮚ If these two ringed elements are not same, there will be no saddle
point.
Problem 1: Find the optimal strategies for player A and player B in the
following game. Also find the value of the game.
Solution:
From each row, select minimum payoff value (Row Minima).
From each column, select maximum payoff value (Column Maxima).
107
Game Theory
Solution:
From each row, select minimum payoff value (Row Minima).
From each column, select maximum payoff value (Column Maxima).
108
Mathematical Foundation Minimax Value = 18.
for Computer Science 2
Thus, Maximin Value = Minimax Value = 18.
The matrix has a saddle point in a cell (A3, B3).
Value of the game = 18.
Thus the optimal strategy for A = A3 (0, 0, 1, 0, 0)
Thus the optimal strategy for B = B3 (0, 0, 0, 1, 0)
Problem 3: Find the optimal strategies for player A and player B in the
following game. Also find the value of the game.
Solution:
From each row, select minimum payoff value (Row Minima).
From each column, select maximum payoff value. (Column Maxima)
109
Game Theory
Solution:
From each row, select minimum payoff value (Row Minima).
From each column, select maximum payoff value (Column Maxima).
Principle of Dominance:
If pure strategies does not exist, the next step is reduce the size of matrix
by eliminating a course of action (rows/columns) by the rule of
dominance.
Rule1: If all the elements of a row say pth are less than or equal to
corresponding elements of another row say qth row, it indicates that pth
row is dominated by qth row. Delete the dominated row.
Rule2: If all the elements of a column say pth are less than or equal to
corresponding elements of another column say qth column, it indicates that
pth column is dominated by qth column. Delete the dominated column.
Problem 5: Find the optimal strategies for player A and player B in the
following game. Also find the value of the game.
110
Mathematical Foundation
for Computer Science 2
Solution:
In the game, row A1 is dominated by row A3, eliminating row A1, the
reduced matrix is given below:
In the game, row A2 is dominated by row A3, eliminating row A2, the
reduced matrix is given below:
111
(A3, B2) is the saddle point. Hence, the value of the game is 24 as it Game Theory
represents the best pay-off for both the players.
Problem 6: Find the optimal strategies for player A and player B in the
following game. Also find the value of the game.
Solution:
112
Mathematical Foundation In the game, column B4 is dominated by column B5, eliminating B4, the
for Computer Science 2
reduced matrix is given below:
(A2, B3) is the saddle point. Hence, the value of the game is 14 as it
represents the best pay-off for both the players.
Problem 7: Find the optimal strategies for player A and player B in the
following game. Also find the value of the game.
Solution:
In the game, column IV is dominated by column II, eliminating IV, the
reduced matrix is given below:
113
In the game, row B is dominated by row C, eliminating row B, the reduced Game Theory
matrix is given below:
5.5 SUMMARY
The game theory is a branch of Applied Mathematics devised to make
decisions in complex circumstances. Game theory has been widely used in
Social Sciences, Biology, and Economics and in Engineering, Political
Science etc. Game theory is the mathematical study of strategy and
conflict, where a player success depend in making choices depends on the
choice of other. The game theory module explains the concept of
competitive situations, strategy, course of action, payoff etc. The module
also explains the maximin-minimax principle, saddle point and principle
of dominance etc.
5.6 REFERENCES
Kapoor, V.K. and Kapoor, S. 2001. Operations Research Techniques for
Management. Sultan Chand and Sons, New Delhi.
Sharma , S.D. 1999. Operations Research. Kedar Nath Ram Nath & Co.,
Mereut.
Swarup, K., Gupta, P.K. and Mohan, M. 1989. Operations Research.
Sultan Chand and Sons, New Delhi.
Taha, H.A. 2005. Operations Research: An Introduction. Prentice Hall of
India Private Limited, New Delhi.
Wagner, H.M. 1982. Principles of Operations Research, with Applications
to Management Decisions. Prentice Hall of India, New Delhi.
114
Mathematical Foundation
for Computer Science 2 5.7 EXERCISE
Problem 1: Solve the following 2 × 2 game
*****
115
6
DECISION THEORY
Unit structure
6.0 Objectives
6.1 Introduction
6.2 Elements of Decision Making Problem
6.3 Types of Decision Making Environments
6.4 Decision Making Under Risk
6.5 Decision making Under Uncertainty
6.6 Summary
6.7 References
6.8 Exercise
Self Learning Topics: Decision tree for decision-making problem.
6.0 OBJECTIVES
After going through this chapter, students will able to:
● Understand the decision making process
● Describe a decision problem in terms of decision alternatives, state of
nature and payoffs
● Construct a payoff table and an opportunity loss table.
● Use payoff tables to analyze decision problems
● Understand the types of decision making environment
● Describe the decision environments of certainty and uncertainty
6.1 INTRODUCTION
Decision theory is used to determine optimal strategies among the several
decision alternatives. While performing various management
functionalities like planning, organizing, directing, coordinating and
controlling, manager has to take several decisions. Manager has to take the
decision under uncertain, risky conditions. We may define Decision theory
as a process, which results in the selection from set of alternative courses
of action, that course of action, which is considered to meet the objectives
of the decision problem.
The decision taken by the manager decide the future of business, right
decisions will have beneficial effect while the wrong ones may prove to be
unsuccessful. Therefore, it is important to choose the appropriate decision.
Decision theory provides a rational approach to the managers in dealing
116
Mathematical Foundation with the problems challenged with partial, imperfect or uncertain future
for Computer Science 2
conditions.
Eg. State of nature is the level of market demand for a particular item
during stipulated time period.
117
Following table shows the general form of Payoff Table: Decision Theory
118
Mathematical Foundation interest of 3 percent and another one is to invest in fixed deposit with 5.5
for Computer Science 2
percent rate of interest. If both alternatives are secure and guaranteed, then
there is a certainty that fixed deposit is better alternative.
The various techniques used for solving problems under certainty are:
i. System of equations
ii. Linear programming
iii. Integer programming
iv. Dynamic programming
v. Queuing models
vi. Inventory models
2. Decision making under risk: In this environment, the decision
maker is aware of all the possible states of nature but does not know
their occurrences with certainty. Decision maker knows or can
estimate the probabilities of their occurrences. This is based on his
experience or on the theoretical probability distributions of the states.
3. Decision making under uncertainty: In this environment, more than
one states of nature exist but the decision maker lacks sufficient
knowledge to allow him assign probabilities to the various states of
nature.
4. Decision making under conflict: In this environment, two or more
opponents with conflicting objectives try to make decisions with each
trying to gain at the cost of the others.
119
2. List the conditional payoff values and corresponding probabilities of Decision Theory
the occurrences of each state of nature.
EMV (Si) =
States
A1 A2 A3
Strategies Probabilities of States
0.4 0.5 0.1
S1 15 13 -12
S2 20 10 5
S3 35 -15 7
EMV (Si) =
120
Mathematical Foundation Example 2:
for Computer Science 2
States
A1 A2 A3
Strategies Probabilities of States
0.4 0.5 0.1
S1 15 13 -12
S2 20 10 5
S3 35 -15 7
121
Example 3: Select the best strategy to maximize the payoff for following. Decision Theory
122
Mathematical Foundation Q -8 24 25 -4 25
for Computer Science 2
R 28 12 0 16 28
S 20 -18 25 8 25
123
Regret = Largest payoff - Payoff for the strategy Decision Theory
IV. Find out the minimum regret from these maximum regrets
Solution: First find out the regrets for each state of nature as:
Regret = Largest payoff - Payoff for the strategy
For A1, Largest payoff is 25.
States of Maximum
A1 A2 A3 A4
Nature Regret
S1 0 30 90 50 90
S2 15 0 0 0 15
S3 5 30 90 30 90
S4 10 50 120 90 120
124
Mathematical Foundation
for Computer Science 2
Minimum regret among all the maximum regret is 15 corresponding to
strategy S2. Hence strategy S2 is optimal strategy.
(1 - ) = 1 – 0.6
= 0.4
States of Courses of Action Maximum Minimum P=
Nature of Row of Row maximum +
A1 A2 A3 A4
(1- )
minimum
S1 25 40 60 80 80 25 58
S2 10 70 150 130 150 10 94
S3 20 40 60 100 100 20 68
125
S4 15 20 30 40 40 15 30 Decision Theory
Si = [P1 + P2 + …. + Pn],
6.6 SUMMARY
126
Mathematical Foundation Decision theory is used to determine optimal strategies among the several
for Computer Science 2
decision alternatives. The decision maker analyzes the possible outcomes
resulting from his available alternatives in two dimensions: value (by
means of utility theory) and probability of occurrence. He/she always
selects the alternative that he expects to have the highest value. Decision
Theory suggests the decision maker to trust more strongly than ever on his
own preferences and judgments. Decision theory provides a rational
approach to the managers in dealing with the problems challenged with
partial, imperfect or uncertain future conditions.
6.7 REFERENCES
Books:
1. Operations Research Techniques for Management – V. K. Kapoor
2. Operations Research – Prem Kumar Gupta and D. S. Hira
3. Quantitative Techniques in Management – Vohra
Website:
http://www3.govst.edu/kriordan/files/mvcc/math212/ppt/pdf/ch18ppln.pdf
https://gurunanakcollege.edu.in/files/commerce-
management/STATISTICS-UNIT-5.pdf
6.8 EXERCISE
Exercise 1: Calculate Expected Monetary Value and Expected Value with
Perfect Information for following.
a)
States
N1 N2 N3 N4 N5
Probabilities of States
Strategies
0.10 0.15 0.20 0.25 0.30
S1 150 120 110 60 30
S2 150 170 140 110 80
S3 150 170 190 160 130
S4 150 170 190 210 180
S5 150 170 190 210 230
States
A1 A2 A3 A4
Strategies Probabilities of States
0.10 0.20 0.40 0.30
S1 60 45 40 35
S2 60 50 35 40
S3 60 50 45 50
S4 60 50 45 55
127
Decision Theory
b)
Exercise 2: Consider the following pay off matrix. Determine best
alternative using maximax criterion, maximin criterion and Minimax
Regret Criterion.
a)
b)
c)
d)
128
Mathematical Foundation 2. Maximax Criterion
for Computer Science 2
3. Minimax Regret Criterion
4. Laplace Criterion
a)
b)
*****
129
UNIT V
7
SIMULATION
Unit Structure
7.1 Objective
7.2 Introduction to Simulation
7.3 Basic Terms
7.4 Model of a system
7.4 A) Physical Model
7.4 B) Mathematical Model
7.5 Steps in Simulation
7.6 Advantages of simulation
7.7 Disadvantages of simulation
7.8 Application of simulation
7.9 Monte Carlo Method
7.9.1. Steps of Monte Carlo Method
7.9.2. Example of Monte Carlo Method
7.10 Queuing
7.10.1[M/M/1]:{//FCFS} Queue System(Single Channel Queuing
System)-
7.10.2. Example of single server queue
7.11 List of Reference
7.1 OBJECTIVE
This chapter would make you understand the following concepts:
What is simulation and discuss various model of simulation.
With the help of simulation step how to solve problem.
Discuss Advantages and disadvantages and application of simulation.
Definition and step of Monte Carlo Method
130
Mathematical Foundation use a computer to evaluate model numerically and data are gathered in
for Computer Science 2
order to estimate the desired true characteristics of the model.
Example of Simulation: Human Patient Simulator (HPS) use by trainee
to practice of surgery before doing actual. On HPS perform demonstration
of new drugs and new equipment by pharmaceutical and medical
equipment companies. It is beneficial in medical college to teach basic
skill in medical science. All trainee fill practical standard in a controlled,
safe and even enjoyable environment.
Example-Bank System:
State- Number of customer waiting in the queue for opening account, first
customer done process and next customer arrived time start.
131
Event-Instantaneous occurrence that may change the state of the Simulation
system.
There are mainly five types:
1) Endogenous system 2) Exogenous system 3) Open system 4) Closed
system 5) Discrete system 6) Continuous system
1) Endogenous system-In this system activity and events occurring
within a system.
2) Exogenous system- In this system activity and events outside the
system boundary i.e those variables in the environment, which affect
the system.
3) Open system-It is a system, which has an exogenous activity.
4) Closed system- It is a system, which does not have any exogenous
activity.
5) Discrete system-State of variable change only at a discrete set of
point.
6) Continuous system-State of variable change continuously over time.
This model used for mechanical & electrical and hydraulic system.
Physical model represent, representation of an object of interest which
shows how the object looks and how well it performs in the real
world.
132
Mathematical Foundation The system attribute are reflected in the physical laws that derive the
for Computer Science 2
model.
Steps are:
1. Problem formulation:
The initial step involves defining the goals of the study and determine
what needs to be solved. The problem is further defined through objective
observations of the process to be studied. Care should be taken to
determine if simulation is the appropriate tool for the problem under
investigation.
3. Model conceptualization:
How the actual system behaves and determining the basic requirements of
the model are necessary in developing the right model. Creating a flow
chart of how the system operates facilitates the understanding of what
variables are involved and how these variables interact.
133
Simulation
4. Data collection:
In this step collect the data necessary to run the simulation. This data is
collected according to system layout and operating procedures.
5. Model translation:
Translate a model to programming language or simulation software to
create simulation.
6. Verification:
In this step the semantics and syntax of the model.
7. Validation:
Validation ensures that no significant difference exists between the model
and the real system and that the model reflects reality. Repeat this process
until model accuracy is reached to the acceptable level. Validation can be
achieved through statistical analysis.
8. Experimental design:
Experimentation involves developing the alternative model(s), executing
the simulation runs, and statistically comparing the alternative(s) system
performance with that of the real system. For each scenario that is to be
simulated, decisions need to be made concerning the length of the
simulation run, the number of runs (also called replications), and the
manner of initialization, as required.
10. Repetition:
On the basis of analysis of runs completed in previous steps, the analyst
determine if additional runs are required or not. If additional runs are
required then what design experiments it should follows.
12. Implementation:
134
Mathematical Foundation The success of implementation phase completely depends upon how well
for Computer Science 2
the previous all steps are performed. If the client has been involved
throughout the study period, and the simulation analyst has followed all of
the steps rigorously, then the likelihood of a successful implementation is
increased.
135
9. In many system actual environment is not possible that time Simulation
simulation help to create environment to perform task first virtually.
E.g. Nuclear explosion simulation system.
10. Decision making problem are too complex to be solved by
mathematical programming.
11. Simulation relative free from mathematics can easily be understood
by the operating personal and non-technical situation.
12. Simulation model are comparatively flexible and modified
environment according to real situation.
136
Mathematical Foundation
for Computer Science 2 7.9 MONTE CARLO METHOD
Monte Carlo simulation is a powerful method for studying the
behavior of a system, as expressed in a mathematical model on a
computer.
Simulation the dentist clinic for four hours and find out average waiting
time the patients as well as the idleness of the doctors. Assume that all the
patients show up at the clinic at exactly their schedule arrival.
137
Use the following random number for handling the above problem Simulation
40, 82,11,34,25,66,17,79.
Solution:
To solve the problem using Monte Carlo break down problem into five
steps:
1. Establishing probability distribution
2. Cumulative probability distribution
3. Setting random number interval
4. Generating random number
5. To find the answer of question asked using the above four steps.
To solve above problem follows the steps
138
Mathematical Foundation Step 4-Generating Random number and prepared table:
for Computer Science 2
Patient Scheduled Random Category Service time
Arrival Number needed
1 8:00 40 Crown 60 min
2 8:30 82 Checkup 15 min
3 9:00 11 Filling 45 min
4 9:30 34 Filling 45 min
5 10:00 25 Filling 45 min
6 10:30 66 Cleaning 15 min
7 11:00 17 Filling 45 min
7.10 QUEUING
A queuing system consists of one or more servers that provide service of
some sort to arriving customers. Customers who arrive to find all servers
busy generally join one or more queues (lines) in front of the servers,
hence the name queuing systems such as bank-teller service, computer
systems, manufacturing systems, maintenance systems, communications
systems and so on Common to all of these cases are the arrivals of objects
requiring service and the attendant delays when the service mechanism is
busy.
Basic Terminology:
Queuing Model
It is a suitable model used to represent a service-oriented problem, where
customers arrive randomly to receive some service, the service time being
also a random variable.
Arrival
The statistical pattern of the arrival can be indicated through the
probability distribution of the number of the arrivals in an interval.
139
Service Time Simulation
Queue Discipline
It is the order in which the members of the queue are offered service. i.e, It
is the rule accordingly to which customers are selected for service when
queue has been formed. The most common disciplines are:
1. First come First Services (FCFS)
2. First in First Out (FIFO)
3. Last in First Out (LIFO)
4. Selection for service in Random Order (SIRO)
140
Mathematical Foundation 2. Analyze arrival rates
for Computer Science 2
3. Determine queue capacity
4. Determine size of source population
5. Choose model from SINGLEQ worksheet.
Single-server equations:
Arrival rate = ë
Service rate = ì
Mean number in queue = ë2/(ì(ì-ë))
Mean number in system = ë /(ì-ë)
Mean time in queue = ë /(ì(ì-ë))
Mean time in system = 1/(ì-ë)
Utilization ratio = ë /ì
Average Utilization is
141
Average Number of Student in the System, and in Line is Simulation
Key Formulas:
B9: =1/B5
B10: =1/B6
B13: =B5/B6
B14: =1-B13
B15: =B5/(B6-B5)
B16: =B13*B15
B17: =1/(B6-B5)
B18: =B13*B17
B22: =(1-B$13)*(B13^B21)
142
Mathematical Foundation
for Computer Science 2
143
Web References: Simulation
*****
144
8
QUEUING MODELS
Unit structure
8.0 Objective
8.1 Introduction
8.2 Essential features of Queuing Systems
8.3 Operating characteristics of Queuing System
8.4 Classification of Queuing Models
8.4.1 M/M/1: 1/FCFS
8.4.2 M/M/1: N/FCFS
8.5 Summary
8.6 References
8.7 Exercise
Self-Learning Topics: Understanding Kendle‟s notation in queuing
theory.
8.0 OBJECTIVES
After going through this chapter, students will able to:
● Know the examples of various queuing system structures.
● Understand the key elements and underlying mathematical concepts
queuing models.
● Discuss various operating characteristics of queuing system
● Examine and solve the single-server queuing model and multiple-
server queuing model problems.
● Understand economic trade-offs associated with designing and
managing queuing systems.
● Understand strengths and weaknesses of Queuing Models.
8.1 INTRODUCTION
Queuing Theory is a branch of mathematics that studies how lines form,
how they function and why they malfunction. It is essential to the study of
how people behave when they have to wait in line to make a purchase or
receive a service. Also what sort of queue structure is required to move
people most efficiently. Queue form because resources are limited. For
example how many supermarkets required in a particular area to avoid
queuing, how many buses or trains needed if queues were to be avoided?
A Queuing model is created in order to anticipate queue length and
waiting time. Queuing model was first developed by a Danish engineer A.
145
K. Erlang. He considered the problem of determining how many telephone Queuing Models
circuits were necessary to provide for a service that would prevent
customers from waiting too long for an available circuit. In designing
queuing systems we need to aim a balance between service to customers
and economic considerations (not too many servers).
In short we can say that whenever there is service to be provided and there
are individuals/items/unit needing that service, we usually find a line
formed of units waiting for the service. Such a waiting line is called a
Queue.
Following are few examples of queue:
1. Railway Ticket Booking
2. Bank counter
3. Toll Gate
4. Library
5. Airport
6. Maintenance shop
146
Mathematical Foundation cheque to the cashier for payment. Such Queues are called Queue in
for Computer Science 2
Jordan.
147
Service Rate: The rate (customers per unit of time) at which one service Queuing Models
channel can perform the service. The mean service rate is denoted by µ
(number of customers per unit of time). We can use the term departure rate
also.
Probability distribution of arrival and departure service straight
through one service channel: The number of arrivals per unit of time and
number of units (customers) served by the service channel follows some
probability distribution. It is assumed that arrival pattern and service
pattern are independent.
Note 1: The most common probability distribution to describe arrival and
departure (service) pattern is Poison (also called Markorians denoted by
M).
Note 2: If number of occurrences (number of customers arriving per unit
of time or number of customer serviced per unit of time) follow a poison
distribution then inter arrival time (time between two successive arrivals)
and the service time follow exponential distribution.
148
Mathematical Foundation C. Notation of a Queuing System: (P/Q/R: (X/Y/Z))
for Computer Science 2
Where,
P = Arrival pattern probability distribution.
Q = Service pattern exponential distribution.
R = Number of servers / number of service channels
X = Source discipline (FCFS, LCFS etc)
Y = Maximum number of customers permitted in the system
Z = size of source (population of customers)
P = Poisson,
Q = Poisson,
R = k services
X = First come first serve (FCFS)
Y = System capacity is infinite (any number of customers can arrive)
Z = size of the source population is infinite i. e. the possible number of
customers are infinite.
2. (M/M/k): (GD/∞/∞)
3. (M/M/1): (GD/N/∞)
4. (M/M/k): (GD/N/∞)
5. (M/M/1): (GD/N/N)
6. (M/M/k): (GD/N/N)
The following are the following are the assumptions to be made in this
type of model:
149
3. Arrival rate and service rate are both independent of the number of Queuing Models
customers in the waiting line.
Remarks:
1. The average waiting time indicates waiting time in queue not in
system unless specified.
2. Probability that a service channel is busy or utilization factor for the
system, ρ = λ / µ
Problem 1: A self-serviced cafeteria manned by single cashier. During
peak hours, customers arrive at a rate of 24 customer per hour. The
average number of customer that can be serviced by cashier is 28 per hour.
Calculate:
i. The probability that cashier is idle.
ii. The average number of customers in the queuing system.
iii. The average time a customer spends in the system.
iv. The average number of customers in the queue.
v. The average time a customer spends in the queue waiting for service.
Solution:
According to the given information
Po = 1 - =1- = 0.143
ii. The average number of customers in the queuing system.
Ls =
= =6
ii. The average time a customer spends in the system.
Ws =
= hour or 15 minutes
Lq =
= 5.142
iv. The average time a customer spends in the queue waiting for service.
151
iv. The average time a customer has to spend in the system. Queuing Models
Solution:
According to the given information:
Lq =
= customer
Ls =
= customer
= hour
Ws =
= hour
152
Mathematical Foundation Problem 3: Customers arrives at a certain airline reservation booking
for Computer Science 2
counter manned by a single clerk at a rate of 6 per hour, assuming arrival
of customer follows Poisson distribution. The clerk can serve a customer
on an average of 4 minutes, with an exponentially distributed service time.
Calculate:
i. What is the probability that the system is busy?
ii. What is the average time a customer spends in the system?
iii. What is the average length of the queue?
iv. What is the number of customer in the system?
Solution:
According to the given information:
Ws =
= hour
Lq =
= customer
153
iv. What is the number of customer in the system? Queuing Models
Ls =
= customer
Lq =
= customer
Ls =
= customer
154
Mathematical Foundation iii. The average time a customer has to wait in queue.
for Computer Science 2
= hour
Ws =
= hour
Solution:
According to the given information:
155
ii. The expected number of customer in the barber’s shop? Queuing Models
Ls =
= hour
Ws =
= hour
This model is different from model 1, this model is applicable for when
the queue can accommodate only a limited number of customers or the
maximum number of customers in the system is limited to N. New arrivals
can join the queue only if space is available, otherwise leaves the queue
without joining the queue. For the queuing system, the arrival rate of
customer follows Poisson distribution and are served on the basis of first
come first served, service rate follows exponential distribution. Arrivals
are from infinite population and forms finite queue length.
Example for this model are queue formation at cinema ticket counter,
clinics, petrol filling pumps etc.
1. Probability of zero customer in the queue system:
Po = .
156
Mathematical Foundation 2. Probability of n customer in the queue system:
for Computer Science 2
n
Pn = (λ / µ ) .Po 0 < n ≤ N.
Lq =
Ls =
Ws = where λ’ = λ (1-Pn).
7. Wq =
Problem 4: At a railway station only one train can stand at a time. The
railway yard can accommodate only two trains to wait and other trains if
there were given a signal to leave. Arrivals of trains follows Poisson
distribution at an average rate of 6 per hour. The railway yard can
accommodate on an average of 12 trains per hour. Assuming exponential
service distribution, find the steady state probabilities for the various
number of trains in the system.
Solution:
According to the given information:
Po =. = =0.53
157
Probability of 3 trains in the queue system: Queuing Models
n
Pn = (λ / µ ) .Po
Ls =
Solution:
According to the given information:
Po =. =
= =
= = 0.01551
158
Mathematical Foundation P1 = (2.5) (0.01551) =0.038775; P2 = (2.5)2 (0.01551) =
for Computer Science 2
0.0969375;
P3 = (2.5)3(0.01551) = 0.24234375; P4 = (2.5)4(0.01551) =
0.605859375
Average number of trains in the queue system:
Ls =
8.4 SUMMARY
A queuing theory is a branch of mathematics that answers how queues are
formed? How it works? and discusses about the mathematical analysis of
queuing process . Queuing theory examines every aspect of queue process,
including arrival process, service process, and number of servers, number
of customers and number of system.
A real life applications of queuing theory finds helpful in wide range of
business. It helps in maintaining traffic flow, faster and improved
customer services, scheduling and managing inventory, streamline staffing
needs etc.
8.5 REFERENCES
Books:
1. Operations Research Techniques for Management – V. K. Kapoor
2. Operations Research – Prem Kumar Gupta and D. S. Hira
3. Quantitative Techniques in Management – Vohra
Websites:
https://www.csus.edu/indiv/f/freemand/chapter%2018%20objectives.htm
https://edge.sagepub.com/venkataraman/student-resources/module-
c/learning-objectives
https://docplayer.net/18444783-Queuing-analysis-chapter-outline-
learning-objectives-supplementary-chapter-b.html
8.6 EXERCISE
Problem 1: The arrival rate of customer in a bank on an average is 15/hr
under Poisson law. The teller of a bank can serve one customer in 3
minutes under exponential law. Find:
i. The probability that teller is busy.
159
ii. The average number of customers in the queuing system. Queuing Models
160
Mathematical Foundation c = number of parallel service channels in the system
for Computer Science 2
d = service discipline
e = maximum number of customer allowed in the system
f = calling source or population
M = Markovian arrival or departure distribution
Ek = Erlangian service time distribution with parameter k
GI = general independent arrival distribution
G = general departure distribution
D = deterministic interarrival or service times
FCFS = first come first served
LCFS = last come first served
SIRO = service in random order
GD = general service discipline
*****
161