Co 3

Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

Module-3

Game Theory

Game theory is a mathematical subject that explains how a game


should be played. It determines logical as well as mathematical
actions that should be taken by the players to obtain the best possible
outcomes for themselves in the games.
To understand the game theory, we need to learn the basic
terminologies.

Two-person zero-sum games

When there are only two players in the game then it is called two-person
game. A simple bet between two people is the common example of two
person games.
If the loss of one player results in the gain of another player, that type of
game is known as zero-sum game.
Now, if there are two players in a zero-sum game then the game will be
called two-person zero-sum game. It is also known as rectangular game.
For example, two coins are tossed and the payment values are given in the
matrix form below
Player B
H T
H 1 -1
Player A
T -1 1

Aashish Sharma
(This above matrix is called as pay-off matrix)
From the matrix, we can see that when the outcome is HH or TT player A
is winning and when the outcome is HT or TH, player B is winning.

Strategies
When the players have different alternatives in front of them to play the
game, these alternatives are called strategies. There are basically two types
of strategies: -
Pure Strategy: - When the player has only single alternative to play, it is
called pure strategy. (Saddle point exist)
Mixed Strategy: - If several alternatives with different values are used to
play the game, it is called mixed strategy. (Saddle point does not exist)

Pay-off Matrix

Suppose the player A has 𝑖 different strategies and player B has 𝑗 different
strategies, the pay-off matrix can be formed by the following rules: -
1. Rows will tell us about the strategies available to player A.
2. Columns will tell us about the strategies available to player B.
3. Any cell in the matrix is pay-off value from player A to B which
means this is player A’s pay-off matrix
4. In zero-sum two-person game, the pay-off matrix for player B can be
written by taking the negative of all corresponding values from player
A pay-off matrix.

For example,
The matrix below is pay-off matrix for player A

Aashish Sharma
𝐵1 𝐵2 … 𝐵𝑗
𝐴1 𝑎11 𝑎12 … 𝑎1𝑗
𝐴2 𝑎21 𝑎22 … 𝑎2𝑗
… … … … …
𝐴𝑖 𝑎𝑖1 𝑎𝑖2 … 𝑎𝑖𝑗

Then, the pay-off matrix for player B will be


𝐵1 𝐵2 … 𝐵𝑗
𝐴1 −𝑎11 −𝑎12 … −𝑎1𝑗
𝐴2 −𝑎21 −𝑎22 … −𝑎2𝑗
… … … … …
𝐴𝑖 −𝑎𝑖1 −𝑎𝑖2 … −𝑎𝑖𝑗

Basically, writing the payments of different strategies in matrix form is


called pay-off matrix.
An example to understand the concept more clearly
𝐵1 𝐵2 𝐵3
𝐴1 6 8 10
𝐴2 4 12 2
Here, player A have two strategies and player B have three strategies.

Saddle Point

A saddle point (𝑟, 𝑠) of a pay-off matrix is the position of an element with


minimum value in its row and maximum in its column.

Aashish Sharma
Mathematically, if the pay-off matrix is such that
max(min 𝑎𝑖𝑗 ) = min(max 𝑎𝑖𝑗 ) = (𝑟, 𝑠)
𝑖 j 𝑗 𝑖

Then the matrix is said to have saddle point. A saddle point determines the
optimum strategy of the game.

Value of the Game


The final pay-off to player A is called the value of the game. If any player
deviates from the optimum strategy, he/she will be in loss.

Maximin/Minimax Principle

Maximin/Minimax principle is used to find the saddle point of the pay-off


matrix in the game.
Procedure to determine the saddle point: -
Step 1: - Choose the minimum values from each row and write them in the
right of the pay-off matrix. (𝛼𝑖 )
Step 2: - Choose the maximum values from each column and write them
below the pay-off matrix. (𝛽𝑗 )
Step 3: - Identify the maximum value of 𝛼𝑖 and minimum value of 𝛽𝑗 . If
both values are same, then we can conclude that saddle point exist.
Step 4: - When saddle point does not exist, we use different strategies to
find the value of the game.

Using the principle to find the saddle point of an example.

Example 1: - The given table below shows the strategies available for
player A and B. Find the optimum value of the game.

Aashish Sharma
𝐵1 𝐵2 𝐵3
𝐴1 6 8 10
𝐴2 4 12 2

Solution: - The optimum value of the game can be found by finding the
value of saddle point
Step 1: - Choose the minimum values from each row and write them in the
right of the pay-off matrix. (𝛼𝑖 )
𝐵1 𝐵2 𝐵3 𝛼𝑖
𝐴1 6 8 10 6
𝐴2 4 12 2 2

