1 Introduction

Consider a P2P network for sharing movies (objects) among multiple users (nodes). Due to limited disk space, the movies can be stored either locally or obtained from other users in some cost. The storing decisions affect everyone that uses this service. A natural question is to predict the movie collection stability in your friends network (i.e. equilibrium) and your satisfaction from them (i.e. access cost), when users act selfishly. Similarly, in the new wireless 4G/5G services, users will not only consume different apps, but will also provide apps to their network through personal communications and computing devices. In such a network, the question is whether storing apps will lead to a situation of endless churn or could there be an equilibrium?

Content delivery and caching in P2P networks can be studied in a game-theoretic framework. In this work, we study Capacitated Selfish Replication (CSR) games as an abstraction of the above network scenarios. In CSR games the strategic agents, or players, are nodes in a network that act selfishly. The nodes have some object preferences and bounded storage space, i.e. caches, to store a limited number of content copies. Each node in cooperation with other nodes can serve access requests for the objects that are stored in its cache. However, the set of objects which a node chooses to store in its cache is from one side solely based on its own utility function (notice that this does not prevent the players to use the same utility function for the whole network) and from the other side based on where objects of interest have been stored in the network. Thus, each node in the model, has two potential actions for an object. Either store a replica of the object in its limited cache, or access with some cost the object replica from a remote node.

Chun et al. [8] first introduced such a game-theoretic framework to analyse pure Nash equilibria in networks without cache capacities, but with some storage cost. They left the capacitated version of the problem open. The main interest of the CSR games in more recent works is on hierarchical networks that have been extensively used to model communication content delivery costs in P2P networks [25]. Ultrametric models for content delivery networks [38] and cooperative caching in hierarchical networks [41, 42, 48, 68] are just some examples. The best results on CSR games for hierarchical networks [46, 57] are about the existence of a Nash equilibrium for a generalized one-level hierarchical network, using the sum utility function for which each node is based on a weighted sum of the cost of accessing the objects.

1.1 Our Results

In this paper, we first introduce the basic model of the Capacitated Selfish Replication (CSR) games in Section 2. This includes the definition of the nodes (players) and objects, the formulation of the cost functions for a node accessing objects in the network, the object replication strategies among nodes, as well as the basic formulation of the network. The main focus is on the study of Nash equilibria existence and computability for a set of CSR games variants. In particular, we introduce a polynomial-time Nash equilibrium method for hierarchical networks, given their extensive use to model communication costs of content delivery in P2P systems. We address the following three problems, including their computational complexity:

  • Does pure Nash equilibrium exist in a CSR game, for hierarchical networks?

  • Does pure Nash equilibrium exist in a CSR game, for general undirected networks, setting specific restrictions on the number of objects and the utility/cost functions?

  • Does pure Nash equilibrium exist, when the objects can be split in fractions, i.e. F-CSR games?

Note that in all the games, we assume that all the pieces of content, i.e. objects, have the same size, as considered in prior works [2, 8, 46, 57]. Otherwise, the problem becomes NP-hard even for computing the best response of a player (node) as a generalization of the well-known knapsack problem.

In Section 3 we present our main algorithm, which extends and resolves the open problem that was defined in [45, 47, 57]. In particular, it has been proved [46, 57] that CSR games for hierarchical networks have a Nash equilibrium in the case of a generalized 1-level hierarchy, when the utility function is a function of the costs sum of accessing replicated objects in the network. We introduce an exact polynomial-time algorithm for Nash Equilibrium computation in any hierarchical network. We use a novel technique which we name “fictional playersFootnote 1” method. We show that using this method we can extend to a general framework of natural preference orders that are entirely arbitrary, but follow two natural constraints: “Nearer is better”, i.e. the closest the content is to the node the less its access cost is and “Independence of irrelevant alternatives”, i.e. the aggregation of individual node preferences. This generalization represents a vast class of utility functions and more interestingly allows each of the nodes to have simultaneously completely different functional forms of utility functions. The method introduces and iteratively eliminates fictional players in a controlled fashion, maintaining a Nash equilibrium at each step. In the end, the desired equilibrium for the entire network is realized without any fictional players left in the network. Even though the analysis is specified in the context of the sum utility function to elucidate the technique of fictional players, we then abstract the central requirements for our proof technique. In particular, we develop a general framework of CSR games with ordinal preferences, for which a larger class of utility functions could be used as extension to the above result.

In Section 4, we present the general CSR games framework in terms of the utility preference relations and node preference orders. In particular, we consider the utility that is not just each node’s specific numeric assignment for each objects placement, but a preference order each node has on object placements that satisfies two natural constraints: Monotonicity (or “Nearer is better”) and Consistency (or “Independence of irrelevant alternatives”). In this way the method is extended to a vast class of utility functions, while nodes may simultaneously have utility functions of completely different functional forms.

After extending our hierarchical networks results to the broader class of utilities, in Sections 5 and 6 we study general CSR games that have various network structures (directed or undirected), forms of object preferences (binary or general). Intractability and effective computability of equilibria is delineated in terms of the network structure, object preferences, and the total number of objects. The results are summarized in Table 1. Most notable are the following results:

  • equilibria existence for general undirected networks with two objects, using the technique of fictional players

  • equilibria existence for general undirected networks when object preferences are binary

  • the problem of equilibria existence becomes NP-hard for general CSR games

  • equivalence of finding equilibria in polynomial time for CSR games in strongly connected networks with two objects and binary object preferences, via a reduction to the well-studied even-cycle problem [61].

Table 1 Equilibria existence and computability in CSR games

Finally in Section 7, we introduce the fractional version of CSR games (F-CSR) to represent content distribution using erasure codes. In this framework, each node is allowed to store fractions of objects and can satisfy an object access request by retrieving any set of object fractions as long as these fractions sum to at least one. We present a natural implementation of this framework via erasure codes (e.g. using the Digital Fountain approach [5, 66]). We prove that F-CSR games always have equilibria and finding it is in PPAD. However, we also show finding equilibria is PPAD-hard even for a sum-of-distances utility function.

1.2 Related Work

Peer-to-Peer (P2P) networks have been used to model systems for sharing content and resources among the individual peers (such as the file systems [9, 44, 63, 64], web caches [10, 22], or P2P caches [33]). Even though P2P networks have been extensively studied from a theoretical point of view, there are several open problems when rational peers have diverse and selfish interests [23].

One of the most interesting problems is caching, i.e. holding copies of content in clients and servers. Several research studies have considered data storing [7, 30], self-stabilization [40], dynamic replication [13, 60, 67], and exchanging of content copies in a centralized manner [35, 36, 49, 58]. Research on capacitated caching has been also considerable as an optimization problem and various centralized and distributed algorithms have been presented for different networks in [2, 4, 41, 48, 71]. For instance, centralized optimization for the facility location problem has been studied in [62], including several approximations [34, 50, 52]. These frameworks usually ignore the fact that peers may make free choices that minimizes their content access cost, by not following usual instrumentation.

The caching problem that we study is in the intersection of game theory and computer science, that has been extensively studied the last decade [53, 69]. In [56] Papadimitriou laid the groundwork for algorithmic game theory by introducing syntactically defined sub-classes of FNP with complete problems, PPAD being a notable such subclass. Non-cooperative facility location games have attracted some small attention over the last decades. For instance, in [70], the problem of Nash equilibrium for games that allowed players build nodes in remote locations, whereas in our case nodes hold fixed spaces for storing objects/content. In [27], content distribution was studied, providing bounds on the approximated Nash equilibrium with respect to the price of anarchy and the convergence speed. The difference in the game design lies in the fact that each node had cost limits for storing objects without considering network latencies. The uncapacitated case of selfish caching games was introduced in [8], in which nodes could store more pieces of content by paying for the additional storage.

We focus on the capacitated version which was left open by [8], believing that limits on cache-capacity model an important real-world restriction. Special cases of the integral CSR games version have been studied. In [46], Nash equilibria were shown to exist in cases that nodes are equidistant from one another and a special centralized server holds all objects. In [57] the model is slightly extended to the case where special servers for different objects are at different distances. Our results generalize and completely subsume all these prior cases of CSR games. Market sharing games [28] also consider caches with capacity, but differ to cc games since they are special cases of congestion games. In this work we focus primarily on equilibria and our general framework of CSR games with ordinal preferences aligns more with the theory of social choice [3]; in this sense, we deviate from prior work [12, 21] that is focused on the price of anarchy [43].

Our work on CSR games in [29] has initiated various research lines and has been extended recently in different directions. For instance, in [31, 32] the selfish replication problem is studied for the case that nodes seek object placements with cache cooperation, and includes an experimental analysis. Etesami et al. have extended our model in a series of papers [18]. In [14] the Nash equilibrium algorithm for two resources is shown to converge faster and it is extended to arbitrary cache sizes for a polynomial time computation. This is extended in [15, 16, 19], where a quasi-polynomial algorithm is introduced to drive allocations whose total cost is within a constant factor of that in any pure-strategy Nash equilibrium, in games formed by undirected networks. The price of anarchy for CSR games with binary preferences over general undirected networks has been studied in [17, 20], showing an upper bound of 3. In [55], the caching problem is studied for operator-specific, non-linear, cost functions in games that form arbitrary peering graph topologies, while in [1] CSR games are studied for general undirected networks for which a randomized algorithm is introduced using a random tree search method to search for pure-strategy Nash equilibrium.

In related work, through a major breakthrough [6, 11] it has been proven that 2-player Nash Equilibrium is PPAD-complete. The PPAD-complete term is coming to occupy a role in algorithmic game theory analogous to NP-completeness in combinatorial optimization [26], and thus we study the fractional version of the problem, where nodes can store parts of objects, while accessing the remaining part from other nodes. In this setup we prove PPAD-completeness.

2 A Basic Model for CSR Games

We consider a set V of nodes (labeled 1 through n = |V |) to form a network in which they share a collection O of unit-size objects. We let dij denote i’s cost for accessing an object at j, for i, jV; we refer to d as the access cost function. j is node’s inearest node in a set S of nodes, if jS and dijdik for all kS. Moreover, a given network is undirected if d is symmetric, i.e. if dij = dji for all i, jV. An undirected network is hierarchical if the access cost function forms an ultrametric, i.e. if dik ≤ max{dij,djk} for all i, j, kV.

The cache of each node i is able to store a certain number of objects. Node’s i placement is simply the set of objects stored at i. The strategy set of a given node is the set of all feasible placements at the node. A global placement is any tuple (Pi : iV ), where Pi ⊆O represents a feasible placement at node i. We are going to use Pi to denote the collection (Pj : jV ∖{i}), for convenience. We will also often use P = (Pi,Pi) to refer to a global placement. Moreover, we also assume that V includes a server node that has the capacity to store all the objects. In this way it is ensured that at least one copy of every object is present in the system; this assumption is without loss of generality given that the access cost of every node to the server can be set an arbitrarily large number.

CSR Games

Each node in our game-theoretic model, attaches a utility to each global placement. We assume that each node i has a weight ri(α) for each object α representing the rate at which i accesses α. We define the sum utility functionUs(i) as follows: \(U_s(i)(P) = - {\sum }_{\alpha \in \text {O}} r_{i}(\alpha ) \cdot d_{i\sigma _{i}(P,\alpha )}\), where σi(P, α) is i’s nearest node holding α in P. A CSR game is a tuple (V,O,d,{ri}). This work focuses on pure Nash equilibria (henceforth, simply equilibria) of the CSR games. Such a CSR game equilibrium instance is a global placement P such that for each iV there is no placement Qi such that Us(i)(P) < Us(i)(Q).

Unit Cache Capacity

In this work, we assume that all objects are of identical size. Under this assumption, we now argue that it is sufficient to consider the case where each node’s cache holds exactly one object. Consider a set V of nodes in which the cache of node i can store ci objects. Let V denote a new set of nodes which contains, for each node i in V, new nodes \(i_{1}, i_{2}, \ldots , i_{c_{i}}\), i.e., one new node for each unit of the cache capacity of i. We extend the access cost function as follows: \(d_{j_{\ell }i_{k}} = d_{ji}\) for all 1 ≤ cj, 1 ≤ kci and \(d_{i_{\ell }i_{k}} = 0\) for all 1 ≤ < kci, for each node iV.

