1 An Approximation Algorithm and Price of Anarchy for the Binary- Capacitated Selfish Replication Game*

Seyed Rasoul Etesami, Tamer Bas¸ar Coordinated Science Laboratory, University of Illinois at Urbana-Champaign, Urbana, IL 61801 Email: (etesami1, basar1)@illinois.edu

Abstract

We consider in this paper a simple model for human interactions as service providers of different resources over social networks, and study the dynamics of selfish behavior of such social entities using a game-theoretic model known as binary-preference capacitated selfish replication (CSR) game. It is known that such games have an associated ordinal potential function, and hence always admit a pure- (NE). We study the price of anarchy of such games, and show that it is bounded above by 3; we further provide some instances for which the price of anarchy is at least 2. We also devise a quasi-polynomial algorithm On2+ln D which can find, in a distributed manner, an allocation profile that is within a constant factor of the optimal allocation, and hence of any pure- strategy Nash equilibrium of the game, where the parameters n, and D denote, respectively, the number of players, and the diameter of the network. We further show that when the underlying network has a arXiv:1506.04047v2 [cs.GT] 11 Mar 2016 tree structure, every globally optimal allocation is a Nash equilibrium, which can be reached in only linear time.

Index Terms

Capacitated selfish replication game; pure Nash equilibrium (NE); potential function; quasi-polynomial algorithm; price of anarchy; optimal allocation.

*Research supported in part by the “Cognitive & Algorithmic Decision Making” project grant through the College of Engineering of the University of Illinois, and in part by AFOSR MURI Grant FA 9550-10-1-0573 and NSF grant CCF 11-11342. 2

I.INTRODUCTION

In recent years, there has been a wide range of studies on the role of social and distributed networks in various disciplinary areas such as , computer science, epidemiology, and engineering. In particular, availability of large data from online social networks and advances in control of distributed systems have drawn the attention of many researchers to model various phenomena in social and distributed networks using some mathematical tools such as in order to exploit some of the hidden properties of such networks. Such studies not only improve our understanding of the complex nature of social and distributed events, but also enable us to devise more efficient algorithms toward some desired outcomes in such networks. Due to accelerated growth of economic networks and advances in using game-theoretic tools in various applications, modeling of distributed network storage has become an important issue. In general, distributed network storage games or resource allocation games are characterized by a set of agents who compete for the same set of resources [1], [2], and arise in a wide variety of contexts such as congestion games [3], [4], [5], load balancing [6], peer-to-peer systems [7], web- caches [8], content management [7], and market sharing games [9]. Among many problems that arise in such a context, one that stands out is distributed replication, which not only improves the availability of resources for users, but also increases the reliability of the entire network with respect to customer requests [10], [11]. However, one of the main challenges in modeling resource allocation problems using game-theoretic tools is to answer the question of to what extent such models can predict the desired optimal allocations over a given network. Modeling a system as a game, ideally one would like for the set of equilibria or person-by-person optimal solutions of the game to be as close as possible to the desired states of the system. In fact, the price of anarchy (PoA) [12] is one of the metrics in game theory that measures efficiency and the extent to which a system degrades due to selfish behavior of its agents; it has been used extensively in the literature [7], [9], [13], [10]. Distributed replication games with servers that have access to all the resources and are accessible at some cost by users have been studied in [14]. Moreover, the uncapacitated selfish replication game where the agents have access to the set of all resources was studied in [10], where the authors were able to characterize the set of equilibrium points based on the parameters of the problem. However, unlike the uncapacitated case, there is no comparable characterization of equilibrium points in capacitated selfish replication games. In fact, when the agents have 3 limited capacity, the situation could be much more complicated as the constraint couples the actions of agents much more than in the uncapacitated case or in replication games with servers. Typically, capacitated selfish replication games are defined in terms of a set of available resources for each player, where the players are allowed to communicate through an undirected communication graph. Such a communication graph identifies the access cost among the players, and the goal for each player is to satisfy his/her customers’ needs with minimum cost. Ideally, and in order to avoid any additional cost, each player only wants to use his/her own set of resources. However, due to limitation on capacity, players do not have access to all the resources and hence, they incur some cost by traveling over the network and borrowing some of the resources which are not available in their own caches from others in order to meet their customers’ demands. The problem of finding an equilibrium for capacitated selfish replication games in the case of hierarchical networks was studied in [8]. Moreover, the class of capacitated selfish replication games with binary preferences has been studied in [8], [15], where “binary preferences” captures the behavioral pattern where players are equally interested in some objects. In this paper, we consider the capacitated selfish replication game with binary preferences. In this model players act myopically and selfishly, while they are required to fully satisfy their customers’ needs. Note that, although the players act in a selfish manner with respect to others in satisfying their customer needs, their actions are closely coupled with the others’ and they do not have absolute freedom in the selection of their actions. It was shown in [8] that when the number of resources is 2, there exists a polynomial time algorithm O(n3) to find an equilibrium. This result has been improved in [15] to a linear time algorithm when the number of resources is bounded above by 5. However, in general there exist only exponential time algorithms for finding a pure-strategy Nash equilibrium. In this work we consider such games over general undirected networks and devise a quasi-polynomial algorithm which drives the system to an allocation profile whose total cost lies within a constant factor of that in any pure-strategy Nash equilibrium. In particular, we show that the price of anarchy, i.e., the ratio of the highest cost among Nash equilibrium points to the overall minimum cost of an optimal allocation, is in general bounded above by 3. The paper is organized as follows. In Section II, we introduce capacitated selfish replication games with binary preferences over general undirected networks. We review some salient prop- erties of such games and include some relevant existing results on this problem. In Section III, 4

