Equilibria and Selfish Behavior in Peer Matching - CiteSeerX

7 downloads 0 Views 219KB Size Report
We investigate three classes of peer matchings: opt, nash, and selfish, where selfish is a ... Any matching in selfish, and therefore also the worst-case Nash.
Equilibria and Selfish Behavior in Peer Matching Anshul Kothari∗ [email protected]

Subhash Suri∗ [email protected]

Csaba D. T´oth∗ [email protected]

Abstract Peer to peer networks are distributed data-sharing systems without a centralized infrastructure. The absence of a central coordinator raises many interesting research problems in distributed systems. We consider one such fundamental problem: how much system performance is sacrificed by the uncoordinated matching of client peers to server peers? We study this problem as a non-cooperative game among the data requesting peers: the players are selfish clients who (independently) choose servers to optimize their individual payoffs (e.g., download latency) rather than aim for a system-wide social optimum. We investigate three classes of peer matchings: opt, nash, and selfish, where selfish is a simple online greedy strategy. Assuming linear and identical payoff functions, we show that every optimal matching is also a Nash equilibrium matching, but not vice versa; every Nash matching is also in selfish, but not vice versa. Any matching in selfish, and therefore also the worst-case Nash matching, is shown to be within a constant factor of the optimal. We prove a tight ratio bound of Θ(log n/ log log n) for the individual payoff in a worst-case Nash matching. We also explore the computational complexity of these matching classes.

1

Introduction

The emergence of the Internet as the platform for distributed computing has brought into focus the recognition that participants in an Internet-centric world are as much economic or strategic players as they are computational players. We quote C. Papadimitriou [13]: “The Internet is unique among all computer systems in that it is built, operated, and used by a multitude of diverse economic interests, in varying relationships of collaboration and competition with each other.” This blend of collaboration and competition is clearly evident in systems like peer to peer networks: the nodes collaboratively form the peer network, but each node in the role of a client is in competition with others because of shared but limited resources. A reasonable assumption is that clients are strategic participants, who wish to optimize their own individual payoff (such as latency), rather than act selflessly to achieve some systemwide social optimum. This viewpoint differs from the traditional computer science perspective where computational agents are typically assumed to be either obedient (rule-abiding) or adversarial (causing worst-case behavior). Therefore, when designing distributed algorithms and systems for such strategic participants, one must understand the impact of self-interested (but non-malicious) behavior. In this paper, we investigate how the lack of coordination in assigning servers to strategic clients impacts the overall system performance. Peer-to-peer (P2P) networks are distributed data sharing systems with no dedicated and centralized infrastructure. Each participant is a peer, playing the roles of both a client and a server (as well as a router). P2P systems are attractive because of their low startup costs, scalability, availability, fault tolerance, and robustness. Because of these desirable properties, the peer-to-peer computing paradigm has been widely recognized as a powerful model for sharing media objects. Indeed, several recent studies ∗

Department of Computer Science, University of California at Santa Barbara, CA 93106. The work on this paper was supported by National Science Foundation grants CCR-9901958 and IIS-0121562.

1

show that a large and growing fraction of the web traffic is due to file-sharing applications like freenet, Gnutella, and Kazaa [16, 17]. A major appeal of P2P systems, no doubt, is that it delivers on the Internet’s promise of true decentralization. The absence of a centralized coordinator, however, also raises many interesting research problems for distributed computing. In this paper, we consider one such fundamental problem: the matching of the data requesting peers (clients) to the data hosting peers (servers). Because of the high level of data replication in P2P systems, there are typically many servers from which a client can retrieve data. Without a central authority, each client is free to choose its server. As strategic players, we assume that each client is selfishly motivated to choose the server to optimize its own personal payoff (typically, low latency). The individual interests of these strategic, though not malicious, users are often in conflict with the social optimum for the system. The main problem we consider is this: how much system performance is sacrificed by the selfish behavior of clients in choosing their own servers?

1.1

The Model

There is a bipartite graph G between a set U of n clients, and a set V of m servers. An edge (u, v) indicates that client u is able to access its desired data from server v. A peer matching is a subgraph M ⊆ G in which the degree degM (u) of every client u ∈ U equals one.1 That is, each client is matched to exactly one server, but a server can be matched with multiple clients (or none). Each server v has a load dependent latency function λv ()—the server multiplexes data transmission to its clients and, so the latency grows with the number of clients. Every client matched to v in the matching M experiences a latency λv (degM (v)). The cost of a matching M is the total latency experienced by all the clients. We assume that all servers have an identical and linear latency function: λv (degM (v)) = degM (v). With this latency function, the cost of a matching M can be defined as follows: cost(M ) =

