Rational Generating Functions and
Integer Programming Games
University of California, Davis, Department of Mathematics, One Shields Avenue, Davis, CA 95616, USA
Christopher Thomas Ryan, Maurice Queyranne
University of British Columbia, Sauder School of Business, 2053 Main Mall, Vancouver, BC, Canada, V6T 1Z2
We explore the computational complexity of computing pure Nash equilibria for a new class of strategic games called integer programming games with difference of piecewise linear convex payoffs. Integer programming games are games where players’ action sets are integer points inside of polytopes. Using recent results from the study of short rational generating functions for encoding sets of integer points pioneered by Alexander Barvinok, we present efficient algorithms for enumerating all pure Nash equilibria, and other computations of interest, such as the pure price of anarchy, and pure threat point, when the dimension and number of “convex” linear pieces in the payoff functions are fixed. Sequential games where a leader is followed by competing followers (a Stackelberg–Nash setting) are also considered.
Key words: algorithmic game theory, integer programming, Barvinok’s generating functions, pure Nash equilibria, pure price of anarchy, pure threat point
In this paper we introduce a new class of strategic games that have appealing properties, and whose set of pure Nash equilibria can be described in a convenient encoding by rational generating functions using techniques pioneered by Barvinok (1994) and expanded by Barvinok and Woods (2003). Generating functions techniques based on Barvinok’s results have been applied to discrete optimization (see, for instance, De Loera et al. (2008), De Loera et al. (2007)), and various other areas of applied and pure mathematics (see De Loera (2005) for a survey). To the authors’ knowledge this is the first application of the theory of rational generating functions to the study of games.
This paper is motivated by open questions regarding the computational complexity of deciding the existence of pure Nash equilibria in strategic games. For a general reference on complexity issues in game theory see Papadimitriou (2007). As opposed to the case of mixed-strategy Nash equilibria which are guaranteed to exist for every game, the general problem of deciding if a strategic game has a pure Nash equilibrium is NP-hard (Gottlob et al. (2005)). In view of this difficulty, the problem has been explored under various restrictions on the actions and payoffs of the players; for instance, in graphical games (Alvarez et al. (2005), Gottlob et al. (2005)), congestion games (Dunkel and Schulz (2008), Fabrikant et al. (2004)) and action graph games (Jiang and Leyton-Brown (2007)). This paper continues this tradition, by introducing a class of games that will be shown to have convenient algorithms to decide if instances have pure Nash equilibria, and if they exist, to compute them.
We consider integer programming games, which are simultaneous games where the players’ actions (pure strategies) are lattice points (i.e., integer points) inside polytopes described by systems of linear inequalities. Since the sets of actions are given implicitly by the description of polytopes, they may be of exponential size with respect to the input size. In our setting, each player’s payoffs are given as difference of piecewise linear convex (DPLC) functions. As an aside, optimization problems involving the difference of convex functions are a well-studied class of nonconvex programs (see for example Horst and Thoai (1999)).
The main result of the paper is that the set of pure Nash equilibria of integer programming games with DPLC payoffs can be encoded as a short rational generating function in polynomial time when the number of players, dimensions of the polytopes that define the action sets and the number of “convex” linear pieces in the payoffs are all fixed. Although these conditions are restrictive, note that each player may have an exponential number of actions. Indeed integer programming games with DPLC payoffs are a subset of a general class of games where deciding if a pure Nash equilibrium exists is -complete with a fixed number of players and exponential-sized strategy spaces Alvarez et al. (2005).
Besides questions of complexity, a short rational generating function encoding is a convenient data structure for answering other questions of interest regarding the structure of pure Nash equilibria and related concepts. For instance, several questions analogous to those explored in Conitzer and Sandholm (2003) regarding mixed strategy Nash equilibria can be answered efficiently in our setting for pure Nash equilibria by using the rational generating function data structure.
We feel the main contributions of the paper are:
Introducing the use of Barvinok short rational generating functions to the study of strategic games and demonstrating the power of encoding sets of pure equilibria as generating functions.
Presenting a tractable class of games, integer programming games with DPLC payoffs, for which pure strategy Nash equilibria and related quantities can be computed in polynomial time when certain dimensions are fixed.
Also of note are two ideas used in several places in this paper:
In order to represent sets of equilibria, or other sets of interest, as rational generating functions we express the set as an overall feasible set in which unwanted elements, expressed as the union of projections of lattice point sets in polytopes, are removed. See for instance the proof of Theorem 5 where the set of pure Nash equilibria is defined in this way. This is a general technique that is adapted to various settings in Sections id1 to id1.
Some results are easier to show when the actions for each player in the game are extended to include a component that captures the payoff of that player. This extension allows for descriptions of extended strategy profiles and equilibria that are more amenable to generating function techniques and can readily be converted back to normal strategy profiles and equilibria. See for instance Definition 3.
The paper is organized into the following sections. Section id1 introduces integer programming games and discusses an application of this framework to a model of competing firms producing identical indivisible goods. Section 1 reviews the basic theory of Barvinok generating functions and major results that will be used in the remainder of the paper. Section id1 discusses pure Nash equilibria and contains the main contributions of the paper – demonstrating how generating functions can be used to encode sets of pure Nash equilibria. Section 3 details several other applications of generating function constructions to the computation of Pareto optima, the price of anarchy, and pure minmax values. Lastly, Section id1 describes a sequential (Stackelberg–Nash) version of an integer programming game where a leader’s actions affects the description of the polytopes defining the actions sets of a group of followers, who then play a simultaneous game.
We begin by introducing the following class of strategic games:
Definition 1 (Integer Programming Game)
An integer programming game with players is a noncooperative game where the of actions for each player is the set of lattice points inside a polytope; that is,
where is a rational polytope.
Let denote the set of players. The set of action profiles is the Cartesian product of the ’s:
where . The payoff functions are integer-valued of the form for .
As noted in the introduction, a distinguishing feature of this class of games is that the action sets are defined succinctly by linear systems , even though may be exponential in size with respect to the input size of and . We use rational generating functions to avoid explicitly enumerating each player’s action set.
Definition 2 (DPLC payoffs)
An integer-valued payoff function of a game is a difference of piecewise-linear convex functions or DPLC function if it can be expressed as:
where the and are affine functions with integer coefficients and where and are finite index sets. We refer to the as the “convex” pieces of and the as the “concave” pieces of .
We consider integer programming games where each player has a DPLC payoff function
again where the and are given affine functions with integer coefficients and the sets and are given finite index sets.
A first comment regarding this class of games is that they can express any finite game given in normal form. A normal form game is defined by action sets and payoffs for and . We refer to the set as the set of action profiles. A normal form game is finite is is finite. We use the alternate notation and , as opposed to and , for normal form games to draw a contrast between the fact that in normal form game the actions sets and payoffs for each action profile are given explicitly as part of the input, whereas in integer programming games the action sets and payoffs are given implicitly. This contrast between implicit and explicit representations is important when one considers the computational complexity of finding pure Nash equilibria (see Alvarez et al. (2005) for a technical discussion).
Every finite normal form game is equivalent to an integer programming game with DPLC payoffs.
Proof. Let finite normal form game be defined by action sets and payoffs for . Let equal the number of elements in the action set . Let vector denotes a mixed strategy profile for player . Mixed strategy profiles lie in the unit simplex:
This is a polytope, and the lattice points inside are exactly its vertices, which correspond to pure strategies (actions) for player , namely, an action in is represented by its characteristic vector . Thus, we represent the set of pure strategies for player as . As above let . This conforms to the framework of integer programming games.
As for the payoffs, our goal is to convert the explicitly given payoffs over the set of action profiles into equivalent DPLC payoff functions over . Let and . For every , define the DPLC payoff
Note that for every we have . Thus the normal form game is equivalent to the integer programming game with pure strategy sets and DPLC payoffs .
Note that this representation has the same input size as the normal form game itself. Further computational complexity consequences of this proposition are discussed in Remark 2.
Another useful result demonstrates the power of modeling payoffs as DPLC functions. Zalgaller (2000, Theorem 4.2) shows that every continuous piecewise linear function can be represented as the difference of two piecewise linear convex functions. Thus, a DPLC function can be used to describe any continuous piecewise linear payoff function, which in turn can be used to approximate an arbitrary continuous payoff function.
Example 1 (Cournot game with indivisible goods and fixed production costs)
A set of manufacturers (the players) produce indivisible goods which are then sold in a market. Player chooses an integer production level for each of its indivisible products subject to resource constraints where . Thus, player ’s action set is the set of integer points in a polytope in . The payoff to each player consists of revenues and production costs. Under usual assumptions, the revenue to each player is a concave function of the action profile , which can be expressed as a piecewise linear concave function . For each player and product there may be a fixed production cost . The variable production cost is a convex function of the production levels expressed as a piecewise linear convex function . The payoff to player is thus
which can be expressed as a DPLC function. As will be discussed further in Remark 3, this is precisely the structure that is analyzed in this paper.
We give a very brief overview of the theory of short rational generating functions used in this paper. Barvinok (1994) introduced an algorithm for determining the exact number of lattice points in a rational polytope , that runs in polynomial time for every fixed dimension . This algorithmic breakthrough provided a strengthening of the famous algorithm of Lenstra (1983), which allows to decide whether contains a lattice point in polynomial time for every fixed dimension.
Barvinok’s method works as follows. Consider the generating function of the lattice point set , which is defined as the multivariate Laurent polynomial
This Laurent polynomial, when encoded as a list of monomials, has exponential encoding size. Barvinok’s algorithm computes a different representation of the function as a sum of basic rational functions in the form
where is a polynomial-size index set and all data are integer. This algorithm runs in polynomial time whenever the dimension is a fixed constant. A formula of the type (4) is called a short rational generating function.
Note that each of the basic rational functions has poles (the point in particular is a pole of all the basic rational functions), but after summing up only removable singularities remain. Obtaining the exact number of lattice points of is easy in (3), since clearly . Since (4) is a formula for the same function (except for removable singularities), we also have , which can be evaluated in polynomial time by performing a residue calculation with each basic rational function in the sum (4). An important point to note is that this evaluation is possible with arbitrary rational generating functions that correspond to finite lattice point sets. In other words, if we can compute in polynomial time a rational generating function of a finite lattice point set , we can also compute in polynomial time its cardinality . Therefore, we can also decide in polynomial time whether .
A first, trivial observation that allows to combine rational generating functions is the following. Let and be lattice point sets given by their short rational generating functions and . Then the direct product (Cartesian product) also has a short rational generating function that is simply the product of the rational functions:
Barvinok and Woods (2003) developed powerful algorithms to obtain short rational generating functions of more general lattice point sets. The first of these algorithms concerns constant-length Boolean combinations of finite lattice point sets that are already given by rational generating functions.
Theorem 1 (Boolean Operations Theorem)
(Corollary 3.7 in Barvinok and Woods (2003)) Let and be fixed integers, and let be any Boolean function such that . Then there exists a constant and a polynomial-time algorithm for the following problem. Given as input, in binary encoding,
the dimension and
rational generating functions
of finite sets , represented by the rational numbers , integer vectors and for , , such that the numbers of terms in the denominators are at most ,
output, in binary encoding,
rational numbers , integer vectors , for , , where , such that
is a rational generating function of the finite set that is the Boolean combination of corresponding to the function .
Note that the restriction ensures that the set will be finite. The essential part of the construction of Theorem 1 is the implementation of set intersections, which are based on the Hadamard product (Barvinok and Woods 2003, Definition 3.2), which is the bilinear extension of the operation defined on monomials as
With this definition, clearly
Another powerful method to define lattice point sets is by integer projections. Let be a finite lattice point set, given by its rational generating function . Let be a linear function and denote by the image (projection) of . If the map is one-to-one (injective) from , then the generating function of the projection can be computed by making a monomial substitution in ; see Barvinok and Woods (2003, Theorem 2.6). This fact is used in the proof of Corollary 2.
When is the set of lattice points in a polytope , the integer projection method of Barvinok and Woods (2003) can be employed to construct a rational generating function of the projection .
Theorem 2 (Projection Theorem)
(Theorem 1.7 in Barvinok and Woods (2003)) Let the dimension be a fixed constant. Then there exists a constant and a polynomial-time algorithm for the following problem. Given as input, in binary encoding,
an inequality description of a rational polytope ;
a positive integer ; and
a linear map given by an integral matrix;
output, in binary encoding,
rational numbers , integer vectors , for , , where , such that
is a rational generating function of the set .
Once a rational generating function of a set has been computed, various pieces of information can be extracted from it. We have already mentioned that it is possible to compute the cardinality of In addition to that, we can explicitly enumerate all elements of . Since the cardinality of can be exponential in the encoding length of the input, we use output-sensitive complexity analysis, i.e., to measure the complexity of the enumeration algorithm in terms of both the input and the output. The strongest notion of an output-sensitive polynomial-time enumeration algorithm is that of a polynomial-space polynomial-delay enumeration algorithm. Such an algorithm only uses space that is polynomial in the encoding length of the input data. In addition, the time spent between outputting two items, and before outputting the first item and after outputting the last item, is bounded by a polynomial in the encoding length of the input data. The following result is a version of Theorem 7 of De Loera et al. (2007).
Theorem 3 (Enumeration Theorem)
Let the dimension and the maximum number of binomials in the denominator be fixed. Then there exists a polynomial-space polynomial-delay enumeration algorithm for the following enumeration problem. Given as input, in binary encoding,
a number ;
rational numbers , integer vectors , for , , where such that
is a rational generating function of a set of lattice points with ;
an integer with
output, in binary encoding,
all points in the projection of onto the last components,
in lexicographic order.
In addition, binary search can be used to optimize a linear function over a lattice point set encoded as a rational generating function.
Theorem 4 (Linear Optimization Theorem)
Let the dimension and the maximum number of binomials in the denominator be fixed. Then there exists a polynomial-time algorithm for the following problem. Given as input, in binary encoding,
and () as in Theorem 3
a vector ,
output, in binary encoding,
an optimal solution of the optimization problem .
We will use all the above results in the following constructions.
Consider an integer programming game with DPLC payoffs as defined in Section id1. Our goal is to encode the Nash equilibria of such a game as a short rational generating function. The most general setting we provide an efficient algorithm for such an encoding is when the number of players and the dimension of their action sets are fixed and each player’s DPLC payoff function has the form:
where we now assume that the size of is a fixed. Since is bounded we assume without loss of generality that for all and . The analysis proceeds with two fundamental insights. First, when there are a fixed number of “convex” pieces, i.e., when is fixed, each player’s payoff is piecewise linear concave within the region where an ’s remains maximum. The second insight is that when payoffs are piecewise linear concave the hypograph of the payoff function is then a polyhedral set, encodable as a short rational generating function.
First, a simple result towards partitioning the action profile space into regions according to the values of the linear pieces of the payoffs. We assume that is a totally ordered set.
For each player , the set of all action profiles can be expressed as a disjoint union
Proof. We first show that and later establish it is a disjoint union. Clearly . It remains to show the reverse inclusion. Let and define and , then .
To show that the union is in fact disjoint suppose by contradiction that there exists an in where . If then since this implies . However, since this yields that , a contradiction. The result follows.
Note that we could equivalently write as follows,
We can do this because the action profiles in are integer vectors and the data defining the functions are integral. The same holds true for all the strict inequalities in this paper, and thus the alternative descriptions using a strict inequality or a weak inequality with one unit added to the larger side of the inequality are used interchangeably throughout.
The next step is to refine the partition of to account for all players simultaneously. To do so we introduce the following convenient notation. Let be the set of all vectors of indices where for . Using this notation, denote by the intersection . Employing this notation we state the following simple corollary of the previous lemma:
The set of action profiles can be partitioned as follows:
Thus each action profile lies in a unique subset of where it is known that the payoff for each player is
and hence a piecewise linear concave function of . To take advantage of this concave structure in the payoff we propose an extension of the game.
Definition 3 (Extended Game)
Given an integer programming game with DPLC payoffs let denote an extended action profile which includes variables which keep track of payoff values. The set of extended action profiles is the set
We define the extended utility function for each player as
which is a linear function on . We call the tuple the extended game of the original game .
At this point there are three important observations regarding the definition of extended games. Note that since is a bounded by a polytope and the constraints bound the values of it follows that each , and thus is bounded. This fact will be important when encoding by a rational generating function and applying the Linear Optimization Theorem, which we have occasion to do in what follows. Note also that is a linear function over and thus more amenable to encoding by generating functions than the piecewise linear payoffs of the original game.
We also remark that the extended game is not a simultaneous-move game since the players’ choices are not independent and some choices of may lead to infeasibility. Similar issues are explored in Bhattacharjee et al. (2000); however, we do not treat the extended game as a game unto itself, but simply as a mathematical construct to study the equilibria of the original game , and we thus ignore these considerations.
A key step is to establish a correspondence between the pure Nash equilibria to those of the original game. As will be seen, this correspondence relies on the fact that the descriptions of the action profile sets involve disjoint unions.
In analyzing games we often consider deviations from the vector in which the -th component is replaced with . For convenience, let denote the vector of the remaining (unchanged) indexes; therefore,
We follow a similar convention in terms of action profiles. Namely, given an action profile , if player deviates to action then we let denote the (unchanged) actions of the remaining players, so
The equilibrium concept used in the extended game is defined as follows:
Definition 4 (Extended pure Nash equilibrium)
Let be an extended game. An extended pure Nash equilibrium is an extended action profile where if then there does not exist such that and
Consider the game and its extended game as defined above.
An extended pure Nash equilibrium of must be of the form
There is a bijection between the set of pure Nash equilibria of the original game and the set of extended pure Nash equilibria of the extended game.
Proof. (i) Let . By the disjoint union (6) there exists a unique such that . It follows that . For all we have and Thus, . Hence, whenever it is profitable for player to deviate to the extended action . Therefore, an extended pure Nash equilibrium must have the form (7). (ii) Consider the mapping defined by . We claim is a well-defined bijection. First we show that is well-defined, that is for all . Clearly is in . Let for some . Now consider a feasible deviating action for player , , where for some . In other words, player deviates from choosing to choosing and changing to . We have
where the second inequality holds since is a Nash equilibrium for the game and the final equality follows from (i). It follows that is an extended Nash equilibrium for the game and mapping is well-defined.
It is clear that is injective. As for surjectivity, by part (i) if follows that every Nash equilibrium in has the form for some . It just remains to show that all such equilibria arise with . Suppose the contrary, that is but . Then there must be a profitable deviation for some player in the original game ; . This implies that there is a profitable deviation in the extended game since
With this bijection, we can now state the main result of the paper:
Consider an integer programming game with DPLC payoffs given by the following input in binary encoding:
the number of players, and a bound ;
for each , the dimension and an inequality description of a rational polytope ;
for each , nonnegative integers and , and for all integers , such that and , integer vectors , (where ) and integers , defining the affine functions and by and for all .
The set of extended pure Nash equilibria of the extended game has a short rational generating function encoding, which can be computed in polynomial time when the total dimension and the sizes are fixed for all .
Proof. We express the set of extended Nash equilibria as follows:
Note that some of the projected sets may be empty.
The set is the set of action profiles where player has a profitable deviation. The description of in (8) is a union over profitable deviations from one set in the partition of to another. This description of is easy to verify using the definition of extended pure Nash equilibria.
We now establish that can be encoded as a short rational generating function. First we claim admits such an encoding. Consider the description of given in (6). The sets are sets of lattice points inside rational polytopes and thus encodable as short rational generating functions. This in turn implies that admits such an encoding since it in turn is the set of lattice points inside a polytope. By the Boolean Operations Theorem, it follows that can be encoded as a short rational generating functions in polynomial time, since there is a constant number of sets under the assumption that the sets and are of fixed size.
Note in addition that the sets to be projected in are again sets of lattice points inside of rational polytopes, by observing that the extended payoffs functions are linear. By the Projection Theorem it follows that each set in the union can be encoded as a short rational generating function. Using again the Boolean Operations Theorem we conclude that each , and thus , admit short rational generating function encodings which can be computed in polynomial time when the sizes of the sets are fixed for all . We remark that the outer union in (8) (indexed by ) is a disjoint union; thus its rational generating function can be computed by adding the rational generating functions of the parts, rather than using the construction of the Boolean Operations Theorem.
Consider an integer programming game with DPLC payoffs given by the same input as in Theorem 5. The set of pure Nash equilibria has a short rational generating function encoding which can be computed in polynomial time when the total dimension and the sizes are fixed for all .
Proof. By the previous theorem, we can encode the set of extended pure Nash equilibria, , in polynomial time. Using the bijective map given in the proof of Lemma 2 we can use an appropriate monomial substitution in the rational generating function description of to yield a short rational generating function encoding for .
The true power of the previous lemma lies in the fact that having a short rational encoding of a set allows for efficient counting, optimizing and enumerating procedures as discussed in Section 1. Using these techniques we can answer numerous questions of interest on the existence, uniqueness and structure of equilibria.
Consider an integer programming game with DPLC payoffs given by the same input as in Theorem 5. There is a polynomial time algorithm to compute the number of pure Nash equilibria, when the total dimension and the sizes are fixed for all . In addition, under the same assumptions there is a polynomial time algorithm to find a sample pure strategy Nash equilibrium, when at least one exists.
Proof. Given the short rational generating function encoding of we calculate in polynomial time by counting methods discussed near the beginning of Section 1. If an equilibrium exists, we can output one by running the polynomial-delay enumeration algorithm on described in the Enumeration Theorem and terminating just after one equilibrium has been generated. This can be done in polynomial time.
Note that the algorithm runs in time polynomial in the total number of “concave” pieces in the payoff functions. This corollary can be used to answer the question of whether a unique pure Nash equilibrium exists – simply check whether . The following result is also immediate by the Enumeration Theorem.
Consider an integer programming game with DPLC payoffs given by the same input as in Theorem 5. There is a polynomial-space polynomial-delay algorithm to enumerate all the pure Nash equilibria of the game when the total dimension and the sizes are fixed for all .
Reflecting on the content and context to the results of this section, we make the following useful remarks.
Considering the number of elements of the game we need to fix in Corollary 3 – fixed number of players, fixed dimension of the polytopes, fixed sizes of the – one might ask if there is an alternate method to generating functions that might yield similar results. The key observation is that the action sets are described implicitly as lattice points in polytopes given by linear inequalities, and thus the number of actions for each player may be exponential in the input size. Thus, simple enumeration of all the action profiles in is a computationally intractable approach to the problem.
It was shown in Proposition 1 that every normal form game can be expressed as an integer programming game with DPLC payoffs. Note, however, that the dimensions of the action spaces are equal to number of corresponding actions in the normal form game. Indeed, using the notation of the proof of Proposition 1, we have . From a complexity point of view this representation is unsatisfactory. In Corollary 3 we require the dimension of the action spaces to be fixed, and thus we can only handle a fixed number of actions in the underlying normal form game. Normal form games with a fixed number of players and fixed number of actions are computationally uninteresting.
The Cournot game in Example 1 fits the assumptions of Corollary 3. We assume that the number of players (manufacturers) is “small”, i.e., fixed, in order for each manufacturer to have appreciable market power. We also assume that the total number of products is small. The sets have cardinality , which is fixed, and thus the decomposition of in Corollary 1 is comprised of a constant number of subsets. Since the algorithm in Corollary 3 scales polynomially with the sizes of the sets , we can afford a variable number of “concave” pieces in the description of the payoff functions. These “concave” pieces are used to represent general concave revenue functions and the convex parts of the cost functions, when restricted to integer points.
In addition to counting and enumerating pure Nash equilibria, generating function techniques can be used to derive efficient algorithms for related computations for integer programming games. Several of these are discussed in the following subsections.
First, note that the encoding of the set of Nash equilibria as a short rational generating function, being a compact representation, is useful for learning about the specific structure of a game’s equilibria. For instance, a simple calculation suffices for deciding the existence of a pure Nash equilibrium where player plays a given action . Indeed, simply find the short rational generating function encoding of
in polynomial time under the same assumptions in the previous section.
Now onto some more sophisticated calculations.
Consider the question of finding Pareto optimal pure Nash equilibria, if any exist, in an integer programming game with DPLC payoffs. To tackle this, we start by encoding the set of Pareto optimal action profiles of the game.
Consider an integer programming game with DPLC payoffs given by the same input as in Theorem 5. The set of Pareto optimal action profiles has a short rational generating function encoding, which can be computed in polynomial time when the total dimension and the sizes are fixed for all .
Define as the set of Pareto optimal points in the extended game and find a generating function encoding for .
Derive a bijection between and .
Use the generating function of and the bijection to obtain the generating function of .
For part (id1) consider the following decomposition of :