we provide an upper bound on the price of anarchy of such games and also an upper bound on the optimal allocation cost. In Section IV we devise a quasi-polynomial algorithm which can reach an allocation profile within a constant factor of the optimal allocation profile, and hence of any pure-strategy Nash equilibrium. We conclude the paper with identifying future directions of research in Section V. Notations: For a positive integer n, we let [n] := {1, 2, . . . , n}. For a vector v ∈ Rn, we let vi be the ith entry of v. We use G = ([n], E) for an undirected underlying network with a

node set {1, 2, . . . , n} and an edge set E. For any two nodes i, j ∈ [n], we let dG(i, j) be the graphical distance between them, that is, the length of a shortest path which connects i and j. The diameter of a graph, denoted by D, is the maximum distance between any pair of vertices,

that is, D = maxi,j∈[n] dG(i, j). We let dmin and dmax denote the minimum and the maximum degree in the graph G, respectively. Moreover, for an arbitrary node i ∈ [n] and an integer r ≥ 0, we define a ball of radius r and center i to be the set of all the nodes in the graph G whose

graphical distance to the node i is at most r, i.e., B(i, r) = {x ∈ V|dG(i, x) ≤ r}. We denote a specific Nash equilibrium and a specific optimal allocation by P ∗ and P o, respectively. Finally, we use |S| to denote the cardinality of a finite set S.

II.PROBLEM FORMULATION AND EXISTING RESULTS

In this section we first introduce the capacitated selfish replication game with binary prefer- ences as was introduced in [8]. In the balance of this paper, our focus will be on such games, which for simplicity we refer to as CSR games.

A. CSR Game Model

We start with a set of [n] = {1, 2, . . . , n} nodes (players) which are connected by an undirected

graph G = ([n], E). We denote the set of all resources by O = {o1, o2, . . . , ok}. For simplicity, but without much loss of generality, we assume that each node can hold only one resource in its cache. All the results can in fact be extended to CSR games with different capacities (see Remark 1 below). Moreover, we assume that each node has access to all the resources. For a

particular allocation P = (P1,P2,...,Pn), we define the sum cost function Ci(P ) of the ith player as follows: X Ci(P ) = dG(i, σi(P, o)), (1)

o∈O\{Pi} 5

where σi(P, o) is i’s nearest node holding o in P . Given an allocation profile P we define the