n X

degM (M (ui )) =

i=1

m X

deg2M (vj ),

j=1

where M (ui ) denotes the server to which client ui is matched. The last equality states the cost in terms of the server degrees: vj contributes degM (vj )2 to the total cost of the matching because each of the degM (vj ) clients matched with vj suffers latency degM (vj ). All clients are assumed to be rational and strategic participants: given a choice, each prefers a fast (lower latency) server to a slow (higher latency) server. (We assume that a peer-to-peer protocol that performs the data lookup can also track the current load of the servers.) The non-cooperative game consists of clients choosing their servers to minimize their individual cost, while the system-wide goal is to minimize the total cost of the matching. In order to discuss the individual preferences, we use the game theoretic notion of an equilibrium. Given a matching M , the payoff to a client u is −degM (v) if u is matched to server v. Thus, the maximum payoff to a client is −1, when it is the only client for its server, and its minimum payoff is −n when all clients are matched to the same server. We adopt the game theoretical concept of Nash equilibrium where no client has an incentive to switch to a different server. In order to study this stable point behavior, we assume that all data requests are long lasting—that is, the client-server connections persist throughout the period of interest. (This is a reasonable assumption in practice too because media downloads times are several orders of magnitude longer than the execution time of a scheduling/matching algorithm.) 1

To avoid trivialities, we assume that for each client u there is at least one server that can provide the data, and each server has data for at least one client.

2

1.2

Our Results

We investigate three classes of matchings: opt, nash and selfish. A matching is in opt if its total cost is minimum; a matching is in nash if no client can improve its payoff by unilaterally switching to another server; a matching is in selfish if it is generated by the following simple greedy strategy—clients arrive in some (arbitrary) order and each client selfishly picks the cheapest server available to it. Our first result is the following (strict) containment relation: opt ⊂ nash ⊂ selfish. Specifically, we show that every optimal matching is also a Nash matching, but not vice versa, and that every Nash matching is in selfish for some permutation of the clients, but not vice versa. Thus, the best-case Nash matching is in fact optimal, and the worst-case Nash matching is upper bounded by selfish. Our analysis of selfish shows that any selfish matching has cost within a constant factor of the optimal.2 Consequently, a worst-case Nash matching is also bounded by a constant factor of the optimal. Next, how well off are individual peers in a worst-case Nash matching? There can be many different optimal matchings, and so to which optimum should a Nash matching be compared? We show that the degree of a server is essentially the same in all optimal matchings and, thus, there is a canonical optimum to which other matchings can be compared. Our second main result is a tight bound of Θ(log n/ log log n) on the ratio between a server’s degree in worst-case Nash and the optimum. The same ratio also bounds the worst-case latency for any client. Our analysis sheds light on some additional questions as well. For instance, suppose each server rejects new clients after its degree reaches a certain level. Then, what fraction of the client population, in a Nash matching, can be served? We show that if each server rejects clients only after accepting k times its degree in the canonical optimal matching, then any Nash matching assigns at least (1 − 21k ) fraction of the clients. We also consider the complexity of computing a Nash matching. An optimal (i.e. best-case Nash) matching can be computed distributively in polynomial time, but the algorithm require complete knowledge of the client-server bipartite graph at each peer. selfish, on the other hand, requires only local information (i.e. each clients only needs to know about the servers from which it can download its data), but does not necessarily produce a Nash matching. We establish bounds on the number of swaps needed to convert an arbitrary matching into a Nash or an optimal matching.

2

Optimal, Nash, and Selfish Matchings

