Game Theory and Operating System
Game Theory and Operating System
Game: A game is a set of rules which players obey while playing it.
Finite Game: A game having finite number of moves is called a finite game.
Consider a 2-person game in which the first player chooses a number (row of
a matrix) from {1, 2, …, m} and the second player, without the knowledge
what choice the first player has made, chooses a number (column of the
matrix) from {1, 2, …, n}. The two numbers are then compared and the 2nd
Players pays the 1st Player an amount by the pre-specified rules of the game.
Such games are referred to as Rectangular Games.
If player 𝑃1 chooses row number (i), then 𝑃1 is sure to get at least minimum
of ith row i.e. at least min 𝑎𝑖𝑗
𝑗
Thus, there is a choice for 𝑃1 so that he gets at least 𝑚𝑎𝑥 min 𝑎𝑖𝑗
𝑖 𝑗
And if player 𝑃2 chooses column number (j), then 𝑃2 is sure to pay at most
maximum of jth row i.e. at least max 𝑎𝑖𝑗
𝑖
then 𝑃1 can get v units and simultaneously 𝑃2 can be restrict 𝑃1 to get more
than v units..
i.e. The cell (r, s) is a saddle point of A if 𝑎𝑟𝑠 is the maximum element of
sth column as well as 𝑎𝑟𝑠 is the minimum element of rth row.
Theorem: Let A = (𝑎𝑖𝑗 )𝑚×𝑛 be the pay-off matrix of a rectangular game. A
Exercise 1. Find max min and min max of the following pay-off matrices, and
find the saddle points, if any
2 2 2 2
(i) A =
1 2 3 4
= max {2, 1}
min max 𝑎𝑖𝑗 = min {max 𝑎𝑖1 , max 𝑎𝑖2 , max 𝑎𝑖3 , max 𝑎𝑖4 }
𝑗 𝑖 𝑖 𝑖 𝑖 𝑖
= min {2, 2, 3, 4}
Thus, (1, 1) and (1, 2) are saddle points of A and the value of the game is 2.
1 3 6
(ii) A = ‖2 1 3‖
6 2 1
𝑚𝑎𝑥 min 𝑎𝑖𝑗 = max { min 𝑎1𝑗 , min 𝑎2𝑗 , min 𝑎3𝑗 }
j𝑖 j j j
= max { min(𝑎11 , 𝑎12 , 𝑎13 ), min(𝑎21 , 𝑎22 , 𝑎23 ), min(𝑎31 , 𝑎32 , 𝑎33 )}
= max {1, 1, 1}
= min { max(𝑎11 ,𝑎21 ,𝑎31 ), max(𝑎12 ,𝑎22 ,𝑎32 ), max(𝑎13 ,𝑎23 ,𝑎33 )}
= min {6, 3, 6}
= 3 = 𝑎12 = 𝑎23
2 4 5
A = (10 7 𝑞)
4 𝑝 6
The point (2, 2) will be a saddle point for the game with pay-off matrix A if
𝑎𝑖2 ≤ 𝑎22 i = 1, 2, 3
𝑎22 ≤ 𝑎2𝑗 j = 1, 2, 3
i.e. if 4 ≤ 7, p ≤ 7
and 7 ≤ 10, 7 ≤ q
i.e. if p ≤ 7 ≤ q
Hence, the range of values of p and q which will render (2, 2) a saddle point
of A is
p ≤ 7 ≤ q.
Mixed Strategies, Expectation Function:
Let the player 𝑃1 plays row number (1) with frequency 𝑥1 , row number (2)
with frequency 𝑥2 , …, row number (m) with frequency 𝑥𝑚 and the player
𝑃2 plays column number [1] with frequency 𝑦1 , column number [2] with
frequency 𝑦2 , …, column number [n] with frequency 𝑦𝑛 .
𝑖=1 𝑥𝑖 = 1 and 𝑥𝑖 ≥ 0 , i ; is
An m-tuple X = (𝑥1 , 𝑥2 , … , 𝑥𝑚 ) where ∑𝑚
called a mixed strategy for the player 𝑃1 .
The set of all mixed strategies for the player 𝑃1 , denoted by, 𝑆𝑚 is
𝑖=1 𝑥𝑖 = 1 , 𝑥𝑖 ≥ 0 , i = 1, 2, …, m }.
𝑆𝑚 = { X = (𝑥1 , 𝑥2 , … , 𝑥𝑚 ) : ∑𝑚
The set of all mixed strategies for the player 𝑃1 , denoted by, 𝑆𝑚 is
𝑆𝑛 = { Y = (𝑦1 , 𝑦2 , … , 𝑦𝑛 ) : ∑𝑛𝑗=1 𝑦𝑗 = 1 , 𝑦𝑗 ≥ 0 , j = 1, 2, …, n }.
The expectation of the player 𝑃1 , denoted by E(X, Y), is given by
E(X, Y) = ∑𝑚 𝑛
𝑖=1 ∑𝑗=1 𝑎𝑖𝑗 𝑥𝑖 𝑦𝑗 .
In this case, the point (𝑋 ∗ , 𝑌 ∗ ) is called strategic saddle point of the game.
Pure Strategy:
𝑥𝑖 = 1 for some i
and 𝑥𝑗 = 0 j ≠ i.
E(i, Y) = E(𝑋 𝑖 , Y) = ∑𝑚 𝑛
𝑖=1 ∑𝑗=1 𝑎𝑖𝑗 𝑥𝑖 𝑦𝑗
= ∑𝑛𝑗=1 𝑎𝑖𝑗 𝑦𝑗
A mixed strategy Y = (𝑦1 , 𝑦2 , … , 𝑦𝑛 ) is called a pure strategy for the player
𝑃2 if
𝑦𝑗 = 1 for some j
and 𝑦𝑖 = 0 i ≠ j.
E(X, j) = E(X, 𝑌𝑗 ) = ∑𝑚 𝑛
𝑖=1 ∑𝑗=1 𝑎𝑖𝑗 𝑥𝑖 𝑦𝑗
= ∑𝑚
𝑖=1 𝑎𝑖𝑗 𝑥𝑖
E(i, 𝑌 ∗ ) v E(𝑋 ∗ , j) i = 1, 2, …, m , j = 1, 2, …, n.
2 1
Exercise: Solve the game whose pay-off matrix is ( )
0 3
2 1
Solution. The pay-off matrix is ( )
0 3
Let 𝑃1 plays (1) with frequency x and (3) with frequency 1 – x. Then the
expectation of 𝑃1 is
= 4xy – 2x – 3y + 3
1 3
= 4(xy − x – y) + 3
2 4
3 1 3
= 4(x – )( y − ) − + 3
4 2 2
3 1 3
= 4(x – )( y − ) +
4 2 2
3 3
Now, by playing with x = , 𝑃1 is sure to get at least while on the other hand
4 2
1 3
by playing with y = , 𝑃2 can restrict 𝑃1 to get more than .
2 2
3
Thus, is the value of the game.
2
3 1
An optimal strategy for 𝑃1 is ( , )
4 4
1 1
An optimal strategy for 𝑃2 is ( , )
2 2
3
and value of the game is .
2
Shortcut formula to find the optimal strategy for the game with 22 pay-
off matrix
𝑃2
𝑎11 𝑎12
𝑃1 (𝑎 𝑎22 )
21
3 −2 4
′
𝐴 = ( −1 4 2)
3 2 −3
To make the value of game positive, adding 4 to the elements of the matrix B,
we solve the game with pay-off matrix
7 2 8
A = (3 8 6)
7 6 1
Let 𝑣 ′ and v be the values of the games with pay-off matrices 𝐴′ and A
respectively. Then
v = 𝑣′ + 4
Solving the game with pay-off matrix A means to find 𝑋 ∗ = (𝑥1 , 𝑥2 , 𝑥3 ) and
𝑌 ∗ = (𝑦1 , 𝑦2 , 𝑦3 ) and a real number v such that
E(i,𝑌 ∗ ) ≤ v ≤ E(𝑋 ∗ , j) i, j = 1, 2, 3
𝑥1 + 𝑥2 + 𝑥3 = v 𝑦1 + 𝑦2 + 𝑦3 = v
𝑥1 , 𝑥2 , 𝑥3 0 𝑦1 , 𝑦2 , 𝑦3 0
𝑥𝑖 𝑦𝑗
Dividing the above relations by v ( > 0) and letting = 𝑥′𝑖, = 𝑦′𝑗 , i,
𝑣 𝑣
j = 1, 2, 3; we get
7𝑥 ′1 + 3𝑥 ′ 2 + 7𝑥 ′ 3 1 7𝑦 ′1 + 2𝑦 ′ 2 + 8𝑦 ′ 3 ≤ 1
2𝑥 ′1 + 8𝑥 ′ 2 + 6𝑥 ′ 3 1 and 3𝑦 ′1 + 8𝑦 ′ 2 + 6𝑦 ′ 3 ≤ 1
8𝑥 ′1 + 6𝑥 ′ 2 + 𝑥 ′ 3 1 7𝑦 ′1 + 6𝑦 ′ 2 + 𝑦 ′ 3 ≤ 1
1 1
𝑥 ′1 + 𝑥 ′ 2 + 𝑥 ′ 3 = 𝑦 ′1 + 𝑦 ′ 2 + 𝑦 ′ 3 =
𝑣 𝑣
𝑥 ′1 , 𝑥 ′ 2 , 𝑥 ′ 3 0 𝑦1 , 𝑦 ′ 2 , 𝑦 ′ 3 0
1
Since the player 𝑃1 would like to maximize v i.e to minimize = 𝑥 ′1 + 𝑥 ′ 2 + 𝑥 ′ 3
𝑣
Minimize z = 𝑥 ′1 + 𝑥 ′ 2 + 𝑥 ′ 3
subject to
7𝑥 ′1 + 3𝑥 ′ 2 + 7𝑥 ′ 3 1
2𝑥 ′1 + 8𝑥 ′ 2 + 6𝑥 ′ 3 1 (A)
8𝑥 ′1 + 6𝑥 ′ 2 + 𝑥 ′ 3 1
𝑥 ′1 , 𝑥 ′ 2 , 𝑥 ′ 3 0
Again,
1
since the player 𝑃2 would like to minimize v i.e. to maximize = 𝑦 ′1 + 𝑦 ′ 2 + 𝑦 ′ 3
𝑣
The problem of the player 𝑃2 is
Maximize z = 𝑦 ′1 + 𝑦 ′ 2 + 𝑦 ′ 3
subject to
7𝑦 ′1 + 2𝑦 ′ 2 + 8𝑦 ′ 3 ≤ 1
3𝑦 ′1 + 8𝑦 ′ 2 + 6𝑦 ′ 3 ≤ 1 (B)
7𝑦 ′1 + 6𝑦 ′ 2 + 𝑦 ′ 3 ≤ 1
𝑦1 , 𝑦 ′ 2 , 𝑦 ′ 3 0
The problems (A) and (B) are a pair of dual problems equivalent to the game
problem.