We consider an obvious onto mapping f from placements in V to those in V. Given placement P for V, we set f(P) = P where \(P_{i} = \cup _{1 \le k \le c_{i}} P^{\prime }_{i_{k}}\). This mapping ensures that Us(i)(P) = Us(i)(P), giving us the desired reduction. Thus, in the remainder of the paper, we assume that every node in the network stores at most one object in its cache.

3 Hierarchical Networks

In this section, we present a polynomial-time equilibria construction for CSR games on hierarchical networks. We can represent any hierarchical network by a tree T in such a way that the node set V is the set of its leaves. Every internal node v has a label (v) such that:

  1. 1.

    if v is an ancestorFootnote 2 of w in T, then (v) ≥ (w)

  2. 2.

    for any i, jV, dij is given by (lca(i, j)), where lca(i, j) is the least common ancestor of nodes i and j [38, 41].

Figure 1 illustrates a simple example for a hierarchical network tree with two internal nodes and three leaf nodes, with the corresponding label relationships, the least common ancestors, and the access costs.

Fig. 1
figure 1

A simple example of a hierarchical network tree with two internal nodes ((v) and (w)) and three leaf nodes (i, j, and k). The label relationships, the least common ancestors, and the access costs are described

Fictional Players

The proposed algorithm requires the introduction of the fictional player notion. A fictionalα-player for an object α will be a new node which stores α in any equilibrium. In particular, for any fictional α-player , r(α) is 1 and r(β) is 0 for any βα. In a particular hierarchy each fictional player is introduced as a leaf; our method determines the exact locations in the hierarchy. The access cost function for each fictional player is naturally extended using the hierarchy and the labels of the internal nodes. We let “node” denote both the elements of V and fictional players.

A preference relation

The object weights for each node i in a hierarchical network induce a natural preorder \(\sqsupseteq _{i}\) among elements of O × Ai, where Ai is the set of proper ancestors of i in T. In particular, we define \((\alpha , v) \sqsupset _{i} (\beta , w)\) whenever ri(α) ⋅ (v) > ri(β) ⋅ (w). In words, in hierarchical networks there is a total preorder in the objects-nodes preferences, which is used during the algorithm to define a potential function, when nodes are playing their best responses. For instance, \((\alpha , v) \sqsupset _{i} (\beta , w)\) means that if i needs to place either α or β in its cache, and the least common ancestor of i and the most i-preferred node in V ∖{i} holding α (resp., β) is v (resp., w), then i prefers to store α over β. Figure 2 illustrates an example of node i that will prefer to store object α that is stored further than object β and with a higher cost, due to the total preorder.

Fig. 2
figure 2

A simple example of a hierarchical network tree with two internal nodes ((v) and (w)) and three leaf nodes (i, j, and k). The preference relation of node i is presented

To express any player’s best response in terms of these preference relations, we define μi(P) = (α, v), where Pi = {α} and v is lca(i, σi(Pi,α)), where σi(Pi,α) denotes i’s nearest node in the set of nodes holding α in Pi. For instance, in Fig. 2σi(Pi,α) is node k (the nearest node holding α), while Pi = {α} (node i is holding α) and the thus, these two information can be denoted as μi(P) = (α, v), where v is the least common ancestor between nodes i and k.

Given, the aforementioned definitions, we can now express the best response of a player in terms of the preference relations in the following Lemma. This is needed in Lemma 2 to prove the existence of an equilibrium at each step of the algorithm.

Lemma 1

A best responsePiof a node i for a placementPiofV ∖{i} is {α} whereαmaximizes (γ,lca(i, σi(Pi,γ))), over all objectsγ, according to\(\sqsupseteq _{i}\).

Proof

For a given placement P with Pi = {α}, Us(i)(P) equals

$$ - \sum\limits_{\gamma \neq \alpha} r_{i}(\gamma) \ell(\text{lca}(i,\sigma_{i}(P_{-i}, \gamma))), $$

which can be rewritten as

$$ -\left( \sum\limits_{\gamma \in \text{O}} r_{i}(\gamma) \ell(\text{lca}(i,\sigma_{i}(P_{-i}, \gamma)))\right) + r_{i}(\alpha) \cdot \ell(\text{lca}(i,\sigma_{i}(P_{-i}, \alpha))). $$

Thus, {α} is a best response to Pi if and only if α maximizes ri(γ) ⋅ (lca(i, σi(Pi,γ)) over all objects γ, while the desired claim follows from the definition of \(\sqsupseteq _{i}\). □

The Algorithm

In the beginning of the algorithm we introduce a set of fictional players, maintaining in the same time the invariant that the current global placement in this hierarchy is an equilibrium. We then proceed by removing existing or adding new fictional players, tweaking in a particular way their set and locations, in such a way that at each step we guarantee an equilibrium. The algorithm terminates when all the fictional players are removed in the desired equilibrium state. Let Wt and Pt denote the set of fictional players and equilibrium, respectively, at the start of step t of the algorithm.

Initialization We create an initial set W0 by adding a fictional α-player as a leaf child of v, for each object α and internal node vT. In the initial equilibrium P0 for each fictional α-player i we have \({P^{0}_{i}} = \{\alpha \}\), i.e. each node iV plays its best response. By definition, it is clear that each fictional player is in equilibrium. Moreover, for every α, every iV has a sibling fictional α-player. Thus, the best response of every iV does not depend on the placement of nodes in V ∖{i}, which implies that P0 is an equilibrium.

Algorithm’s t step For the node set VWt (the original nodes and the fictional ones) we fix an equilibrium Pt. If Wt is empty, i.e., no fictional player remained, we are done. Otherwise, we select a fictional node j in Wt. Let \({P^{t}_{j}} = \{\alpha \}\) and μj(Pt) = (α, v), i.e. the fictional player j holds object {α} and the closest node that holds object {α} is through the internal node v. We let S be the set of all nodes iV such that \((\alpha , v) \sqsupset _{i} \mu _{i}(P^{t})\), i.e. the closest node that holds object {α} (except itself) is through the internal node v. We consider two cases for computing a new set of fictional players Wt+ 1 and a new global placement Pt+ 1 such that Pt+ 1 is an equilibrium for VWt+ 1:

Sis empty (there is a node holding the object closer than through the internal node v and thus the fictional node j is not affecting the strategy). We remove the j fictional player from Wt and the hierarchy. For the remaining nodes the placement remains as is. In this way Wt+ 1 = Wt −{j} (the fictional player is removed) and Pt+ 1 is the same as Pt (since the fictional player j was not affecting any other node’s best response strategy), but \(P^{t+1}_{j}\) is no longer defined, since j is removed.

Sis nonempty (some nodes are accessing object α from the fictional player i). We select a node iS such that lca(i, j) is lowest among all nodes in S (in this way no other node is affected from the change in the strategy of i) and we let \({P^{t}_{i}} = \{\beta \}\). We set \(P^{t+1}_{i} = \{\alpha \}\), remove the fictional α-player j from Wt, and add a new fictional β-player as a leaf sibling of iT (in this way the player will be in equilibrium by accessing β from the new fictional player). In this way \(P^{t+1}_{\ell } = \{\beta \}\), while for every other node j we set \(P^{t+1}_{j} = {P^{t}_{j}}\). Finally, we set Wt+ 1 = (Wt ∪{}) ∖{j}, removing from the node set the removed fictional player and adding the new one.

An example of the steps is illustrated in Fig. 3. Next, in Lemma 2 we prove why at every step t, as described above, we have an equilibrium.

Fig. 3
figure 3

Illustrating the algorithm for a simple hierarchical network

Lemma 2

Consider step t of the algorithm. IfPtis an equilibrium forVWt, then the following statements hold.

  1. 1.

    For every nodek inVWt+ 1, \(P^{t+1}_{k}\)isa best response to\(P^{t+1}_{-k}\).

  2. 2.

    For every nodek inVWt+ 1, \(\mu _{k}\left (P^{t+1}\right ) \sqsupseteq _{k} \mu _{k}(P^{t})\).

  3. 3.

    We have |Wt+ 1|≤|Wt|.Furthermore, either |Wt+ 1| < |Wt| or there exists a node i in V suchthat\(\ \mu _{i}(P^{t+1}) \sqsupset _{i} \mu _{i}(P^{t})\).

Proof

Let α, v, S, i, and j be defined as described above in step t. We first prove the first two lemma’s statements. We let k be any node in VWt+ 1. First, we consider the case that lca(k, j) is an ancestor of v. In this case k is not in the subtree rooted at the child u of v that contains j. For any object γ, \(\sigma _{k}(P^{t+1}_{-k}, \gamma ) = \sigma _{k}(P^{t}_{-k}, \gamma )\) and \(P_{k}^{t+1} = {P^{t}_{k}}\). Statement 2 for k is implied thus from the fact that μk(Pt+ 1) = μk(Pt). Since Pt is in equilibrium, statement 1 also holds for k. We then consider the case that lca(k, j) is a proper descendant of v. in this case k is in the subtree rooted at the child u of v that contains j. There are two cases.

In the case that S is empty, the fictional α-player j is removed. In this way j is not in Wt+ 1. Moreover, there is no copy of α in the subtree rooted at u. Given that no other object except α is created or removed, \(\sigma _{k}(P^{t+1}_{-k}, \gamma ) = \sigma _{k}(P^{t}_{-k}, \gamma )\) for γα. The second statement is established for k by the fact that \(\text {lca}(k, \sigma _{k}(P^{t+1}_{-k}, \alpha )) = v\) and μk(Pt+ 1) = μk(Pt). Since S is empty, \(\mu _{k}(P^{t}) \sqsupseteq _{k} (\alpha ,v)\). The first statement for k follows from Lemma 1 and the fact that \({P^{t}_{k}}\) is in equilibrium such that \(P^{t+1}_{k}\) is a best response against \(P^{t+1}_{-k}\).

In the second case that S is not empty, we let i be a node in S such that lca(i, j) is lowest among all nodes in S, as defined above, x denote lca(i, j), and \({P^{t}_{i}}\) be equal to {β}, where βα. From the algorithm it is true that \(P^{t+1}_{k} = \{\alpha \}\). We let ki be a node in the subtree rooted at u. For any γα, \(\sigma _{k}(P^{t+1}_{-k}, \gamma ) = \sigma _{k}(P^{t+1}_{-k}, \gamma )\). The second statement is established for k by the fact that since \(P_{k}^{t+1} = {P_{k}^{t}} \neq \{\alpha \}\), we have μk (Pt+ 1) = μk(Pt). Similarly for node i, we have \(\mu _{i}\left (P^{t+1}\right ) = (\alpha ,v) \sqsupset _{i} \mu _{i}(P^{t})\).

To establish the first statement or any node k in the subtree rooted at u we consider two cases. Let y be the child of x that is an ancestor of j (see Fig. 4). In the first case, we let k be in the subtree rooted at y. Then, by our choice of i, it is true that

$$ \mu_{k}\left( P^{t+1}\right) \sqsupseteq_{k} (\alpha, v) \sqsupseteq_{k} (\alpha, x) = \left( \alpha, \sigma_{k}\left( P^{t+1}_{-k}, \alpha\right)\right), $$

which, by Lemma 1, implies that the first statement holds for k. In the second case, we let k be in the subtree rooted at u, but not in the subtree rooted at y. Again, \(\sigma _{k}\left (P^{t+1}_{-k}, \gamma \right ) = \sigma _{k}(P^{t}_{-k}, \gamma )\) for γα. And for α it is true that

$$ \left( \alpha, \text{lca}\left( k,\sigma_{k}\left( P^{t+1}_{-k}, \alpha\right)\right)\right) = (\alpha, \text{lca}(k,i)) \sqsupseteq_{k} (\alpha, x) \sqsupseteq_{k} \mu_{k}(P^{t}) = \mu_{k}\left( P^{t+1}\right), $$

which establishes the first statement for k using Lemma 1.

Fig. 4
figure 4

Illustrating the analysis for hierarchical networks; referred to in the proof of Lemma 2. The square is a node i in V holding object β, and the hexagon is a fictional α-player

To establish the third statement we use the fact that |Wt+ 1|≤|Wt|, which is immediate from the definition of the algorithm’s t step. When S is empty, |Wt+ 1| < |Wt| since a fictional player is deleted. When S is nonempty, we have proved above that \(\mu _{i}\left (P^{t+1}\right ) \sqsupset _{i} \mu _{i}(P^{t})\). This concludes the proof of the third statement and of the whole lemma. □

Theorem 1

For hierarchical node preferences, an equilibrium can be found in polynomial time.

Proof

From Lemma 2 and the definition of the algorithm it is straightforward that it returns a valid equilibrium at the termination. We should prove now that the termination is achieved in polynomial time. We consider the potential function given by the sum of |Wt| and the sum of the μi(Pt) position in the preorder \(\sqsupseteq _{i}\) over all i. We notice that |W0| is at most nm, where m is the number of objects and n is |V | which is at least the number of internal nodes. Moreover, the initial potential is at most nm + n2m since |O × I| is at most nm. From Lemma 2, the potential decreases by at least one in each step and thus the number of steps is at most nm + n2m.

We need to also prove that each step can be implemented in polynomial time. In the initialization we add O(nm) fictional players and compute the best response for each node iV. For the later process, we compare at most m placements for each kV, i.e. one for each object. During each subsequent step we select a fictional player j, we determine whether the set S is nonempty, and if so we compute node i and the updated placement. From this process we only need to explain the computation of S and i, where S is the set of all k nodes which are not in equilibrium when a fictional player j is deleted. S is computed as follows: for each node kV, we replace the current object in its cache by α and add k to S. According to the utility, this yields to a more preferable placement. Thus, S can be computed in time polynomial in n. To complete the proof of the theorem, we let node i simply be a node in S such that lca(i, j) is lowest among all nodes in S. This can also be computed in time polynomial in n. □

4 A General Framework for CSR Games with Ordinal Preferences

In this section, we present a new framework on CSR games with ordinal preferences, to generalize the results that were presented in Section 3 to a broad class of utility functions, and to also enable the study of the existence and complexity of equilibria in more general settings.

Node Preference Relations

Among all the nodes in V, we assume that each node iV has a total preorder ≥iFootnote 3 and ≥i further satisfies iij for all i, jV. A node iprefersj over k if jik, while a node j is the mosti-preferred in a set S of nodes if jS and jik for all kS. We let j = ik denote that jik and kij, while when it is not the case that kij, we denote it by j >ik. Notice that >i is a strict weak orderFootnote 4 and for any i, j, kV exactly one of the following three relations hold: 1) j >ik, 2) k >ij, and 3) k =ij. We also extend the σi(P, α) and σi(Pi,α) notations such that they denote a most i-preferred node holding α in P and Pi respectively, breaking ties arbitrarily.