It is well-known that Nash equilibria do not always optimize the social welfare, with the Prisoner’s Dilemma being one of the best-known examples. Our peer matching problem is no exception: an equilibrium matching does not necessarily have minimum cost. But the following simple result shows that the best-case Nash matching does achieve social optimum. Theorem 2.1. (opt ⊂ nash) Every optimal matching is also a Nash matching, but not vice versa. Proof. Suppose Mopt is an optimal matching. For the sake of contradiction, assume that a client node u, which is matched in Mopt to a server vi of degree di , can improve its cost by switching to server vj , whose degree in Mopt is dj . Since u’s cost equals the degree of its server, we must have dj < di − 1; note that once u joins, the degree of vj increases by one. Let M 0 be the matching obtained from Mopt by transferring u to vj . Then, ¡ ¢ ¡ ¢ cost(M 0 ) − cost(Mopt ) = (dj + 1)2 + (di − 1)2 − d2j + d2i = 2(dj − di + 1) < 0, which is a contradiction because Mopt is the minimum cost matching. Thus, Mopt must be a Nash equilibrium matching. Not all Nash matchings are optimal: Figure 1 shows an example of a sub-optimal Nash matching (Figure 1(c)). 2

We have just learned that a load balancing result of Awerbuch et al. [1] also gives a constant factor competitive ratio for the greedy strategy.

3

v1

v2

v3

v1

v2

v3

v1

v2

v3

v1

v2

v3

u1

u2

u3

u1

u2

u3

u1

u2

u3

u1

u2

u3

(a)

(b)

(c)

(d)

Figure 1: (a) An instance. (b) An optimal matching, of cost 3. (c) A Nash but not optimal matching, of cost 5. (d) A selfish but not Nash matching. In general, there are many Nash equilibria, and we investigate how bad is the worst-case Nash matching. We approach this question by analyzing an intermediate class of matchings, called selfish. In such a matching, each client (in some arbitrary order of arrival) chooses the cheapest server available to it. While this greedy strategy does not necessarily lead to Nash matchings, we show that the class of selfish matchings is rich enough to include all Nash matchings. In other words, given any Nash matching M , there is an ordering of clients for which the selfish strategy produces M .

Selfish Matchings Let us assume that the clients arrive in the system in order u1 , u2 , . . . , un . The order of clients is arbitrary, and may be determined by an adversary. Our algorithm processes the incoming clients sequentially, and so the resulting selfish matching depends on this order. Given a client node u ∈ U , let N (u) ⊆ V denote the neighbors of u: these are the servers from whom u can download its data. The algorithm Selfish requires only that each client u knows its neighbors N (u), and their load at the time it chooses its server. We use Mself to denote the matching produced by the algorithm Selfish, and dself (v) to denote the degree of server v in Mself . Algorithm Selfish • Initialize dself (v) = 0 for all servers v ∈ V . Consider the clients in the given order u1 , u2 , · · · , un . 1. Suppose ui is the next client to be assigned. 2. Let vj ∈ N (ui ) be the neighbor of ui with the smallest current degree.3 3. Assign ui to vj , and increment dself (vj ). Given an instance of peer matching, define selfish to be the set of all matchings that can be produced by the algorithm Selfish over all permutations of the clients. Theorem 2.2. (nash ⊂ selfish) Every nash matching is in selfish, but not vice versa. Proof. Given a Nash matching M , we construct an ordering of the clients for which Selfish produces the matching M (with suitable tie-breaking). Consider a server v, which is assigned to dM (v) clients in M . We assign rank values r() to these clients arbitrarily between 1 to dM (v). Since the servers partition the clients, each client receives exactly one rank, and each rank is between 1 and maxv∈V dM (v). Now consider a total order u1 < u2 < . . . < un such that r(ui ) < r(uj ) implies i < j (i.e., clients with smaller rank come first). 3

We assume ties are broken arbitrarily.

4

We show that if the clients are sequenced as u1 , u2 , . . . , un , then Selfish outputs the matching M . Inductively, assume that Selfish assigns the first k − 1 clients to the same servers as M . Consider the kth client uk , and suppose it is matched with server v in M . Because M is a Nash matching, dM (w) > dM (v) − 1, for any server w ∈ N (u). By our ordering, Selfish has already matched all clients with rank less than r(u), and some of the clients with rank r(u). Thus, when u is considered, we must have dself (v) ≤ dself (w) for each w ∈ N (u) and, therefore, Selfish can assign u to v. Thus, nash ⊂ selfish. For the converse, Figure 1(d) shows a selfish matching that is not Nash.

3

Worst-Case Bounds for nash and selfish Matchings

In this section, we analyze the competitive ratio of a selfish matching, which in turn bounds the cost of a worst-case Nash matching. We prove that any matching in selfish, and thus any Nash matching as well, is within a constant factor of the optimal. While writing this paper, we discovered that a load balancing result by Awerbuch et al. [1] also yields a constant factor bound for Selfish. Nevertheless, we include our proof below because its simplicity and combinatorial method should extend to more complex forms of peer matchings. Our proof also involves an interesting pebble game, which may have an independent appeal.

