Nash Equilibrium of a Fixed-Sum Two-Player Game

Abstract

It is well established that Nash equilibrium exists within the framework of mixed strategies in strategic-form non-cooperative games. However, finding the Nash equilibrium generally belongs to the class of problems known as PPAD (Polynomial Parity Argument on Directed graphs), for which no polynomial-time solution methods are known, even for two-player games. This paper demonstrates that in fixed-sum two-player games (including zero-sum games), the Nash equilibrium forms a convex set, and has a unique expected payoff. Furthermore, these equilibria are Pareto optimal. Additionally, it is shown that the Nash equilibrium of fixed-sum two-player games can theoretically be found in polynomial time using the principal-dual interior point method, a solution method of linear programming.

Share and Cite:

Tanaka, Y. (2024) Nash Equilibrium of a Fixed-Sum Two-Player Game. American Journal of Computational Mathematics, 14, 346-357. doi: 10.4236/ajcm.2024.143017.

1. Introduction

It has been well-established since Nash’s work [1] that the Nash equilibrium exists in mixed strategies for strategic games. However, the computational complexity of finding Nash equilibria belongs to the class of PPAD (Polynomial Parity Argument for Directed graphs) complete [2], for which no polynomial-time solution method is known, particularly for general, non-zero-sum games.

Bowling et al. [3] solved the Nash equilibrium for Poker—an incomplete information game and a repeated two-player zero-sum game—using an approximate computation method.

Monderer and Shapley [4] revealed that potential games consistently have Nash equilibria in pure strategies. Additionally, Moulin [5] and Friedman [6] examined the properties of Nash equilibrium in mixed strategies for non-zero-sum two-player games when the games are strictly competitive.

It is well-known that a zero-sum two-player game can be formulated as a pair of linear programming problems. Although linear programming problems are generally solved efficiently using the Simplex method, which moves along the vertices of the feasible polyhedron, there are rare instances where problems cannot be solved in polynomial time. To address this, various interior-point methods, which traverse the interior of the feasible polyhedron, have been developed since the mid-1980s. Among these, the primal-dual interior-point method, proposed by Kojima et al. [7] and others, which simultaneously solves both the primal and dual problems, is considered a powerful approach.

This study first indicates that for a fixed-sum two-player game, the Nash equilibrium can be efficiently solved in polynomial time using the principal-dual interior point method for linear programming. Furthermore, the study reveals that the Nash equilibrium forms a convex set in the mixed strategy for fixed-sum two-player games and that all Nash equilibria yield unique expected payoffs. Elementary computational experiments demonstrate the correctness of the methods presented.

2. Formulation

The Nash equilibrium is defined as ( x ¯ , y ¯ ) Δ m1 × Δ n1 (where Δ d denotes a d-simplex), which satisfies

x ¯ T A y ¯ x T A y ¯ , x Δ m1 (1)

x ¯ T B y ¯ x ¯ T By , y Δ n1 ,

for the non-zero-sum two-player game ( A,B ) , where A and B are the payoff matrices of the two players.

Generally, the computational complexity of finding Nash equilibria belongs to a class of PPAD complete [2], for which no polynomial-time solution method is known, even in two-person games.

The fixed-sum two-player game, including the zero-sum two-player games, can be formalized as a linear programming problem, which can be solved in polynomial time.

We convert a fixed-sum two-player game ( A+ p 2 E, p 2 EA ) , where p is the sum of the payoffs of the two players, and E=( e ij ) , e ij =1 , i=1,,m , j=1,,n , to a zero-sum two-player game ( A,A ) , by subtracting p 2 from all the entries. Let x and y denote the mixed strategy of player 1 and player 2, respectively, and 1 be the vector ( 1,,1 ) T .

Nash equilibrium is also referred to as “equilibrium,” particularly in the zero-sum two-player games.

In a zero-sum game ( A,A ) , player 2’s maximin strategy is equivalent to their minimax strategy.

The maximin strategy for player 1 is defined as

maximize x, v 1 v 1 subjectto A T x v 1 1 n i=1 m x i =1, x i 0,i=1,,m, (2)

where x represents a mixed strategy.