The access cost function d introduced in Section 2 induces a natural node preference relation: j >ik if dij < dik, and j =ik if dij = dik. In fact, as we show in Lemma 3, undirected networks (i.e., when the access cost function is symmetric) are equivalent to acyclic node preference collections. Formally, the collection {≥i : iV } is an acyclic node preference collection if there does not exist a sequence of nodes i0,i1,…,ik− 1 for an integer k ≥ 3 such that \(i_{(j-1) \bmod k} >_{i_{j}} i_{(j+1) \bmod k}\) for all 0 ≤ j < k.

Lemma 3

Any undirected network yields an acyclic node preference collection. For any acyclic node preference collection, we can compute, in polynomial time, symmetric cost functions that are consistent with the node preferences.

Proof

Let d denote a symmetric access cost function over the set V of nodes. For a given node iV, we have jik iff dijdik. We now argue that the collection {≥i : iV } is acyclic. Suppose, for the sake of contradiction, that there exists a sequence of nodes i0,i1,…,ik− 1 for an integer k ≥ 3 such that \(i_{(j-1) \bmod k} >_{i_{j}} i_{(j+1) \bmod k}\) for all 0 ≤ j < k. It then follows that:

$$ d_{i_{j}i_{(j-1) \bmod k}} < d_{i_{j}i_{(j + 1) \bmod k}} \text{ for } 0 \le j < k. $$

Since d is symmetric, we obtain

$$ d_{i_{j}i_{(j-1) \bmod k}} < d_{i_{(j+1) \bmod k}i_{j}} \text{ for } 0 \le j < k, $$

which is a contradiction, since \(d_{i_{0}i_{(k-1)}} < d_{i_{1}i_{0}} < {\dots } < d_{i_{(k-1)}i_{0}} = d_{i_{0}i_{(k-1)}}\).

Given an acyclic collection of node preferences, we compute an associated access cost function d in polynomial time as follows. We construct a directed graph G over the set U of all unordered pairs (i, j) : i, jV, ij. There is a directed edge from node (i, j) to (i, k) if and only if kij. Since the collection {≥i : iV } is acyclic, G is a dag. We compute the topological ordering \(\pi : U \rightarrow \mathbb {Z}\); thus, we have π((i, j)) < π((k, )) whenever there is a directed path from (i, j) to (k, ). Setting dij to be π((i, j)) gives us the desired undirected network. □

Utility Preference Relations

Each node in our game-theoretic model attaches a utility to each global placement. In our general definition a large class of utility functions it is considered simultaneously. Instead of defining a numerical utility function, we let the utility at each node i be a total preorder ≽i among the set of all global placements. The ≻i and =i notations over global placements are defined analogously. We require that ≽i, for each iV, satisfies the following two basic conditions:

  • Monotonicity: If for any two global placements P and Q, for each object α, and each node q with αQq, there exists a node p with αPp and piq, then PiQ.

  • Consistency: Let two global placements (Pi,Pi) and (Qi,Qi) such that for each object αPiQi, if p (resp. q) is a most i-preferred node in V ∖{i} holding α, i.e. αPp (resp. αQq), then p =iq. If (Pi,Pi) ≻i(Qi,Pi), then (Pi,Qi) ≽i(Qi,Qi).

In words, the monotonicity condition says that for any node, if all the objects in a placement are placed at nodes that are at least as preferred as in another placement, then the node prefers the former placement at least as much as the latter. The consistency condition says that the preference for a node to store one set of objects instead of another is entirely a function of the set of most preferred other nodes that together hold these objects. For instance, if a node i with unit capacity prefers to store α over β in a scenario where the most i-preferred node (other than i) storing α (resp. β) is j (resp. k), then i prefers to store α at least as much as β in any other situation where the most i-preferred node (other than i) storing α (resp. β) is j (resp. k).

Generality of the Conditions

We note that many standard utility functions defined for replica placement problems [8, 47, 57], including the sum and max functions, satisfy the monotonicity and consistency conditions. Indeed, any utility function that is an Lp norm, for any p, over the costs for the individual objects, also satisfies the conditions. Furthermore, since the monotonicity and consistency conditions apply to the individual utility functions, our model allows the different nodes to adopt different types of utilities, as long as each separately satisfies the two conditions.

Binary object Preferences

One of the utility preference relations classes we study is based on binary object preferences. Assume that each node i is equally interested in an objects set Si and it does not have any interest in the other objects. Then, τi(P) will denote the |Si|-length sequence of the σi(P, α), such that αSi and it is in non-increasing order based on the ≥i relation. In this setup the consistency condition can be further strengthened to the binary consistency term: for any placements P = (Pi,Pi) and Q = (Qi,Qi) with Pi = Qi, we let PiQ if and only if for 1 ≤ k ≤|Si|, the kth component of τi(P) is at least as i-preferred as the kth component of τi(Q).

CSR Games

We let a CSR game be a tuple (V,O,{≥i},{≽i}) in the general axiomatic framework. A pure Nash equilibrium in a CSR game instance is a global placement P such that there is no placement Qi for which (Qi,Pi) ≻i(Pi,Pi), for each iV.

To further analyse the complexity results, a definition of a game instance specification is required. We first specify the set V, the node cache capacities, and an enumerated list of object names O. For each node iV, we specify i’s preference relation ≥i succinctly by a set of at most \(\binom {n}{2}\) bits. However, the utility preference relation ≽i is over a potentially exponential number of placements in terms of n, m, and cache sizes. We further assume that the utility preference relations are specified by an efficient algorithm, which we denote as utility preference oracle, that takes as input a node i, and two global placements P and Q, and returns whether PiQ. For the sum, max, and Lp-norm utilities, the utility preference oracle simply computes the relevant utility function. For binary object preferences, the binary consistency condition yields an oracle which is polynomial in the number of nodes, objects, and cache sizes.

Unit Cache Capacity

We now argue that the unit cache capacity assumption of Section 2 continues to hold without loss of generality. Consider a set V of nodes in which the cache of node i can store ci objects. Let V denote a new set of nodes which contains, for each node i in V, new nodes \(i_{1}, i_{2}, \ldots , i_{c_{i}}\), i.e., one new node for each unit of the cache capacity of i. We set the node preferences as follows: for all i, i,jV, 1 ≤ f, cj, 1 ≤ k, kci, we have \(i_{k} \ge _{j_{\ell }} i^{\prime }_{k^{\prime }}\) whenever iji, and \(j_{f} =_{i_{k}} j_{\ell }\).

We consider an obvious onto mapping f from placements in V to those in V. Given placement P for V, we set f(P) = P where \(P_{i} = \cup _{1 \le k \le c_{i}} P^{\prime }_{i_{k}}\). This mapping naturally defines the utility preference relations for the node set V. In particular, for any iV and 1 ≤ kci, \(P^{\prime } \succeq _{i_k} y\) whenever f(P) ≽if(Q). We also note that f is computable in time polynomial in the number of nodes and the sum of the cache capacities. It is easy to verify that the utility preference relation \(\succeq _{i_k}\) for all ikV satisfies the monotonicity and consistency conditions. Furthermore, P is an equilibrium for V if and only if f(P) is an equilibrium for V; this together with the onto property of the mapping f gives us the desired reduction.

5 Existence of Equilibria in the General Framework

In this section, we establish the existence of equilibria for several CSR games under the general framework of CSR games with ordinal preferences that we introduced in Section 4. First, we extend the sum utility function results on hierarchical networks to the general framework (Section 5.1). Next, we show that CSR games on undirected networks and binary object preferences are potential games (Section 5.2). Finally, when there are only two objects in the system, we use the technique of fictional players to give a polynomial-time construction of equilibria for CSR games on undirected networks (Section 5.3).

5.1 Hierarchical Networks

We fist show that the polynomial time algorithm which was introduced in Section 3 holds also for the general framework of CSR games with ordinal preferences. A hierarchical network, as defined in the general framework, is a tree T whose leaves set is the node set V and the node preference relation ≥i is jik if lca(i, j) is a descendant of lca(i, k). This hierarchical network structure and each node’s i pair-preference relations \(\sqsupseteq _{i}\), determine completely the analysis of the algorithm introduced in Section 3. The latter were defined for the sum utility function. Extending our analysis to the general framework, requires a new preference relation derivation and the establishment of Lemma’s 1 analogue, which we present next for arbitrary utility preference relations that satisfy the monotonicity and consistency properties.

Pair Preference Relations

For any utility preference relation ≽i that satisfies the monotonicity and consistency conditions, we define a strict weak order \(\sqsupset _{i}\) on O × Ai, where Ai is the set of i’s proper ancestors in T.

  1. 1.

    We let \((\alpha , v) \sqsupset _{i} (\alpha , w)\) hold whenever v is a proper ancestor of w, for each object α, node i, and proper i’s ancestors v and w.

  2. 2.

    Considering distinct objects α, β and nodes i, j, k with j, ki, we let \(\mathcal {P}\) be the set of global placements P, such that j (resp. k) is a most i-preferred node in V ∖{i} holding α (resp. β) in Pi. If there exist global placements P = ({α},Pi) and Q = ({β},Pi) in \(\mathcal {P}\) with PiQ, then \((\alpha , \text {lca}(i,j)) \sqsupset _{i} (\beta , \text {lca}(i,k))\).