A Pebble Game Imagine a two dimensional matrix, where the columns correspond to the servers, and rows correspond to degrees of these servers. Without loss of generality, assume that servers are indexed so that in the optimal peer matchingP Mopt , their degrees are in non-descending order, dopt (v1 ) ≤ dopt (v2 ) ≤ · · · ≤ dopt (vm ), where clearly j dopt (vj ) = n. One can visualize any peer matching as a configuration of n pebbles in this matrix: the configuration is specified by the height of each column. The cost of a configuration is the sum of the squares of the column heights. Our goal is to bound the cost of Selfish matching’s configuration in terms of the optimal. In order to do this, we propose and analyze an intermediate configuration, which we call the Pebble matching, defined as follows: consider the pebble configuration of the optimal matching; scan the servers in order v1 , v2 , . . . , vm , and evenly distribute the pebbles associated with server vi among the servers {vm , vm−1 , . . . , vi } in the right-to-left order. The Pebble assignment is described more formally below. See Figure 2 for illustration. Algorithm Pebble • Initialize dpeb (v) = 0 for all servers v ∈ V . • Assume that servers are indexed so that dopt (v1 ) ≤ dopt (v2 ) ≤ · · · ≤ dopt (vm ). 1. Let vi be the current server and let Ui ⊂ U be set of clients matched to it in Mopt . 2. For each u ∈ Ui do the following (a) Let v be the first server in the list (vm , vm−1 , · · · , vi ) with the smallest current degree. (b) Assign u to v and increment dpeb (v). Note that the Pebble matching is not necessarily a feasible peer matching—it ignores the client-server bipartite graph, and may match clients to non-neighbor servers. Surprisingly, though, the following (tight) bound holds, which is the main combinatorial lemma in our proof. Lemma 3.1. cost(Mself ) ≤ cost(Mpeb ).

5

19 18 17 16 15 19

14 13

12 15 18 1

2

3

5

7

9 11 14 17

4

6

8 10 13 16

v1

12 11 10 5

v9

Mopt

v1

9

8

7

4

3

2

Mpeb

6 1

v9

Figure 2: An illustration of Pebble. The left side shows an optimal matching, with 19 clients and 9 servers (columns); the right side shows the matching produced by Pebble. Proof. Let X(i) denote the set of servers whose degree is exactly i in Mself , and Y (i) denote Plet P the set of ` servers with degree i in Mpeb . We establish that, for any natural number `, i=0 |X(i)| ≤ `i=0 |Y (i)|. That is, the number of servers with degree at most ` is no more in Selfish than in Pebble, from which it follows easily that cost(Mself ) ≤ cost(Mpeb ). Sets X(i) and Y (i) satisfy the following inequalities, for any natural number `: ` X X dopt (v)) ≤ (` + 1)m (|X(i)| · (` + 1 − i) + i=0

(1)

v∈X(i)

` X X dopt (v)) ≤ (` + 1)m (|Y (i)| · (` + 1 − i) + i=0

(2)

v∈Y (i)

These inequalities arise from the following consideration: For (1), consider a server of degree at most ` in Mself . All the clients assigned to this server in Mopt must be assigned to level at most ` + 1 in Mself . The quantity (` + 1)m counts the total number of such slots. But since each server P of degree i leaves (`+1−i) slots unoccupied in Mself , the total number of available slots is (`+1)m − `i=0 |X(i)|·(`+1−i), which gives the desired inequality. The inequality (2) for Mpeb is derived analogously. P P Next, we show by induction that `i=0 |X(i)| ≤ `i=0 |Y (i)|, for any natural number `. For the base case, namely, ` = 0, the two inequalities above reduce to |X(0)| +

X

dopt (v)) ≤ m,

|Y (0)| +

X

dopt (v)) ≤ m

(3)

v∈Y (0)

v∈X(0)