The maximin strategy for player 2 is:

maximize y, v 2 v 2 subjectto( A )y v 2 1 m i=1 n y i =1, y i 0,i=1,,n,

where y represents a mixed strategy.

Specifically,

minimize y, v 2 v 2 subjecttoAy v 2 1 m i=1 n y i =1, y i 0,i=1,,n, (3)

which is known as the minimax strategy.

Therefore, the Nash equilibrium ( x ¯ , y ¯ ) is obtained by solving linear programming problems (2) and (3).

Theorem 1. For a fixed-sum two-person game ( A+ p 2 E, p 2 EA ) , there exists a Nash equilibrium ( x ¯ , y ¯ ) , which is the solution to the linear programming problems (2) and (3), and can be obtained in polynomial time in m,n . In this case, the payoffs of the two players are ( x ¯ T A y ¯ + p 2 , p 2 x ¯ T A y ¯ ) .

Proof. First, we show that ( x ¯ , v ¯ 1 ) , the solution of (2), and ( y ¯ , v ¯ 2 ) , the solution of (3), exist for the zero-sum two-player game ( A,A ) .

(2) is similar to

minimize x, ξ 1 , ξ 2 ξ 1 ξ 2 subjectto A T x+( ξ 1 ξ 2 ) 1 n 0 1 m T x1 1 m T x1 x i 0,i=1,,m, ξ 1 , ξ 2 0. (4)

The duality problem of (4) can be expressed as

maximize y, η 1 , η 2 η 1 η 2 subjecttoAy+( η 1 η 2 ) 1 m 0 1 n T y1 1 n T y1 y i 0,i=1,,n, η 1 , η 2 0. (5)

(3) is also a dual problem of (2) by considering that v 2 =( η 1 η 2 ) . Note that (4) has a bounded optimal solution ( x ¯ , ξ ¯ ) because x ¯ Δ m1 . Therefore, from the strong duality theorem of linear programming, there exist bounded solutions ( x ¯ , ξ ¯ ) and ( y ¯ , η ¯ ) , and ( v ¯ 1 = ) ξ ¯ 1 ξ ¯ 2 = η ¯ 1 η ¯ 2 ( = v ¯ 2 ) , i.e. v ¯ 1 + v ¯ 2 =0 .

Noting that

x T ( p 2 E )y= p 2 , x Δ m1 , y Δ n1 ,

we have (1) is the same as

x ¯ T ( A+ p 2 E ) y ¯ x T ( A+ p 2 E ) y ¯ , x Δ m1

x ¯ T ( p 2 EA ) y ¯ x ¯ T ( p 2 EA )y , y Δ n1 .

Thus, the Nash equilibrium ( x ¯ , y ¯ ) of the zero-sum two-player game also serves as a Nash equilibrium for the fixed-sum two-player game ( A+ p 2 E, p 2 EA ) , and can be obtained by solving the linear programming problem (2) and (3).

The linear programming problem can be solved using polynomial time methods such as those discussed in [8], which validates this approach.

In this case, the payoffs for the two players are ( x ¯ T A y ¯ + p 2 , p 2 x ¯ T A y ¯ ) . □

Note that it is not always the case that v ¯ = v ¯ 1 = v ¯ 2 =0 in any zero-sum two-player game ( A,A ) , as is evident from the case that v ¯ 1 =1 , v ¯ 2 =1 when A=E .

Consider the following definition:

Definition. A fixed-sum two-player game ( A+ p 2 E, p 2 EA ) is assumed to be symmetric if A T =A .

Example 1. Rock-Paper-Scissors

A=( 0 1 1 1 0 1 1 1 0 ) , ( x ¯ T , y ¯ T )=( ( 1 3 , 1 3 , 1 3 ),( 1 3 , 1 3 , 1 3 ) ) , v ¯ =0

Notably, in a symmetric fixed-sum two-player game, the condition n=m holds by definition.

Competitions are typically symmetric zero-sum two-player games, such as Rock-Paper-Scissors, which represent a broad class of games.

In symmetric fixed-sum two-player games, solving only one linear programming problem is sufficient to obtain a Nash equilibrium solution.