Step 2: - Choose the maximum values from each column and write them
below the pay-off matrix. (𝛽𝑗 )
𝐵1 𝐵2 𝐵3 𝛼𝑖
𝐴1 6 8 10 6
𝐴2 4 12 2 2
𝛽𝑗 6 12 10 -

Step 3: - Identify the maximum value of 𝛼𝑖 and minimum value of 𝛽𝑗 . If


both values are same, then we can conclude that saddle point exist.
𝐵1 𝐵2 𝐵3 𝛼𝑖
𝐴1 6 8 10 6
𝐴2 4 12 2 2
𝛽𝑗 6 12 10 -

The maximum value of 𝛼𝑖 = 6 (lower value of game)


The minimum value of 𝛽𝑗 = 6 (upper value of game)

Aashish Sharma
Both the values are same, the saddle point will be (1,1). The value of the
game will be 6.

Example 2: - Consider a problem of military operations between two


countries A and B. While country A has three kinds of aircrafts
𝐴1 , 𝐴2 𝑎𝑛𝑑 𝐴3 , country B has three kinds of aircraft 𝐵1 , 𝐵2 𝑎𝑛𝑑 𝐵3 . Country
A goal is to hit the enemy aircraft and country B goal is to avoid getting hit.
The probabilities of the aircraft getting hit is given in the table below.
Determine the lower and upper values of game with saddle point.
𝐵1 𝐵2 𝐵3
𝐴1 0.9 0.4 0.2
𝐴2 0.3 0.6 0.8
𝐴3 0.5 0.7 0.2

Dominance Property
Dominance property states if any strategy in pay-off matrix dominates the
other strategy, the dominated strategy can be ignored.
Matrix reduction: - Sometimes the size of pay-off matrix is very large.
You can reduce the pay-off matrix using dominance property.
The dominance rule for rows implies that every entry in the dominating row
must be greater than or equal to the corresponding entry of dominated row.
The dominance rule of column implies that every entry in the dominating
column should be less than or equal to the corresponding entry of the
dominated column.

The steps used to reduce the pay-off matrix by dominance principle are as
follows: -
Step 1: - Construct the pay-off matrix

Aashish Sharma
Step 2: - Use dominance principle of rows and column to reduce the matrix

Example 3: - Reduce the following pay-off matrix using the principle of


dominance.
𝐵1 𝐵2 𝐵3 𝐵4
𝐴1 2 3 11 8
𝐴2 7 5 2 7
𝐴3 6 4 -4 -9
Solution: -
Step 1: - Construct the pay-off matrix
𝐵1 𝐵2 𝐵3 𝐵4
𝐴1 2 3 11 8
𝐴2 7 5 2 7
𝐴3 6 4 -4 -9

Step 2: - Use dominance principle of rows and column to reduce the matrix
For the strategies 𝐴2 and 𝐴3 , all the values of row 𝐴2 are greater than the
corresponding values of row 𝐴3 . This means row 𝐴3 is dominated by row
𝐴2 . You can remove row 𝐴3 from the pay-off matrix.
𝐵1 𝐵2 𝐵3 𝐵4
𝐴1 2 3 11 8
𝐴2 7 5 2 7
For the strategies 𝐵1 and 𝐵4 , all the entries of column 𝐵1 are equal or less
than to the corresponding entries of column 𝐵4 . This means column 𝐵4 is
dominated by the column 𝐵1 . You can remove column 𝐵4 in the next step.
𝐵1 𝐵2 𝐵3
𝐴1 2 3 11
𝐴2 7 5 2

Aashish Sharma
Check further if you can reduce the pay-off matrix. If the further reduction
is not possible then this is your final reduced matrix.

Example 4: - Reduce the pay-off matrix given in example 1 by dominance


principal.

Example 5: - Solve the following game using the dominance principal.


Player B
1 2 3 4 5
1 3 5 4 9 6
2 5 6 3 7 8
Player A 3 8 7 9 8 7
4 4 2 8 5 3

The final answer will be 7.

Dominance Rule – Simplex Method

When the saddle value of the game could not be found by using simple row
reduction method by dominance principle, the simplex method can be used
to find the value of the game.
For any pay-off matric, first we assume the probabilities for both the players
of playing strategy and simplex variables and then use the formulas with
simplex method to find the values of the game.
For any pay-off matrix of the form
𝐵1 𝐵2
𝐴1 4 -1
𝐴2 3 5
New pay-off matrix will be

Aashish Sharma
𝑦1 𝑦2
𝑞1 𝑞2
𝐵1 𝐵2
𝑥1 𝑝1 𝐴1 4 -1
𝑥2 𝑝2 𝐴2 3 5