Since the server degrees in the optimal are monotonically increasing, i.e., dopt (v1 ) ≤ . . . ≤ dopt (vm ), and that Pebble leavesPthe lowest degree P servers (in optimal) empty, for any set of servers PS ⊂ V , where |S| P ≥ |Y (0)|, we have v∈Y (0) dopt (v) ≤ v∈S dopt (v). And, for any set S ⊂ V , where v∈S dopt (v) ≤ v∈Y (0) dopt (v), we have |S| ≤ |Y (0)|. It follows that |Y (0)| ≤ |X(0)|. P Pk We now inductively assume that ki=0 |X(i)| ≤ i=0 |Y (i)| for every k = 0, 1, . . . , ` − 1 and establish it for k = `. Using the S same argument as above, the increasing degree sequence of the optimal matching implies that `i=0 Y (i) is a maximal set satisfying inequality (2). At the same time, P` P P` P i=1 v∈Y (0) dopt (v) ≤ i=1 v∈S dopt (v), for any set of servers S ⊂ V , where |S| ≤ |Y (`)|, again because of the non-decreasing degree sequence. Therefore, we have ` X

|X(i)| · (` + 1 − i) ≤

i=0

Using the induction hypothesis, we get that

` X

|Y (i)| · (` + 1 − i).

i=0

P`

i=0 |X(i)|

6



P`

i=0 |Y

(i)|, and this completes the proof.

(4)

The matching Mpeb depends only on the optimal matching and, using elementary algebra, we can show the following. (Our analysis is quite loose, and with refinement, the constant factor in the bound can be further reduced.) Lemma 3.2. cost(Mpeb ) ≤ 16 cost(Mopt ). The preceding two lemmas immediately imply the following result. Theorem 3.3. Every selfish matching, and therefore also a worst-case nash matching, has cost at most 16 times the optimum.

Lower Bounds In the following, we give lower bounds on the costs of nash and selfish matchings. Lemma 3.4. In the worst-case, cost(Mnash )/cost(Mopt ) ≥ 2 − 1/n. P Proof. We choose n = 1+k + k−1 `=0 k ·k!/`!, for some k ∈ N. Thus, n = Θ(k!) and k = Θ(log n/ log log n). The optimal matching is a one-to-one matching between n clients and n servers. These n client-server pairs of the optimal matching are partitioned into k + 2 classes V0 , V1 , . . . , Vk+1 such that |Vk+1 | = 1, |Vk | = k, and |V` | = k · k!/`! for every `, 0 ≤ ` ≤ k − 1. The server v ∈ Vk+1 is adjacent to all k clients in Vk , and every server in V` , 1 ≤ ` ≤ k, is adjacent to ` clients in V`−1 . We argue that the matching where every client in V` , 0 ≤ ` ≤ k is assigned to an adjacent server in V`+1 (and the client in Vk+1 is assigned to the server in Vk+1 ) is a Nash matching. Indeed, for every server v` ∈ V` , 0 ≤ ` ≤ k, we have dnash (v` ) = ` and dnash (v) = k. So no client in V` can improve its own payoff by switching from a server in V`+1 to one in V` . The cost of the optimal matching is n, the cost of the worst-case nash is k X k · k! `=1

`!

· `2 + (k + 1)2 =

k k k X X X k · k! k · k! k · k! · ` + (k + 1)2 = + + k 2 · 1 + k · 2 + 1 = 2n − 1. (` − 1)! (` − 2)! (` − 1)! `=1

`=2

(a)