radius of agent i, denoted by ri(P ), to be the distance between node i and the nearest node other than her holding the same resource as i, i.e., ri(P ) = minj6=i,Pj =Pi dG(i, j). Note that if there does not exist such a node, we simply define ri(P ) = D, where D is the diameter of the network. We suppress the dependence of ri(P ) on P whenever there is no ambiguity. Finally, If some resource o is missing in an allocation profile P , we define the cost of each player for that specific resource to be very large such as D + 1.

Remark 1. Actually all the proofs in this paper can be carried over to games with varying capacities by constructing a new network which transfers games with different cache sizes to one with unit size caches [15], [8].

Remark 2. Given two allocation profiles P and P˜ which only differ in the ith coordinate, using ˜ ˜ (1) and the definition of the radius, one can easily see that Ci(P ) − Ci(P ) = ri(P ) − ri(P ). This establishes an equivalence between decrease in cost and increase in radius for player i, when the actions of the other players are fixed.

It has been shown in [8] that the CSR game has an associated ordinal potential function, and hence, it has at least one pure Nash equilibrium. However, the number of best responses to reach an equilibrium can in general be exponentially large (O(nD)). Therefore, the main challenge here is to find an efficient way to arrive at an equilibrium or at least to be close enough to an equilibrium.

B. Least Best Response Algorithm

It was shown earlier in [15] that the following algorithm known as the least best response algorithm will find a pure Nash equilibrium of the CSR game when the number of resources is low or the underlying network is “dense enough” with respect to the number of resources. Least Best Response Algorithm 1: Given a CSR game, at each time t = 1, 2,..., and from all the agents who want to update, we select an agent with the least radius and let her update be based on her best response. Ties are broken arbitrarily.

Theorem 1. ([15]) In the binary CSR game with n agents and network diameter D, let T denote 6 the convergence time of the least best response algorithm to a pure Nash equilibrium. Then,  3 3n min{|O| − 1,D}, if |O| ≤ dmin T ≤ n min{D, |O| − 1}, if |O| < 5,

In the remainder of this paper, we provide substantial improvements to these results. We provide a constant approximation algorithm which works in quasi-polynomial time over general networks and without any extra assumption on the structure of the network. Roughly speaking, this algorithm reduces the time complexity of being close to an equilibrium from the naive search of O(nD) to O(nln D).

III.PRICEOF ANARCHYFORTHE CSRGAME

In this section, we show that all the equilibrium points of the CSR game are almost as good as the global optimal allocation, i.e., an allocation profile which minimizes the total sum of the costs of the players.

Theorem 2. The price of anarchy in the CSR game is bounded from above by 3.

∗ ∗ Proof: For an arbitrary equilibrium P and a specific node i with equilibrium radius ri , ∗ ∗ ∗ ∗ i.e., ri = dG(i, σi(P ,Pi )), we note that all the resources must appear at least once in B(i, ri ). ∗ In fact, if a specific resource is missing in B(i, ri ), then node i can increase its radius by updating its current resource to that specific resource, thereby decreasing its cost. But this is in contradiction with P ∗ being an equilibrium (Figure 1). Now, given the equilibrium profile P ∗, let us define rˆi to be the smallest integer such that B(i, rˆi) contains at least two resources of the same type, i.e.,

n ∗ ∗ ∗ ∗ o rˆi = min r ∈ N : ∀j, k ∈ B(i, r−1),Pj 6= Pk , and ∃j0, k0 ∈ B(i, r),Pj0 = Pk0 .

Now we claim that all the resources must appear at least once in B(i, 3ˆri). To see this and j 6= k ∈ B(i, rˆ ) P ∗ = P ∗ by the above definition, let 0 0 i be such that j0 k0 . This means that the ∗ ∗ equilibrium radius of node j0, i.e., rj0 in P is at most dG(j0, i) + dG(i, k0) ≤ 2ˆri. On the other hand, by the argument at the beginning of the proof, all the resources must appear at least once in B(j0, 2ˆri). But since B(j0, 2ˆri) ⊆ B(i, 3ˆri), this shows that B(i, 3ˆri) must include all the resources at least once. 7