Theorem 2. A symmetric fixed-sum two-player game ( A+ p 2 E, p 2 EA ) contains the Nash equilibrium ( x ¯ , x ¯ )( x ¯ , y ¯ ) , where x ¯ contains the solution to the linear programming problem (2). In this case, the payoffs of both players are ( p 2 , p 2 ) .

Proof. In a symmetric fixed-sum two-player game ( A+ p 2 E, p 2 EA ) , ( x ¯ , v ¯ 1 ) is the solution of (2) ( n=m ), and ( y ¯ , v ¯ 2 ) is a solution of (3) ( n=m ).Note that (2) is a solution of the fixed-sum two-player game ( A+ p 2 E, p 2 EA ) , then (2) and (3) are equivalent for A T =A . Thus, y ¯ = x ¯ , since (2) and (3) are the same problem.

In this case, the payoffs of the two players are ( x ¯ T A y ¯ + p 2 , p 2 x ¯ T A y ¯ )=( x ¯ T A x ¯ + p 2 , x ¯ T A T x ¯ + p 2 ) . Now that x ¯ T A x ¯ = x ¯ T A T x ¯ =0 , since x ¯ T A x ¯ + x ¯ T A T x ¯ =0 and ( x ¯ T A x ¯ ) T = x ¯ T A T x ¯ . Hence, the payoffs are ( p 2 , p 2 ) . □

Many efficient general-purpose libraries, such as Python’s PuLP, that implement polynomial-time methods for linear programming problems exist. These methods can effectively handle large scale problems with tens of thousands of strategies.

The convexity of Nash equilibria in zero-sum two-player games was examined by Friedman [6] in strictly competitive games where m=n .

This study extends the analysis to a more general setting.

Theorem 3. The Nash equilibrium of a finite-sum two-player game is a convex set of m+n and any solution of the Nash equilibrium determines the unique expected payoffs.

Proof. ( x v ) of (2), which satisfies A T xv 1 n is a convex polyhedron in m+1 . On the other hand, { x| x i 0,i=1,,m, i x i =1 } is Δ m1 m+1 (( m1 )-simplex).

Their common part S m+1 is a bounded convex set in Δ m1 .

Therefore, as the solution set P * of (2) is the intersection of the convex set S and the support hyperplane ( 0,,0,1 )( x v 1 )= v ¯ 1 , it is a convex set in m+1 .

Thus, X ¯ ={ x|( x v ¯ 1 ) P * } m+1 is also a convex set.

Similarly, Y ¯ ={ y|( y v ¯ 2 ) D * } n+1 is also a convex set for the solution set D * of (3).

Thus, ( x ¯ y ¯ ) X ¯ × Y ¯ m+n is a convex set.

As discussed in Theorem 1, v ¯ = v ¯ 1 = v ¯ 2 . Therefore, the expected payoff of each is uniquely determined. □

Example 2. Zero-sum two-player game

A=( 0 1 1 1 0 1 1 1 1 ) , ( x ¯ T , y ¯ T )=( ( 1 3 , 2 3 ,0 ),( 0, 2 3 , 1 3 ) ) , and v ¯ = 1 3

Example 3. Non-fixed-sum two-player game

( A,B )=( ( 2,2 ) ( 1,3 ) ( 3,1 ) ( 0,0 ) ) ,

( x ¯ T , y ¯ T ){ ( ( 1,0 ),( 0,1 ) ),( ( 1 2 , 1 2 ),( 1 2 , 1 2 ) ),( ( 0,1 ),( 1,0 ) ) }

The solution is not a convex set and ( v ¯ 1 , v ¯ 2 )={ ( 1,3 ),( 3 2 , 3 2 ),( 3,1 ) } , respectively.

In a fixed-sum two-player game, as specified in Theorem 3, the Nash equilibrium solution forms a convex set; however, it may not be unique (e.g., when A=O ). However, in a zero-sum two-player game, by definition, any Nash equilibrium solution is Pareto optimal. Furthermore, Theorem 3 indicates that any solution has a unique expected payoff, making all Nash equilibria equally desirable.

3. Solving a Fixed-Sum Two-Player Game