In words, item 1 says that i’s preference for keeping α in its cache increases as the most i-preferred node holding α becomes less preferred (or “moves farther away”). In item 2, \((\alpha , v) \sqsupset _{i} (\beta , w)\) means that if i needs to place either α or β in its cache, and the least common ancestor of i and the most i-preferred node in V ∖{i} holding α (resp., β) is v (resp., w), then i prefers to store α over β. The strict weak order \(\sqsupset _{i}\) induces a total preorder \(\sqsupseteq _{i}\) as follows: \((\alpha , v) \sqsupseteq _{i} (\beta , w)\) if it is not the case that \((\beta , v) \sqsupset _{i} (\alpha , w)\). We similarly define =i: (α, v) =i(β, w) if \((\alpha , v) \sqsupseteq _{i} (\beta , w)\) and (β, v) =i(α, w).

Lemma 4

For each i, \(\sqsupset _{i}\)asgiven above, is a well-defined strict weak order.

Proof

We need to ensure the well-definedness of part 2 of the definition of pair preference relations. That is, we need to show that for any placements Pi and Qi such that a most i-preferred node in Pi holding α (resp., β) is also a most i-preferred node in Qi, it is impossible that ({α},Pi) ≻i({β},Pi) and ({β},Qi) ≻i({α},Qi) both hold. This directly follows from the consistency condition for utility preference relations.

The reflexivity and transitivity of \(\sqsupseteq _{i}\) are immediate from the definitions and the reflexivity and transitivity of ≽i. Finally, to ensure the well-definedness of the strict preorder \(\sqsupset _{i}\), we also have to show that there is no collection of pairs (αj,vj), 0 ≤ j < for some integer > 1, such that \((\alpha _{j}, v_{j}) \sqsupset _{i} (\alpha _{j+1 \bmod \ell }, v_{j+1 \bmod \ell })\) for 0 ≤ j < . To see this, it is sufficient to note that if \((\alpha , v) \sqsupset _{i} (\alpha ^{\prime }, v^{\prime })\) then for all placements P and P such that \(P_{-i} = P^{\prime }_{-i}\) and the least common ancestor of i and the most i-preferred node in V ∖{i} that holds α (resp. α) is v (resp. v) we have PiP. So any cycle in the strict preorder \(\sqsupset _{i}\) implies a cycle in ≻i, yielding a contradiction. □

Analogous to Lemma 1, we can express the best response of any player in hierarchical networks as follows. For any global placement P = ({α},Pi), assume that j (resp. k) is a most i-preferred node holding object α (resp. β) in Pi, and ({β},Pi) ≻i({α},Pi), i.e., for node i, storing β is a better response to Pi than storing α. Then the following Lemma holds.

Lemma 5

For any global placementP = ({α},Pi), \((\beta , \text {lca}(i,k)) \sqsupset _{i} (\alpha , \text {lca}(i,j))\).Furthermore, {α} is a best response toPi, whereαmaximizes (γ,lca(i, σi(Pi,γ))), over all objectsγ, according to\(\sqsupseteq _{i}\).

Proof

The first statement of the lemma directly follows from item 2 of the definition of pair preference relations. We establish the second statement by contradiction. Suppose that for node i, {β} is a better response to Pi than {α}. Then, we have ({β},Pi) ≻i({α},Pi), which, by item 2 of the definition of pair preference relations, implies that \((\beta , \text {lca}(i,\sigma _{i}(P_{-i}, \beta ))) \sqsupset _{i} (\alpha , \text {lca}(i,\sigma _{i}(P_{-i}, \alpha )))\), a contradiction to the choice of α. □

The remainder of the analysis for hierarchical networks (Lemma 2 and Theorem 1) follows as before, invoking Lemma 5 instead of Lemma 1.

5.2 Undirected Networks with Binary Object Preferences

Let d be a symmetric cost function for an undirected network over the node set V. From the binary object preferences definition for each node i we are given an object set Si in which i is equally interested. We prove the existence of equilibria via a potential function argument. Given a placement P, we let Φi(P) = dij, where j is the most i-preferred node in V −{i} holding the object in Pi. We introduce the potential function Φ: \({\Phi }(P) = ({\Phi }_{0}, {\Phi }_{i_{1}}(P), {\Phi }_{i_{2}}(P), \ldots , {\Phi }_{i_{n}}(P))\), where Φ0 is the number of nodes i such that PiSi, and \({\Phi }_{i_{j}}(P) \leq {\Phi }_{i_{j+1}}(P)\), ∀j, where V = {i1,i2,…,in}. We prove that Φ is an increasing potential function, i.e. after any better response step, Φ increases in lexicographical order.

Let P = (Pi,Pi) be an arbitrary global placement. Assume that Pi = {α} and j is the most i-preferred node in Pi holding α. Consider any better response step, from placement P to Q = (Qi,Pi), where Qi = {β}. Clearly βSi. We consider two cases. First, suppose αSi and βSi. Then, Φ0 increases, and so does the potential. The second case is where α, βSi. Let k be the most i-preferred node in Pi holding β. In this case, Φ0 does not change. However, since this is a better response step of i, j >ik, implying that dik > dij and hence Φi(Q) > Φi(P). Consider any other node j. If j holds any object γ other than β, since no new copy of γ has been added, Φj(Q) ≥Φj(P). It remains to consider the case where j holds β. If S is the set of nodes in V ∖{j} holding β in Pj, then S ∪{i} is the set of nodes in V ∖{j} holding β. Thus, Φj(Q) = min{Φj(P),dji}≥ min{Φj(P),Φi(Q)}. This also means that Φj(P) appears later in the sorted order than Φi(P) and Φj(Q) appears no earlier in the sorted order than Φi(Q). Hence, Φ(Q) is lexicographically greater than Φ(P). This establishes that for undirected networks with binary object preferences, the resulting CSR game is a potential game, and hence also in PLS [37].

5.3 Undirected Networks with Two Objects

In the case of an undirected network with two objects we provide a polynomial-time algorithm to compute an equilibrium. We use the fictional player technique that was introduced in Section 5.1. In the beginning a set of fictional players are introduced to serve the two objects in the network at zero cost from each node. In each subsequent step, the fictional players are progressively moved “further” away, in a way that at each instance the equilibrium is ensured. The whole set of fictional players are completely removed when they are at the least preferred cost from all the nodes, yielding finally to an equilibrium for the original network.

Suppose we are given a undirected network with access cost function d. Also let \(\mathcal {D}\) be the set {0,1,2,…,r} of all access costs between nodes in the system in increasing order; that is, 1 = mini, jdij and r = maxi, jdij and i < i+ 1 for all 1 ≤ i < r.

Fictional Player

For an object α, a fictional α-player is a new node that will store α in every equilibrium; an fictional α-player prefers storing α over any other object. We denote by srvα() the fictional α-player which is at access cost from every node in V.

The algorithm

Initialization. :

Assuming that there are two objects α and β in the system, we initially set up a fictional α-player srvα(0) and β-player srvβ(0) at access cost 0 from each node in V, which does not affect the actual distance between nodes. We let nodes replicate their most preferred object and access the other without any access cost from the corresponding fictional player. This placement is obviously an equilibrium.

Step t of algorithm. :

Fix an equilibrium P for the node set V ∪{srvα(t)}∪{srvβ(t)}. We describe one step of the algorithm which computes a new set of fictional players srvα(t+ 1) and srvβ(t+ 1) and a new placement P such that P is an equilibrium for the node set V ∪{srvα(t+ 1)}∪{srvβ(t+ 1)}. We first remove the α-player srvα(t) from the system and instead we add srvα(t+ 1). If there do not exist nodes that want to deviate we are done. Otherwise, assume that there exists a node i that wants to deviate from its strategy. Since the most i-preferred node holding β in V ∪{srvα(t)}∪{srvβ(t)} remains the same in Vsrvα(t+ 1) ∪ srvβ(t), i is not holding object α. Thus the only nodes that may want to deviate are those that are holding object β. We argue that if we let i to deviate from βPi to \(\alpha \in P^{\prime }_{i}\), there is no node jV ∖{i} that gets affected by i’s deviation. Consider the following two cases:

  • If a node j has access cost at most t from i, then βPj. Otherwise, if αPj, srvα(t) would not be the most i-preferred node holding α and thus i would not be affected by any change of α-players. Thus there does not exist any node jV ∖{i} with access cost at most t from i, such that αPj, and as we showed above \(\alpha \in P^{\prime }_{j}\).

  • If a node j has access cost at least t+ 1 from i, then \(P_{j} = P^{\prime }_{j}\). Because of the α-player srvα(t+ 1) and the β-player \(srv_{\ell _{t}}{\beta }\), i would never be the j-most preferred node in P.

We then remove the β-player srvβ(t) from the system and instead we add srvβ(t+ 1). Using a similar argument as above, we obtain a new equilibrium at the end of this step.

Theorem 2

For undirected networks with two objects, an equilibrium can be found in polynomial time.

Proof

An initial placement P, where we have the set of fictional players srvα(0) and srvβ(0) in the system, is obviously an equilibrium. It is immediate from our argument above that at termination the algorithm returns a valid equilibrium.

The size of the set \(\mathcal {D}\) is at most \({n \choose 2}\) which is at most n2. In each step t at most n nodes may want to deviate from their strategy, since we showed above that if a node deviates once in a step, it will not deviate again during the same step. Thus, the total number of deviations in the algorithm is at most n3. □

6 Non-Existence of Equilibria in CSR Games and the Associated Decision Problem

In this section, we show that the classes of games studied in Section 5 are essentially the only games where equilibria are guaranteed to exist. We identify the most basic CSR games where equilibria may not exist, and study the complexity of the associated decision problem.

6.1 NP-Completeness

We first show that it is NP-hard to determine whether a given CSR game has an equilibrium even when the utility preference relations are based on the sum utility function and either the number of objects is small or the object preferences are binary. Some simple network examples appear in Fig. 5 (middle and right)–the networks are described in details after Theorem 3–showing that there does not exist an equilibrium in these configurations (proved in the second part of Theorems 4 and 5). The NP-hardness proof is by a polynomial-time reduction from 3SAT [26]. Each reduction is built on top of a gadget which has an equilibrium if and only if a specified node holds a certain object. Several copies of these gadgets are then put together to capture the given 3SAT formula.

Fig. 5
figure 5

Left: instance of the construction for the undirected case proof of NP-Hardness, where \(\phi = (x_{1} \vee \bar {x_{3}} \vee x_{4}) \wedge {\ldots } \wedge (x_{n-3} \vee x_{n-1} \vee \bar {x_{n}})\). Middle and right: gadget G for the directed and the undirected case

Theorem 3

The problem of determining whether a CSR instance has an equilibrium is in NP even if one of these three restrictions hold: (a) the number of objects is two; (b) the object preferences are binary and number of objects is three; (c) the network is undirected and the number of objects is three.

The membership in NP is immediate, since one can determine in polynomial time whether a given global placement is an equilibrium. The remainder of the proof focuses on the hardness reduction from 3SAT.

Given a 3SAT formula ϕ with n variables x1, x2, …, xn and k clauses c1, c2, …, ck, we construct a CSR instance as follows. For each variable xi in ϕ, we introduce two variable nodes Xi and \(\bar {X}_{i}\). We set \(d_{X_{i}\bar {X}_{i}}\) and the symmetric \(d_{\bar {X}_{i}X_{i}}\) to be 0.5, where d is the underlying access cost function. For each clause cj we introduce a clause node Cj. Assuming that j, r for r ∈{1,2,3}, are the three literals of the cj clause in formula ϕ, we set \(d_{C_{j}L_{j,r}}\) and \(d_{L_{j,r}C_{j}}\) to be 1, where Lj, r is the corresponding variable node. We also introduce a gadget G illustrated in Fig. 5 (middle and right), consisting of nodes S, A, B, and C. We set the access cost \(d_{SC_{i}}\) and the symmetric \(d_{C_{i}S}\), for all 1 ≤ ik between node S and all clause nodes to be 2. The general construction is illustrated in Fig. 5 (left).

Directed Networks with Two Objects

We set the access costs dAS = dAB = dBC = dCA = 1, and the server node, which stores a fixed copy of two objects α and β, at access cost dsrv = 10 from all nodes in V. We also set the weights of the variable nodes \(r_{x_{i}}(\alpha ) = r_{\bar {x}_{i}}(\alpha ) = r_{x_{i}}(\beta ) = r_{\bar {x}_{i}}(\beta ) = 1\), the weights of the clause nodes \(r_{C_{i}}(\alpha ) = 0.85\) and \(r_{C_{i}}(\beta ) = 1\), for all 1 ≤ ik. Finally, we set the weights of the nodes in the G gadget rS(α) = 0.85, rS(β) = rA(β) = rB(α) = rB(β) = rC(α) = rC(β) = 1 and rA(α) = 0.7. We refer to this CSR instance as I1.

