Dynamic Algorithms for Cooperation in User-provided Network Services Leonidas Georgiadis∗ , George Iosifidis† , Leandros Tassiulas† ∗ Dept. of Electrical and Computer Engineering, Aristotle University of Thessaloniki, and CERTH, Greece † Dept. of Electrical and Computer Engineering, University of Thessaly, and CERTH, Greece Abstract—The ever increasing demand for Internet access, and the proliferation of advanced user-owned network equipment have given rise to collaborative schemes, where users satisfy each other’s communication needs whenever they have spare network resources. In this paper, we consider such an autonomous model where users have random resource availability and decide independently how to serve each other. For this dynamic setting, we find that a myopic proportional allocation strategy, applied by each node in an asynchronous fashion based only on local information, converges to a stable equilibrium point. Moreover, we show through numerical examples, that the equilibrium exhibits a rich structure and coincides with the lexicographically maximum allocation of the users’ resources. Accordingly, we consider a more sophisticated model where each user can pay for the services she receives, with service credits. This enhances the cooperation beyond those users that can directly exchange resources. For this setting, we propose a backpressure-inspired heuristic algorithm for implementing a lightweight, decentralized service exchange scheme, based on the credit backlogs, that balances as much as possible the service allocation across the different users. I. I NTRODUCTION Motivation. Today we are witnessing an increasing interest for cooperative networking services which extend the wellestablished peer-to-peer (P2P) file sharing concept [1], [2]. Some examples are the Wi-Fi sharing networks [4], [3], and the commercial [6], or community [7] mesh networks for residential users, as shown in Fig. 1. These models rely on collaborative consumption of underutilized or idle resources, such as the Internet access. Besides, similar schemes have been proposed for energy sharing over smart grid [8], and for a variety of other networked markets [9], [10], where users exchange directly, i.e., without intermediaries, resources such as residential space and cars. In this type of service exchange models (bartering), each user is both a service consumer and a service provider. The main idea is that users can exploit the diversity of their resource availability and needs, and increase through collaboration their long - term benefits. Clearly, a prerequisite for the success of these models is to ensure that users will share their resources in a fair fashion, and hence will agree to cooperate. Ideally, from a system design point of view, each user should receive resources (or, service) commensurate to her contribution towards the other users. When this is not possible, e.g., due to asymmetries in resource availability, we would prefer to have a fair outcome that balances the resource exchanges as much as possible. Fig. 1. Instances of Service Exchange in Networks: left: a wireless mesh network of mobile devices that share their Internet connections, e.g., as in Open Garden [5]. Right: an example of a mesh network among residential users, as proposed by Telefonica/BeWifi [6], for sharing their Internet broadband connections. Nevertheless, designing and implementing such fair policies for these collaborative networks has unique challenges. In particular: • Graph-constrained Decisions. The service exchange among the users is constrained by an underlying graph that prescribes, for each node (representing a user), the subset of the nodes she can serve and receive services from. Such constraints arise due to users’ preferences, the different patterns of resource availability and needs, etc. For example in a collaborative mesh network the users should be in range with each other. • Decentralized Decisions. Such service exchange decisions are not centrally designed; instead they are devised independently by each user, based on the strategy she has adopted, aiming to maximize the total service she receives in exchange. • Asynchronous Decisions. The service exchange decisions are not synchronous. They are determined independently and asynchronously by each user whenever she has idle network resources. • Myopic Decisions. Even worse, in most cases, each user is not aware of the resource availability of other users in the past or in the future, nor she is aware of their previous or current service allocation decisions (towards the other nodes). Therefore, the service exchange decisions are myopic, based only on local and currently available information. In this totally dynamic and fully decentralized setting, the following question arises: which is a fair long-term allocation for this graph-constrained dynamic service exchange model, and how can it be achieved in a decentralized and asynchronous fashion by the users? Methodology and Contributions. We study this question using a general model that abstracts all the above cooperative networking scenarios. The users interact exchanging their idle resources, with the objective to maximize the total amount of resource (or, equivalently, service) each one will receive from the others. In particular, random service opportunities are created by each user (hereafter called also "tokens"), possibly with different rate, and each user has unsaturated demand for receiving service from the other users. Nodes can exchange resources only with their neighbors, where neighborhood relationships are bidirectional and specified by some undirected connected graph. Each token can be assigned to only one user who is represented by a node in the graph. For example, a mobile device currently not using its cellular connection, can decide to serve a nearby user for a certain time period. To simplify the analysis, we assume that the tokens have the same value, e.g., they represent equal servicing time1 . The interactions of the users give rise to a dynamic service exchange economy where each user decides how to allocate her tokens as they are generated. The operation of this market can be characterized by the token exchange ratios for each pair of neighbors. These ratios admit a natural interpretation as the "prices" at which these exchanges are realized [1], [2]. The token allocation decision of each user is devised based on a proportional best response strategy. Namely, each user assigns her tokens to her neighbor that offers the lowest price, i.e., reciprocates with the largest number of tokens for each token she receives. Each user does not know the token generation rates of other nodes, nor their previous or current token allocation policy. We show numerically that such myopic token allocation decisions lead to an exchange equilibrium. The latter is defined as the asymptotic point where each user has equal average token exchange ratios for all her neighbors that she collaborates with. Therefore, each node is characterized by a single price. This equilibrium exhibits a very rich and interesting structure. For example, the nodes are partitioned in sets such that all nodes in each different set have equal prices. If there is just one such set, then the value of the price is equal to one, i.e., each node receives service equal to her contribution. When there are multiple sets, there is service exchange only among the set of the most expensive nodes with the set of the cheapest nodes, the set of the second most expensive nodes with the set of the second cheapest nodes, and so on. There are also some topological properties. For example, the nodes with the cheapest prices are not connected with each other, and have connections only with the most expensive nodes. We explain through representative examples, that this equilibrium coincides with the lexicographically maximum (lexoptimal) token exchange solution. In other words, the resulting 1 This assumption can be easily relaxed, since we do allow the nodes to have different token generation rates. price vector has the desirable max-min fairness properties and it is Pareto optimal, [11], [12]. This surprising result reveals that centrally designed fair policies, which have been extensively used for resource allocation and load balancing in communication networks [13], can be achieved in these decentralized, dynamic service exchange models, where users compete and apply this naive best response asynchronous policy. Accordingly, we study how these systems can be enhanced by a credit exchange scheme that addresses the problem of double coincidence of needs and wants, and facilitates the users’ interactions. In particular, we assume that each user is initially endowed with a certain amount of credit, which she can exchange for the services she receives. Each user creates a different type of credit, that has different value to the community based on the service token generation rate of the user. For this credit-based service exchange market we propose a backpressure-inspired [19] heuristic algorithm where users serve those having the largest credit backlogs (queues). The advantage of this scheme, compared to typical pricing schemes, is that it is totally decentralized, and requires minimum accounting (for maintaining the credit queues), and information exchange only among neighboring nodes. We show numerically that this mechanism often allows each node to receive on average as many tokens as it allocates to her neighbors. For certain scenarios, when the underlying connecting graph is not symmetric (we assume a directed graph) this credit-based algorithm may yield highly unbalanced service allocation outcomes. To address this issue, we propose a credit control mechanism that imposes an upper bound parameter on the amount of credit each user can issue. The credit of each user is consumed as she creates more service tokens. Hence, the nodes with the lowest service rate eventually stop creating credit. In a way, this control parameter determines the balance between the efficiency of the market, when all users offer as many tokens as they generate, and the fairness, where users consume tokens in proportion to those they offer to others. The rest of this paper is organized as follows. Section II provides the model details and proposes a myopic token allocation policy that leads to the max-min fair solution. In Section III we introduce the respective credit-based service exchange model, and the respective heuristic algorithms. We study numerically the convergence and the fairness properties of the myopic allocation policy and the backpressure-inspired algorithm in Section IV. Finally, in Section V we discuss related works, and conclude in Section VI. II. M ODEL AND A LGORITHMS : T HE C ASE OF BARTERING A. Model We consider a service exchange market that is modeled as an undirected connected graph G = (N , E) with node and edge set N and E, respectively. Let Ni = {j : (i, j) ∈ E} be the set of neighbors of node i ∈ N . The market operation is continuous in the time domain. Every node i creates service tokens according to a Poisson process with rate λi > 0. Each token, upon creation, is allocated to one of her neighbors. Let dij (ti ) = {1, 0} denote the decision of node i to allocate or not, respectively, the token created in time instance ti , to her neighbor j ∈ Ni . Also, we denote with Dij (t) ∈ Z + the number of tokens that node i has allocated to node j ∈ Ni until time t. Every token is always allocated to one node, i.e., the users do not reserve tokens, and the tokens are not splittable. Therefore, it holds X dij (ti ) = 1, ∀ i ∈ N , ∀ ti . (1) Algorithm 1: Asynchronous Best Response Strategy 1 2 3 4 5 6 7 j∈Ni We assume that the allocation decision is realized instantly. Hence, in each time instance ti , ∀ i ∈ N , only one token is created in the network (that by node i)2 . Finally, we denote with Ri (t) and Di (t) the total service tokens that node i ∈ N has received and allocated respectively, until time t: X X Dij (t) . (2) Dji (t), Di (t) = Ri (t) = j∈Ni j∈Ni A meaningful metric for characterizing the performance of each node participating in this service, is the ratio ρij (t) = Dji (t)/Dij (t) for each one of her neighbors j ∈ Ni . This ratio admits a natural interpretation as the token exchange price among nodes (i, j) ∈ E. To see this, note that ρij (t) corresponds to the number of service tokens node i has received from node j, for each token that i has offered to j until time t. Moreover, we define the price per node i ∈ N as ρi (t) = Ri (t)/Di (t), and the vector ρ(t) = ρi (t) : i ∈ N . Fair Policy. We are interested in the long-term, asymptotic behavior of the market. That is, we study the average rate of tokens exchanged among each pair of nodes (i, j) ∈ E: lim t→∞ Dji (t)/t = lim ρij (t) = ρ¯ij , Dij (t)/t t→∞ (3) and the average rate of total exchanged tokens: lim ρi (t) = ρ¯i , ∀ i ∈ N . t→∞ (4) Notice that we denote all the limiting versions of the variables with the respective overline symbols. Based on the token allocation policy that each node employs, there are many possible price solutions ρ¯ij , (i, j) ∈ E. We denote the respective set of all these feasible solutions as P. The first question that arises for this dynamic service exchange model, is what is a fair long-term allocation of the service tokens. In other words, if there was a central network entity, e.g., a controller, how would allocate the generated tokens? Clearly, the most straightforward criterion is to allocate to every node i ∈ N tokens equal to her contribution, ¯i = D ¯ i . However, due to the graph that constraints i.e., R resource exchanges, and the different token generation rates of the nodes, such policies will not be, in general, realizable. In these cases, the controller would prefer to ensure the most balanced token exchange allocation. 2 In other words, we assume that the generation processes are independent across nodes. 8 t ← ti % Event-driven algorithm. j ∗ = 0; % maxprice = LB; % Set a very low value. %Find the highest-price neighbor. for j = 1 : Ni do if Dji (t)/Dij (t) > maxprice then j ∗ = j; maxprice = Dji (t)/Dij (t); end end dij ∗ (t) = 1; Dij ∗ (t) = Dij ∗ (t) + 1; A suitable method to achieve this goal is to employ the lexicographically maximum (or, “lex-optimal”) criterion, which has been extensively used for max-min fair resource allocation, and load balancing in communication networks [13], [11], [12], [14]. This multi-objective optimization method increases first as much as possible the allocated tokens to the node with the cheapest price, i.e., the one having received the smaller number of tokens compared to her contribution. Next, if there are many choices, it attempts to increase the tokens allocated to the node with the second cheapest price, and so on. More formally, for the problem under consideration, we are interesting in finding the lex-optimal (or, max-min) price vector ρ¯ ∗ , i.e., ¯ ∀ ρ¯ ∈ P, ρ¯ ∗ ρ, (5) ∗ where denotes the lexicographic ordering: if φ ρ¯ and φ ρ¯ are the respective vectors created by sorting the components of ρ¯ ∗ and ρ¯ in non-decreasing order, then the first ¯ is positive non-zero component of the vector φ(ρ¯ ∗ ) − φ(ρ) [13], [11]. It is easy to see that the set of feasible prices P is compact and convex. Hence, as is shown in [12], there is a unique lex-optimal ρ¯ ∗ ∈ P. In the sequel, we study whether and how the users participating in this market can achieve this lex-optimal solution based solely on myopic strategies, i.e., without having global information for the market, nor being assisted by a central controller or a market clearing house. B. Dynamic Exchange Policy In the absence of a network controller, each user will try to allocate every service token that she creates to her neighbors from which she anticipates to receive more service in the future. Therefore, a rational node i who creates a token in time instance ti , will allocate it to node j ∈ Ni for which the current price ρij (ti ) = Dji (ti )/Dij (ti ) is the largest among all her neighbors k ∈ Ni . From a different perspective, we can interpret this strategy as each node i "selling" her token to her neighbor offering the highest token exchange price. This is a basic rationality condition for such competitive markets [1], [10], [15]. The machinery of this decision making is presented in Algorithm 1, which is executed continuously, upon the creation of a service token at any node. To avoid deadlocks, we assume that each pair of neighbors has exchanged initially at least one token. The steady state of the market is represented by an exchange equilibrium [15]. At that point, the average token exchange prices are expected to satisfy certain conditions according to the following definition: Definition 1. Exchange Equilibrium. A price vector ρ¯ is an equilibrium, if and only if for every node i ∈ N it holds (i) ¯ ji = ρ¯i D ¯ ij for all j ∈ Ni , and (ii) if D ¯ ji > 0 for some D j ∈ Ni , then ρ¯j = mink∈Ni ρ¯k . The question that arises is if this uncoordinated myopic behavior of nodes can lead to the competitive equilibrium, and whether the latter is related to the lex-optimal point. Interestingly, we show in the numerical results section, that the answer to both of these questions is affirmative. However, it is clear that this kind of bartering systems, i.e., without any kind of money or credit systems, are constrained by the problem of double coincidence of needs and wants. To understand this, consider a simple network with four nodes (1 → 2 → 3 → 4 → 1), where no node can reciprocate exchanging directly tokens with her neighbors. In such cases, a pure bartering service exchange scheme as the one described herein, is not effective. In the next section, we address this issue by proposing a credit-based service exchange scheme which however, unlike this kind of similar systems, is totally decentralized and does not require a clearing house for determining the prices for the tokens of the different users. III. M ODEL AND A LGORITHMS : T HE C ASE OF C REDIT In this section, we extend the service exchange model by introducing a credit system. Namely, each user is endowed with a certain amount of credit that can trade for receiving services. This method allows users to cooperate even if they cannot directly exchange services. The latter case arises often especially when the graph that connects the nodes is directed, and/or the resource availability of the nodes is asymmetric. A. Model Eq. (6) implies that every user does not have a backlog or budget of her own credit, as she can issue as much credit as she wants. This assumption may result in highly unfair token allocations for certain network graphs, and we relax it in the sequel. Each user i can serve only her neighbors Ni . We denote the slots that user i has relayed user j, until slot t, with Dij (t) ∈ Z + , and construct the servicing matrix D(t) = (Dij (t) : (i, j) ∈ E). We assume that each user i ∈ N creates a service opportunity (or, token) in each slot t, with probability Ti p i = PN j=1 Tj . We assume that the slot duration is small enough such that in each slot only one node creates a service opportunity, similarly to Section II. Upon creation, user i decides to whom among her neighbors she will allocate it. Unlike the previous model, where decisions where taken based on the history of service exchanges among i and all her neighbors, now the allocation is based on the available credit each user has. We follow the rationale of backpressure-like queueing control algorithms [19] to determine how a user will allocate her service tokens. The underlying idea is that the users having accumulated large credit (long credit queues) by serving other users, should be prioritized when they ask for service. Therefore, in a way, the credit of each user is supported by her service provision capability. This queue-based control allows the inclusion of this credit system without however requiring any kind of centralized infrastructure for accounting, or a clearing house for price determination. B. Credit-based Servicing Algorithm The machinery of this credit-based service exchange is as follows. Whenever a user i ∈ N creates a service token, she calculates all the differences in accumulated coupons (coupon backlogs) that she possesses compared to her neighbors. Namely, for each one of her neighbors j ∈ Ni , and for every type of credit (each type corresponds to one node), node i calculates the quantity Yijm (t) = Xjm (t) − Xim (t), ∀ j ∈ Ni , m ∈ N , We consider again the set N of the N = |N | users who are embedded in the graph Gc = (N , Ec ). Notice that in this case, the graph is directed and hence it has a different set of edges (than previously), denoted Ec . Also, we consider that the market operation is time slotted. Without loss of generality, we study the market for a time period of t = 1, 2, . . . , Tmax slots, that is long enough so as to characterize its asymptotic performance. Each user i ∈ N can serve her outgoing neighbors for Ti < Tmax slots. This represents the serving capacity of the user. Each user i has Xij (t) credit tokens of every other user j ∈ N , i 6= j, in slot t. By definition it is Xii (t) = 0, ∀ t, ∀ i ∈ N , (6) Xij (0) = 0, ∀ j ∈ N . (7) and (8) (9) where j is the outgoing neighbor of i, Xjm (t) is the amount of credit of type m (i.e., issued by user m) that user j has at her disposal in slot t, and Xim (t) the respective quantity for user i. After calculating these backlogs Yijm (t), node i finds the pair (j, m) for which Yijm (t) is maximum (ties are broker arbitrarily). Then, she allocates her service token to user j ∈ Ni and she is paid in credit of type m. Notice that since Xjj (t) = 0, ∀ t, in this step user i will not select to be paid in credit of user j. This strategy allows user i to serve her neighbor with the largest difference in any type of credit. Accordingly, the credit backlogs are adjusted as follows: • The credit of user j who received the service decreases, Xjm (t) = Xjm (t − 1) − 1 . (10) • The credit of user i who offered the service increases, Xim (t) = Xim (t − 1) + 1 . • (11) where when m = i, we do not need to increase the Xii counter, since it is always set to Xii (t) = 0, ∀ t. We increase the relay counter, Dij (t) = Dij (t − 1) + 1 . (12) If in the previous step user i could not identify any neighbor j ∈ Ni for which Xjm (t) > 0, m ∈ N \ {i}, then user i serves her neighbor j ∈ Ni for which Xij (t) is minimum. That is, gives priority to the user of which she currently has the smallest credit backlog. Accordingly, we set, Xij (t) = Xij (t − 1) + 1, (13) Dij (t) = Dij (t − 1) + 1 . (14) Fig. 2. A network with 10 nodes, partitioned in 4 price sets, and ¯ 1∗ = 15.65, creating 2 cooperating groups. Received average tokens: R ¯ 2∗ = 25.54, R ¯ 3∗ = 38.33, R ¯ 4∗ = 31.29, R ¯ 5∗ = 51.1, R ¯ 6∗ = 19.55, R ∗ ¯ 7∗ = 64, R ¯ 8∗ = 11.81, R ¯ 9∗ = 6.18, R ¯ 10 R = 23.48. and The above steps (9) -(14) are continuously executed upon the creation of a service token in any node. From the above analysis it is clear that this credit-based service exchange scheme is lightweight and suitable for decentralized implementation, as it significantly departs from traditional pricing mechanisms. For example, each service token is exchanged with one service credit, i.e., there is no need to determine the "price" of each service token with respect to the credits. Also, it is not required to have a clearing house to set prices for each token. C. The Impact of Credit Control A key issue in this model is the amount of credit each user can issue. In the above machinery, we assume that each user can always pay a service token with credit of her own type, i.e., the credit she creates. However, as we show in the numerical results section, in certain cases this may not be desirable. For example, consider a two node network where only the one user creates service tokens and exchanges them with the service credit that the other user continuously issues. For these scenarios, one may prefer to set an upper limit on the amount of credit a user generates, so as to avoid an ever increasing "debt", which in turn implies very large asymmetries in resource allocations among the nodes. To address this issue, we only have to modify the machinery presented above, by introducing the credit control parameter L ∈ R+ . Then, when each user i determines which of her neighbors she will serve, she excludes those having produced (or, issued) already more than L service credits. Obviously, this modified algorithm presumes the existence of an accounting mechanism for informing each user for the total issued credit of every other user in the network3 . The value of parameter L determines in a way the balance between the efficiency and the fairness of the market. That is, when L is very large, or there is no credit control, the users offer to each other all the service tokens they generate. This 3 However, if the nodes are considered benign, then there is no need for such an accounting mechanism, as every node is aware of the total credit she has issued an can refrain from exceeding the credit control parameter L. Fig. 3. A network with 13 nodes, 6 price sets, and 3 cooperating ¯ 1∗ = 26, R ¯ 2∗ = 20, R ¯ 3∗ = 39.74, R ¯ 4∗ = groups. Received tokens: R ∗ ∗ ∗ ∗ ¯ ¯ ¯ ¯ ¯ 9∗ = 42.78, R5 = 93.49, R6 = 14.97, R7 = 30.38, R8 = 20.96, R ∗ ∗ ∗ ∗ ¯ 10 ¯ 11 ¯ 12 ¯ 13 30.38, R = 4.28, R = 160, R = 6.25, and R = 33.75. We ∗ ∗ ∗ have 6 level of prices: ρ¯12 = ρ¯13 = 0.25, ρ¯4∗ = ρ¯6∗ = ρ¯8∗ = ρ¯10 = 0.4278, ρ¯2∗ = 0.7692, ρ¯1∗ = 2.3373, ρ¯3∗ = ρ¯5∗ = ρ¯7∗ = ρ¯9∗ = 1.3, ∗ ρ¯11 = 4. increases the services the market offers to the participants, but may result in highly asymmetric prices. On the other hand, small values of L yield more balanced exchanges (price values are closer to one) but this is achieved by having some users not allocating all their tokens. IV. N UMERICAL R ESULTS In this section we present several representative examples, using both arbitrary and specific structured graphs. Our goal is to demonstrate the convergence of the asynchronous best response algorithm (Algorithm 1) to the respective exchange equilibrium, which coincides with the max-min average token allocation. For verifying the lex-optimality of the resulting equilibriums, we used a lexicographic optimization algorithm such as the one in [11]. Additionally, we present several examples of the credit-based service exchange algorithm, with or without the usage of the credit control parameter L. A. Best Response Algorithms In the first example of Fig. 2 we present a network with N = 10 nodes. Next to each node i we depict her token ¯ i = λi . The solid lines represent the physical generation rate D connections and the dotted arrows denote the token exchanges. First, observe that not all neighboring nodes exchange tokens. For example, nodes 6 and 7 do not serve each other. Moreover, at the equilibrium, each node exchanges tokens only at a certain price, which is the same for all her neighbors with whom she interacts. In particular, the exchange ratios (prices) for the nodes in this example are ρ¯8∗ = ρ¯9∗ = 0.2813, ∗ ρ¯1∗ = ρ¯4∗ = ρ¯6∗ = ρ¯10 = 0.7826, ρ¯2∗ = ρ¯3∗ = ρ¯5∗ = 1.2778, ∗ ρ¯7 = 3.5556. Fig. 4. Convergence results for Algorithm 1, for the networks of Fig. 2 (left), and Fig. 3 (right). Fig. 5. Left: for this complete graph, the prices are equal to 1 and all nodes cooperate with each other. Right: for the ring graph there are two levels of prices with product equal to 1. Notice that the nodes can be classified in different sets, based on their prices. In the figure we have used different colours to mark the nodes with the same price (ranging from white to dark, as prices increase). In this example, we have K = 4 price levels. It is interesting to notice that each node interacts only with her neighbors who are exchanging tokens in the lowest price (e.g., node 6 interacts with 2 and 5 but not with node 7). Moreover, the prices of the interacting nodes are not arbitrary, but instead, they yield a product equal to 1. For example ρ¯7∗ · ρ¯9∗ = 1 and ρ¯3∗ · ρ¯4∗ = 1. This means that the network is partitioned in distinct groups of nodes, and there is no interaction among nodes belonging to different groups. For Figure 2, these groups comprise nodes {1, 2, 3, 4, 5, 6, 10} and {7, 8, 9}. Moreover, in each of these groups, there are only two different price levels (for all their members). Notice that the nodes with the cheapest prices cooperate only with the nodes with the most expensive prices, the nodes with the second cheapest prices cooperate only with the second most expensive nodes, and so on. For example, in Figure 3, we have 13 nodes which - at the equilibrium - are partitioned in 3 sets: {1, 2}, {3, 4, 5, 6, 7, 8, 9, 10}, and {11, 12, 13}. Again, the nodes exchange tokens only with their lowest-price neighbors, and certain cooperation groups are formed based on the price ordering. Additionally, there are interesting topological properties. In particular, observe that nodes with the lowest prices are not connected with each other, and have links only with the most expensive nodes. In Figure 4 we present the convergence of Algorithm 1 for the above two networks. In the horizontal axis we depict the actual time (e.g., in seconds) and in the vertical axis the different prices for each network. We can see that the prices converge to the equilibrium values quite fast, i.e., after 20-30 seconds or, equivalently, after 500-1000 total generated tokens. Finally, Fig. 5 depicts the token exchange and the prices for a complete and a ring graph. Notice that in the complete graph there is only one price level ρ¯ ∗ = 1, i.e., each node receives resources equal to her contribution. This result is due to the graph structure (complete graph) and the specific token generation rates. For example, if there was one node having token generation rate larger than the total rates of all the other nodes, then the equilibrium would comprise two different price levels. In Figure 6, we present the results for a complete graph as the one in Fig. 5, where here we have assumed that node 4 has a token generation rate that is larger than the aggregate rates of all the other nodes in the graph. We see that this changes drastically the equilibrium point. Namely, all the other nodes exchange tokens only with node 4 who is now having a lower price. Therefore, we have two different price sets in this case. Notice again that the product of the different prices is equal to one, and that the node with the lowest price is independent (here comprised only by node 4). Moreover, the average token allocations are as expected. That is, every node apart from ¯ i4 = λi , node 4 allocates to the latter all her tokens, hence D ∀i ∈ N \{4}, where the token generation rates are shown next ¯ 41 = 21.9985, to each node. Node 4 responds with the rates D ¯ ¯ ¯ ¯ 46 = D42 = 28.5969, D43 = 18.6992, D45 = 43.9916, D ¯ ¯ 38.4970, D47 = 14.2921, D48 = 53.8859. Fig. 6. A complete graph with 8 nodes, partitioned in 2 price sets, and creating 1 cooperating group. Average prices are: ρ¯1∗ = ρ¯2∗ = ρ¯3∗ = ρ¯5∗ = ρ¯6∗ = ρ¯7∗ = ρ¯8∗ = 1.0999 and ρ¯4∗ = 0.9092. In Figure 7 we depict a network with 6 nodes. At the equilibrium there are 3 different price levels, and the nodes are partitioned in two different cooperating groups. Namely, we have ρ¯1∗ = ρ¯6∗ = 0.5, ρ¯3∗ = ρ¯4∗ = 1, ρ¯2∗ = ρ¯5∗ = 1. Finally, in Figure 8 we present a tandem network of 8 nodes. There are 6 different prices at the equilibrium, as follows: ρ¯8∗ = 0.2653, ρ¯4∗ = ρ¯6∗ = 0.4222, ρ¯2∗ = 0.7692, ρ¯1∗ = 1.3, ρ¯3∗ = ρ¯5∗ = 2.3684, ρ¯7∗ = 3.76921. Observe that the product of the prices among the cooperating nodes is equal to one, and the cheapest nodes are only connected to the most expensive nodes. In Figure 9 we present the convergence of the prices for the network of Figure 7. We can see that the prices converge quite fast to their equilibrium values. Similarly, the price convergence for the network of Figure 8 is depicted in Figure 10. Fig. 7. A network with 6 nodes, partitioned in 4 price sets, and creating 2 cooperating groups. Fig. 10. Convergence results for Algorithm 1, for network in Fig. 8. Fig. 8. A tandem network with 8 nodes, partitioned in 6 price sets, and creating 3 cooperating groups. B. Credit-based Algorithms In this subsection we present several numerical examples of the credit-based, backpressure-inspired, heuristic service allocation algorithm. We begin with the network of Figure 11 for a symmetric network of 4 nodes, where, however the nodes have different service token generation rate.s In particular, for every 145 slots, it is T1 = 20, T2 = 30, T3 = 35, and T4 = 60. We study the system operation for a time horizon of Tmax = 80 · 103 · 145 slots, where each user allocates her service tokens according to the mechanism described in Subsection III-B. We find that on average the users allocate ¯ 1 = 20.01, D ¯ 2 = 30.00, D ¯ 3 = 34.99, D ¯ 4 = 60.00, and D ¯ ¯ ¯ 3 = 35, they respectively receive R1 = 20.01, R2 = 30.00, R ¯ ¯ ¯ R4 = 59.99. That is, it holds Ri = Di , ∀ i ∈ N . Next, we consider the network of Figure 12 where the nodes have different capacities, and the links are asymmetric. For example, node 2 can serve node 3, but node 3 can only serve node 4. We run the credit-based heuristic algorithm for a time horizon of Tmax = 50, 000.00 · 121 slots. The average service ¯ 1 = 0, R ¯ 2 = 11, R ¯ 3 = 10, R¯4 = 99.99; each user receives is R ¯ ¯ 2 = 10, and the service they allocate to others: D1 = 10.01, D ¯ ¯ D3 = 99.99, D4 = 0.99. Now, assume that we set the credit control parameter to L = 5000. In this case, the users allocate ¯ 1 = 9.17, D ¯ 2 = 9.99, D ¯ 3 = 1.02, and D ¯4 = on average D ¯ ¯ ¯ 0.92, and they receive R1 = 9.07, R2 = 10.09, R3 = 0.92, Fig. 9. Convergence results for Algorithm 1, for network in Fig. 7. Fig. 11. A four node graph with symmetric links, and different token generation rates. ¯ 4 = 1.02. The same results hold for L = 1000. When L is R further increased then the algorithm allows larger differences ¯ i and D ¯ i, ∀ i ∈ N . among R Fig. 12. A four node graph with asymmetric links and different token generation rates, i.e., for every 121 slots, it is T1 = 10, T2 = 10, T3 = 100, T4 = 1. The prices without credit: ρ¯1 = 0, ρ¯2 = 1.1, ρ¯3 = 0.1, ρ¯4 = 101, and with credit: ρ¯1 = 0.98, ρ¯2 = 1.01, ρ¯3 = 0.90, ρ¯4 = 1.11. Finally, in Figure 13 we present another asymmetric network where for every 1040 slots, the nodes generate tokens with proportions T1 = 10, T2 = 10, T3 = 1000, T4 = 10, T5 = 10. Running the credit-based heuristic algorithm with the credit control parameter set to L = 1.000, we get the ¯ 1 = 9.72, R ¯ 2 = 10.04, R ¯ 3 = 0.21, following results: R ¯ ¯ ¯ ¯ 2 = 9.93, R4 = 0.405, R5 = 0.205, and D1 = 10.04, D ¯ ¯ ¯ D3 = 0.4, D4 = 0.205, D5 = 0.005. Notice that with this algorithm the nodes do not allocate their entire resources due to the credit control parameter L, and hence some other nodes do not receive as many service tokens as it is possible. This observation motivates the employment of different control parameters for different nodes. For example, if we increase the credit control parameter for nodes 4 and 5 to ¯ 1 = 8.94, R ¯ 2 = 10.02, R ¯ 3 = 1.04, L = 5.000, then we get: R ¯ 4 = 2.02, R ¯ 5 = 1.02, and D ¯ 1 = 10.02, D ¯ 2 = 9.98, R ¯ 3 = 2, D ¯ 4 = 1.02, D ¯ 5 = 0.02. The updated prices are D ρ¯1 = 0.89, ρ¯2 = 1.00, ρ¯3 = 0.52, ρ¯4 = 1.98, ρ¯5 = 51. And if we further increase the credit allowance for these two ¯ 1 = 6.96, R ¯ 2 = 10.03, nodes, at L = 15.000, then we have R ¯ 3 = 3.03, R ¯ 4 = 6.05, R ¯ 5 = 3.05, and D ¯ 1 = 10.03, R Fig. 13. A five node network with T1 = 10, T2 = 10, T3 = 1000, T4 = 10, T5 = 10. The prices with the credit-based heuristic algorithm with the control parameter are: ρ¯1 = 0.97, ρ¯2 = 1.01, ρ¯3 = 0.53, ρ¯4 = 1.97, ρ¯5 = 41. ¯ 2 = 9.99, D ¯ 3 = 6, D ¯ 4 = 3.05, D ¯ 5 = 0.05. The new prices D are ρ¯1 = 0.69, ρ¯2 = 1.00, ρ¯3 = 0.51, ρ¯4 = 1.98, ρ¯5 = 55. That is, as we increase L for nodes 4 and 5, node 4 receives more service from node 3 and node 5 from node 4. V. R ELATED W ORKS The problem of service exchange in communication networks is of paramount importance and has been considered in different contexts, such as routing in ad hoc networks [18], Wifi sharing models [17], cooperative mesh networks [6], [7], and peer-to-peer (P2P) content sharing overlays [1]. Also, similar models arise in several other cases (not related to communication networks), where different users exchange idle or underutilized resources [9]. The proposed collaboration solutions most often require a reputation or a centralized creditbased mechanism, for accounting and payment purposes, or complete information about the nodes’ resources and needs. Clearly, such approaches exhibit high complexity, and do not capture the dynamics of this service exchange market. Best response algorithms have been considered in various context. For example, reference [2] showed that a synchronous, time slotted proportional bandwidth allocation algorithm for P2P networks, converges relatively fast to the system’s fixed point equilibrium. This scheme resembles the typical tatonnement process [15], which, however, requires the circulation of explicit price signals. On the contrary, our analysis considers a dynamic best response algorithm (without prices), with discrete non-divisible allocation of resources, and unknown resource availability. Besides, we explain and demonstrate through representative examples that the equilibrium has a rich structure, and coincides with the fair, lex-optimal allocation of the nodes’ resources. Additionally, the proposed credit-based service exchange scheme differs substantially from previous mechanisms since it is fully decentralized and lightweight in terms of required message passing. Finally, our analysis is also applicable in graphical economies [10], which extend the classical Arrow - Debreu economies [15], by imposing graph constraints on the subsets of buyers and sellers that can trade. VI. C ONCLUSIONS We consider a fundamental trading or bartering model, where the nodes have a dual role of resource provider and consumer. A basic property of the model is that the nodes’ interactions are constrained by a graph. A simple myopic best response dynamic algorithm was proposed, that operates in the time domain, asynchronously and without any prior information regarding the needs and the resources of other nodes. We showed numerically that this algorithm converges to the max-main fair allocation of the nodes’ resources. Finally, we considered an enhanced setting where the nodes can exchange service credit with service tokens. A backpressureinspired heuristic algorithm was introduced, aiming to reduce the credit backlogs. We are currently working on the formal convergence proofs of the proposed schemes. VII. ACKNOWLEDGEMENT This research has been co-financed by the European Union (European Social Fund - ESF) and Greek national funds through the Operational Program ”Education and Lifelong Learning” of the National Strategic Reference Framework (NSRF) - Research Funding Program: Thales, Investing in knowledge society through the European Social Fund, for the project SOCONET. This work is also supported by the EINS, the Network of Excellence in Internet Science, through FP7ICT grant 288021 from the European Commission. R EFERENCES [1] C. Aperjis, R. Johari, and M. Freedman, “Bilateral and Multilateral Exchanges for Peer-Assisted Content Distribution”, IEEE/ACM Tran. on Networking, vol. 19, no. 5, 2011. [2] F. Wu, and L. Zhang, “Proportional Response Dynamics Leads to Market Equilibrium”, in Proc. of ACM FOCS, 2010. [3] R. Sofia, and P. Mendes, “User-Provided Networks: Consumer as Provider”, IEEE Comm. Mag., vol. 46, no. 12, 2008. [4] FON [Online]: http://fon.com [5] Open Garden [Online]: http://opengarden.com/ [6] Telefonica BeWiFi [Online]: http://www.bewifi.es/ [7] B. Braem, et al., “A Case for Research with and on Community Networks”, ACM Sigcomm CCR, July 2013. [8] W. Saad, Z. Han, and V. H. Poor, “Coalitional Game Theory for Cooperative Micro-Grid Distribution Networks”, in Proc. of IEEE ICC, 2011. [9] R. Botchman, and R. Roogers, “What’s Mine is Yours: The Rise of Collaborative Consumption”, HarperBusiness, 2010. [10] S. Kakade, M. Kearns, and L. Ortiz, “Graphical Economics”, Annual Conference on Learning Theory, Springer, 2004. [11] D. Nace, and M. Pioro, “Max-Min Fairness and Its Applications to Routing and Load-Balancing in Communication Networks: A Tutorial”, IEEE Comm. Surveys and Tutorials, vol. 10, no. 4, 2008. [12] B. Radunovic, and J. Y. Le Boudec, “A Uunified Framework for Maxmin and Min-max Fairness with Applications”, IEEE/ACM Trans. on Networking, vol. 15, no. 5, 2007. [13] L. Georgiadis et al., “Lexicographically Optimal Balanced Networks”, IEEE/ACM Transactions on Networking, vol. 10, no. 5, 2002. [14] L. Tassiulas, and S. Sarkar, “Maxmin Fair Scheduling in Wireless Ad Hoc Networks”, IEEE JSAC, vol. 23, no. 1, 2005. [15] A. Mas-Colell, et al., “Microeconomic Theory”, Oxford Un. Press, 1995. [16] K. Arrow, and G. Debreu, “Existence of an Equilibrium for a Competitive Economy”, Econometrica, vol. 22, no. 3, 1954. [17] E. C. Efstathiou, et al., “Controlled Wi-Fi Sharing in Cities: A Decentralized Approach Relying on Indirect Reciprocity”, IEEE Trans. on Mobile Comp., vol. 9, no. 8, 2010. [18] L. Buttyan, J. Hubaux, “Stimulating Cooperation in Self-organizing Mobile Ad Hoc Networks”, ACM J. Mobile Networks, vol. 8, 2003. [19] L. Georgiadis, M. J. Neely, and L. Tassiulas, “Resource Allocation and Cross-layer Control in Wireless Networks”, Foundations and Trends in Networking, vol. 1, no. 1, pp. 1-149, 2006.
© Copyright 2024