In non-symmetric general finite-sum two-player games, solving the Nash equilibrium requires addressing both problems (2) and (3). Therefore, we consider applying the primal-dual interior point method, which has been extended for use in linear programming, convex programming, and positive semi-definite programming.

In the primal-dual interior point method (see [9]), the primal linear programming problem is formulated as

minimize x c T x subjecttoAx=b x i 0,i=1,,m, (6)

where c,x n , A: m×n matrix, and b m . The dual problem to (6) is

maximize y,z b T y subjectto A T y+z=c z i 0,i=1,,n, (7)

where y m , z n . The duality gap is:

x T z= x T ( c A T y )= c T x ( Ax ) T y= c T x b T y

The optimal solution ( x,y,z ) of (6) and (7) is obtained as the solution of the following equations:

{ Xz=0 Ax=b A T y+z=c x0,z0, (8)

where X=diag( x ) .

The primal-dual interior point method considers the following system of equations

( Xzv Axb A T y+zc )=0 .(9)

If we consider the Newton method as v= v k 0 , the search direction is obtained as a solution of

( Z k 0 X k A 0 0 0 A T I )( Δ x k Δ y k Δ z k )=( X k z k v k A x k b A T y k + z k c ) ,(10)

where Z k =diag( z k ) , X k =diag( x k ) .

Subsequently, the iteration process is

( x k+1 y k+1 z k+1 )=( x k + α P k Δ x k y k + α D k Δ y k z k + α D k  Δ z k ) ,(11)

where α P k and α D k are step widths.

The algorithm can be written as follows:

Algorithm PD

Input: ( x 0 , y 0 , z 0 )

Iteration ( k0 )

1. Set v k and find the solution ( Δ x k ,Δ y k ,Δ z k ) of (10).

2. By (11), we obtain ( x k+1 , y k+1 , z k+1 ) .

3. If the convergence condition is satisfied, then Kk . Stop.

4. kk+1 . Go to 1.

Output: ( x K , y K , z K )

Now let us consider its application to a fixed-sum two-player game.

We introduce a slack variable to (4).

minimize x, ξ 1 , ξ 2 ,s ξ 1 ξ 2 subjectto( A T 1 n   1 n I n 1 m T 0 0 0 )( x ξ 1 ξ 2 s )=( 0 0 1 ) x i 0,i=1,,m, ξ 1 , ξ 2 0, s j 0,j=1,,n. (12)

The dual problem to (12) is

maximize y,η,z η subjectto( A 1 m 1 n T 0 1 n T 0 I n 0 )( y η )+z=( 0 0 1 1 0 0 ) z i 0,i=1,,m+n+2. (13)

We denote

A=( A T 1 n 1 n I n 1 m T 0 0 0 ) , x=( x ξ 1 ξ 2 s ) , b=( 0 0 1 ) , y=( y η ) , c=( 0 0 1 1 0 0 ) . (14)

The necessary and sufficient conditions for the main problem (12) and the dual problem (13) to be optimal solutions are

{ Xz=0 Ax=b A T y+z=c x0,z0, (15)

where X=diag( x ) , x,z n ˜ , n ˜ =m+n+2 .

Therefore, the primal-dual interior point method can be applied.

We define L as a measure of the length of the input data [8], namely

L= i,j log 2 ( | a ij |+1 ) + i log 2 ( | b i |+1 ) + j log 2 ( | c j |+1 ) + log 2 ( n+1 ) + log 2 ( m+1 ) +( nm+n+m+1 ). (16)

Theorem 4. The Nash equilibrium ( x ¯ , y ¯ ) of the fixed-sum two-player game can be obtained by solving (15) using the sequence tracking method of the primal-dual interior point method in O( m+n L ) iterations, where L is a measure of the length of the input data to (12).

Proof. In the sequence tracking method of Mizuno [10], which is part of the primal-dual interior point method, it has been proved that the solutions of the primal linear programming problem (6) and the dual problem (7) can be obtained in O( n L ) iterations.

For the Nash equilibrium, the solutions of (12) and (13) can be obtained in O( m+n L ) iterations, given that n m+n+2 . □

Considering that the computational effort of each iteration of the primal-dual interior point method primarily involves solving a simultaneous linear equation to determine the search direction, and given that this can be done in polynomial time, the Nash equilibrium ( x ¯ , y ¯ ) can be obtained in polynomial time.

4. Computational Results

The study performed elementary computational experiments on a fixed-sum two-player game ( A+ p 2 E, p 2 EA ) . It solved the Nash equilibrium of the following example where A is not a skew-symmetric matrix.

Example 4. A fixed-sum two-player game

( A+E,EA )=( ( 1,1 ) ( 0,2 ) ( 2,0 ) ( 2,0 ) ( 1,1 ) ( 0,2 ) ( 0,2 ) ( 0,2 ) ( 0,2 ) )

Note that A=( 0 1 1 1 0 1 1 1 1 ) : Example 2, where

( x ¯ T , y ¯ T )=( ( 1 3 , 2 3 ,0 ),( 0, 2 3 , 1 3 ) ) .

The primal-dual interior point methods discussed in the previous section include the affine scaling method, path-following method, potential reduction method, and others.

The primal-dual path following algorithm is used in this section for efficiency reasons (see [11]), and is coded in Python and executed on a Windows PC.

Consider the following system of equations:

( Xzv Axb A T y+zc )=0 (17)

This system of equations with v=0 satisfies all constraints (15) except the sign of x and z . Following Lustig et al. [12], the study employs v=σμ 1 n ˜ , where σ=0.01 , which was determined in an ad hoc manner, and μ is set to μ= 1 n ˜ i=1 n ˜ x i z i = 1 n ˜ x T z as the minimization of Xzμ 1 n ˜ 2 .

Newton Direction ( Δ x k ,Δ y k ,Δ z k ) is obtained by solving

( Z k 0 X k A 0 0 0 A T I )( Δ x k Δ y k Δ z k )=( X k z k σ μ k 1 n ˜ A x k b A T y k + z k c ) ,(18)

where X k =diag( x k ) and Z k =diag( z k ) .

We denote the residuals for complementarity, linear constraints on the main problem, and linear constraints on the dual problem by r c , r p , and r d , respectively.

Then, the right-hand side of (18) can be expressed as

Z k Δ x k + X k Δ z k = r c

AΔ x k = r p

A T Δ y k +Δ z k = r d .

This allows us to calculate the following in this order:

Δ y k = ( A Z k 1 X k A T ) 1 ( r p A Z k 1 ( r c X k r d ) )

Δ z k = r d A T Δ y k (19)

Δ x k = Z k 1 ( r c X k Δ z k ) .

A line search is performed using

α p k = min i x i k Δ x i k , if x i k Δ x i k <0

α d k = min i z i k Δ z i k , if z i k Δ z i k <0

α k =min{ 0.95 α p k ,0.95 α d k ,1 }

so that

x k + α k Δ x k >0

z k + α k Δ z k >0 .

Subsequently, the iteration step is

( x k+1 y k+1 z k+1 )=( x k y k z k )+ α k ( Δ x k Δ y k Δ z k ) (20)

The algorithm can be written as follows:

Algorithm 1

Input: x 0 =1 , y 0 =0 , z 0 =1

Iteration ( k0 )

1. Set v k . Calculate the solution ( Δ x k ,Δ y k ,Δ z k ) by (19).

2. By (20), we obtain ( x k+1 , y k+1 , z k+1 ) .

3. If the convergence condition is satisfied, then Kk . Stop.

4. kk+1 . Go to 1.

Output: ( x K , y K , z K )

The following is a summary of the results of the study.

Table 1 summarizes the sequence ( x k , y k ) generated by Algorithm 1 to solve the Nash equilibrium in Example 4.

Table 1. Solution by the principal-dual interior point method.

k

x1

x2

x3

y1

y2

y3

0

1.0

1.0

1.0

0.0

0.0

0.0

1

0.6623576

0.6623576

0.1415717

−0.1125475

0.7458808

0.3166667

2

0.4368808

0.5696124

0.0509516

−0.0040950

0.7077344

0.2938607

3

0.3520076

0.6394974

0.0180646

0.0008768

0.6956012

0.3024998

4

0.3330301

0.6650078

0.0030526

0.0002386

0.6716897

0.3278449

5

0.3332779

0.6665529

0.0002351

0.0000310

0.6669522

0.3329941

6

0.3333300

0.6666585

0.0000153

2.89E−6

0.6666822

0.3333133

7

0.3333332

0.6666661

9.39E−7

2.30E−7

0.6666675

0.3333322

8

0.3333333

0.6666666

5.54E−8

1.64E−8

0.6666671

0.3333333

9

0.3333333

0.6666667

3.20E−9

1.09E−9

0.6666667

0.3333333

Figure 1 presents the change in the dual gap at each iteration of the obtained sequence on a semi-logarithmic graph.

Figure 1. Duality gap for Example 4.

During the initial iterations for k=1,2 , although there is some influence from σ , the logarithm of the duality gap gradually decreases with each iteration, albeit at a slow pace.

For k3 , we have

dual gap= c T x k b T y k =C 10 1.2k (C: constant)

relationship; hence, the sequence converges to the solution swiftly.

5. Conclusions

The study confirms that the Nash equilibrium of the fixed-sum two-player game forms a convex set. Additionally, all solutions within this set yield the unique expected payoffs.

The Nash equilibrium solution to the fixed-sum two-player game can be efficiently solved by using the primal-dual interior point method. This method solves the linear programming problems involved in polynomial time regarding the number of strategies, m and n.

In elementary computational experiments, the Nash equilibrium of the fixed-sum two-player game is efficiently determined using the primal-dual path following algorithm, a technique within the primal-dual interior point method.

Conflicts of Interest

The author declares no conflicts of interest regarding the publication of this paper.

References

[1] Nash, J.F. (1950) Equilibrium Points in n-Person Games. Proceedings of the National Academy of Sciences, 36, 48-49.
https://doi.org/10.1073/pnas.36.1.48
[2] Daskalakis, C., Goldberg, P.W. and Papadimitriou, C.H. (2009) The Complexity of Computing a Nash Equilibrium. Communications of the ACM, 52, 89-97.
https://doi.org/10.1145/1461928.1461951
[3] Bowling, M., Burch, N., Johanson, M. and Tammelin, O. (2015) Heads-Up Limit Hold’em Poker Is Solved. Science, 347, 145-149.
https://doi.org/10.1126/science.1259433
[4] Monderer, D. and Shapley, L.S. (1996) Potential Games. Games and Economic Behavior, 14, 124-143.
https://doi.org/10.1006/game.1996.0044
[5] Moulin, H. (1976) Cooperation in Mixed Equilibrium. Mathematics of Operations Research, 1, 273-286.
https://doi.org/10.1287/moor.1.3.273
[6] Friedman, J.W. (1983) On Characterizing Equilibrium Points in Two-Person Strictly Competitive Games. International Journal of Game Theory, 12, 245-247.
https://doi.org/10.1007/BF01769094
[7] Kojima, M., Mizuno, S. and Yoshise, A. (1989) A Primal-Dual Interior Point Algorithm for Linear Programming. In: Megiddo, N., Ed., Progress in Mathematical Programming, Interior Point and Related Methods, Springer, 29-47.
[8] Griva, I., Nash, S.G. and Sofer, A. (2009) Linear and Nonlinear Optimization. 2nd Edition, SIAM.
https://doi.org/10.1137/1.9780898717730
[9] Mizuno, S. (1992) A Primal-Dual Interior Point Method for Linear Programming. Proceedings of the Institute of Statistical Mathematics, 40, 27-44. (In Japanese)
[10] Mizuno, S. (1992) A New Polynomial Time Method for a Linear Complementarity Problem. Mathematical Programming, 56, 31-43.
https://doi.org/10.1007/BF01580891
[11] GitHub-Hideki105/Linear-Programming.
https://github.com/Hideki105/linear-programming
[12] Lustig, I.J., Marsten, R.E. and Shanno, D.F. (1991) Computation Experience with a Primal-Dual Interior Point Method for Linear Programming. Linear Algebra and Its Applications, 152, 191-222.
https://doi.org/10.1016/0024-3795(91)90275-2

Copyright © 2025 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.