∗ ∗ Fig. 1: Illustration of resource allocation in Nash equilibrium P . Note that rj0 denotes the radius ∗ of node j0 at equilibrium P which is upper bounded by dG(j0, k0). The ball B(i, rˆi −1) contains only resources of different types.

Next, let us denote an optimal allocation profile by P o, and the cost of node i in the optimal o ∗ allocation and Nash equilibrium by Ci(P ) and Ci(P ), respectively. Now for the equilibrium ∗ P and since by the definition of rˆi there are no two similar resources in B(i, rˆi −1), and all the resources appear at least once in B(i, 3ˆri), we can write

∗ X Ci(P ) ≤ dG(i, j)+3ˆri(|O|−1−|B(i, rˆi −1)|). (2)

j∈B(i,rˆi−1) On the other hand, for the cost of node i in the optimal allocation P o we can write,

o X Ci(P ) ≥ dG(i, j)+ˆri(|O|−1−|B(i, rˆi −1)|), (3)

j∈B(i,rˆi−1) where the inequality holds since node i has to pay at least P d (i, j) for the first j∈B(i,rˆi−1) G

|B(i, rˆi−1)| closest resources, and to pay at least rˆi for the remaining (|O| − 1 − |B(i, rˆi−1)|) ∗ Ci(P ) resources. By comparing relations (2) and (3), it is not hard to see that o is at most Ci(P ) P dG(i, j) + 3ˆri (|O| − 1 − |B(i, rˆi −1)|) j∈B(i,rˆi−1) , P d (i, j) +r ˆ (|O| − 1 − |B(i, rˆ −1)|) j∈B(i,rˆi−1) G i i which is bounded from above by 3. Since node i and the equilibrium P ∗ were chosen arbitrarily, ∗ ∗ o for every equilibrium P and for all i ∈ V (G), we have Ci(P ) ≤ 3Ci(P ). Summing this ∗ P ∗ P o o inequality over all i ∈ V (G) we get C(P ) = i Ci(P ) ≤ 3 i Ci(P ) = 3C(P ). Since we have this inequality for all possible Nash equilibria, and using the definition of the price of ∗ maxP ∗∈NE C(P ) anarchy, we have P oA = C(P o) ≤ 3. 8

Next in the following we provide an example which shows that for some network configura- tions, the price of anarchy of the CSR game can actually be arbitrarily close to 2.

Example 1. Given arbitrary positive integers m, |O| ≥ 2, let us consider a network of n := (m+1)(|O|−1) nodes (players) as shown in Figure 2. Here we assume that |O| is the number of

resources {o1, o1, . . . , o|O|} in the CSR game over this network. The bottom part of the network is composed of a clique of |O| − 1 nodes, and the top part forms an independent set of m(|O| − 1) nodes which all are connected to the bottom part. As it can be seen in Figure 2, the top figure constitutes a pure Nash equilibrium for the CSR game with the total cost of C(P ∗) = m(|O|−1)(2|O|−3)+(|O|−1)2. Moreover, it can easily be seen that the bottom figure illustrates an optimal allocation, where the cost of each node is |O| − 1, and hence the total optimal cost o 2 C(P ∗)  m+|O|−1  equals C(P ) = (m + 1)(|O| − 1) . Thus, we have C(P o) = 2 − (m+1)(|O|−1) . This shows that for large m and |O|, the price of anarchy of the CSR game over such networks can be arbitrarily close to 2.

Fig. 2: Illustration of the resource allocation for a Nash equilibrium (top figure), and an optimal allocation (bottom figure) in Example 1.

Before concluding, we provide in the theorem below an upper bound on the minimum in the general CSR game, which uses a probabilistic argument.

Theorem 3. For a network G with vertex degrees di, i ∈ [n], the optimal allocation cost for the di Pn  1  CSR game is bounded above by n(2|O| − 1) + |O|(|O| − 1) i=1 1 − |O| . 9