Undirected Networks with Three Objects

We set the access costs dAS = dBS = 3, dAB = 3.1, dBC = 3.05, and dCA = 2; while symmetry holds. The server node, which stores a fixed copy of three objects α, β, and γ, is at access cost dsrv = 5 from all nodes in V. We set the weights of the clause nodes \(r_{x_{i}}(\alpha ) = r_{\bar {x}_{i}}(\alpha ) = r_{x_{i}}(\beta ) = r_{\bar {x}_{i}}(\beta ) = 1\), the weights of the clause nodes \(r_{C_{i}}(\alpha ) = 0.85\) and \(r_{C_{i}}(\beta ) = 1\), for all 1 ≤ ik. Finally, we set the weight of the nodes in the G gadget rS(α) = 0.85, rS(β) = rA(α) = rB(β) = rC(β) = 1, rA(γ) = 2, rB(γ) = 0.9837, and rC(γ) = 1.6. All the remaining weights are set to 0. We refer to this CSR instance as I2.

Lemma 6

A variable node X i holds object α (resp., β ) if and only if node \(\bar {X}_{i}\) holds object β (resp., α ).

Proof

The proof is immediate, since \(\bar {X}_{i}\) (resp., Xi) is Xi’s (resp., \(\bar {X}_{i}\)’s) nearest node, and both Xi and \(\bar {X_{i}}\) are interested equally in α and β. □

Lemma 7

Clause nodeCiholds objectαif and only if its variable nodesLi, j, forj ∈{1,2,3} hold objectβ.

Proof

First, assume that Li, j, for j ∈{1,2,3} hold β. These nodes are Ci’s nearest nodes holding β. By Lemma 6 we know that nodes \(\bar {L}_{i,j}\), for j ∈{1,2,3} hold α, and they are Ci’s nearest nodes holding α. Node’s Ci cost for holding α and accessing β from Li, j, for j ∈{1,2,3}, is \(r_{C_{i}}(\beta ) d_{C_{i}L_{i,j}} = 1\); while the cost for holding β and accessing α from \(\bar {L}_{i,j}\), for j ∈{1,2,3}, is \(r_{C_{i}}(\alpha ) d_{C_{i}\bar {L}_{ij}} = 1.275\). Obviously, node Ci prefers to replicate α.

Now assume that at least one of the nodes \(\bar {L}_{i,j}\), for j ∈{1,2,3} holds α. These nodes are Ci’s nearest nodes holding α. Also, by Lemma 6, Ci’s nearest nodes holding β are all the remaining nodes from the set Li, j, \(\bar {L_{i,j}}\), for j ∈{1,2,3}, that don’t hold α. Node’s Ci cost for holding β and accessing α from Li, j, for j ∈{1,2,3}, is \(r_{C_{i}}(\alpha ) d_{C_{i}L_{i,j}} = 0.85\); while the cost for holding α and accessing β from node \(\bar {L}_{i,j}\) (resp., Li, j), is \(r_{C_{i}}(\beta ) d_{C_{i}\bar {L}_{i,j}} = 1.5\) (resp., \(r_{C_{i}}(\beta ) d_{C_{i}L_{i,j}} = 1\)). Obviously, in any case node Ci prefers to replicate β. □

Lemma 8

Node S holds objectαif and only if all clause nodesC1,…,Ckhold objectβ.

Proof

First, assume that C1,…,Ck are holding β. These nodes are S’s nearest nodes holding β. Also by Lemma 7, S’s nearest node holding α is at least one of Li, j nodes, where i ∈ [1,k],j ∈{1,2,3}. The cost for S holding α and accessing β from a node Ci,i ∈ [1,k], is \(r_{S}(\beta ) d_{SC_{i}} = 2\); while the cost for holding β and accessing α from Li, j, where i ∈ [1,k],j ∈{1,2,3}, is \(r_{S}(\alpha ) d_{SL_{i,j}} = 2.55\). Obviously, node S prefers to replicate α.

Now assume that at least one of C1,…,Ck holds α. These nodes are S’s nearest node holding α. Also S’s nearest node holding β, due to Lemma 7 is one of Li, j, where i ∈ [1,k],j ∈{1,2,3}. The cost for holding β and accessing α from a node Ci, is \(r_{S}(\alpha ) d_{SC_{i}} = 1.7\); while the cost for holding α and accessing β from a node Lij, where j ∈{1,2,3}, is \(r_{S}(\beta ) d_{SL_{i,j}} = 3\). Obviously, in any case node S prefers to replicate β. □

Theorem 4

TheCSRinstanceI1has an equilibrium if and only if node S holds objectα.

Proof

First, assume that S is holding α. By Lemma 8 nodes C1,…,Ck hold object β, and by Lemma 7 at least one of nodes Li, j, for j ∈{1,2,3} for each node Ci,i ∈ [1,k], holds object α, and the corresponding \(\bar {L}_{i,j}\) is holding object β. We claim that the placement where A holds β, B holds β, and C holds α, is a pure Nash equilibrium. We prove this by showing that none of these nodes wants to deviate from their strategy.

Node A does not want to deviate since its cost for holding object β and accessing α from A’s nearest node S, is rA(α)dAS = 0.7; while the cost for holding object α and accessing β from A’s nearest node B, is rA(α)dAB = 1. Node B does not want to deviate since its cost for holding object β and accessing α from B’s nearest node C, is rB(α)dBC = 1; while the cost for holding object α and accessing β from B’s nearest node A, is rB(β)dBA = 2. Node C does not want to deviate since its cost for holding object α and accessing β from C’s nearest node A, is rC(β)dCA = 1; while the cost for holding object β and accessing α from C’s nearest node S, is rC(α)dCS = 2. Also note that none of \(S, C_{1}, \ldots , C_{k}, L_{ij}, \bar {L}_{ij}\) for i ∈ [1,k],j ∈{1,2,3} is getting affected of the objects been held by the gadget nodes.

Now assume that node S holds object β. We are going to prove that for every possible placement over nodes A, B, and C, at least one node wants to deviate from its strategy. Consider the following cases:

  • Nodes A, B, and C hold object α: Node B (resp., C) wants to deviate, since the cost for holding object α and accessing β from B’s (resp., C’s) nearest node S, is rB(β)dBS = 3 (resp., rC(β)dCS = 2); while the cost for holding object β and accessing α from B’s nearest node A, is rB(β)dBA = 2 (resp., rC(β)dCA = 1).

  • Two nodes hold object α and the third holds β: In the case where A and B hold α, A wants to deviate since the cost while holding α and accessing β from A’s nearest node S is rA(β)dAS = 1; while the cost for holding β and accessing α from A’s nearest node B is rA(α)dAB = 0.7. In the case where A and C hold α, then C wants to deviate since the cost while holding α and accessing β from C’s nearest node B is rC(β)dCB = 2; while the cost for holding β and accessing α from C’s nearest node A is rC(α)dCA = 1. In the case where B and C hold α, B wants to deviate since the cost while holding α and accessing β from B’s nearest node A is rB(β)dBA = 2; while the cost for holding β and accessing α from B’s nearest node C is rB(α)dBC = 1.

  • One node holds α: If A (resp., B, or C) holds α, B (resp., C, A) wants to deviate since the cost while holding β and accessing α from B’s (resp., C’s, or A’s) nearest node A (resp., B, or C) is rB(α)dBA = 2 (resp., rC(α)dCB = 2, or rA(α)dAC = 1.4); while the cost for holding α and accessing β from B’s (resp., C’s, or A’s) nearest node C (resp., A, or B), is rB(β)dBC = 1 (resp., rC(β)dCA = 1, or rA(β)dAB = 1).

  • Nodes A, B, and C hold β: All of them want to deviate. Node A wants to deviate since the cost while holding β and accessing α from A’s nearest node Ci, for some i ∈ [1,k], is \(r_{A}({\beta }) r_{AC_{i}} = 3\); while the cost for holding β and accessing α from A’s nearest node S is rA(α)dAS = 0.7. Similar proof holds for nodes B and C.

Obviously the system does not have a pure Nash equilibrium, which completes the proof. □

Theorem 5

TheCSRinstanceI2has an equilibrium if and only if node S holds objectα.

Proof

First, assume that S is holding α. By Lemma 8 nodes C1,…,Ck hold object β, and by Lemma 7 at least one of nodes Li, j, for j ∈{1,2,3} for each node Ci,i ∈ [1,k], holds object α, and the corresponding \(\bar {L}_{i,j}\) is holding object β. We claim that the placement where A holds γ, node B holds β, and C holds γ is a pure Nash equilibrium. We prove this by showing that none of these nodes wants to deviate from their strategy. Node A doesn’t want to deviate since the cost for holding object γ and accessing object α from node S is rA(α)dAS = 3; while the cost for holding α and accessing γ from node C increases to rA(γ)dAC = 4. Node B doesn’t want to deviate since the cost for holding object β and accessing object γ from node C is rB(γ)dBC = 3.000285; while the cost for holding object β and accessing γ from the server increases to rB(γ)dsrv = 5. Node C doesn’t want to deviate since the cost for holding object γ and accessing β from node B is rC(β)dCB = 3.05; while the cost for holding object β and accessing γ from node A increases to rC(β)dCA = 3.2.