Here, 𝑝𝑖′ 𝑠 and 𝑞𝑗 ′𝑠 are the probabilities of player A and player B selecting
the strategies.
Let the value of the game is 𝑉, then formula to solve the pay-off matrix will
be
1
𝑀𝑎𝑥 𝑍𝐵 = 𝑦1 + 𝑦2 =
𝑉
𝑞𝑗 𝑝𝑖
where, 𝑦𝑗 = and 𝑥𝑖 =
𝑉 𝑉

The value of constraints will be found from the pay-off matrix.


The value of 𝑥𝑖 ′𝑠 will be the value of slack variables.

Aashish Sharma
Sequencing Models

Sequencing models determines the optimal order in which jobs should be


arranged for processing through a certain number of machines to minimize
the total time or cost.
Sequencing models are divided into several categories such as:
1 Processing n jobs through Two Machines
2 Processing n Jobs through k Machines
3 Processing Two Jobs through k Machines
For example, manufacturing of book mainly contains two processes
(Printing and Binding). The table containing time for both process is given
below:
Books 1 2 3 4 5 6 7
Printing Time 20 90 80 20 120 15 65
Binding Time 25 60 75 30 90 35 50
This is an example of sequencing model while processing n jobs through
two machines. Here, the jobs mean printing several books.

Several assumptions are made while solving sequencing models such as:
- Each machine is allowed to process only one job at a time.
- A job started on a machine must be completed before going to another
machine.
- Every machine/process is of different type.
- A job is always processed without any delay.
- The time taken by a job in going from one machine to another machine
is negligible.

Aashish Sharma
Johnson’s algorithm for processing n jobs through two
machines
In this type of algorithm there will be two machines involved to perform 𝑛
jobs. The time required for performing each job on each machine is always
provided in the give problem.
There are two main procedures in this type of problems
- Find the optimal sequence of jobs.
o First make boxes equivalent to number of jobs. If there are five
jobs given, then you need to make

o You always write the sequence of first machine from left side
and second machine from right side.
Machine 1

Machine 2
o Identify the minimum value belonging to a job from any
machine and write the job number in the sequence table
depending on the machine.
o If the minimum number exist for machine 1, write left side. If
the minimum number exist for machine 2, write right side.
o For example
Jobs 1 2 3
Machine 1 (𝑀1 ) 8 6 5
Machine 2 (𝑀2 ) 8 3 4

o The minimum number in the table is 3 which comes under job


2 and for machine 2. Thus, you will write 2 in the right side and
cancel the column.
2
o Now, ignore the column of job 2.

Aashish Sharma
o The next minimum value will be 4 which exist under job 3 and
for machine 2. The sequence table will be
3 2

o Write the remaining job number in the remaining place. Final


sequence table will be
1 3 2

o If there is tie in selecting the minimum value, then it can be


resolved using one of the rules
(i) If both minimum values are for 𝑀1 , then choose the job
number which have higher 𝑀2 values.
(ii) If both minimum values are for 𝑀2 , then choose the job
number which have higher 𝑀1 value.
(iii) If both minimum values are from 𝑀1 and 𝑀2 respectively,
then write the job number for 𝑀1 on left side (starting)
and job number for 𝑀2 on right side (end).

- Find the total lead time and idle time for each machine.

The following steps can be used to solve a sequencing model using


Johnson’s algorithm: -
Step 1: - Construct the sequence table.
Step 2: - Find the optimal sequence for all the jobs.
Step 3: - Make a new table with optimal sequence.
Step 4: - Find the elapsed time for each job on both machines with total
time taken.
Step 5: - Make a new column for each machine to find the idle time.

Using above steps to solve an example.

Aashish Sharma
Example 6: - Solve the following sequencing problem to minimize the total
elapsed time.
Jobs 1 2 3
Machine 1 (𝑀1 ) 8 6 5
Machine 2 (𝑀2 ) 8 3 4
Solution: -
Step 1: - Construct the sequence table.
The table is already given in the table.

Step 2: - Find the optimal sequence for all the jobs.


Solved already in above section.
1 3 2

Step 3: - Make a new table with optimal sequence.


Machine 1 Machine 2
Jobs
In Out In Out
1
3
2

Step 4: - Find the elapsed time for each job on both machines with total
time taken.
First find the in and out time of all jobs for machine 1.
In time of first job will always be zero.
The table will become
Machine 1 Machine 2
Jobs
In Out In Out
1 0

Aashish Sharma
3
2