1 Proof: Let us assign with probability |O| and independently a resource to any of the vertices of G. Now for an arbitrary but fixed node i, dG(i, σi(o, P )) is a random variable denoting the graphical distance between player i and the player closest to him who has resource o under such a random resource allocation P . For any nonnegative integer r and any arbitrary but fixed resource o ∈ O, we have

 |B(i,r−1)|  1− 1 if 0 ≤ r ≤ D+1   |O| P dG(i, σi(o, P )) ≥ r = 0 else. Note that for r = 0 we have B(i, r − 1) = ∅, and hence, |B(i, r − 1)| = 0. Therefore, using the tail formula for expectation of discrete random variables, the expected distance of player i P∞ from resource o is r=1 P(dG(i, σi(o, P )) ≥ r). Hence, the total expected cost of such random assignment for all players and all resources is

n ∞ X X X E[C(P )] = P(dG(i, σi(o, P )) ≥ r) o∈O i=1 r=0 n D+1 |B(i,r−1)| X X  1  = |O| 1 − |O| i=1 r=0 n D+1 |B(i,r−1)|! X  1  X  1  = |O| 1 + 1 − + 1 − |O| |O| i=1 r=2 n ∞ k X X  1  < n(2|O| − 1) + |O| 1 − |O| i=1 k=di+1 n d X  1  i = n(2|O| − 1) + |O|(|O| − 1) 1 − . |O| i=1 This shows that there exists at least one resource assignment where the total cost is at most di Pn  1  n(2|O| − 1) + |O|(|O| − 1) i=1 1 − |O| .

Remark 3. One can easily check that for the line graph, the bound in Theorem 3 is tight up to a constant factor.

IV. QUASI-POLYNOMIAL APPROXIMATION ALGORITHM

In this section we show that for the CSR game over general networks, one can obtain an allocation profile whose total cost lies within a constant factor of that in an optimal allocation 10

in only quasi-polynomial time. We start with the following lemma.

Lemma 1. Given a number  > 1, at every time instance there exists an agent i who can increase its radius by a factor of at least  by playing its best response. Dynamics thus generated terminate 2 log n after no longer than O n D  steps.

Proof: Given a profile P (t) = (P1(t),...,Pn(t)) at time t, let us denote the radii of

the players by r1(t), . . . , rn(t), and let nk(t) be the number of players whose radii are k, for

k = 1, 2,...,D. Now, given that at time step t player i with Pi(t) = o1 wants to change to

Pi(t + 1) = o2, it means that at time step t, there is no resource of type o2 in B(i, ri) (Figure 3). Now, let us define a potential function R(t) to be

D n X nk(t) X 1 R(t) := log n = log n , (4) k  (rk(t))  k=1 k=1 Pn 1 where the equality holds since by definition of nk(t), exactly nk(t) of the terms in log n k=1 (rk(t))  1 R(·) are equal to klog n . Moreover, one can easily see that is a nonnegative function which is upper bounded by n. We will show that after each time of running the dynamics, the value of 1 the potential function given in (4) decreases by at least log n , where k{rmax(t)}k∞ = nk{rmax(t)}k∞ maxt≥0 maxi∈[n] ri(t). To see this, let us assume that node i updates its radius from ri(t) to

ri(t + 1) ≥ ri(t). Therefore, for some k ∈ [n] we must have one of the following three cases:

• If k = i, then ri(t + 1) ≥ ri(t). This holds due to the dynamics rule, since node i updates

its radius from ri(t) to ri(t + 1) if and only if ri(t + 1) ≥ ri(t).

• If rk(t) < ri(t + 1), then rk(t + 1) ≥ rk(t). To see this, note that if rk(t) < ri(t + 1),

then Pk(t) 6= o2. Moreover, either Pk(t) = o1, where in this case by updating Pi(t) from

Pi(t) = o1 to Pi(t+1) = o2, the radius of node k does not decrease, i.e., rk(t+1) ≥ rk(t), or

Pk(t) 6= o1, where in this case the radius of node k remains the same, i.e., rk(t+1) = rk(t).

