Computing Equilibria in Binary Networked Public Goods Games
Abstract
Public goods games study the incentives of individuals to contribute to a public good and their behaviors in equilibria. In this paper, we examine a specific type of public goods game where players are networked and each has binary actions, and focus on the algorithmic aspects of such games. First, we show that checking the existence of a purestrategy Nash equilibrium is NPComplete. We then identify tractable instances based on restrictions of either utility functions or of the underlying graphical structure. In certain cases, we also show that we can efficiently compute a socially optimal Nash equilibrium. Finally, we propose a heuristic approach for computing approximate equilibria in general binary networked public goods games, and experimentally demonstrate its effectiveness.
1 Introduction
Public goods games have been a major subject of inquiry as a natural way to model the tension between individual interest and social good [kollock1998social, santos2008social]. In a canonical version of such games, individuals choose the amount to invest in a public good, and the subsequent value of the good, which is determined by total investment of the community, is then shared equally by all. A number of versions of this game have been studied, including variants where players are situated on a network, with individual payoffs determined solely by the actions of their network neighbors [bramoulle2007public].
An important variation of networked public goods games treats investment decisions as binary [galeotti2010network]. One motivating example is crime reporting, known to vary widely, with the general observation that crime is considerably underreported [Morgan17]. In a game theoretic abstraction of crime reporting, individuals choose whether or not to report crimes, and benefits accrue to the broader community, for example, causing a reduction in overall crime rate. Another example of binary public goods games is vaccination. In this example, parents decide whether to vaccinate their children, with herd immunity becoming the public good. To keep terminology general, we will refer to the binary decision whether or not to invest in a public good (thus, reporting a crime and vaccinating are forms of such investment).
A special case of binary public goods games (BNPGs), commonly known as bestshot games, has received some prior attention [Dallasta11, galeotti2010network, Komarosvky15, Levit18]. However, bestshot games make a strong assumption about the structure of the player utility functions. While Levit et al. [Levit18] recently showed that equilibria for bestshot games can be computed in polynomial time by best response dynamics, these may fail to find social welfareoptimal equilibria, and nothing is known about BNPGs more generally.
We study the problem of computing pure strategy Nash equilibria in general binary public goods games on networks. We provide examples to show that a pure strategy Nash equilibria is not guaranteed to exist for general BNPGs. Furthermore, we show that even determining if a pure strategy Nash equilibrium exists is hard in general. However, while pure strategy equilibria need not in general exist, and are hard to compute, we exhibit a number of positive results for important special cases. One class of special cases pertains to binary public goods games for completely connected networks (communities), in which case an equilibrium can be found efficiently if it exists. Similarly, we can efficiently find a pure strategy equilibrium in general BNPGs when the graph is a tree. If we further restrict the externalities to have an identical impact on all players (we call this the homogeneous case), we can characterize all pure strategy equilibria, and efficiently compute a socially optimal equilibrium. Moreover, if both investment costs and externalities are identical (termed the fully homogeneous case), we can characterize all pure strategy equilibria for arbitrary networks. Finally, we present a heuristic approach for finding approximate equilibria to tackle general BNPGs, and experimentally demonstrate that it is highly effective. Our algorithmic results are summarized in Table 1.
Related Work
Our work relates to the broad literature on graphical games, a succinct representation of games in which utilities exhibit local dependences captured by a graph [kearns2013graphical]. [elkind2006nash, daskalakis2009complexity, gottlob2005pure] studied the complexity of computing (mixedstrategy) equilibria in graphical games with utilities defined in the matrix form, and proposed efficient algorithms to find equilibria on graphs with restricted topologies.
Networked public goods games can be regarded as a special class of graphical games where the utilities are functions of the accumulated efforts of individuals. A number of model variations have been proposed to study public goods in different fields such as economics, innovation diffusion, and medical research [feick1987market, valente1996network, burt1987social]. Our model is closely related to that proposed by bramoulle2007public [bramoulle2007public]. The two qualitative distinctions are that (a) we consider binary investment decisions, in contrast to bramoulle2007public, who focus on the more traditional continuous investment model, and (b) bramoulle2007public assume homogeneous concave utilities, while we consider a more general setting.
Other related variations of graphical games include supermodular network games [manshadi2009supermodular] and bestshot games [Dallasta11, galeotti2010network, Komarosvky15, Levit18]. The latter are a special case of BNPGs, and Levit et al. [Levit18] recently showed that these are potential games with better response dynamics converging to a pure strategy equilibrium in polynomial time. No other algorithmic results are known for either of these special classes of graphical games.
general  complete graph  tree  