`=1

(b)

Figure 3: Our construction for k = 2: (a) the optimal matching, (b) the worst case nash matching.

Lemma 3.5. In the worst-case, cost(Mself )/cost(Mopt ) ≥ 3 − log n/n. Proof. Assume equal number of clients and servers, with n = m = 2q . The client ui has an edge to server vj if and only if i ≤ j. Since there is a perfect matching in this bipartite graph, cost(Mopt ) = n. Now suppose Selfish processes the clients in order of increasing index, and assigns each client to the highest indexed server with current minimum degree. Simple algebra shows that cost(Mself ) = 3n−log n, establishing the claim.

7

(a)

(b)

Figure 4: Our construction for q = 3: (a) the optimal matching, (b) the worst case selfish matching.

4

Individual Payoffs in Worst-case Nash

In this section, we consider how well off are individual peers in a worst-case Nash matching compared to the optimum. In general there can be many optimal matchings, and so to which optimum should we compare the Nash matching? We prove a characterization theorem about optimal matchings, which shows that all optimal matchings are essentially the same, and so we can speak of a canonical optimum. Specifically, we show that in any optimal matching, a server’s degree is within one of its degree in the canonical optimal. Thus, the individual payoffs in any optimal are essentially the same as those in the canonical optimum. We then show that the worst-case ratio between a peer’s payoff in any Nash matching and its payoff in the optimum is Θ(log n/ log log n). The similar ratio for the selfish matching is Θ(log n). We begin by describing the canonical structure of optimal matchings. Recall the classical notion of an alternating path in a graph with respect to a matching. Given a peer matching M , a (directed) alternating path from server v1 to server v2 is a path that starts with an edge in M and then alternates between edges in E \M and those in M . Given a peer matching M , we define a partition PM of the set of servers V in the following manner. Let d be the maximum server degree in M . Let the group Vd contain all the servers with degree d and all the servers reachable from a degree d server by an alternating path. Repeat this procedure for V \ Vd until the maximum degree is non-zero. Thus we obtain a partition of V into at most d groups: V = V1 ∪ V2 ∪ . . . ∪ Vd . (Note that V0 = ∅, since every zero degree server is adjacent in G to at least one client, and so it is reachable by an alternating path from a server whose degree is non-zero.) The following theorem states the structure of optimal matchings. Theorem 4.1. All optimal matchings induce the same (thus canonical) partition of servers. Let dP (v) denote the canonical degree of server v, defined as the maximum degree of any node in v’s group in the partition. Then, dopt (v) − 1 ≤ dP (v) ≤ dopt (v). We now investigate how large can a server’s degree be in a Nash matching compared to its degree in the optimum. We introduce the notion of a transition graph. Given two peer matchings M1 and M2 , their transition graph, denoted D(M1 , M2 ), is a directed graph on the vertex set V and edges defined as follows: for each client u ∈ U that is matched to different servers in the two matchings, we put a directed edge from v1 to v2 , where u is matched to v1 in M1 and to v2 in M2 . Note that there may be multiple edges between a pair of nodes. Our proof uses the following technical lemma. Lemma 4.2. For any peer matching M , there exists an optimal matching Mopt such that D(M, Mopt ) is cycle-free and dopt (v) is monotone decreasing along every directed path in D(M, Mopt ). The following theorem states our main result concerning the individual payoffs in the worst-case Nash matching. Theorem 4.3. We have the following tight bound for the worst-case ratio: µ ¶ log n dnash (v) = Θ , dP (v) log log n where v is any server node and dP (v) is the canonical degree of v. 8

Proof. (Sketch) Consider a Nash matching Mnash and a server v0 such that ∆(v0 ) := dnash (v0 )/dP (v0 ) = k. Let Mopt be an optimal matching as in Lemma 4.2 and let D = D(Mnash , Mopt ). We denote by in(v) (out(v)) the in-degree (out-degree) of a server v in D and we call, in particular, a server with no outgoing edges a sink. It suffices to show that Mopt matches at least (k − 1) · (k − 1)! · dP (v0 ) clients to sinks that are reachable from v0 on directed paths of D, since this already implies n = Ω(exp(k log k)) · dP (v0 ). Let us assume first dP (v0 ) = 1. For every server v reachable from v0 on a directed path, we also have dP (v) = dP (v0 ) = 1 by Lemma 4.2; which in turn implies in(v) = 1 and out(v) ≥ dnash (v). For the initial server v0 , out(v0 ) ≥ k − 1 follows from ∆(v0 ) = k. Notice that an edge v1 v2 in D means that dnash (v1 ) ≥ dnash (v2 ) − 1, otherwise the client corresponding to v1 v2 could switch from v2 to v1 and increase its payoff. That is, out(v) can drop by at most one along every edge of a directed path. This leads to a recursion formula that for every server v, one can reach at least out(v) · (dnash (v) − 1)! sinks from v on directed paths of D. The general argument for dP (v0 ) > 1 is analogous. In that case, several distinct directed paths initiating from v0 can possibly pass through a server w, but the number of these paths is bounded by dP (w) ≤ dP (v0 ). The corresponding lower bound is established by the worst case Nash matching described in the proof of Lemma 3.4. By contrast, the maximum degree of a server node in a non-Nash but selfish matching has worstcase ratio Θ(log n). Specifically, we can show that dself (v) ≤ dP (v)·log n+1, where dP (v) is the canonical degree of v, and this bound is tight. In fact, the construction in the proof of Lemma 3.5 gives the desired lower bound. An interesting side question is to consider the effect of admission control by servers. Suppose each server decides to reject clients after its load has reached a certain threshold. To what extent does this affect the number of clients assigned in a Nash matching? We can prove the following result, which essentially says that if all servers accept at least k times their canonical degree clients, then at least (1 − 1/2k ) fraction of the clients are matched in any Nash equilibrium matching. Theorem 4.4. If no server v rejects clients before reaching degree k · dP (v), for a natural number k, then every Nash matching assigns at least (1 − 21k ) fraction of the n clients.

5

Computational Complexity of Optimal and Nash Matchings

We now discuss some algorithmic questions concerning the computation of peer matchings. We first describe a polynomial time algorithm for computing an optimal matching, by reducing the problem to that of computing a weighted (one-to-one) assignment in another bipartite graph. Let G = (U ∪ V, E) denote the bipartite graph between the clients U and servers V . We construct a new weighted bipartite graph H, with |U | + |E| nodes, and at most |U | · |E| edges, as follows. The set of nodes U in H is the same as in G, but the node set V is modified as follows. Consider a node vj ∈ V of G, and suppose it has `j = deg(vj ) neighbors in U , labeled u(1), u(2), . . . , u(`j ). We create `j copies of node vj , labeled vj (1), vj (2), . . . , vj (`j ), and create edges from each u(x) to each vj copy. We set the weight or cost of each edge: cost(u(x), vj (y)) = 2y − 1, where x, y ∈ {1, 2, . . . , `j }. That is, all edges incident to the y-th copy of vj have weight 2y − 1. We do this for all the nodes of V , and obtain our graph H. Obviously, H has |U | + |E| nodes, and at most |U | · |E| edges. The optimal assignment problem is to choose n = |U | disjoint edges in H of total minimum cost. The following theorem shows that an optimal assignment in H is an optimal peer matching in G. The assignment problem can be solved in polynomial time, for instance, using the Hungarian method [5, 12]. We can also make the algorithm distributed, by having each peer compute the matching independently, but using a consistent node ordering to ensure that all peers compute the same matching. 9

Theorem 5.1. An optimal assignment in graph H corresponds to an optimal peer matching in G. The optimal matching can be computed in polynomial time, by a distributed algorithm. The optimal matching, or the best-case Nash, requires that each peer have access to the entire clientserver adjacency graph. This is both impractical and undesirable. Without a complete knowledge of the graph, and given the selfish clients, the next best solution concept is a Nash matching. One possible idea is to start with an arbitrary matching and execute a number of Nash rounds, where in each round any peer that can improve its payoff function does so by swapping to a cheaper server. A natural question is how many rounds are needed before a Nash matching is discovered? One can also ask, how many rounds are needed before an optimal matching (the best-case Nash) is reached? More specifically, suppose we execute rounds, where the clients are considered in a fixed sequential order, and any client that can strictly improve its payoff by switching to another server is allowed to switch (but only once per round). Clearly, O(n2 ) rounds suffice, since each rounds (unless Nash is ready reached) must reduce the cost by at least 1. The following result gives a lower bound of Ω(m) rounds, where m is the number of servers. Theorem 5.2. In the worst-case, Ω(m) rounds are needed to reach a Nash matching using the strict swap method. It is easy to show that one cannot always reach the optimal Nash using strict swaps only. Surprisingly, it turns out that one can always reach the optimum using non-strict swaps (that do not increase the cost), moreover, we need at most n such swaps to convert a non-Nash matching to an optimal. Theorem 5.3. Given an arbitrary peer matching, one can execute a sequence of at most n non-strict swaps that transforms the matching to an optimal (best-case Nash) matching.

6

Related Work

Researchers in distributed computing and Internet protocols have long appreciated the game-theoretic aspects of interactions among the system participants. One of the first theoretical investigations into quantifying the cost of selfish and uncoordinated behavior in network routing was carried out by Koutsoupias and Papadimitriou [11]. They considered a simplified transportation problem where n independent agents wish to route their traffic through a network of m parallel edge. They modeled this problem as a non-cooperative game among the agents, and studied the ratio between the worst-case Nash equilibrium and the social optimum. Koutsoupias and Papadimitriou [11] derived a tight bound for m = 2. The general case of m > 2 parallel edges was solved recently by Czumaj and V¨ocking [4]. Roughgarden and Tardos [14, 15] have considered the routing problem in general networks, and studied the relative loss of system performance caused by selfish routing. In their model, each network link has a load dependent latency function, and a rate of traffic is given between each ordered pair of nodes. The objective function is the total latency across all source and destination pairs. The main result in [14, 15] is that if all agents route their traffic selfishly, then the total latency is at most 4/3 times the social optimum. The matching class selfish has been studied in the context of load balancing [1, 2]. In [2], Azar et al. show that the greedy strategy achieves an Θ(log n) factor maximum load on a machine. This contrasts with our Θ(log n/ log log n) factor result for the individual payoffs in Nash matchings. Awerbuch et al. [1] show that the greedy strategy is within a constant factor of the optimal for L2 norm load balancing. This corresponds to our Theorem 3.3.

10

7

Closing Remarks

Peer-to-peer systems are attractive because of their lack of centralized control and administration. As distributed systems, they also raise many interesting research questions. In this paper, we have taken some initial steps in the investigation of how this lack of coordination affects the system performance. Our main results include the containment relation opt ⊂ nash ⊂ selfish, optimality of best-case Nash matching, a constant factor bound on the worst-case Nash matching, and a tight ratio bound of Θ(log n/ log log n) on the individual peer’s latency in any Nash matching. An interesting open problem is to analyze the peer matching problem with more general latency functions. It would also be interesting to find more efficient algorithms for finding Nash matchings.

References [1] A. Awerbuch, A. Azar, E. F. Grove, P. Krishnan, M. Y. Kao, and J. S. Vitter. Load Balancing in the Lp Norm. Proc. of 36th Sympos. Foundations of Comp. Sci., 1995, pp. 383–391. [2] Y. Azar, J. Naor, and R. Rom. The competitiveness of online assignments. Journal of Algorithms 18 (2) (1995), 221–237. [3] Y. Chen, C. Tang, and Y. Tsai. Average performance of a greedy algorithm for the on-line minimum matching problem on euclidean space. Information Processing Letters 51 (1994), 275–282. [4] A. Czumaj and B. V¨ocking. Tight bounds for worst-case equilibria. Proc. of 13th ACM-SIAM Sympos. Discrete Algorithms, ACM Press, 2002, pp. 413–420. [5] J. Edmonds and R.M. Karp. Theoretical improvement in algorithmic efficiency for network flow problems. Journal of the ACM 19 (2) (1972), 248–264. [6] A. Fiat and G. J. Woeginger. Online Algorithms, Springer-Verlag, Berlin, 1998. [7] R. Idury and A. Sch¨affer. A better lower bound for on-line bottleneck matching, manuscript, 1992. [8] B. Kalyansundaram and K. Pruhs. Online weighted matching. J. of Algorithms 14 (1993), 478–488. [9] B. Kalyansundaram and K. Pruhs. The online transportation problem. Proc. European Symposium on Algorithms, LNCS, Vol. 979, Springer-Verlag, 1995, pp. 484–493. [10] S. Khuller, S.G. Mitchell, and V.V. Vazirani. On-line algorithms for weighted bipartite matching and stable marriages. Proc. 18th ICALP, LNCS, Vol. 510, Springer-Verlag, 1991, pp. 728–738. [11] E. Koutsoupias and C. Papadimitriou. Worst-case Equilibria. Proc. 16th STACS, LNCS, Vol. 1563, 1999. Springer-Verlag, pp. 404-413. [12] H. W. Kuhn. The Hungarian method for the assignment problem. Naval Research Logistics Quarterly 2 (1995), 83–97. [13] C. Papadimitriou. Algorithms, games, and the internet. Proc. 33rd ACM Symposium on Theory of Computing, ACM Press, 2001, pp. 749-753. [14] T. Roughgarden. Selfish Routing. PhD thesis, Cornell University, 2002. ´ Tardos. How bad is selfish routing? Journal of ACM 49 (2002), 235–259. [15] T. Roughgarden and E. [16] S. Saroiu, P. K. Gummadi and S. D. Gribble, A Measurement Study of Peer-to-Peer File Sharing Systems, Proc. of Multimedia Computing and Networking, 2002. [17] S. Saroiu, P. K. Gummadi, R. J. Dunn, S. D. Gribble and H. M. Levy. An Analysis of Internet Content Delivery Systems. Proc. OSDI , 2002.

11

Suggest Documents