From the table, you can see the time taken to complete job 1 in machine 2
is 8 hours. So, the out time will be 0 + 8 = 8.
Machine 1 Machine 2
Jobs
In Out In Out
1 0 8
3
2

For job 3, in time will be same as out time for job 1.


Machine 1 Machine 2
Jobs
In Out In Out
1 0 8
3 8
2

Time taken to complete job 3 in machine 1 is 5 hours. The out time will be
8 + 5 = 13
Machine 1 Machine 2
Jobs
In Out In Out
1 0 8
3 8 13
2

Aashish Sharma
In time will be same as out time of previous job
Machine 1 Machine 2
Jobs
In Out In Out
1 0 8
3 8 13
2 13

The time taken by Machine 1 to complete job 2 is 6. Out time will be


13 + 6 = 19.
Machine 1 Machine 2
Jobs
In Out In Out
1 0 8
3 8 13
2 13 19

The first in time for machine 2 is always same as out time of machine 1. In
this case, it will be 8.
Machine 1 Machine 2
Jobs
In Out In Out
1 0 8 8
3 8 13
2 13 19

Time to complete job 1 by machine 2 is 8 hours. The out time will be


8 + 8 = 16 hours
Machine 1 Machine 2
Jobs
In Out In Out
1 0 8 8 16
3 8 13
2 13 19

Aashish Sharma
The in time for job 3 in machine 2 will be the maximum of the highlighted
values.
Machine 1 Machine 2
Jobs
In Out In Out
1 0 8 8 16
3 8 13
2 13 19

The maximum value is 16. The in time will be 16.


Machine 1 Machine 2
Jobs
In Out In Out
1 0 8 8 16
3 8 13 16
2 13 19

Time to complete job 3 by machine 2 is 4 hours. The out time will be


16 + 4 = 20 hours
Machine 1 Machine 2
Jobs
In Out In Out
1 0 8 8 16
3 8 13 16 20
2 13 19

Now for the in time choose the maximum value.


Machine 1 Machine 2
Jobs
In Out In Out
1 0 8 8 16
3 8 13 16 20
2 13 19

Aashish Sharma
The maximum value is 20. This will be the in time.
Machine 1 Machine 2
Jobs
In Out In Out
1 0 8 8 16
3 8 13 16 20
2 13 19 20

Time to complete job 2 by machine 2 is 3 hours. The out time will be


20 + 3 = 23 hours
Machine 1 Machine 2
Jobs
In Out In Out
1 0 8 8 16
3 8 13 16 20
2 13 19 20 23

Total time elapsed time will be 23 hours which is your final answer.
Step 5: - Make a new column for each machine to find the idle time.
Machine 1 Machine 2 Idle time for Idle time for
Jobs
In Out In Out Machine 1 Machine 2
1 0 8 8 16
3 8 13 16 20
2 13 19 20 23
Machine 1 stopped working after 19 hours but the elapsed time is 23 hours.
The idle time for machine 1 will be 23 − 19 = 4
Machine 1 Machine 2 Idle time for Idle time for
Jobs
In Out In Out Machine 1 Machine 2
1 0 8 8 16 -
3 8 13 16 20 -
2 13 19 20 23 4

Aashish Sharma
Machine 2 started after 8 hours and worked continuously till the end.
The idle time for machine 2 will be 8 hours
Machine 1 Machine 2 Idle time for Idle time for
Jobs
In Out In Out Machine 1 Machine 2
1 0 8 8 16 - 8
3 8 13 16 20 - -
2 13 19 20 23 4 -

The final answer will be


Elapsed Time = 23
Idle time of Machine 1= 4
Idle time of Machine 2= 8

Example 7: - Find the total elapsed time for the given sequence model with
the idle time of each machine.
Books 1 2 3 4 5 6 7
Printing Time 20 90 80 20 120 15 65
Binding Time 25 60 75 30 90 35 50
The answer will be 460 with idle time 50 and 95.

Example 8: - Find the solution of processing 7 jobs through 2 machines


using Jhonson’s algorithm.

Job 1 2 3 4 5 6 7

Machine-1 3 12 15 6 10 11 9

Machine-2 8 10 10 6 12 1 3

The final answer will be 67 with idle time 1 and 17.

Aashish Sharma
Example 9: - Find the elapsed time and idle time of the given sequencing
problem

Job 1 2 3 4 5

Machine-1 5 1 9 3 10

Machine-2 2 6 7 8 14

The final answer will be 38 with idle time 10 and 1.

Johnson’s algorithm for processing n jobs through m