Now assume that node S holds object β. We are going to prove that for every possible placement over nodes A, B, and C, at least one node wants to deviate from its strategy. Consider the following cases:

  • Node A holds α, node B holds γ, and node C holds β: Node A wants to deviate since the cost while it is holding object α and accessing object γ from node B is (rA(γ)dAB = 6.2); while the cost for holding object γ and accessing α from the server decreases to rA(α)dsrv = 5.

  • Node A holds γ, node B holds γ, and node C holds β: Node B wants to deviate since the cost while it is holding object γ and accessing object β from node C is (rB(β)dBC = 3.05); while the cost for holding object β and accessing γ from node A decreases to rB(γ)dBA = 3.04947.

  • Node A holds γ, node B holds β, and node C holds β: Node C wants to deviate since the cost while it is holding object β and accessing object γ from node A is (rC(γ)dCA = 3.2); while the cost for holding object γ and accessing β from node B decreases to rC(β)dCB = 3.05.

  • Node A holds γ, node B holds β, and node C holds γ: Node A wants to deviate since the cost while it is holding object γ and accessing object α from the server is (rA(α)dsrv = 5); while the cost for holding object α and accessing γ from node C decreases to rA(γ)dAC = 4.

  • Node A holds α, node B holds β, and node C holds γ: Node B wants to deviate since the cost while it is holding object β and accessing object γ from node C is (rB(γ)dBC = 3.000285); while the cost for holding object γ and accessing β from node S decreases to rB(β)dBS = 3.

  • Node A holds α, node B holds γ, and node C holds γ: Node C wants to deviate since the cost while it is holding object γ and accessing object β from the server is (rC(β)dsrv = 5); while the cost for holding object β and accessing γ from B decreases to rC(γ)dBC = 4.88.

  • Node A holds α, node B holds β, and node C holds β: Node C wants to deviate since the cost while it is holding object β and accessing object γ from the server is (rC(γ)dsrv = 4.9185); while the cost for holding object γ and accessing β from node B decreases to rB(β)dCB = 3.05.

  • Node A holds γ, node B holds γ, and node C holds γ: Node A wants to deviate since the cost while it is holding object γ and accessing object α from the server is (rA(α)dsrv = 5); while the cost for holding object α and accessing γ from C decreases to (rA(γ)dAC = 4.

The remaining placements where A holds α, B holds α, and C holds α, obviously are not stable since none of the nodes are interested in these objects. Since there does not exist a stable placement, an equilibrium does not exist. □

Binary Object Preferences Over Three Objects

For the binary object preferences, we introduce two extra nodes K and L. We set \(d_{C_{i}K}\), for i ∈ [1,k], between clause nodes and K to be 1.4, dSL to be 2.1, and dAS, dAB, dBC, dCA to be 1. The server node, which is at access cost dsrv = 10 from all nodes in V, stores a fixed copy of three objects α, β, and γ. Each node i has a set Si of objects in which it is equally interested. For nodes Xi, \(\bar {X}_{i}\), for i ∈ [1,n], we set \(S_{X_{i}} = \{\alpha , \beta \}\) and \(S_{\bar {X}_{i}} = \{\alpha , \beta \}\). For nodes Ci, for i ∈ [1,k], we set \(S_{C_{i}} = \{\alpha , \gamma \}\). For node K we set SK = {γ}; while for node L we set SL = {β}. For node S we set SS = {α, β}. For nodes A, B, and C we set SA, SB, and SC correspondingly to be the set {α, γ}. As we mentioned in the binary object preference definition for our utility function Us(i), equally interested means weight 1 for all objects in Si, and 0 for the remaining. We refer to this instance as I3.

Lemma 6 holds as it is for the binary object preferences directed case.

Lemma 9

Clause nodeCiholds objectαif and only if its variable nodesLi, j, forj ∈{1,2,3} hold objectβ.

Proof

First, assume that Li, j, for j ∈{1,2,3} hold β. By Lemma 6 we know that nodes \(\bar {L}_{i,j}\), for j ∈{1,2,3} hold α, and they are Ci’s nearest nodes holding α; while Ci’s nearest node holding γ is node K. Node’s Ci cost for holding α and accessing γ from K is \(d_{C_{i}K} = 1.4\); while the cost for holding γ and accessing α from \(\bar {L}_{i,j}\), for j ∈{1,2,3}, is \(d_{C_{i}\bar {L}_{ij}} = 1.5\). Obviously, node Ci prefers to replicate α.

Now assume that at least one of the nodes \(\bar {L}_{i,j}\), for j ∈{1,2,3} holds α. These nodes are Ci’s nearest nodes holding α; while again Ci’s nearest node holding γ is node K. Node’s Ci cost for holding γ and accessing α from Li, j, for j ∈{1,2,3}, is \(d_{C_{i}L_{i,j}} = 1\); while the cost for holding α and accessing γ from node K is \(d_{C_{i}K} = 1.4\). Obviously, node Ci prefers to replicate γ. □

Lemma 10

Node S holds objectαif and only if all clause nodesC1,…,Ckhold objectγ.

Proof

First, assume that C1,…,Ck are holding γ. By Lemma 9, S’s nearest node holding α is at least one of Li, j nodes, where i ∈ [1,k],j ∈{1,2,3}; while S’s nearest nodes holding β is node L. The cost for S holding α and accessing β from node L, is dSL = 2.1; while the cost for holding β and accessing α from Li, j, where i ∈ [1,k],j ∈{1,2,3}, is \(d_{SL_{i,j}} = 3\). Obviously, node S prefers to replicate α.

Now assume that at least one of C1,…,Ck holds α. These nodes are S’s nearest node holding α; while again S’s nearest node holding β is L. The cost for holding β and accessing α from a node Ci, is \(d_{SC_{i}} = 2\); while the cost for holding α and accessing β from a node L is dSL = 2.1. Obviously, node S prefers to replicate β. □

Theorem 6

There exists an equilibrium for theCSRinstanceI3if and only if node S holds objectα.

Proof

First, assume that S is holding α. By Lemma 10 nodes C1,…,Ck hold object γ, and by Lemma 9 at least one of nodes Li, j, for j ∈{1,2,3} for each node Ci,i ∈ [1,k], holds object α, and the corresponding \(\bar {L}_{i,j}\) is holding object β. We claim that the placement where A holds γ, B holds γ, and C holds α, is a pure Nash equilibrium. We prove this by showing that none of these nodes wants to deviate from their strategy.

Node A does not want to deviate since its cost for holding object γ and accessing α from A’s nearest node S, is dAS = 1; while the cost for holding object α and accessing γ from A’s nearest node B, is still dAB = 1. Node B does not want to deviate since its cost for holding object γ and accessing α from B’s nearest node C, is dBC = 1; while the cost for holding object α and accessing γ from B’s nearest node A, is still dBA = 1. Node C does not want to deviate since its cost for holding object α and accessing γ from C’s nearest node A, is dCA = 1; while the cost for holding object γ and accessing α from C’s nearest node S, is still dCS = 1. Also note that none of \(S, C_{1}, \ldots , C_{k}, L_{ij}, \bar {L}_{ij}\) for i ∈ [1,k],j ∈{1,2,3} is getting affected of the objects been holded by the gadget nodes.

Now assume that node S holds object β. We are going to prove that for every possible placement over nodes A, B, and C, at least one node wants to deviate from its strategy. Consider the following cases:

  • Nodes A, B, and C hold object α: Node B (resp., C) wants to deviate, since the cost for holding object α and accessing γ from B’s (resp., C’s) nearest node Ci, for some i ∈ [1,k] or from node K, is \(d_{BC_{i}} = 5\) or dBK = 6.4 (resp., \(d_{C C_{i}} = 4\) or dCK = 5.4); while the cost for holding object γ and accessing α from B’s nearest node A, is dBA = 2 (resp., dCA = 1).

  • Two nodes hold object α and the third holds γ: In the case where A and B hold α, A wants to deviate since the cost while holding α and accessing γ from A’s nearest node C is dAC = 2; while the cost for holding γ and accessing α from A’s nearest node B is dAB = 1. The other cases are symmetric.

  • One node holds α: If A holds α, B wants to deviate since the cost while holding γ and accessing α from B’s nearest node A is dBA = 2; while the cost for holding α and accessing γ from B’s nearest node C, is dBC = 1. The other cases are symmetric.

  • Nodes A, B, and C hold γ: All of them want to deviate. Node A wants to deviate since the cost while holding γ and accessing α from A’s nearest node Ci, for some i ∈ [1,k], is \(d_{AC_{i}} = 3\); while the cost for holding α and accessing γ from A’s nearest node B is dAB = 1. The other cases are symmetric.

Obviously the system does not have a pure Nash equilibrium, which completes the proof. □

We now show that ϕ is satisfiable if and only if the above CSR games (both undirected and directed cases) (resp., for the binary object preferences, directed case) has a pure Nash equilibrium. Suppose that ϕ is satisfiable and consider a satisfying assignment for ϕ. If the assignment of a variable xi is True, then we replicate object α in cache of variable node Xi; otherwise, we replicate object β. By Lemma 6 we know that a variable node Xi holds object α (resp., β) if and only if node \(\bar {X}_{i}\) holds object β (resp., α). In this way we keep the consistency between truth assignment of a variable and its negation. By Lemma 7 (resp., Lemma 9) we know that a clause node Ci, will replicate object β (resp., γ) if and only if at least one of its variable nodes, holds object α. From above, any clause node Ci will hold object β (resp., γ) only if at least one of clause ci literals is True. By Lemma 8 (resp., Lemma 10), we know that node S, will replicate object α if and only if all clause nodes C1,…,Ck are holding object β (resp., γ). Thus, node S replicates object α only if all clauses c1,…,ck are True. By Theorems 4 and 5 (resp., 6), we know that there exists a pure Nash Equilibrium if and only if object β is stored to node S; thus, there exists a pure Nash Equilibrium if and only if all clauses are True. This gives our proof.

6.2 Binary Preferences Over Two Objects

Consider the problem 2BIN: does a given CSR instance with two objects and binary preferences possess an equilibrium? We prove that 2BIN is polynomial-time equivalent to the notorious EVEN-CYCLE problem [72]: does a given digraph contain an even cycle? Despite intensive efforts, the complexity of the problem EVEN-CYCLE was open until [51, 61] provided a tour de force polynomial-time algorithm. Our result thus also places 2BIN in P.

Theorem 7

EVEN-CYCLE is polynomial-time equivalent to 2BIN .

We prove the polynomial-time equivalence of 2BIN and EVEN-CYCLE by a series of reductions. We first show the equivalence between 2BIN and 2DIR-BIN, which is the sub-class of 2BIN instances in which the node preferences are specified by an unweighted directed graph (henceforth digraph); in a 2DIR-BIN instance, we are given a digraph, and the preference of a node for the other nodes increases with decreasing distance in the graph.

Lemma 11

2BIN is polynomial-time equivalent to 2DIR-BIN .

Proof

Given a 2BIN instance I with node set V , two objects, node preference relations {≥i : iV }, and interest sets {Si : iV }, we construct a 2DIR-BIN instance I with the same node set, objects, and interest sets, but with the node preference relations specified by an unweighted digraph G. Our construction will ensure that any equilibrium in I is an equilibrium in I and vice-versa. For distinct nodes i and j, we have an edge from i to j if and only if j is a most i-preferred node in V ∖{i}. We now argue that I has an equilibrium if and only if I has an equilibrium. A placement for I is an equilibrium if and only if the following holds for each node i: (a) if |Si| = 1, then i holds the lone object in Si; (b) if |Si| = 2, then the object not held by i is at an i-most preferred node. Similarly, any equilibrium placement for I satisfies the following condition for each i: (a) if |Si| = 1, then i holds the lone object in Si; (b) if |Si| = 2, then the object not held by i is at a neighbor of i. By our construction of the instances, equilibria of I are equilibria of I and vice-versa. □

We next define EXACT-2DIR-BIN, which is the subclass of 2DIR-BIN games where each node is interested in both objects; thus, an EXACT-2DIR-BIN instance is completely specified by a digraph G. We say that a node i is stable in a given placement P if Pi is a best response to Pi. We say that an EXACT-2DIR-BIN instance G is stable (resp., 1-critical) if there exists a placement in which all nodes (resp., all nodes except at most one) are stable. Since each node has unit cache capacity, each placement is a 2-coloring of the nodes: think of a node as colored by the object it holds in its cache. Given a placement, an arc is said to be bichromatic if its head and tail have different colors. Note that for any EXACT-2DIR-BIN instance, a node is stable in a placement iff it has a bichromatic outgoing arc.

Lemma 12

2DIR-BIN and EXACT-2DIR-BIN are polynomial-time equivalent on general digraphs.

Proof

Since EXACT-2DIR-BIN games are a special subclass of 2DIR-BIN games, we only need to show that 2DIR-BIN games reduce to EXACT-2DIR-BIN games. Given an instance of a 2DIR-BIN game, we need to handle the nodes that are interested in at most one object. First, note that we can remove the outgoing arcs from all such nodes. Let V0 consist of the nodes with no objects of interest. For each node u in V0 we add a new node u0 to V0 along with arcs (u, u0) and (u0,u). Let red and blue denote the two objects. Let Vr and Vb denote the set of nodes interested in red and blue, respectively. Without loss of generality, let |Vr|≥|Vb|. Add |Vr|−|Vb| additional nodes to the set Vb (so that |Vr| = |Vb|) and connect all the nodes in \(V_{r} \bigcup V_{b}\) with a directed cycle that alternates strictly between Vr nodes and Vb nodes. The rest of the network is kept the same and all the nodes are set to have interest in both objects. Now, if the original instance is stable then we can stabilize the new instance by having each node in Vr (resp., Vb) cache the red (resp., blue) object, the nodes in V0 cache any object (so long as an original node u and its associated node u0 store complementary objects) and the other nodes cache the same object as in the placement that made the original instance stable. And in the other direction, if the transformed instance is stable then in an equilibrium placement, the nodes in Vr must each store an object of one color while each node in Vb stores the object of the other color. By renaming the colors, if necessary, we get a stable coloring (placement) for the original instance. □

For completeness, we next present some standard graph-theoretic terminology that we will use in our proof. A digraph is said to be weakly connected if it is possible to get from a node to any other by following arcs without paying heed to the direction of the arcs. A digraph is said to be strongly connected if it is possible to get from a node to any other by a directed path. We will use the following well-known structure result about digraphs: a general digraph that is weakly connected is a directed acyclic graph on the unique set of maximal strongly connected (node-disjoint) components. We will also use the following strengthening of the folklore ear-decomposition of strongly connected digraphs [65]:

Lemma 13

An ear-decomposition can be obtained starting with any cycle of a strongly connected digraph.

Proof

The proof is by contradiction. Suppose not, then consider a subgraph with a maximal ear-decomposition obtainable from the cycle in question. If it is not the entire digraph then consider any arc leaving the subgraph. Note that the digraph is strongly connected and hence such an arc must exist. Further, note that every arc in a digraph is contained in a cycle since there is a directed path from the head of the arc to the tail. Starting from the arc follow this cycle until it intersects the subgraph again, as it must because it ends at the tail which lies in the subgraph. This forms an ear that contradicts the maximality of the decomposition. □

Lemma 14

EVEN-CYCLE on strongly connected digraphs and EVEN-CYCLE on general digraphs are polynomial-time equivalent.

Proof

Since strongly connected digraphs are a special subclass of general digraphs it suffices to show that EVEN-CYCLE on general digraphs can be reduced to EVEN-CYCLE on strongly connected digraphs. Remember that a general digraph has a unique set of maximal strongly connected components that are disjoint and computable in polynomial-time. Further any cycle, including even cycles, must lie entirely within a strongly connected component. Thus a digraph possesses an even cycle iff one of its strongly connected components does. Hence it follows that EVEN-CYCLE on general digraphs reduces to EVEN-CYCLE on strongly connected digraphs. □

Lemma 15

EVEN-CYCLE and EXACT-2DIR-BIN games are polynomial-time equivalent on strongly connected digraphs.

Proof

To show the polynomial-time equivalence, we show that a strongly connected digraph is stable iff it has an even cycle. One direction is easy. If the digraph is stable then consider the placement in which every node is stable. So every node has a bichromatic outgoing arc; by starting at any node and following outgoing bichromatic edges we will eventually loop back on ourselves. The loop so obtained is the required even cycle; it is even because it is composed of bichromatic arcs. In the other direction, if there is an even cycle then we take the ear-decomposition starting with that cycle (Lemma 13), stabilize that cycle (by making each arc bichromatic since it is of even cardinality) and then stabilize each node in each ear by working backwards along the ear. □

Lemma 16

Any EXACT-2DIR-BIN game on a strongly connected digraph is 1-critical.

Proof

Consider an ear-decomposition of the strongly connected digraph starting with a cycle. Observe that all but at most one node of the cycle can be stabilized by arbitrarily assigning one color to a node, and then assigning alternate colors to the nodes as we progress along the cycle. Every node in the cycle, other than possibly the initial node, is stable. The rest of the digraph can be stabilized ear by ear, stabilizing each ear by working backwards from the point of attachment. Hence, all but one node of the digraph can be stabilized. □

Lemma 17

EXACT-2DIR-BIN on general digraphs is polynomial-time equivalent to EXACT-2DIR-BIN on strongly connected digraphs.

Proof

Since strongly connected digraphs are a subclass of general digraphs we need only show that the problem EXACT-2DIR-BIN on general digraphs reduces to EXACT-2DIR-BIN on strongly connected digraphs. A general digraph is stable iff all of its weakly connected components are. A weakly connected component is a directed acyclic graph (dag) on the strongly connected components. It is clear that a weakly connected component cannot be stabilized if any one of the strongly connected components that is a minimal element of the directed acyclic graph cannot be stabilized. Interestingly, the converse is also true. If all of the strongly connected components that are minimal elements of the dag can be stabilized then the entire weakly connected component can be stabilized because each of the other strongly connected components has at least one outgoing arc which is used to stabilize its tail while the rest of the strongly connected component can be stabilized because strongly connected components are 1-critical by Lemma 16. We can determine such a stable placement by processing the strongly connected components in topologically sorted order (according to the dag) starting from the minimal elements. Thus a digraph is stable iff every strongly connected component that is a minimal element is stable. Hence, EXACT-2DIR-BIN on general digraphs is reducible in polynomial-time to strongly connected digraphs. □

7 Fractional Replication Games

We introduce a new class of capacitated replication games where nodes can store fractions of objects, as opposed to whole objects, and satisfy an object access request by retrieving enough fractions that make up the whole object. Rather than associate different identities with different fractions of a given object, we view each portion of an object as being fungible, thus allowing any set of fractions of an object, adding up to at least one, to constitute the whole object. Such fractional replication scenarios naturally arise when objects are encoded and distributed within a network to permit both efficient and reliable access.

Several implementations of fractional replication, in fact, already exist. For instance, fountain codes [5, 66] and the information dispersal algorithm [59] present two ways of encoding an object as a number of smaller pieces – of size, say 1/m fraction of the full object size, where m is an integer – such that the full object may be reconstructed from any m of the pieces. A natural formalization is to view each object as a polynomial of high degree, and consider each piece of the object as the evaluation of the polynomial on a random point in a suitable large field. Then, accessing an object is equivalent (with very high probability) to accessing a sufficient number of pieces of the object.

We now present fractional capacitated selfish replication (F-CSR) games, which are an adaptation of the game-theoretic framework developed in Section 4 to fractional replication. We have a set V of nodes sharing a set O of objects. In an F-CSR game, the strategies are fractional placements; a fractional placement \(\widetilde {P}\) is a |V |-tuple \(\{\widetilde {P}_{i}: i \in V\}\) where \(\widetilde {P}_{i}: \text {O} \rightarrow \Re \) under the constraint that sum of \(\widetilde {P}_{i}(\alpha )\), over all α in O, is at most the cache size of i.

We begin by presenting F-CSR games in the special case of sum utilities, where the generalization from the integral to the fractional setting is most natural. For sum utilities, recall that we are given a cost function d and node-object weights ri(α), iV, α ∈O. Given a fractional global placement \(\widetilde {P}\), we define the cost incurred by i for accessing object α as the minimum value of xjdij under the constraints that \({\sum }_{j} x_{j} = 1\) and \(x_{j} \le \widetilde {P}_{j}(\alpha )\) for all j. Then, the total cost incurred by i is the sum, over all objects α, of ri(α) times the cost incurred by i for accessing α. For a given fractional global placement \(\widetilde {P}\), the utility of i is the negative of the total cost incurred by i under \(\widetilde {P}\).

We now consider F-CSR games under the more general setting of utility preference relations. As before, each node i has a node preference relation ≥i and a preference relation ≽i among global (integral) placements. Recall that the node and placement preference relations of each node i induce a preorder \(\sqsupseteq _{i}\) among the elements of O × (V ∖{i}) (see Section 4). For F-CSR games, we require the existence of a total preorder \(\sqsupseteq _{i}\), for all i. We now specify the best response function for each player for a given fractional global placement \(\widetilde {P}\). For each node i and object α, we determine the assignment \(\mu _{i,\widetilde {P},\alpha }: V \setminus \{i\} \rightarrow \Re \) that is lexicographically minimal under the node preference relation ≥i subject to the condition that \(\mu _{i,\widetilde {P},\alpha } \le \widetilde {P}_{k}(\alpha )\) for each k and \({\sum }_{k} \mu _{i,\widetilde {P},\alpha }(k) = 1\). We next compute \(b_{i,\widetilde {P}} : \text {O} \times (V \setminus \{i\}) \rightarrow \Re \) to be the lexicographically maximal assignment under \(\sqsupseteq _{i}\) subject to the condition that \(b_{i,\widetilde {P}} (\alpha ,k) \le \mu _{i,\widetilde {P}, \alpha }(k)\) for all k and \({\sum }_{\alpha , k} b_{i,\widetilde {P}} (\alpha ,k)\) is at most the size of i’s cache. The best response of a player i is then to store \({\sum }_{k} b_{i,\widetilde {P}} (\alpha , k)\) of α in their cache. This completes the definition of F-CSR games.

Using standard fixed-point machinery, we show that every F-CSR game has an equilibrium. We also show that finding equilibria in F-CSR games is PPAD-complete.

Theorem 8

Every F-CSR instance has a pure Nash equilibrium. Finding an equilibrium in an F-CSR game is PPAD -complete.

We prove Theorem 8 by establishing separately the existence of equilibria, membership in PPAD, and the PPAD-hardness of finding equilibria.

7.1 Existence of Equilibria

Theorem 9

Every F-CSR instance has a pure Nash equilibrium.

Proof

By [54] (Proposition 20.3, based on Kakutani’s fixed-point theorem), a game has a pure Nash equilibrium if the strategy space of each player is a compact, non-empty, convex space, and the payoff function of each player is continuous on the strategy space of all players and quasi-concave in the strategy space of the player. In an F-CSR instance, the strategy space of each player i is simply the set of all its fractional placements: that is, the set of functions f : O → [0,1] subject to condition that \({\sum }_{\alpha \in \text {O}} f(\alpha ) \le c_{i}\), where ci is the cache size of the node (player). The strategy set thus is clearly convex, non-empty, and compact. Furthermore, as defined above, the payoff for any player i under fractional placement \(\widetilde {P}\) is simply the solution to the following linear program:

$$ \begin{array}{@{}rcl@{}} \max - \sum\limits_{\alpha \in \text{O}} r_{i}(\alpha) \left( \sum\limits_{j \in V} x_{ij}(\alpha) d_{ij}\right) & \\ \sum\limits_{j \in V} x_{ij}(\alpha) = 1 & \text{ for all } i \in V, \alpha \in \text{O}\\ x_{ij}(\alpha) \le \widetilde{P}_{j}(\alpha) & \text{ for all } i,j \in V, \alpha \in \text{O}\\ x_{ij}(\alpha) \ge 0 & \text{ for all } i,j \in V, \alpha \in \text{O} \end{array} $$

It is easy to see that the payoff function is both continuous in the placements of all players, and quasi-concave in the strategy space of player i, thus completing the proof of the theorem. □

7.2 Membership in PPAD

Theorem 10

Finding an equilibrium in an F-CSR game is in PPAD .

Proof

Our proof is by a reduction from FSPP (Fractional Stable Paths Problem), which is defined as follows [39]. Let G be a graph with a distinguished destination node d. Each node vd has a list π(v) of simple paths from v to d and a preference relation ≥v among the paths in π(v). For a path S, we also define π(v, S) to be the set of paths in π(v) that have S as a suffix. A proper suffix S of P is a suffix of P such that SP and S. A feasible fractional paths solution is a set w = {wv : vd} of assignments wv : π(v) → [0,1] satisfying: (1) Unity condition: for each node v, \({\sum }_{P \in \pi (v)} w_{v}(P) \le 1\), and (2) Tree condition: for each node v, and each path S with start node u, \({\sum }_{P \in \pi (v, S)} w_{v}(P) \le w_{u}(S)\).

In other words, a feasible solution is one in which each node chooses at most 1 unit of flow to d such that no suffix is filled by more than the amount of flow placed on that suffix by its starting node. A feasible solution w is stable if for any node v and path Q starting at v, one of the following holds: (S1)\({\sum }_{P \in \pi (v)} w_{v}(P) = 1\), and for each P in π(v) with wv(P) > 0, PvQ; or (S2) There exists a proper suffix S of Q such that \({\sum }_{P \in \pi (v,S)} w_{v}(P) = w_{u}(S)\), where u is the start node of S, and for each Pπ(v, S) with wv(P) > 0, PvQ.

Given an F-CSR G with node set V , object set O, node preference relations ≥i for iV, and utility preference relations ≽i for iV, we construct an instance \(\mathcal {I}\) of FSPP as follows. For nodes i, jV and object α ∈O, we introduce the following FSPP vertices.

  • hold(i, α) representing the amount of α that node i will store in its cache.

  • serve(i, j, α) representing the amount of α that node j will serve for i given a placement for V ∖{i}.

  • serve’(i, j, α), an auxiliary vertex needed for serve(i, j, α).

  • serve(i, α), representing the amount of α that other nodes will serve for i given a placement for V ∖{i}.

  • hold(i), representing the best response of i give the placement of other nodes.

  • hold’(i, α), an auxiliary vertex needed for hold(i, α).

We now present the path sets and preferences for each vertex of the FSPP instance.

  • serve(i, α): the path set includes all paths of the form 〈serve(i, α),hold(j, α),d〉, and serve(i, α) prefers 〈serve(i, α),hold(j, α),d〉 over 〈serve(i, α),hold(k, α), d〉 if jik.

  • serve’(i, j, α): the path set includes all paths of the form 〈 serve’(i, j, α), serve(i, α), hold(j, α),d〉 and the direct path 〈serve’(i, j, α),d〉. For the preference order, serve’(i, j, α) prefers all paths 〈serve’(i, j, α),serve(i, α),hold(j, α),d〉 equally, and all of them over the direct path.

  • serve(i, j, α): the path set includes the path 〈serve’(i, j, α),d〉 and the direct path 〈serve(i, j, α),d〉 with a higher preference for the former path.

  • hold(i): the path set includes paths of the form 〈hold(i),serve(i, j, α),d〉, and hold(i) prefers the path 〈hold(i),serve(i, j, α),d〉 over 〈hold(i),serve(i, k, β), d〉 if \((j,\alpha ) \sqsupseteq _{i} (k,\beta )\).

  • hold’(i, α): the path set includes paths of the form 〈 hold’(i, α), hold(i), serve(i, j, α), d〉 all of which are preferred equally, and the direct path 〈hold’(i, α),d〉 which is preferred the least.

  • hold(i, α): the path set includes two paths 〈hold’(i, α),d〉 and the direct path with a higher preference for the former path.

We now show that the F-CSR instance has an equilibrium if and only if the FSPP instance has an equilibrium. Our proof is by giving a mapping f from global fractional placements in the F-CSR instance to feasible solutions in the FSPP instance such that (a) if \(\widetilde {P}\) is an equilibrium for the F-CSR instance, then \(f(\widetilde {P})\) is an equilibrium for the FSPP instance, and (b) if w is an equilibrium for the FSPP instance, then f− 1(w) is an equilibrium for the F-CSR instance.

Let \(\widetilde {P}\) denote any fractional placement of the F-CSR instance. We now define the solution \(f(\widetilde {P})\) of the FSPP instance. In \(f(\widetilde {P})\) vertex hold(i, α) plays \(\widetilde {P}_{i}(\alpha )\) on the direct path and \(1 - \widetilde {P}_{i}(\alpha )\) on the other path in its path set, for every i in V and α in O. The remaining vertices play their best responses, considered in the following order. First, consider vertices of the form serve(i, α). In the best response, the amount played by serve(i, α) on the path 〈serve(i, α), hold(j, α), d〉, equals \(\mu _{i,\widetilde {P},\alpha }(j)\); recall that \(\mu _{i,\widetilde {P},\alpha }(j)\) is the assignment that is lexicographically minimal under the node preference relation ≥i subject to the condition that \(\mu _{i,\widetilde {P},\alpha } \le \widetilde {P}_{k}(\alpha )\) for each k and \({\sum }_{k} \mu _{i,\widetilde {P},\alpha }(k) = 1\). We next consider the vertices of the form serve’(i, j, α). In its best response, vertex serve’(i, j, α) plays \(\mu _{i,\widetilde {P},\alpha }(j)\) on the path 〈serve’(i, j, α), serve(i, α), hold(j, α),d〉. Next, in its best response, vertex serve(i, j, α) plays \(\mu _{i,\widetilde {P},\alpha }(j)\) on its direct path and \(1 - \mu _{i,\widetilde {P},\alpha }(j)\) on its remaining path. We now consider the best response of vertex hold(i); it distributes its unit among paths of the form 〈hold(i), serve(i, j, α), d〉 (for all j in V ∖{i} and α in O) lexicographically maximally under the total preorder \(\sqsupseteq _{i}\) over node-object pairs. That is, hold(i) plays \(b_{i,\widetilde {P}}(\alpha ,j)\) on the path 〈hold(i),serve(i, j, α),d〉. We next consider the best response of the vertex hold’(i, α); it plays \(1 - {\sum }_{j} b_{i,\widetilde {P}}(\alpha ,j)\) on its direct path and \(b_{i,\widetilde {P}}(\alpha ,j)\) on the path 〈hold’(i, α),hold(i),serve(i, j, α),d〉. This completes the definition of the solution \(f(\widetilde {P})\).

We now argue that if \(\widetilde {P}\) is an equilibrium so is \(f(\widetilde {P})\). By construction, every vertex other than of the form hold(i, α) play their best responses in \(f(\widetilde {P})\). We next show that i plays a best response in \(\widetilde {P}\) if and only if the vertices hold(i, α) play their best response in \(f(\widetilde {P})\). The best response of hold(i, α) is to play \(1 - {\sum }_{j} b_{i,\widetilde {P}}(\alpha ,j)\) on the path 〈hold(i, α),hold’(i, α),d〉 and the \({\sum }_{j} b_{i,\widetilde {P}}(\alpha ,j)\) on its direct path. The best response of i in \(\widetilde {P}\) is to set \(\widetilde {P}_{i}(\alpha )\) to \({\sum }_{j} b_{i,\widetilde {P}}(\alpha ,j)\). Thus if \(\widetilde {P}\) is an equilibrium, then so is \(f(\widetilde {P})\). Furthermore, if w is an equilibrium, by definition of f , \(\widetilde {P} = f^{-1}(w)\) is well-defined. Since the best responses of i and the vertices hold(i, α) are consistent, \(\widetilde {P}\) is also an equilibrium. This completes the reduction from F-CSR to FSPP, placing F-CSR in PPAD. □

7.3 PPAD-Hardness

This section is devoted to the proof of the following theorem.

Theorem 11

The problem of finding an equilibrium inF-CSRgames is PPAD-hard evenwhen the underlying cost function d is a metric.

Our reduction is from preference games [39]. Given a preference game G with n players 1,2,…,n and their preferences given by ≥i, we construct an F-CSR game \(\widehat {G}\) as follows. The game \(\widehat {G}\) has a set V of n2 + 3n players numbered 1 through n2 + 3n, and a set O of 2n objects α1,…,α2n. We set the utility function for each node to be the sum utility function, thus ensuring that the desired monotonicity and consistency conditions are satisfied.

We next present the metric cost function d over the nodes. We group the players into four sets V1 = {i : 1 ≤ in}, V2 = {in + j : 1 ≤ in,1 ≤ jn}, V3 = {n2 + n + i : 1 ≤ in}, and V4 = {n2 + 2n + i : 1 ≤ in}. For each node i in V1 and j in V3, we set dii = 2 and dij = 4. We set \(d_{n^{2} + n + i,n^{2} + 2n + i} = 3\). For each node i in V1 and k = in + j, we set dik as follows: if j >ii then dij equals 6 − /n when j is the th most preferred player for i; if iij, then dij equals 1. All the other distances are obtained by using metric properties.

We finally specify the object weights. For kV1, we set rk(αi) = 1 for all ik such that ikk; we set rk(αk) = 2.5 such that 4 < 2rk(αk) ≤ 5. For node k = in + j in V2, we set rk(αj) = 1. For node k = n2 + n + i in V3, we set rk(αi) = rk(αi+n) = 1. Finally, for node k = n2 + 2n + i in V4, we set rk(αi+n) = 1.

Given a placement P for \(\widehat {G}\), we define a solution ω(P) = {wij} for the preference game G: wij = Pi(αj). The following lemma immediately follows from the definition of \(\widehat {G}\).

Lemma 18

The following statements hold for any placement P for\(\widehat {G}\).

  • Fork = in + j,1 ≤ jn, Pkis a best response toPkif and only ifPk(αj) = 1.

  • Fork = n2 + n + i,1 ≤ in, Pkis a best response toPkif and only ifPk(αn+i) = 1.

  • Fork = n2 + n + i, Pkis a best response toPkif and only ifPk(αi) = 1 − Pi(αi) andPk(αn+i = Pi(αi).

Lemma 19

Let P be a placement for\(\widehat {G}\)inwhich every node not inV1plays their best response. Then, the best response of a node i inV1is the lexicographically maximum\((P_{i}(\alpha _{j_{1}}), P_{i}(\alpha _{j_{2}}), \ldots , P_{i}(\alpha _{j_{n}}))\), wherej1ij2i⋯ ≥ijn, subject to the constraint thatPi(αj) ≤ Pj(αj) forji.

Proof

Fix a node i in V1. By Lemma 18, node in + j holds object j, for 1 ≤ jn; each of these nodes is at distance at least 5 and at most 6 away from i. By Lemma 18, for every node k = n2 + n + j, 1 ≤ jn, Pk(αj) = 1 − Pj(αj) and Pk(αn+j) = Pj(αj).

We now consider the best response of node i. We first note that for any j ∈{1,…,n}∖{i} such that iij, Pi(αj) = 0 since the nearest full copy of αj is nearer than the nearest node holding any fraction of object αi. Let S denote the set of j such that jii. For any j in S ∖{i}, Pi(αj) ≤ Pj(αj) since node n2 + n + j at distance 5 holds 1 − Pj(αj) fraction of αj, the nearest node holding any fraction of αi is at distance 4, and 4ri(αi) > 5ri(αj). Furthermore, for any j, k in S if j >ik, then the farthest Pj(αj) fraction of αj is farther than the farthest Pk(αk) fraction of αk, implying that in the best response, if Pi(αj) < Pj(αj) then Pi(αk) = 0. Thus, the best response of i is the unique lexicographically maximum solution \((P_{i}(\alpha _{j_{1}}), P_{i}(\alpha _{j_{2}}), \ldots , P_{i}(\alpha _{j_{n}}))\), where j1ij2i⋯ ≥ijn, subject to the constraint that Pi(αj) ≤ Pj(αj) for ji. □

Lemma 20

A placement P is an equilibrium for\(\widehat {G}\)ifand only ifω(P) is a equilibrium for G and every node not inV1plays their best response in P.

Proof

Consider an equilibrium placement P for \(\widehat {G}\) Clearly, every node plays their best response. We now prove that ω(P) is an equilibrium for G. Fix a node i in V1. By Lemma 19, the best response of i is the unique lexicographically maximum solution \((P_{i}(\alpha _{j_{1}}), P_{i}(\alpha _{j_{2}}), \ldots , P_{i}(\alpha _{j_{n}}))\), where j1ij2i⋯ ≥ijn, subject to the constraint that Pi(αj) ≤ Pj(αj) for ji. Since this applies to every node i, it is immediate from the definitions of ω(P) and preference games that if P is an equilibrium for \(\widehat {G}\) then ω(P) is an equilibrium for G.

We now consider the reverse direction. Suppose we have a placement P in which every player not in V1 plays their best response and ω(P) is an equilibrium for the preference game G. By Lemma 19 and the definition of ω(P), the best response of i in G matches that in the F-CSR game; hence every player in V1 also plays their best response in P, implying that P is an equilibrium for \(\widehat {G}\). □

The construction of \(\widehat {G}\) from G is clearly polynomial time. Furthermore, given any equilibrium for \(\widehat {G}\), an equilibrium for G can be constructed in linear time. We thus have a reduction from a PPAD-complete problem to F-CSR implying that the latter is PPAD-hard, thus completing the proof of Theorem 11.

8 Concluding Remarks

In this paper, we first define the integral and fractional selfish replication games (CSR and F-CSR) in networks. In our setup each node has a bounded cache capacity for uniform size objects. We prove that every hierarchical network has a pure Nash equilibrium, introducing the notion of fictional players. We almost completely characterize the complexity of CSR games, i.e. which classes have an equilibrium, the complexity of determine whether it exists, and if so, how efficiently it can be found. For the open complexity question about undirected networks with binary preferences (proved to be potential games), we conjecture that finding equilibria is PLS-hard. For the cases of games where equilibria exist, we study the convergence of the best response process. The main focus of this work is in equilibria, leaving the problem of estimating the price of anarchy for all the configurations as future work, extending the work of [20].

We also show that F-CSR games always have equilibria, though they may be hard to find. It is not hard to argue that an equilibrium in the corresponding integral variant is an equilibrium in the fractional instance. So whenever an “integral” equilibrium can be determined efficiently, so can a “fractional” equilibrium. An interesting direction of research is to identify other special cases of fractional games where equilibria may be efficiently determined. We also note that our proof of existence of equilibria in F-CSR games, currently presented for the case of unit-size objects, extends to arbitrary object sizes.

Finally, even though our proofs work for a model that the sets of nodes, objects, and preference relations are all static, we believe that our results will be meaningful for dynamically changing environments. Developing better models for addressing infrequently changes is a very important practical research direction.