heterogeneous  hard  poly  poly 
homogeneous  hard  poly  poly 
fullyhomogeneous  hard  poly  poly 
fullyhomogeneous + convex  poly  poly  poly 
2 Model
A Binary Networked Public Goods game (henceforth BNPG game) is characterized by a graph , where the node set denotes the players and represents the interdependencies among the players’ payoffs, a binary strategy space for each player (we can think of these as decisions whether to invest in a public good), and a collection of utility functions . These utility functions have special structure, which we now describe, and we use the running example of crime reporting to illustrate the intuition behind this structure.
Let be the set of neighbors of , and define , or equivalently, is the number of ’s network neighbors who choose to invest (note the implicit dependence of on the strategies of ’s neighbors). Thus, in the crime reporting scenario, represents the number of ’s neighbors who report crimes. We assume that each player gains whenever more people invest (report crimes), for example, because as a result crime rate drops. On the other hand, reporting crime is costly (time consuming, or even dangerous). We capture the latter feature by introducing a cost which is incurred whenever invests in a public good. Player ’s utility function is then defined as
(1) 
where captures the positive externality of investment choices by ’s neighbors, such as the benefits to an individual when their neighbors report crimes. The only restriction we impose on at this point is that they are nondecreasing functions in (e.g., higher reporting reduces crime rate). Our definition of generalizes the one given by bramoulle2007public bramoulle2007public, who assume that is a twice differentiable strictly concave function. There are many scenarios these assumptions are violated. For example, studies of incentives in P2P systems entail natural models in which is an Sshaped function [buragohain2003game]; commonly considered bestshot games model as a step function [galeotti2010network]; and may be convex as in models of social unrest [chwe2000communication]. However, our definition of is flexible enough to model the aforementioned scenarios. Note that the size of BNPG representation is for an arbitrary . A useful observation is that player chooses to invest if and only if which can be rewritten as
(2) 
As each player has a different mapping function , we henceforth call the general version of this game a heterogeneous BNPG game. We will study several important special cases. The first is when the externality function is the same for all players, which we term a homogeneous BNPG game. The second is a further restriction of a homogeneous game where all players have identical costs ; we term this a fully homogeneous BNPG game. The bestshot games, which received some prior attention, are a special case of homogeneous BNPGs with for some integer .
We use to parametrize a BNPG game with underlying graph and a set of utility functions . We seek purestrategy Nash Equilibria (PSNE) of the game. Let denote the action profile for all players, and let denote the joint actions of all the players other than player .
Definition 2.1.
In a BNPG game , a purestrategy Nash Equilibrium is a vector satisfying for any , where .
3 Heterogeneous BNPG Games
Existence and Complexity
We begin by asking basic questions about BNPG games: is a PSNE guaranteed to exist, and if not, is it hard to check whether one exists?
Existence of PSNE We first show that a PSNE need not exist even if the network is a complete graph. Consider a game with two players and . Let and be the utilities of and , respectively. A sufficient condition under which PSNE does not exist is that and and and . This condition can be achieved by choosing and such that , , , and , where is a positive constant. A possible configuration is that , , , and , , , where and , ensuring that both and are nondecreasing.
Complexity Next, we show that determining the existence of PSNE is hard.
Theorem 1.
Determining the existence of a purestrategy Nash equilibrium in a BNPG game is NPComplete.
Proof.
Given an action profile, it takes polynomial time to check if it is a PSNE, so the problem is in NP. We construct a reduction from the Independent Set (IS) problem. Given a graph , the IS problem is to decide whether there is an independent set of size at least in .
Given an instance of IS (i.e., a graph and an integer ), we construct a new graph by adding an additional node and connecting to every node in , that is . We define the bestresponse policy of the players as the following:
(3) 
Note that by choosing different functions , the bestresponse policy above are always realizable. A heterogeneous BNPG is defined on the graph , with the bestresponse policies defined above. We now show that finding an independent set of size at least in graph is equivalent to finding a PSNE of the game.
First, suppose we have found an independent set of size . Then node is not in since connects to every node in . We check the remaining nodes in and iteratively add into those nodes that have no connections to any node in , which results in . Note that is maximal and its size is at at least . We argue that all nodes in choosing and the rest of the nodes choosing is an equilibrium. For a node in , it will not deviate since none of its neighbors chooses . For node , it will not deviate since it has at least neighbors that choose . For a node , it must connect to at least one node in ; otherwise is not maximal. Thus will also not deviate.
Second, suppose we have found an equilibrium. There must be some nodes choosing in the equilibrium, otherwise for any node in it has no investing neighbor and it would deviate to choose . If the equilibrium is that all nodes choose , we have since chooses . Because connects to all nodes in , which indicates that . So the equilibrium cannot be that all nodes choose . Suppose in the equilibrium the nodes are divided into two sets and where nodes in choose and nodes in choose . Further note that cannot be in . Because another node in would prefer to choose as it connects to . Thus, the nodes in form an independent set. For a node in , it must be true that connects to at least one node in since chooses . Furthermore, choosing means that the size of is at least . Thus, the set is an independent set of with size at least . ∎
Since determining existence of a PSNE is hard in general BPNG games, we next consider tractable special cases.
Games on Complete Graphs Consider the case where is a complete graph. Remarkably, despite the fact that a PSNE need not exist even in this special case, we now show that we can find one (if it exists) or confirm nonexistence in polynomial time. Define a set associated with an integer , which represents the number of players investing, as follows:
(4) 
Let . When (resp. ), the set consists of the players who will choose to invest (resp. not invest), or indifferent between investing and not investing, if the total of players invest and counts the number of such players. The following proposition is then immediate.
Proposition 2.
There exists a PSNE if and only if .
The condition in Prop. 2 suggests the following algorithm to compute a PSNE, or prove that one doesn’t exist. For each integer , check if , which simply requires computing , an operation. If we find a such that this condition holds, the players in are condidate investing players, from which a PSNE can be constructed. Otherwise, PSNE does not exist. Thus, the full algorithm has running time of .
Games on Trees Another important special case is when is a tree. We now present a polynomialtime algorithm to compute a PSNE on trees (or conclude one does not exist).
Suppose an action profile is given. Consider a subtree denoted by . Observe that is a PSNE if and only if the actions restricted to the subtree, namely , form a (local) PSNE of the BNPG played on . This indicates that a PSNE on can be constructed from those (local) PSNE on subtrees. Our algorithm, TreePSNE, is inspired by TreeNash kearns2013graphical kearns2013graphical, but unlike the latter, it computes an exact PSNE (rather than an approximate mixed Nash equilibrium) in polynomial time, as formalized by the following theorem.
Theorem 3.
When is a tree, it takes time to compute a PSNE or conclude that one does not exist, where is the maximum degree of .
Proof.
We give a constructive proof of Theorem 3. Given a tree , we denote its root by (the choice of the root is arbitrary). Suppose is an inverted tree, where the root is at the bottom and the leaves at the top. The nodes in are categorized into three classes: leaf nodes, internal nodes, and the root. Our algorithm consists of two passes: a downstream pass and an upstream pass. In the downstream pass we traverse the nodes in a depthfirst order (start with the leaves and end at the root). Each leaf or internal node passes a table to its parent. We call the table conditional bestresponse table since it contains the best responses of a node conditioned on its parent’s actions and equilibrium actions of its children.
Before presenting the algorithm, we define (resp. ) as the number of node ’s children that invest in a PSNE of the associated subtree given that invests (resp. not invests). Let and be a pair of nodes, where is the parent of . Denote their action profile as . The necessary condition that is part of a PSNE is in Eq. (5), where the “” is “” if and “” otherwise.
(5) 
Suppose is a leaf node and is its parent. Since does not have any child, is always zero no matter what ’s decision is. Thus, computing the table is equivalent to identify the action profiles such that they satisfy Eq. (5), which takes time since there are at most four combinations of . If no satisfies Eq. (5), we conclude a PSNE does not exist for the game. The procedure to compute the conditional bestresponse table for a leaf node is summarized in Algorithm 1.
Now we consider an internal node . Suppose its parent is and it has children . For the purpose of induction, suppose the conditional bestresponse tables of have been passed to . An example is showed in Figure 1, where the two tables beside and indicate the best responses of the two nodes conditioned on their parent node ’s actions. We need to check if there is a an action profile satisfying Eq. (5), which requires us to compute . Note that there may be ties, where a player is indifferent between investing and not investing given its parent’s action. For example, in Figure 1 the right table indicates that node is indifferent between and , given .
Let be the maximum degree of . When , we denote the number of ’s children that always choose to invest (resp. not invest) as (resp. ). To compute (resp. ), we iterate through the conditional bestresponse tables of and count the number of children that have unique best response (resp. ) given . This step takes . Note that , since has children. Thus, the possible values of are . We obtain possible values of given using the similar procedure. Finally, we substitute the four combinations of , as well as the corresponding values of that condition on , into Eq.(5), which identifies the that can be part of a PSNE. If no satisfies Eq. (5), we conclude a PSNE does not exist for the game. The procedure to compute the conditional bestresponse table for an internal node is summarized in Algorithm 2.
We can compute the best response table of in using a slightly modified version of Algorithm 2.; if the table is empty, we can conclude that no PSNE exists. Thus, computing the conditional bestresponse tables for all nodes takes time. In addition, it takes to obtain the depthfirst order. Thus, the downstream pass takes time.
In what follows we show that the downstream pass does not miss any PSNE if there is one, by an inductive argument. Suppose there is a PSNE that is missed by the downstream pass. Then we must wrongly conclude that no PSNE exists at some node as we move downward. First, the node cannot be a leaf node, since we exhaustively check the four possible action profiles of and its parent. Next, suppose the PSNE is not missed until an internal node . Since the PSNE is not missed by any child of , we must miss an action profile of and its parent that satisfies Eq. (5). However, we check all combinations of , , and , so we cannot miss such an action profile, which leads to a contradiction. The same argument applies for the root .
In the upstream pass we traverse in a reversed depthfirst order (start at the root and end the leaves). We first select the action of the root. If both and are ’s best responses, we arbitrarily pick one. Next, we sequentially determine each node’s action based on its parent’s action and the conditional bestresponse table passed to the parent. This pass takes time. In conclusion, the total running time of TreePSNE is (see the Appendix for the detailed algorithm). ∎
Games on Arbitrary Graphs Finally, we present a heuristic algorithm to find approximate PSNE for general BNPG games. An approximate PSNE is defined as follow:
Definition 3.1.
In a BNPG game an PSNE is a vector such that:
, where and .
The heuristic algorithm is composed of two subroutines. The first one is termed as AsynchronousBR, which is based on the idea of bestresponse dynamics. In one execution of AsynchronousBR, each player will sequentially update her action with the bestresponse to all other players, in an asynchronous manner. The second subroutine is termed Evolve, and will execute AsynchronousBR times and pick the minimum such that in the associated action profile , every player has achieved an PSNE. In this way, Evolve finds the approximate PSNE with the best quality through bestresponse dynamics. Due to limited space, the AsynchronousBR and Evolve are provided in the supplement. The heuristic algorithm to find an approximate PSNE is given in Algorithm 3. The input is the stopping criterion. When the distance of two consecutive profiles is small enough () the algorithm converges.
4 Homogeneous BNPG Games
Next, we consider homogeneous BNPG games where all the players share the same function . We begin by showing that even in homogeneous BNPG games, a PSNE need not exit.
Existence of PSNE
We present a homogeneous game for which a PSNE does not exist. This game has three players and nodes corresponding to the players form a simple path with player in the middle. Specifically, , , and . We set , , and , corresponding to a certain function that we can select arbitrarily. There are a total of possible action profiles of the game and an action profile is a PSNE if and only if a specific set of inequality constraints are satisfied. For example, the action profile is a PSNE if and only if and and . By exhaustively checking all profiles, it is not difficult to verify that none of the sets of inequality constraints is satisfied, meaning that a PSNE does not exist in this game.
Complexity Next, we show that checking if a PSNE exists for a homogeneous BNPG is hard. The hardness result follows from Theorem 10, where we show that determining the existence of a PSNE in a special case of the homogeneous BNPG is NPcomplete.
Theorem 4.
Determining the existence of a PSNE in a homogeneous BNPG game is NPComplete.
Next, we consider further restrictions that enable strong positive algorithmic results—far stronger than for the general BNPG games.
Games on Complete Graphs
Computing a PSNE We now show that there always exists a PSNE in homogeneous BNPG games on complete graphs, and it can be computed in time , in contrast to the algorithm for the general case.
Theorem 5.
Every homogeneous BNPG game on a complete graph has a PSNE, which can be computed in time .
Proof.
Our proof is constructive. Without loss of generality, suppose (we can start by sorting players in this order). If , we immediately obtain an equilibrium where no player invests, since for every . If , every player invests is an equilibrium. If neither of the two cases holds, we initialize to allzeros. Since , we set . For a subsequent player , we set if . Note that in this case is the number of players (who choose to invest) with index smaller than . We repeat this process for each player in ascending order of until we found a certain player such that . We then set the decisions of player and her subsequent players to . We argue that the resulting action profile is a PSNE.
Note that in the above process, we have for player , , since is the number of investing players preceding player . For player , we have . Now, for any player with , we have since . Thus, player will not deviate from her current decision, which is . For any player with , we have . That is, player would not deviate from her current decision . The resulting action profile is then a purestrategy Nash equilibrium. The proof implies that the complexity of finding a PSNE is , dominated by the time to sort players in order of . ∎
The proof of Theorem 5 is constructive and gives an algorithm to find a PSNE. We term this algorithm SimpleSort. In fact, SimpleSort outputs an equilibrium with a special structure, where the first players (in ascending order of ) will invest and the rest will not, for some determined by the algorithm. As this equilibrium is not unique, we next characterize all PSNE of this game.
Characterizing all PSNE In order to characterize all equilibria, we classify these based on the number of players who choose to invest in an equilibrium. For an equilibrium , let be the number of player who choose to invest. We term such an equilibrium a PSNE.
Let be the index set of the players whose associated satisfies a certain condition . Given a PSNE, for a player who has chosen , we have based on the condition in Eqn. (2). For a player who has chosen , we have . Equivalently, if (respectively, ), we know that player has chosen (respectively, ). Based on this, given any , we can characterize all possible PSNE.
Proposition 6.
When , a PSNE exists if and only if: (1) there is no such that and (2) . The resulting unique PSNE is that all players in the set invest.
We introduce some notation. Let , , and . Let , , and .
Proposition 7.
When , PSNE exists if and only if and . Specifically, let be an arbitrary subset of with cardinality . Then a PSNE is that all players in the set invest.
Proof.
Consider a PSNE for a fixed integer , where there are players decided to invest. Recall from Eqn. (2) that a player decides to report if and only if where is the number of ’s neighbors who decide to invest. As the underlying graph is complete, is the total number of investing players in the game excluding . Note that for a player who decides to invest, while for a player who decides not to invest, . Then it is sufficient to compare associated with each player to and .
Based on the investing condition in Eqn (2), we have for the player who decided to invest in a PSNE. For a player who decided not to invest, we have . Equivalently, for an arbitrary player , we have two observations:

if , player has decided to not to invest;

if , player has decided to invest.
Then to check the existence of PSNE, it is sufficient to examine the above two conditions and check whether there are exactly players chosen to invest. We divide the discussion into two cases: and , which corresponds to Proposition 5 and Proposition 6, respectively.
Case 1:
When , if there is a player such that , a PSNE does not exist. Moreover, a PSNE exists only if there are exactly players whose associated satisfies . And that players reporting is a PSNE. This proves Proposition 5.
Case 2:
When , the two values and divide the players into three sets based on : , , and . Let , , and . Then if a PSNE exists, all players in will invest and all players in will not invest. Furthermore, to ensure that there are exactly players investing, there should be exactly players in the set choosing to invest. Thus, a PSNE exists if and only if and . This proves Proposition 6. ∎
By considering all from to , Proposition 6 and Proposition 7 can fully characterize all possible PSNE in polynomial time. We note that Proposition 7 shows that for a given , the number of possible PNSE could be exponential in . However, we can pick one PNSE by arbitrarily (e.g., randomly) selecting a subset from .
The above two propositions also characterize the structure of the equilibrium action profiles , which is illustrated in Fig. 2. Specifically, if we sort the players in ascending order of , an equilibrium is divided into three regions. The first (respectively, third) region corresponds to players who choose (respectively, ) and the second region is a mixed zone where some of the players choose and others .
Social Welfare Social welfare is defined as the sum of utilities of all players:
(6) 
A common goal is to seek the PSNE with maximum social welfare—the socially optimal PSNE. Although the SimpleSort algorithm can always find a PSNE, it is not necessarily socially optimal. We now use the results in Propositions 6 and 7 to efficiently find a socially optimal PSNE.
For a specific PSNE, we have , the same for all players. Thus, the social welfare in a PSNE, denoted as , can be rewritten as a linear function of :
(7) 
For a fixed , there are two possible cases, i.e., or . For the first case, we can efficiently compute a unique PSNE based on Proposition 6 if it exists. For the second case, Proposition 7 states that in an equilibrium, there are exactly players in the index set choosing to invest. As is linear in , it is maximized when we pick the top players in the set in ascending order of and set the corresponding decision variables to . That is, for any , we can either confirm that a PSNE does not exist or efficiently compute the socially optimal PSNE for that fixed . Thus, by considering from to , we can efficiently compute the socially optimal PSNE.
Fully Homogeneous Games on Arbitrary Graphs
In this section, we discuss equilibrium computation in BNPG games with arbitrary graph structure. As demonstrated in the counterexample above, a PSNE need not exist even if is homogeneous. We now consider the question for a more restricted class of fully homogeneous BNPG games, where all players share the parameters . Further, we restrict to be strictly convex. In this case, we show that equilibria always exist, and all equilibria can be computed efficiently.^{1}^{1}1In this case, the game is a supermodular game [sundararajan2007local, manshadi2009supermodular]. While supermodular games always have a PSNE, computing one is not necessarily efficient. For this discussion, let be the maximum degree in .
Since is strictly convex, we have . When , all players investing is a unique PSNE. When , there is a PSNE with no one investing; however, other equilibria might exist. To distinguish, we term the equilibria and as two trivial equilibria, and others where at least one player (but not all) invest are termed nontrivial. The nontrivial equilibria are closelyrelated to a core of a graph. Specifically, a core of a graph is a maximal induced subgraph of , where each node in has degree at least . We have the following lemma from bickle2010k [bickle2010k] charactering the core of a graph.
Lemma 4.1 (bickle2010k [bickle2010k]).
Given an arbitrary graph and an integer , if a core of exists, it is unique.
The following theorem characterizes the relationship between a nontrivial PSNE and a core of the graph .
Theorem 8.
In a fullyhomogeneous BNPG game with strictly convex function , let be an action profile and be the subgraph of induced from the nodes corresponding to the investing players in . If is a nontrivial PSNE, then is a core of .
Proof.
If is a nontrivial PSNE, then we have for some integer . Thus, for an arbitrary player who chooses to invest in the equilibrium , she must be connected to other players who also choose to invest. This holds for any player who invests in the equilibrium. As a result, the induced subgraph has minimum node degree at least . Now, for any other node not in , it represents a player who decides not to invest. By the definition of equilibrium, the must be connected to fewer than nodes in ; otherwise, the corresponding player will change her action to invest. That is, adding to will violate the condition that each node in has at least degree , meaning that is maximal. Thus, is a core of . ∎
Note that Theorem 8 does not guarantee the existence of a nontrivial PSNE. It only states that if a nontrivial PSNE exists, the corresponding induced subgraph is a core of . Thus, it provides a guideline to find a nontrivial PSNE for a specific game – finding the core of the underlying graph.
Fortunately, a simple pruning algorithm can efficiently find the core of a given graph provided that it exists. Specifically, given a graph and an integer , the pruning algorithm will remove all the nodes that have degree less than iteratively until no more nodes can be removed. If the remaining set of nodes is not empty, the resulting subgraph is a core; otherwise, a core does not exist. Moreover, if a core exists, the corresponding nontrivial PSNE is unique from Lemma 4.1. Now we are able to fully characterize the equilibria in a fully homogeneous BNPG game.
Corollary 9.
For a fully homogeneous BNPG game parameterized by , where is strictly convex, we have:

[nosep]

when , is a unique trivial PSNE;

when , is a unique trivial PSNE;

otherwise, there is always one trivial PSNE and possibly one nontrivial PSNE corresponding to the unique core of graph , where satisfies .
The algorithm to find all possible equilibria is then straightforward. Given a fully homogeneous game, we can check if there is an integer such that . If it is the case, we can use the pruning algorithm to find the core of graph (if it exists), corresponding to a nontrivial PSNE. For the other two special cases, we can find the two trivial PSNE. As there are at most two PSNE of the game, we can easily identify the socially optimal equilibrium. Finally, we show that convexity of is necessary to find all equilibria of this game in polynomial time.
Theorem 10.
In a fullyhomogeneous BNPG game with general function , determining the existence of a PSNE is NPComplete.
Proof.
Given an action profile it takes polynomial time to certify if it is a PSNE, so the problem is in NP. When or it takes polynomial time to check if it is a PSNE. Thus, we consider the problem to determine if there is a nontrivial () such that it is a PSNE. We construct a reduction from the kclique (KC) problem. Given a graph , the KC problem asks if there is a clique of size at least in . For an arbitrary instance , we construct a graph . First, we add a clique of size to , where is a large integer satisfying . The nodes are denoted by a set . For every node we connect it to every node in .
Next, we specify a homogeneous BNPG on . Let the players in share the same cost . For each player the bestresponse policy is
(8) 
where the player is indifferent between investing and not investing when . The bestresponse policy above is realizable, for example, by a function satisfying when and when , where .
Suppose a clique in is given. Denote the players in this clique by . We claim that letting the players in invest and others not invest is a nontrivial PSNE. For a player , she is connected to the investing players in , as well as the other investing players in , which means and she will not deviate. Similar argument shows that for any player she will not deviate because . For a player , the number of her investing neighbors falls into one of the three cases: , , and , so she will not deviate.
Another direction is to show that given a nontrivial PSNE , there is a clique of size at least in . First, there must be at least one investing player since the PSNE is nontrivial. Next, we argue there must be at least one investing player in . If all the players in were not investing, then for any player we have , so all players in would not invest, which contradicts the fact that is a nontrivial PSNE. Furthermore, We claim that all players in are investing players. Suppose the set is partitioned into two disjoint sets , where players in invest while players in not. Then for any player we have . Since is a large integer, must be an empty set, otherwise the player cannot have enough investing neighbors. Due to the bestresponse policy in Eq. (8), there are exactly investing players in , which are denoted by . For any player we know , so the player must be connected to the other players in , which shows that is a clique. ∎
5 Experiments
In this section we conducted experiments to show the effectiveness of Algorithm 3 for finding approximate PSNE in general BNPG games. The parameters are sampled from the uniform distribution on . In our experiments we assume where is sampled uniformly at random on , and are either convex or concave, corresponding to strategic substitutes and complements, respectively [galeotti2010network]. If is convex, it is sampled from a set of convex functions by uniformly at random sampling and from and , respectively. Similarly, if is concave it is sampled from a set of concave functions by sampling and from the same sets. We normalize the values of the utility functions to when evaluating the approximation quality of an PSNE. In each simulated game, we feature a mix of players with concave and convex . This mix is determined using a parameter , which is the probability that a particular player ’s is concave; consequently, higher implies a larger fraction of the population with convex utility functions. For each value of we simulated BNPG games. We first conduct experiments on a Facebook network [leskovec2012learning], which is a connected graph with nodes and edges. Then, we experiment on synthetic networks to study the impact of network topologies on the fraction of players reporting in PSNE.
Facebook network The experimental results are shown in Figure 3, where we vary . Each bar is the averaged of the approximate PSNE computed using Algorithm 3. We omit the two corner cases of and because in all of these instances our algorithm returned an exact PSNE. The main takeaway from these results is twofold: first, that even when populations are mixed so that a PSNE is not guaranteed to exist, there is usually an approximate PSNE with a small (maximum benefit from deviation), and second, that our heuristic algorithm finds good approximate PSNE (observe that even outliers have ).
Next, we study the impact of our three parameters, , , and , on the fraction of players reporting in PSNE. Figure 4 presents the results for (left) and (right) (these are the two cases where we can compute the exact PSNE, as mentioned above). We can note that in both cases, increasing or leads to increasing fraction of investing players. This is because higher values of either increase the rate of change of the utility function as more players invest, and consequently network effects lead to higher overall investment. The most dramatic difference, however, is between and . In the former case, a relatively small fraction ultimately invest, whereas leads to a great deal of equilibrium investment, particularly for sufficiently large and . This is because convex imply that as more players invest, the marginal benefits to investment increase, and therefore equilibrium may be seen as a cascade of investment decisions that ultimately captures most of the community.
Synthetic networks We conduct experiments on two types of synthetic networks. The first type is the BarabasiAlbert network (BA) [barabasi2009scale]. BA is characterized by its powerlaw degree distribution, where connectivity is heavily skewed towards highdegree nodes. The powerlaw degree distribution, , gives the probability that a randomly selected node has neighbors. We consider three variants of the BA network with different exponents . We also experiment on SmallWorld (SW) network [watts1998collective]. The SmallWorld network is wellknown for balancing shortest path distance between pairs of nodes and local clustering in a way as to qualitatively resemble real networks. We consider three variants of the SW network, where they differ in the local clustering coefficients. The details about BA and SW networks are listed in Table 2. We use the same experimental setup as the one for Facebook network. Note that we only consider and , where a PSNE can always be found by Algorithm 3. When , a player has higher incentive to invest as more neighbors invest, while the incentive structure is the opposite when .
BA1  BA2  BA3  
exponent  
SW1  SW2  SW3  
local clustering coeff. 
The experimental results on BA networks are showed in Figure 5. The columns from left to right correspond to results on BA1, BA2, and BA3. Note that as decreases it is more likely to have highdegree nodes. The top row (resp. bottom row) is the case where (resp. ). At the bottom row, when and are fixed, there are more highdegree nodes as decreases, thus the investing decisions of these highdegree nodes can encourage more nodes to invest, which results in an overall increasing trend to invest. The results at the top row have the opposite trend, where more free riders occur due to the increase of highdegree nodes, which leads to an overall decreasing trend to invest. The experimental results for SW networks are showed in Figure 6. The columns from left to right correspond to results on SW1, SW2, and SW3. Note that a larger local clustering coefficient leads to denser local structures. Intuitively, when , an investing player’s decision can encourage more neighbors to invest as the local structure becomes denser. On the other hand, when , a denser local structure can also lead to more free riders. This intuition is supported by the overall trend exhibited in Figure 6.
6 Conclusion
We study binary networked public goods games from an algorithmic perspective. We show that pure strategy equilibria may not exist even in highly restricted cases, and checking equilibrium existence is computationally hard in general. However, we exhibit a number of important special cases in which such equilibria exist, can be efficiently computed, and even where socially optimal equilibria can also be efficiently found. Finally, we presented a heuristic approach for approximately solving such games, shown to be highly effective in our experiments.