• If rk(t) ≥ ri(t+1), then ri(t+1) ≤ rk(t+1). To show this, first note that if Pk 6= o1, o2, then

the radius of node k does not change after node i updates, i.e., rk(t+1) = rk(t) ≥ ri(t+1).

Otherwise, either Pk(t) = o1, which in this case rk(t + 1) ≥ rk(t) ≥ ri(t + 1) due to the

fact that after update we have fewer number of o1-resources, or pk(t) = o2 in which case the radius of player k cannot decrease to less than the graphical distance between k and i,

thus rk(t+1)≥rk(t)≥ri(t+1).

Using the fact that ri(t + 1) ≥ ri(t) and considering the above three possibilities, we can write 11

Fig. 3: Illustration of updating node i in the Lemma 1. Note that there no other resource of type

o2 in B(i, ri(t+1)).

n X  1 1  R(t + 1) − R(t) = log n − log n (rk(t + 1))  (rk(t))  k=1 1 1 = log n − log n (ri(t + 1))  (ri(t))  X  1 1  + log n − log n (rk(t + 1))  (rk(t))  {k6=i:rk(t)

|{k : rk(t) ≥ ri(t + 1)}| ≤ n − 2. In fact, we argue that at most for D instances we can have

|{k : rk(t) ≥ ri(t + 1)}| ≥ n − 2, which does not really change the quasi-polynomial order

of the termination time. Note that at least i∈ / {k : rk(t) ≥ ri(t + 1)}, thus |{k : rk(t) ≥

ri(t + 1)}| ≤ n − 1. Moreover |{k : rk(t) ≥ ri(t + 1)}| cannot be equal to n − 1 more

than D steps, since by Lemma 1 in [15] every time that |{k : rk(t) ≥ ri(t + 1)}| = n − 1, then after updating node i at the next time step the minimum index of the positive entries in n(t + 1) = (n1(t + 1), n2(t + 1), . . . , nD(t + 1)) will increase by at least 1, which cannot happen 12

for more than D steps.

2 log n Finally, since R(·) is upper bounded by n, R(·) cannot decrease more that n k{rmax(t)}k∞   2 log n times, which shows that the dynamics must terminate after at most O n k{rmax(t)}k∞

steps. Moreover, since for all t = 0, 1,... and i ∈ [n], ri(t) cannot exceed the diameter D of

the network, k{rmax(t)}k∞ ≤ D. This shows that the dynamics must terminate after at most   O n2Dlog n steps. Next we introduce a useful definition.

Definition 1. Given an undirected network G = ([n], E), and an allocation profile P , the resource-radius of any node i is the smallest positive integer γi such that all the resources appear at least once in B(i, γi) for that given profile P .

In what follows, we introduce an algorithm, called -best response algorithm, which in at most quasi-polynomial time can find an allocation profile which lies within a constant factor of an optimal allocation in the CSR game. -Best Response Algorithm 2: Given a network G = ([n], E), a number  > 1, and an arbitrary initial allocation profile P (0), at every time instance we select an agent i who can increase its radius ri(t) by a factor of at least , and let her to play her best response (ties are broken arbitrarily).

Example 2. Through this example, we illustrate how the -best response algorithm works. Let

 = 2, and consider a network of 10 nodes and 4 available resources O = {o1, o2, o3, o4}. The initial profile of allocated resources has been illustrated in Figure 4. Let us assume that at the first time instant node i has been selected by the algorithm. Since the radius of node i in the initial profile is 1, i.e., ri(0) = 1, among the resources whose distances to node i are at least

ri(0) = 2 × 1(in this example {o3, o4}), she will play her best response, i.e., o3. Therefore,

Pi(1) = o3. Now at the second time instant, and given that node j is selected, since rj(1) = 1, among the resources whose distances to j are at least rj(1) = 2×1 (in this example only {o4}), she will play her best response, i.e., Pj(2) = o4. Note that if the set of available resources where an agent is supposed to choose her best resource from is empty at some time instant, then she will not update.

In the following theorem we prove that the allocation profile reached after executing Algorithm 13

Fig. 4: Resource allocation in the -best response algorithm (Example 2).

2 is a constant approximation of the optimal allocation in the CSR game.

Theorem 4. The -best response algorithm provides a (2 + 1)-approximation of the optimal   allocation after at most O n2Dlog n steps.

Proof: First, we note that by Lemma 1 the -best response algorithm terminates after at   most O n2Dlog n steps. Therefore, we only need to show that the final profile P is indeed

within a constant factor of the optimal allocation. For any arbitrary i ∈ [n], suppose that γi

γi−1 is the resource-radius of node i at the final profile P . We now claim that B(i, 2+1 ) contains only different resources. To see this, let us assume by contradiction that there are two nodes

0 γi−1 0 γi−1 0 j, j ∈ B(i, 2+1 ) which share the same resource, i.e., P j = P j . Since j, j ∈ B(i, 2+1 ), 0 2(γi−1) 2(γi−1) 2(γi−1) dG(j, j ) ≤ 2+1 . This shows that rj ≤ 2+1 , and hence, rj ≤ 2+1 . In particular, since

γi−1 2(γi−1) γi−1 dG(j, i) ≤ 2+1 , B(j, rj) ⊆ B(i, 2+1 + 2+1 ) = B(i, γi − 1). Since we assumed that P is

the final allocation of the algorithm, every resource must appear at least once in B(j, rj), as

otherwise node j can update its resource to another one which is outside of B(j, rj). But, by

definition of resource-radius γi, we know that for the profile P there exists at least one resource

which is missing in B(i, γi − 1). This is in contradiction with B(j, rj) ⊆ B(i, γi − 1), which

γi−1 implies that all the resources in B(i, 2+1 ) are different. Finally, as we have shown above, for every agent i, the final profile P at the termination of

γi−1 Algorithm 2 has the property that all the vertices in B(i, 2+1 ) have different resources, while 14

all the resources appear at least once in B(i, γi). Thus we have   X γi − 1 C (P ) ≤ d (i, j) + γ |O|−1−|B(i, )| , i G i 2 + 1 γi−1 j∈B(i, 2+1 )

where the inequality holds due to the definition of γi. On the other hand, for the cost of node i in the optimal placement, we can write   X γi γi − 1 C (P o) ≥ d (i, j)+( ) |O|−1−|B(i, )| , i G 2+1 2+1 γi−1 j∈B(i, 2+1 ) where the above inequality holds since node i in the optimal allocation P o has to pay at

P γi−1 least γi−1 dG(i, j) for the first |B(i, )| closest resources, and to pay an integer j∈B(i, 2+1 ) 2+1 γi−1 γi γi−1 cost strictly larger than 2+1 (at least ( 2+1 )), for the remaining (|O| − 1 − |B(i, 2+1 )|) re- sources. By comparing the above two relations, it is not hard to see that for all i ∈ [n], o we have Ci(P ) ≤ (2 + 1)Ci(P ). Summing all of these inequalities for i ∈ [n], we get C(P ) ≤ (2 + 1)C(P o).

Corollary 1. Replacing  = e in the result of Theorem 4, one can easily see that Algorithm 2 gives us an allocation profile within a constant factor of the optimal allocation and any NE after at most O n2Dln n = O n2+ln D steps.

Before concluding, we state the following theorem for the case where the underlying network has a tree structure. We omit the proof here due to space limitation, but we include it in the full version of the paper [16].

Theorem 5. Assume that the network in the CSR game is a tree of n nodes. Then every optimal allocation P o must be a NE. Furtheremore, there is an algorithm which reaches an optimal allocation in only n steps.

V. CONCLUSION

In this paper, we have studied the binary-preference capacitated selfish replication (CSR) game over general networks. We have provided a distributed quasi-polynomial time algorithm   O n2+ln D which can approximate any NE of the system within a constant factor. Moreover, we have shown that such games benefit from having a low price of anarchy. As an avenue for future research, one possibility is to study the dynamic version of the CSR game, in the spirit of what has been discussed in [17] and [18]. 15

REFERENCES

[1] V. Pacifici and G. Dan, “Convergence in player-specific graphical resource allocation games,” Selected Areas in Communications, IEEE Journal on, vol. 30, no. 11, pp. 2190–2199, 2012. [2] A. M. Masucci and A. Silva, “Strategic resource allocation for competitive influence in social networks,” arXiv preprint arXiv:1402.5388, 2014. [3] I. Milchtaich, “Congestion games with player-specific payoff functions,” Games and economic behavior, vol. 13, no. 1, pp. 111–124, 1996. [4] H. Ackermann, H. Roglin,¨ and B. Vocking,¨ “On the impact of combinatorial structure on congestion games,” Journal of the ACM (JACM), vol. 55, no. 6, p. 25, 2008. [5] A. Fabrikant, C. Papadimitriou, and K. Talwar, “The complexity of pure Nash equilibria,” in Proceedings of the thirty-sixth annual ACM symposium on Theory of computing. ACM, 2004, pp. 604–612. [6] B. Ghosh and S. Muthukrishnan, “Dynamic load balancing in parallel and distributed networks by random matchings,” in Proceedings of the sixth annual ACM symposium on Parallel algorithms and architectures. ACM, 1994, pp. 226–235. [7] G. G. Pollatos, O. A. Telelis, and V. Zissimopoulos, “On the social cost of distributed selfish content replication,” in NETWORKING 2008 Ad Hoc and Sensor Networks, Wireless Networks, Next Generation Internet. Springer, 2008, pp. 195–206. [8] R. Gopalakrishnan, D. Kanoulas, N. N. Karuturi, C. P. Rangan, R. Rajaraman, and R. Sundaram, “Cache me if you can: capacitated selfish replication games,” in LATIN 2012: Theoretical Informatics. Springer, 2012, pp. 420–432. [9] M. X. Goemans, L. Li, V. S. Mirrokni, and M. Thottan, “Market sharing games applied to content distribution in ad hoc networks,” Selected Areas in Communications, IEEE Journal on, vol. 24, no. 5, pp. 1020–1033, 2006. [10] B.-G. Chun, K. Chaudhuri, H. Wee, M. Barreno, C. H. Papadimitriou, and J. Kubiatowicz, “Selfish caching in distributed systems: a game-theoretic analysis,” in Proceedings of the twenty-third annual ACM symposium on Principles of distributed computing. ACM, 2004, pp. 21–30. [11] S. Goyal and F. Vega-Redondo, “Learning, network formation and coordination,” Tinbergen Institute, Tech. Rep., 2000. [12] E. Koutsoupias and C. Papadimitriou, “Worst-case equilibria,” in STACS 99. Springer, 1999, pp. 404–413. [13] A. Vetta, “Nash equilibria in competitive societies, with applications to facility location, traffic routing and auctions,” in Foundations of Computer Science, 2002. Proceedings. The 43rd Annual IEEE Symposium on. IEEE, 2002, pp. 416–425. [14] N. Laoutaris, O. Telelis, V. Zissimopoulos, and I. Stavrakakis, “Distributed selfish replication,” Parallel and Distributed Systems, IEEE Transactions on, vol. 17, no. 12, pp. 1401–1413, 2006. [15] S. R. Etesami and T. Bas¸ar, “Pure Nash equilibrium in capacitated selfish replication (CSR) game,” arXiv preprint arXiv:1404.3442, 2014. [16] ——, “A quasi-polynomial approximation algorithm for the CSR game and a tight bound on its price of anarchy,” Submitted to 54rd IEEE Conference on Decision and Control. CDC’15. arXiv preprint arXiv:1412.6546, 2015. [17] ——, “Game-theoretic analysis of the Hegselmann-Krause model for opinion dynamics in finite dimensions,” arXiv preprint arXiv:1412.6546, 2014. [18] A. Fabrikant, A. Luthra, E. Maneva, C. H. Papadimitriou, and S. Shenker, “On a network creation game,” in Proceedings of the twenty-second annual symposium on Principles of distributed computing. ACM, 2003, pp. 347–351.