machines
In last algorithm, the number of jobs could be anything but the number of
machines were fixed. In this algorithm, the number of jobs as well as
number of machines are not fixed.
𝑛, 𝑚 ∈ 𝑁
For example,
Jobs
1 2 3 … n
Machines
𝑀1 𝑀11 𝑀12 𝑀13 … 𝑀1𝑛
𝑀2 𝑀21 𝑀22 𝑀23 … 𝑀2𝑛
𝑀3 𝑀31 𝑀32 𝑀33 … 𝑀3𝑛
… … … … … …
𝑀𝑚−1 𝑀(𝑚−1)1 𝑀(𝑚−1)2 𝑀(𝑚−1)3 … 𝑀(𝑚−1)𝑛
𝑀𝑚 𝑀𝑚1 𝑀𝑚2 𝑀𝑚3 … 𝑀𝑚𝑛

We convert these types of problems in to 𝑛 jobs through 𝑡𝑤𝑜 machines


problem using the following process:
• Find the minimum number of first and last row.
• Find the maximum number of remaining rows.

Aashish Sharma
• The given model can be reduced if it follows either one of the
conditions:
I. Minimum of Row 1 ≥ Maximum of remaining rows
II. Minimum of Row m ≥ Maximum of remaining rows
If the minimum value of either row1 or row m is greater than the
maximum value of the remaining rows. (Row m is the last row here)
The following steps can be used to reduce the sequencing model:
Step 1: - First verify the condition.
Step 2: - Suppose there will be two hypothetical machines 𝐺, 𝐻, then the
reduced table will be

1 2 3 … n

Step 3: - Finding the columns one by one for G first. Add all the given
values in first column except last row values in the first column.

1 2 3 … n
𝑀11 +
𝑀21 +
G 𝑀31 +
….+
𝑀(𝑚−1)1
H

Similarly find the values of remaining columns

Aashish Sharma
1 2 3 … n
𝑀11 + 𝑀12 + 𝑀13 + 𝑀1𝑛 +
𝑀21 + 𝑀22 + 𝑀23 + 𝑀2𝑛 +
G 𝑀31 + 𝑀32 + 𝑀33 + 𝑀3𝑛 +
….+ ….+ ….+ ….+
𝑀(𝑚−1)1 𝑀(𝑚−1)2 𝑀(𝑚−1)3 𝑀(𝑚−1)𝑛
H

Step 4: - To find the value of row H, ignore the values of first row in each
column and add the remining terms in each column

1 2 3 … n
𝑀11 + 𝑀12 + 𝑀13 + 𝑀1𝑛 +
𝑀21 + 𝑀22 + 𝑀23 + 𝑀2𝑛 +
G 𝑀31 + 𝑀32 + 𝑀33 + … 𝑀3𝑛 +
….+ ….+ ….+ ….+
𝑀(𝑚−1)1 𝑀(𝑚−1)2 𝑀(𝑚−1)3 𝑀(𝑚−1)𝑛
𝑀21 + 𝑀22 + 𝑀23 + 𝑀2𝑛 +
𝑀31 + 𝑀32 + 𝑀33 + 𝑀3𝑛 +
H …+ …+ …+ … …+
𝑀(𝑚−1)1 + 𝑀(𝑚−1)2 + 𝑀(𝑚−1)3 + 𝑀(𝑚−1)𝑛 +
𝑀𝑚1 𝑀𝑚2 𝑀𝑚3 𝑀𝑚𝑛

This will be your new reduced sequencing model. Use the above model to
find the value of optimal sequence and then find the elapsed time for the
process.
It will be clear with the help of an example.

Aashish Sharma
Example 10: - Five jobs are to be performed by four machines named
𝑀1 , 𝑀2 , 𝑀3 and 𝑀4 . The processing time are given in the following table (in
hours).
Jobs 1 2 3 4 5
𝑀1 11 13 9 16 17
𝑀2 4 3 5 2 6
𝑀3 6 7 5 8 4
𝑀4 15 8 13 9 11
I. Determine the total elapsed time.
II. Find the idle time for each machine.
(84,18,64,54,28)
Example 11: - Find the elapsed time and idle time of each for the given
sequencing model.
Jobs 1 2 3 4
𝑀1 7 6 5 8
𝑀2 5 6 4 3
𝑀3 2 4 5 3
𝑀4 3 5 6 2
𝑀5 9 10 8 6
(51,25,33,37,35,18)

Example 12: - Find the elapsed time and idle time of each for the given
sequencing model.
Jobs 1 2 3 4
𝑀1 6 5 4 7
𝑀2 4 5 3 2
𝑀3 1 3 4 2
𝑀4 2 4 5 1
𝑀5 8 9 7 5
(43,21,29,33,31,14)

Aashish Sharma

You might also like