{'fraction_non_alphanumeric': 0.04139496343264762, 'fraction_numerical': 0.011420542565839248, 'mean_word_length': 3.5632089429557783, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Budget-restricted utility games with ordered strategic decisions

We introduce the concept of budget games. Players choose a set of tasks and each task has a certain demand on every resource in the game. Each resource has a budget. If the budget is not enough to satisfy the sum of all demands, it has to be shared between the tasks. We study strategic budget games, where the budget is shared proportionally. We also consider a variant in which the order of the strategic decisions influences the distribution of the budgets. The complexity of the optimal solution as well as existence, complexity and quality of equilibria are analyzed. Finally, we show that the time an ordered budget game needs to convergence towards an equilibrium may be exponential.


Introduction
Recent advancements of network technology enabled and simplified outsourcing of processing and storing information to remote facilities. The offering of such services in a competitive environment has become known as cloud computing. The competitive aspect is twofold. On the one hand, customers compete over the allocation of various types of services and resources like bandwidth, memory space, computing power etc. These resources are usually limited in capacity and as soon as the demand exceeds that capacity customers' demand can only be satisfied partially. On the other hand, the service providers face strategic decisions in the markets which have to take into account the budget of their clients. As long as a client can afford all the desired products, his budget has no consequence. But once their total costs exceed his budget, he has to split it between them. When deciding to offer a product, a provider therefore has to consider the remaining budgets of the interested clients.
We study this in a game theoretic setting called budget games in which several tasks (or products) have a certain demand for resources (or money) and the resources (or clients) have budgets. As long as the sum of the demands does not exceed the budget, the demands can be completely satisfied, otherwise only partially. For example in scheduling, where tasks are allocated to one or more servers. Each server disposes of a limited amount of computational capacity, space or bandwidth and when it runs too many tasks, this capacity has to be split between them. Naturally, every job will aim to obtain as much capacity as it needs, which may vary between the different servers. Also, not every server combination may be possible for every task.
We study budget games as strategic games as well as in a variant that takes into account temporal aspect. Strategic games are often analyzed as one-shot games which do not capture situations like a new provider entering a market having a disadvantage against those already established. The clients prioritize the products they already know and spend only what may be left of their budget on what the new provider offers. As a result, he cannot gain more than what is left of a clients budget.
In the strategic game the utility of a resource is shared proportional among all tasks. In the second approach, called ordered budget games, we also take into account the order in which the tasks arrived. Each resource has an ordering of the tasks and its utility is allocated to the tasks in that order. If a player decides to deviate to another strategy, the tasks that are allocated to different resources are moved to the last position in the ordering of those resources.

Related Work
There are several models which share similarities to budget games. Li et al. [5] developed cost-sharing mechanisms for set cover games. Every element e i has a coverage requirement r i , every set S j has a cost c j and the multiplicity of e i in S j is k j,i . The multiplicity states how many times e i is covered by S j . The sets are chosen on the condition that e i has to be covered at least r i many times. The total costs are distributed between the elements such that the result is 1 ln(dmax) -budget-balanced and fair under core. In [6], Li et al. analyze set cover games in which the elements are the agents and declare bids for the sets. They give mechanisms which decide which elements will be covered, which sets are used and how much each element is charged.
Other games have been defined on the facility location problem [4]. In [1], Ahn et al. studied the Voronoi game in which two players alternately choose their facilities and the space they control is determined by the nearest-neighbor rule. They give a winning strategy for player 2, although player 1 can ensure that the advantage is only arbitrarily small.
Also related to our model are congestion games. Rosenthal [10] showed that they always have a pure Nash equilibrium. Milchtaich [8] extended this result to weighted congestion games with player-specific payoff functions, where the utility of player i playing strategy j is a monotonically nonincreasing function S ij of the total weight of all players with the same strategy. Mavronicolas et al. [7] considered the special case of latency functions f ie = g e c ie , where g e is the latency function of resource e, c ie > 0 and is the operation of an abelian group. A characterization of the class of congestion games with pure Nash equilibria was recently given by Gairing and Klimm [3]. They showed that the player-specific cost functions of the weighted players have to be affine transformations of each other as well as be affine or exponential. These games emphasize that the impact of the same strategic choice may vary between the players. Finally, the strategic version of our game is a basic utility game. One property of basic utility games is that the social welfare function is submodular and non-decreasing, which is used in Section 3 to approximate the optimal solution for any of our games. Vetta [11] showed that any basic utility game has a Price of Anarchy at most 2. We prove the same for the non-strategic ordered budget games.

Our Contribution
We show that computing an optimal allocation for both variants of budget games is NP-hard in general but can be approximated within a factor of 1 − 1 /e if the strategies of the players have a matroid structure.
In standard budget games a stable solution, i. e., a pure Nash equilibrium, might not exist and deciding if one exists is NP-hard. For ordered budget games the situation is more positive. Nash and even strong equilibria exist and can be computed in polynomial time. We show that this complexity result cannot be extended to super strong equilibria as these are NP-hard to compute. Moreover, we compare the performance of equilibria to optimal solutions and show that the price of (strong) stability is 1 and the price of (strong) anarchy is 2. Concerning the convergence of repeated improvement steps we show that the dynamic that emerges if players repeatedly make improving moves converges towards a Nash equilibrium and this is even true for simultaneous moves of several players if ties are broken in a certain way. However, there are games and initial strategy profiles in which the convergence process may take exponentially long.

Model
A budget game B is a tuple (N , R, (b r ) r∈R , (S i ) i∈N , (u i ) i∈N ), where the set of players is denoted by N = {1, . . . , n}, the set of resources by R = {1, . . . , m}, and the budget of resource r by b r . Each player i has a set of tasks T i = {t i 1 , . . . , t i qi } with t i k ∈ R m ≥0 . For a task t ∈ T i , we use t(r) to denote the demand for resource r. We say a task t is connected to a resource r if t(r) > 0. If the task demands the full resource, i. e. t(r) = b r , we say that t is fully connected to r. Now, let T = ∪ i∈N T i denote the set of all tasks. A strategy of a player is a set of tasks and S i ⊆ 2 Ti denotes the set of strategies available to player i. S = S 1 × . . . × S n is the set of strategy profiles and u i : S → R ≥0 denotes the private utility function player i strives to maximize. For a strategy profile s = (s 1 , . . . , s n ), let u t,r (s) : S → R ≥0 denote the utility of t from r and u i (s) := t∈si r∈R u t,r (s). We demand that the utilities are always valid, i. e. i∈N t∈si u t,r ≤ b r for every r ∈ R.
We consider two different utility distribution rules and call the games standard budget games (or simply budget games) and ordered budget games. In a standard budget game, the utility of task t ∈ s i from resource r is defined as u t,r (s) := min t(r), br·t(r) / j∈N t ∈s j t (r) .
In an ordered budget game, the utilities do not only depend on the current strategy profile, but also on the course of the game up to this point. To that end a strategy profile is augmented by an ordering of the tasks for each resource. Let ≺= (≺ e ) r∈R be a vector of total orders on the set T . The utility of a task t ∈ s i in (s, ≺) is u t,r (s, ≺) When player i changes its strategy from s i to s i all new tasks are moved to the end of ≺ r for all resources. Let τ = s i \ s i then the new state is ((s i , s −i ), ≺ ) with x ≺ r y if and only if x ≺ r y and x ≺ r t for all x, y ∈ T \ τ and t ∈ τ . Here, the order for given tasks of the same player is arbitrary, as it does not change the utility function of the specific player. For strategy changes of a coalition C ⊆ N of players the definition is analogous and we set τ = ∪ i∈C (s i \ s i ). For the ordering between tasks in τ , we show two tie-breaking rules in Section 5.
A pure Nash equilibrium (NE) is a strategy profile s in which no player has an incentive to deviate, i. e., there is no For super strong equilibrium we only demand that this inequality is strict for at least one player.
For a strategy profile s, u(s) := i∈N u i (s) is the social welfare of s. The optimal solution of B is the strategy profile opt with u(opt) ≥ u(s) for every s ∈ S. The price of anarchy (PoA) is defined as max u(opt) u(s) , the price of stability (PoS) as min u(opt) u(s) , where s is a NE. Analogously the price of (super) strong anarchy and stability is defined with s being a (super) strong equilibrium.

Complexity of the Optimal Solution
For any form of budget game, the social welfare is independent of the order of the tasks. The following results hold for both standard and ordered budget games.
Theorem 3.1. Computing the optimal solution for a budget game with respect to social welfare is NP-hard, even if the tasks and strategy sets of all players are equal and the strategies are restricted to singletons.
Proof. We give a reduction from the maximum set coverage problem. An instance I = (U, W, w) of this problem is given by a set U, a collection of subsets W = {W 1 , . . . , W q } with W i ⊆ U and an integer w ∈ N. The task is to cover as many elements from U as possible by choosing at most w sets from W.
From I, we create a budget game We create a number of w players, that is N = {1, . . . , w}. Now, let the set of resources correspond to the set U, i. e. R = U, and set the budget of each resource j ∈ R to b j = 1. For each player i, we define the set of tasks as T i = {t W1 , . . . , t Wq }, where the demands of a task are set to t W k (r) = 1 for r ∈ W k and t W k (r) = 0 otherwise. Note that the set of tasks is equal for all players. Finally, we set the strategy space to be Given a strategy profile s for B, the social welfare increases by 1 for every resource r that is used by some task. This applies if and only if there is a set W k with r ∈ W k so that the chosen strategy of some player i is s i = {t W k }. Choosing strategies for all players corresponds to choosing w sets from {W 1 , . . . , W q } and thus a strategy profile for B also describes a solution for I where the number of covered elements equals the social welfare of s. In addition, every solution for I can be transformed into a strategy profile for B by assigning each chosen set W k to one player i by setting s i = {t W k }. Again, the social welfare and the number of covered elements are equal. Therefore, the problems of finding an optimal solution for B and finding an optimal solution for I is equivalent.
If the sets of strategies S i correspond to bases of some matroid (with the tasks as elements), the optimal solution for a budget game can be approximated up to a constant factor, since computing an optimal solution corresponds to maximization of a submodular monotone function. A function g : For budget games, the function mapping the set of tasks chosen by the players to the social welfare has these properties. Nemhauser et al. [9] proved that greedy maximization yields an approximation factor of 1 − 1 e . In our case, this means always picking the task (out of all) with the highest utility next. The resulting strategies are then valid, provided the number of tasks in each is not too large. Feige [2] showed that there is no better approximation algorithm for the maximum set coverage problem unless P = NP. Therefore, we conclude the following result.

Standard Budget Games
A (standard) budget game does not always possess a NE. In addition, the question whether a given game instance has at least one NE is NP-hard.
Theorem 4.1. To decide for a budget game B whether it has a NE is NP-complete.
Proof. Given B and a strategy profile s, we can verify if s is a NE in polynomial time. Therefore, the problem is in NP. We prove that it is NP-hard by reduction from the exact cover by 3-sets problem. Given an instance I = (U, W) consisting of a set U with |U| = 3m and a collection of subsets W = W 1 , . . . , W q ⊆ U with |W k | = 3 for every k, the question whether W contains an exact cover for U in which every element is covered by exactly one subset is NP-hard. We create a budget game . . , q, A, B, C, D. The players 1, . . . , q correspond to the sets in W. We introduce the following resources and budgets. The actual values for γ and δ will be defined later on.

Resource
r j , j ∈ U r e,i , i ∈ [q] r f r aux r aux r 1 r 2 r 3 r 4 r 5 r 6 Budget 1 8 /3 100 100 γ 5 10 10 5 10 15 Finally, we list all demands which are not 0. A sketch of the resulting game can be found in Figure 1.
Basically, our game consists of two smaller ones. The first involves the players 1, . . . , q and is based on I, the other revolves around A, B and C and is mostly constant. Player D forms a connection between the two games. The fact whether I has a solution determines how the NE in the first game looks like. If I can be solved, there is a NE which causes D to participate in the first game. This in turn is necessary for the existence of any NE in the second game and therefore for the existence in B as a whole. We start by analyzing the first game. Each player i = 1, . . . , q has the decision between t i 0 and t i 1 . Choosing t i 0 corresponds to picking the set W i as part of a solution for I. If the three resources connected to t i 0 are not covered by any other task, the utility of player i is 3. Otherwise, it is at most 5 2 = 1 + 1 + 1 2 . This is already the case when one of the three resources is covered by only one other task. Since the utility of t i 1 is always greater than 5 2 , a player has no incentive to choose t i 0 unless he receives the full budget of the three connected resources. If there is an exact cover in I, it consists of m sets. This leaves q − m players to pick the task t i 1 . On the other hand, if m players choose the task t i 0 , then they represent an exact cover. For player D, the utility of t D 1 is 100 plus his share of the budgets of r e,i . For q −m players picking t i 1 , this share is α := (q−m) b 2 1000 +mb. For one additional player, the share decreases to β := (q−m+1) b 2 1000 +(m−1)b. We pick γ such that it has the property α > γ > β. Then we choose δ > 100(β−γ+100) γ−β . One can verify that with these values, player D will only pick the task t D 1 if he has to share the resource r e with q − m other players. As mentioned before, this is equivalent to I having an exact cover. Now consider the other half of our game. If player D picks the task t D 0 , his demand on the resource r f is so high that the tasks t A 0 , t B 0 and t C 0 hardly profit from r f . Intuitively speaking, for the players A, B and C, the resource r f almost does not exist. This prevents any stable state, as there is always one of the three players who can improve its utility by switching its strategy. We conclude that the existence of a Nash equilibrium is equivalent to I having an exact cover.
As a finite strategic game, every budget game has a mixed Nash equilibrium. It is also a basic utility game and from [11] we know that the price of anarchy is at most 2 for this class of games. If a budget game has a NE, this upper bound applies as well. We can get arbitrarily close to it as shown in the following example. optimal solution is the strategy profile opt = (t 1 0 , . . . , t n 0 , t n+1 ) with a social welfare of n · ( 1 n+1 − ε) + 1. The only NE is s = (t 1 1 , . . . , t n 1 , t n+1 ) with a social welfare of 1.

Ordered Budget Games
We now turn to an extension of budget games namely ordered budget games that take into account chronological aspects. Note that ordered budget games are not strategic games as the utility of a player does not only depend on the strategy profile but also on the order in which they made their choices. For ordered budget games, the social welfare function is a potential function. Since every strategy change by a player (or a coalition of players) does not decrease the utility of the remaining players, it is easy to observe that every improvement step by a player (or a coalition of players where every player improves his utility) increases social welfare.
Corollary 5.1. The social welfare function is a potential function as every improvement step of a player increases social welfare.
Using this insight we derive a simple method to compute a strong equilibrium.

Theorem 5.2. A strong equilibrium can be computed in time O(n).
Proof. A (strong) equilibrium can be computed in time O(n) by inserting players one after the other. In the resulting state, no player has an incentive to deviate from its strategy as long as the players which have been inserted before him play the strategy they chose when they were inserted.
Thus, computing both Nash and strong equilibria can be done in polynomial time. However, if we consider super strong equilibria, the situation is different. We show that finding such a state is NP-hard. Proof. We prove the theorem via a reduction from the monotone One-In-Three 3SAT problem. Given is a set U = {x 1 , . . . , x n } of variables and a collection C of clauses over U with |c| = 3 for each c ∈ C. In this context, monotone implies that no c contains a negated literal. We therefore call the literals just variables.
We construct an ordered budget game B = (N , R, (b r ) r∈R , (S i ) i∈N , (u i ) i∈N ) from the sets U and C. Every variable x i ∈ U defines a player i ∈ N with T i = {0 i , 1 i }. Every clause c j ∈ C defines two resources r j,0 , r j,1 ∈ R with b j,0 = 2 and b j,1 = 1. S i = T i for every player i. The demands are defined as Set the remaining demands 0 i (r j,1 ) and 1 i (r j,0 ) to 0. Let k i be the number of clauses the variable x i occurs in. Then each task of i has a demand of 1 on k i many resources and a demand of 0 on all others. The highest utility the player i can obtain is also k i . If there is a satisfying truth assignment φ for C, then each player can obtain this individual maximum. If φ(x i ) = 0, let player i choose strategy 0 i , otherwise 1 i . φ has to one-in-three property, which means that in each clause, only one variable is set to 1. Thus, every resource r j,1 is covered by exactly one task 1 i and every resource r j,0 by exactly two tasks 0 i1 and 0 i2 . No resource experiences a demand higher than its budget, therefore the order of the tasks is not important here. In this case, the social welfare achieves a value of i∈N k i . If there exists a strategy profile with this social welfare in B, then it induces in turn a satisfying truth assignment φ for C. Note that if such a strategy profile exists, it is also the only super-strong equilibrium of the game. In each other state, all players can form a coalition to collectively assume this strategy profile without reducing their utility. Therefore, computing a super-strong equilibrium for B determines whether C can be satisfied or not.
Since the optimal solution of an ordered budget game is a NE and even a super-strong equilibrium, we obtain the following bound on the price of (super strong) stability.
Corollary 5.4. The price of (super strong) stability of ordered budget games is 1.
For the price of anarchy we obtain the following, nearly tight bound.
Theorem 5.5. For every ordered budget game, the price of anarchy is at most 2. For every ε > 0, there exists an ordered budget game with PoA = 2 − ε.
Proof. We begin by upper bounding the price of anarchy of an ordered budget game B. Let (s, ≺) be a NE of B and s * be the strategy profile with the maximal social welfare. Note that the ordering of the players is irrelevant for the social welfare. To simplify notation we will use s and (s −i , s * i ) as a shorthand for (s, ≺) and ((s −i , s * i ), ≺ ) with ≺ the new ordering as defined in Section 2. We can lower bound the social welfare of a NE s as follows.
Observe that (1) follows from the Nash inequality and (2) from the definition of the utility functions. In (3) we partition R into R 1 and R 2 where R 1 contains all resources with at least one task that evaluates the min statement to the second expression. That is there is a i ∈ N and a t ∈ s * i with u t,r (s * ) > b r − i =i t ∈s i u t ,r (s). Adding i∈N u i (s) to both sides at (4) shows that the price of anarchy is bounded by 2.
For a lower bound, consider the game . Set the demands to t 1 1 (r 1 ) = b, t 1 2 (r 2 ) = b(1 − ε), t 2 (r 2 ) = b and all others to 0. Set S 1 = {{t 1 1 , }, {t 1 2 }} and S 1 = {{t 2 }}. In the optimal solution, the social welfare is If player 1 is inserted first, his best response is to open task t 1 1 . This leads to a NE in which the utility of player 2 is 0 and the price of anarchy 2 − ε. B can be extended to n players by using n 2 instances of the two-player version. In contrast to the fact that one can easily construct an equilibrium in n steps by inserting players one after the other, the situation is different when starting in an arbitrary situation. We now study the dynamic that emerges if players repeatedly perform strategy changes that improve their utilities. This may also lead to situations in which a resource is simultaneously newly allocated by two tasks of different players which necessitates the existence of a tie-breaking rule. We introduce two tie-breaking rules which guarantee that the game still converges towards an equilibrium. For an ordered budget game B, let p : N → N be an injective function that assigns a unique priority to every player i. Whenever simultaneous strategy changes occur, they are executed sequentially, in decreasing order of the priorities of the players involved. This corresponds to setting t 1 ≺ r t 2 for all resources r and all pairs of tasks where the priority of the player with t 1 was higher than the priority of the player with t 2 . For p fix , the priorities are fixed. For p max , they change over time, with p max (i 0 ) > p max (i 1 ) if u i0 (s) > u i1 (s) for the current strategy profile s. Any ties may be broken arbitrarily.
Theorem 5.6. Let B be an ordered budget game which allows multiple simultaneous strategy changes. If B uses either p fix or p max to set the priorities of the players, then it reaches a NE after finitely many improvement steps.
Proof. Let s be the current strategy profile B and − → u (s) ∈ R n ≥0 the vector containing the current utilities of all players. We Since the utility vectors are strongly monotonely increasing, but bounded by the vectors containing the maximal utility of each player, a NE is reached after finitely many steps.
For the following, we assume that p fix is used as tie-breaking rule and that the priority of a player corresponds to her index. We show that the number of improvement steps towards an equilibrium may be exponential in the number of players, even if the number of strategies per player is constant.
Theorem 5.7. For any n, there is an ordered budget game B n with polynomial description length in n and a strategy profile s 0 so that the number of best-response improvement steps from s 0 to any NE s of B n is exponential in n.
Proof. We give a recursive construction of the game B n . B n contains the game B n−1 , for which there is exactly one path of best-response improvement steps of length O(2 n−1 ). B n−1 is executed once. Then it is reset to its original state and executed once more along the same path. In the end, B n has reached a NE after O(2 n ) steps. Each player has only two tasks and as a strategy, she can choose one of them, i. e.
Labeling the strategies of player i with 0 i and 1 i , each strategy profile can be written as a binary number. The initial strategy profile s 0 can be regarded as 0 and the first execution of B n−1 counts up to 2 n−1 − 1. The reset of B n−1 corresponds to increasing that value by 1 to 2 n−1 and the second iteration of B n−1 continues counting up to 2 n − 1. In the final state of B n , every player i plays strategy 1 i . Since the strategies contain only single tasks, the ordering of these tasks on the resources is also an ordering of the players and we can abuse notation and say i 1 ≺ i 2 for players i 1 and i 2 if t 1 ≺ r t 2 holds for any pair of tasks t 1 ∈ T i1 and t 2 ∈ T i2 and any resource r.
In the following construction, for any pair of task t and resource r, t is either fully connected to r or not connected to r at all. Thus, t(r) is either b r or 0. In the following, connecting a task t to a resource r means setting t(r) := b r .
We need a few new notations for our proof. The only NE that is reached in our construction is the state where every player i plays strategy 1 i and in which the players reach their final state in descending order, i. e. i 1 ≺ i 2 for i 1 > i 2 . Let p i n be the utility of player i in that NE for B n . For the ordered budget game B n , let s n 0 be the initial strategy profile in which it is started. Let i 1 ≺ i 2 for i 1 > i 2 in s n 0 . Intuitively, this means that players with a higher index get prioritized.
In s n 0 , we set aux n ≺ n and initially, her strategy is {t auxn 0 }. We connect t aux 0 to r i 5 for all i ∈ {1, . . . , m}. Now, this auxiliary player starts the game with a utility of m i=1 p i n−1 + 2m. We also connect t aux 1 to r auxn and to all resources r i 3 for i ∈ {1, . . . , m, n}. Finally, for every player i = 1, . . . , m, we connect r i 4 to t i 0 , r i 4 to t i 1 and r i 5 to t i 1 . For player n, we establish these connections the other way around, such that r n 3 is connected to t n 0 and r n 4 to t n 1 . Again, the effects of r i 3 and r i 4 regarding B n−1 cancel out. Only when every player i in B n−1 plays strategy {t i 0 } and player n plays strategy {t n 1 }, the auxiliary player will change to t aux 1 and obtain a utility of m i=1 (p i n−1 ) + 2m + 1. This frees the budget of all resources r i 5 and the utility of every task t i 1 in B n−1 is increased by the same amount we increased the utility of t i 0 in the first part of the construction. The game B n−1 is executed once more, only the player n remains idle. When all players i are playing strategy {t i 1 }, B n has reached a NE.
Thus, together with the auxiliary players we get a total of 2 · n − 1 players in B n . and the number of steps to reach the NE is at least 2 n − 1. At the same time, the number of tasks and resources is polynomial in n.