The Integer Nucleolus of Directed Simple Games: a Characterization and an Algorithm

We study the class of directed simple games, assuming that only integer solutions are admitted; i.e., the players share a resource that comes in discrete units. We show that the integer nucleolus—if nonempty—of such a game is composed of the images of a particular payoff vector under all symmetries of the game. This payoff vector belongs to the set of integer imputations that weakly preserve the desirability relation between the players. We propose an algorithm for finding the integer nucleolus of any directed simple game with a nonempty integer imputation set. The algorithm supports the parallel execution of multiple threads in a computer application. We also consider the integer prenucleolus and the class of directed generalized simple games.


Introduction
The nucleolus is a popular solution concept for cooperative transferable-utility (TU) games because it is a set of game outcomes that are in a sense most acceptable "... as a compromise between the players" (Schmeidler [1], p. 1163).A cooperative TU game is a pair (N, v) =: Γ, henceforth called a game, with a finite set N := {1, . . ., n} of n (≥ 2) players and a coalition function v : 2 N → R, v(∅) = 0.For every payoff vector x ∈ R n and coalition S ⊆ N, let x(S) := i∈S x i .If S ⊂ N, S = ∅, we denote the excess of coalition S at x by e(S, x) := v(S) − x(S).This way, we can associate with each x ∈ R n the vector θ(x) of all 2 n − 2 excesses e(S, x), arranged in nonincreasing magnitude.The nucleolus of Γ with respect to a set X of feasible payoff vectors is the set N (Γ, X) := x ∈ X : θ(x) ≤ lex θ(z) for all z ∈ X of payoff vectors which minimize θ(x) lexicographically over X (cf.Schmeidler [1]), as if they were the outcome of an egalitarian arbitration among player coalitions (cf.Maschler [2], p. 611).Our choice for X will be the integer imputation set I(Γ) := x ∈ Z n : x(N) = v(N), x i ≥ v({i}) for all i ∈ N , under the condition that v(N) ∈ Z >0 .Thus, we assume that the players face an integer resource allocation problem in that v(N) comes in discrete units that cannot be broken apart.We call ν(Γ) := N Γ, I(Γ) the integer nucleolus of the game Γ.
A problem closely related to the integer nucleolus is that of finding minimum (or minimum-sum) integer representations of weighted majority games (cf.Peleg [3], Krohn and Sudhölter [4], Kurz et al. [5]).In Wolff and Karagök [6], the integer nucleolus is used to analyze the apportionment of ministries in the Swiss parliament.Fragnelli and Gastaldi [7] study the bankruptcy problem where the estate and the claims are integer, and compare integer versions of the Talmud solution to this problem with the integer nucleolus of the corresponding pessimistic bankruptcy game when there are two or three agents.It is interesting to note that Fragnelli et al. [8,9] suggest integer solutions to a bankruptcy setting that involves an integer estate, while the claims can be of any positive magnitude.An example is the assignment of emergency intervention units, when the claims are calculated in proportion to the size of the population or area to attend to, which, in turn, means that the characteristic function of an associated bankruptcy game may assume noninteger values.A bankruptcy-based model for the management of capacity-constrained integer resources in mobile radio networks is proposed in Lucas-Esta ñ et al. [10].Further examples of integer resources are college places, housing opportunities, livestock, or organs for transplant.Finally, when a sum of money is to be divided among a set of players, each smallest relevant money unit also is a whole object.
Since I(Γ) lacks convexity, ν(Γ) may contain multiple elements.The question arises in such a case whether the payoff vectors in ν(Γ) possess some common attributes, beyond the property that they all minimize θ lexicographically.A complementary practical question is how to compute ν(Γ).In general, ν(Γ) can be obtained by solving a sequence of integer linear programs, analogous to a suggestion by Maschler [2] (p.615) that is implemented in most of the studies compiled by Leng and Parlar [11] (p. 669): where A 0 := {∅, N}, while A i , i ≥ 1, is the set of coalitions with excess i < • • • < 1 for each optimal solution ( i , x) to ILP i (cf.Guajardo and Jörnsten [12] and Nguyen and Thomas [13]).For some k = κ, eventually 2 N \ {A 0 , . . ., A κ } = ∅, in which case ILP κ is solved by the set of pairs ( κ , x) with x ∈ ν(Γ).However, this is only a feasible procedure if n is small, since integer linear programs are usually much harder to solve than their continuous counterparts.The present article provides a characterization of ν(Γ) with respect to the class of directed simple games, and suggests an algorithm to compute ν(Γ) for this game class more efficiently, as long as I(Γ) is not too large.We focus on directed simple games because they have numerous applications-e.g., in economics, in political science, and in threshold logic (cf.Taylor and Zwicker [14] for literature references).
A simple game Γ t with t ∈ Z >0 is a monotonic game Γ, whereby v(S) ≤ v(T) if S ⊂ T ⊆ N, that satisfies v(S) ∈ {0, t} for each S ⊆ N, while v(N) = t.We denote by W (Γ t ) := {S ⊆ N : v(S) = t} the set of winning coalitions of Γ t .A simple game Γ t is called an ordered (or complete or linear) simple game, if it exhibits a complete desirability relation D on the players in the set N. It is called a directed simple game, if in addition 1 D • • • D n, without loss of generality.Given a game Γ, if i D j for two players i, j ∈ N, then player i is said to be more desirable than player j, in which case Player i is said to be strictly more desirable than player j, denoted by i D j, if i D j, while not j D i.The players are called symmetric-denoted by i ∼ D j-if both i D j and j D i (cf.Maschler and Peleg [15], Sect.9).The desirability relation may be hidden in the set of winning coalitions, and can then be computed with polynomial-time methods (cf.Aziz [16] and Aziz [17], Ch. 3).It may also be rooted naturally in the setup of the game.For example, consider a simple game Γ t that is a weighted majority game with a quota q ∈ R >0 and the weights w 1 , . . ., w n ∈ R ≥0 of the players, where q ≤ i∈N w i .Here, W (Γ t ) := S ⊆ N : i∈S w i ≥ q .Hence, i D j for two players i, j ∈ N whenever w i ≥ w j .We shall represent such a game by the tuple [q; w 1 , . . ., w n ; t], in brief [q; w; t], where w := (w 1 , . . ., w n ).Note that the desirability relation of an ordered simple game Γ t is strictly preserved by the counting vector c := (c 1 , . . ., c n ), where c i := S ⊆ W (Γ t ) : i ∈ S (cf.Lapidot [18,19]).Note also that the integer nucleolus ν(Γ) of any game Γ is nonempty and finite whenever I(Γ) = ∅.A characterization of ν(Γ t ) will now be derived in Section 2. The algorithm and a performance analysis follow in Sections 3 and 4. Section 5 provides an extension to the integer prenucleolus, and Section 6 concludes.

A Characterization of ν(Γ t )
We begin with two general properties of the integer nucleolus: Lemma 1.Let Γ be a game.If i D j for two players i, j ∈ N, then x i ≥ x j for each x ∈ ν(Γ).
Hence, a reallocation at x of one unit of payoff from player j to player i will result in an integer imputation that improves θ, a contradiction (note that the excesses of all coalitions which contain neither or both of the players i and j are not affected).Therefore, if i D j and x ∈ ν(Γ), then x i ≥ x j .Lemma 2. Let Γ be a game.If i ∼ D j for two players i, j ∈ N, then |x i − x j | ∈ {0, 1} for each x ∈ ν(Γ).

Remark 1.
Let Γ be a game, where i ∼ D j for two players i, j ∈ N. If x i = x j for x ∈ ν(Γ), and payoff vector z differs from x only in that the payoffs of players i and j are permuted, then z ∈ ν(Γ) by the anonymity (impartiality) of ν(Γ).
The following lemma and a subsequent corollary are our main theoretical result: Lemma 3. The integer nucleolus ν(Γ t ) of a directed simple game Γ t with I(Γ t ) = ∅ has a unique element, henceforth denoted by y, that weakly preserves D ; i.e., y Proof.By definition of a directed game, 1 D • • • D n.Then, because of Lemmas 1 and 2, Remark 1, and the nonemptiness of ν(Γ t ), a payoff vector like y exists.To prove its uniqueness, suppose for x ∈ I(Γ t ) that x = y and x 1 ≥ • • • ≥ x n .Denote by i the largest index j for which x j = y j .Hence, x j = y j for j > i.Without loss of generality, suppose ., e({i}, y) = −y i .Assume y i = 0.Then, x j = 0 if and only if j > i, in which case also y j = 0. Now consider any coalition S ⊂ N, S = ∅, with e(S, x) = 0.If S ∈ W (Γ t ), then x(S) = t, and thus x l = 0 for every player l ∈ N \ S. Since y l = 0 for each such player, y(S) = t and hence e(S, y) = 0.If S / ∈ W (Γ t ), then x k = 0, and thus y k = 0, for every k ∈ S, whereby also e(S, y) = 0.However, as e({i}, x) = −x i < 0, we conclude that θ(x) = θ(y).

An Algorithm to Compute ν(Γ t )
Given a directed simple game Γ t , denote by θ W the subvector of θ associated with the coalitions in W (Γ t ) \ N, and by P(Γ t This conclusion was brought to the author's attention through a valuable comment by J. Derks. for any two players i, j ∈ V(Γ t ), only one element of the set P(Γ t ) assigns the payoff t to coalition V(Γ t ), this element being y = (y + ), where y := t r denotes the largest integer that does not exceed t r , and s := t − ry.Thus, ν W (Γ t ) = {y}.
Next, suppose r = 0; i.e., V(Γ t ) = ∅.Take any x ∈ P(Γ t ), x = y, and denote by i the largest index j such that x j = y j .Accordingly, x j = y j for all j > i.Without loss of generality, assume x i > y i .As i / ∈ V(Γ t ), there exists a coalition S ∈ W (Γ t ) \ N, i / ∈ S, and hence N \ {i} ∈ W (Γ t ) by the monotonicity of Γ t .Consequently, e(N \ {i}, y) = y i .This excess may be obtained at x only by winning coalitions N \ T with T ⊆ {i + 1, . . ., n}, but then also at y. Since e(N \ {i}, x) = x i > y i , we obtain θ W (x) = θ W (y), and so The borderline case of a directed simple game Γ t with W (Γ t ) \ N = ∅ implies that W (Γ t ) = {N} = V(Γ t ), and thereby I(Γ t ) = ∅, as well as ν(Γ t ) = P(Γ t ) = {y} because of the symmetry of all players.The associated payoff vector y is determined by (3) for r = n.
Thus, if Γ t is a directed simple game and I(Γ t ) = ∅, we may search P(Γ t ) for y without reference to the coalitions not contained in W (Γ t ).In view of this observation, we now suggest an algorithm to compute the integer nucleolus of any such game.Since the elements of P(Γ t ) have independent excess vectors θ W , our algorithm can make the most of computing machinery that supports the parallel execution of multiple threads in an application program.Note for each x ∈ P(Γ t ) with x k > 0, ) parts in standard form.A fast generator of integer partitions in standard form and in anti-lexicographic order is procedure ZS1 by Zoghbi and Stojmenović [20] (pp.325-326).
To proceed, define the incidence vector 1 S ∈ {0, 1} n of any coalition S ∈ W (Γ t ) \ N in that 1 Si = 1 if and only if i ∈ S, and consider the auxiliary vector a S := (a S1 , . . ., a Sn ), where Hence, if x ∈ P(Γ t ) and x k > 0, x k+1 = 0, then a Sk players in coalition S receive a positive payoff.These players can be read off the auxiliary vector b S := (b S1 , . . ., b S|S| ), where b Si := index of the ith positive entry of 1 S , i = 1, . . ., |S|.
excesses hand in hand, we may be able to tell quite early how x ∈ P(Γ t ) compares to a current best status quo, say x * .Let Θ * := Θ(x * ), and suppose l is the first index i for which Θ * i > 0.Then, payoff vector x can already be discarded if any of the first l − 1 entries of Θ(x) has been detected to take a positive value or once Θ l (x) is known to exceed Θ * l .
Input: Directed simple game Γ t (assuming I(Γ t ) = ∅), p Output: (c, y) 4) and ( 5 x * (i) ← last x ∈ P(Γ t ) ; Θ * ← Θ(x * (i)) ; l ← smallest index j for which Θ * j > 0 FOR the ith to the 2nd last x ∈ P(Γ t ) STEP p DO k ← number of parts of t in x ; Θ ← (0, . . ., 0) This observation has been built into the computer pseudocode in Table 1.The code distributes most of the workload across a user-defined number p (≥ 1) of threads, in support of machines that can execute multiple threads in parallel (desktop applications will most often benefit from creating as many parallel threads as possible, unless |P(Γ t )| is small).On input, Γ t and p are passed to the main program LEXMIN that at first generates both n and t as well as the counting vector c, the set P(Γ t ), and the pairs (a S , b S ), S ∈ W (Γ t ) \ N.Then, it allocates memory for an array x * (1 : p) of p best status-quo payoff vectors, before invoking the thread functions LEXMIN1, . . ., LEXMINp.Each of them refers to a separate piece of code, such as the code for thread function LEXMINi.This function initializes x * (i), Θ * , and l, in terms of a most equal allocation of t across the players, and then enters into two nested loops.In an attempt to spread the computational burden evenly across the threads, the outer loop has been designed to pass over every pth element of the (ordered) set P(Γ t ), starting from element number i.For each resulting payoff vector x ∈ P(Γ t ) and underlying number k of parts of t, the inner loop computes the excesses associated with x and populates Θ(x).If in the course of these operations index t − h + 1 comes out less than l, or Θ * l is exceeded, then x will be discarded by a subsequent exit instruction.In the remaining cases, whenever Θ(x) is lexicographically smaller than Θ * , the elements of the set {x * (i), Θ * , l} are updated.Once all threads are completed, LEXMIN minimizes Θ lexicographically over the set of retained payoff vectors {x * (1), . . ., x * (p)} in order to obtain the unique argument y, and then the pair (c, y) is returned.Note that all relevant variables are considered as local to LEXMIN and its thread functions unless stated otherwise.
Remark 4. A payoff vector x ∈ P(Γ t ) can already be discarded if Θ l is seen to be no smaller than Θ * l , while Θ l+1 is known to be greater than Θ * l+1 , etc.This may serve to reject x more quickly, while the extra comparisons can have the opposite effect.
Remark 5.If a reallocation of a unit of payoff between players i and j is unfavorable, another such reallocation can be rejected, everything else being equal.We then do not have to trace Θ over the full set P(Γ t ), at the cost of an extended bookkeeping.Remark 6.One may want to exploit the occurrence of special categories of players (e.g., null players or vetoers), which imposes a search cost (cf.Aziz [16] and Aziz [17], Ch. 3, for the complexity of detecting player types).

Remark 7.
The coalitions S ∈ W (Γ t ) \ N have independent pairs (a S , b S ), which suggests a distributed execution of the second loop in LEXMIN.
Once y is known, we conduct a scan of the counting vector c for all subvectors (c i , . . ., c j ), where c i = • • • = c j and y i > y j , the range j − i being as large as possible.If no such subvector exists, then ν(Γ t ) = {y}, and we are done.Otherwise, given whichever pair (i, j) of matching indices, we retain all elements of ν(Γ t ) obtained earlier, as well as every payoff vector that can be derived from these elements by permuting the payoffs of the players i, . . ., j.

Input:
Directed simple game Γ t (assuming I(Γ t ) = ∅) and associated pair (c, y) The pseudocode program COMPL in Table 2 generates a corresponding sequence of approximations {y 1 , . . ., y m } to ν(Γ t ).On input, Γ t and the pair (c, y) are passed.To begin with, the program determines n and initializes ν(Γ t ).Then, starting from i = j = n, the program looks for the smallest i (< j) for which both c i = c j and y i > y j . 3Whenever a matching i is found, the program retrieves all permutations of the payoffs in (y i , . . ., y j ) from the respective permutation set, named B(i, j), and updates ν(Γ t ).In the following iteration, j is set to i − 1, and so on.The search ends if i ≤ 2, and then ν(Γ t ) is returned.Note that for each matching pair (i, j) the respective subvector (y i , . . ., y j ) of y takes the form (a, . . ., a, b, . . ., b), where b = a − 1.The set B(i, j) can thus be calculated with ACM Algorithm 152 (Nexcom) by Hopley [21], under the normalization a = 1.
For a generalized simple game Γ t , the monotonicity property is dropped, and it is not maintained that v(∅) = 0 and v(N) = t (cf.Carreras and Freixas [22], p. 153, and Taylor and Zwicker [14], p. 4).The desirability relation of a directed generalized simple game is also strictly preserved by the counting vector c.However, I(Γ t ) may have to be redefined as denoting the set x ∈ Z n : x(N) = t, x i ≥ v({i}) for all i ∈ N .The proof of Lemma 3 then remains valid, and hence statements analogous to Lemma 3 and Corollary 1 apply.The following result replaces Lemma 4: 3 As to the inner WHILE/DO loop in Table 2, we assume short-circuit evaluation of relational expressions.This means that the expression 'i > 1 and c i−1 = c j ' is marked to be false as soon as i = 1.Hence, no attempt will be made to access a nonexistent c 0 .Lemma 5. Let Γ t be a directed generalized simple game with I(Γ t ) = ∅.Suppose x, x ∈ P(Γ t ), x = x.Denote by i the largest index j for which x j = xj , where x i > xi without loss of generality.Then Proof.Assume {i} ∈ W (Γ t ), whereby i = 1, since Γ t is directed and I(Γ t ) = ∅.Hence, x j = xj for each player j ≥ 2. Since x 1 > x1 , it cannot be true that both x and x are contained in P(Γ t ).So, assume {i} / ∈ W (Γ t ).Consider any nonempty coalition S ⊂ N, S / ∈ W (Γ t ).Observe that x j = xj whenever j > i.Consequently, if e(S, x) > − xi or e(S, x) > − xi , and thus S ⊆ {i + 1, . . ., n}, then e(S, x) = e(S, x).Furthermore, if e(S, x) = − xi , and hence again S ⊆ {i + 1, . . ., n}, then also e(S, x) = − xi .Therefore, and since e({i}, Hence, if θ W (x) = θ W ( x) for two payoff vectors x, x ∈ P(Γ t ), we can always discriminate between them by inspecting the smallest payoff components by which they differ.The required adjustment of the code in Table 1 is straightforward.

Performance Analysis
The computational workload of the algorithm in Section 3 is mostly determined by the cost of finding y.In a worst-case scenario, if n ≥ t while there are no symmetric players, then Hall [23], p. for the asymptotic total number of payoff vectors that have to be considered.In another worst-case scenario, every coalition S ⊆ N, S / ∈ ∅, {2}, . . ., {n} , is winning, and the inner loop of each thread function then executes The algorithm has been applied on two personal computers to solve several samples of weighted majority games Γ t , where w := n i=1 w i is an odd sum of integer weights, and q = w+1 2 .The weights have been drawn from the interval [1, n] at random, in terms of uniform deviates as supplied by a system routine.The chosen order of the coalitions S ∈ W (Γ t ) \ N in the thread functions was from the smallest to the largest coalitions, with a lexicographic ordering of each group of coalitions of a size (cf.Example 4).One computer (machine 1) was equipped with a dual-core CPU Intel(R) Core(TM) i7-2620M, 2.70 GHz and the other (machine 2) with a quad-core CPU Intel(R) Core(TM) i5-760, 2.80 GHz .Both CPUs possess four logical processors, whereby p = 4.The algorithm's run-times were measured as the elapsed time when computing the solution of a given game from the pair (n, t) and the set W (Γ t ) \ N. Aiming at a performance improvement (albeit small), the main program LEXMIN in Table 1 was modified to take account of the suggestion in Remark 7.
Two samples of fifty games have been solved with machine 1.
In the first sample, (n, t) = (7, 300), whereas (n, t) = (10, 100) in the second.The average run-times per game were about four seconds (first sample) and about five seconds (second sample).Two samples of ten games have been solved with machine 2. In the first of these samples, (n, t) = (20, 30), while (n, t) = (20, 40) in the second.The average run-times were about two seconds (first sample) and about ten seconds (second sample).In comparison, the Gurobi(TM) [24] linear-programming tool (version 6.5.0, with default settings) needed between about 4 and 35 min, with an average of about 20 1  2 min, to complete only the first linear program of procedure (1) on machine 2 for the ten games where (n, t) = (20, 30).At this stage, just one element of a single game's integer nucleolus (of cardinality three) could be found.The tool used all available cores of the CPU.

Extension to the Integer Prenucleolus
If a simple game Γ t admits two or more winning single-player coalitions, then v(Γ t ) = I(Γ t ) = ∅.In such a case-or when the individual rationality of the game solution is not an issue-we may refer to the integer prenucleolus ν * (Γ t ) := N Γ t , I * (Γ t ) , where I * (Γ t ) := x ∈ Z n : x(N) = v(N) is the game's integer preimputation set with v(N) = t ∈ Z >0 .Note that ν * (Γ t ) is nonempty and finite.Lemma 6.Let Γ t be a simple game.If x ∈ ν * (Γ t ), then −1 ≤ x i ≤ t for all i ∈ N.
Proof.Take any x ∈ ν * (Γ t ) and let N − := j ∈ N : x j ≤ −1 .Observe that x ∈ I * (Γ t ), whereby N \ N − = ∅.Then, consider an arbitrary player i ∈ N: (a) Assume x i ≤ −2.Hence, i ∈ N − .Let Q := arg max ∅ =S⊂N e(S, x) and consider any coalition Q ∈ Q, whereby |Q| < n.Since Γ t is monotonic, N − ⊆ Q, and hence there must be a player k ∈ N \ N − , k / ∈ Q.Now take any coalition T ∈ arg max k∈S⊆N\{i} e(S, x).Suppose T = N \ {i}, such that e(T, x) = v(N \ {i}) − x(N \ {i}) ≤ t − (x(N) − x i ) = x i ≤ −2.Since e({i}, x) ≥ 2, a reallocation at x of one unit of payoff from player k to player i improves θ, and therefore x / ∈ ν * (Γ t ).Next, suppose T ⊂ N \ {i}.Observe that e(T, x) ≤ e(T ∪ {i}, x) + x i by the monotonicity of Γ t , and that e(T ∪ {i}, x) ≤ e(Q, x) by definition of the set Q. Consequently, e(T, x) ≤ e(Q, x) + x i ≤ e(Q, x) − 2. As i ∈ Q, we conclude that θ can still be improved at x by a reallocation of one unit of payoff from player k to player i.Thus again x / ∈ ν * (Γ t ), a contradiction.
Since none of the T-type coalitions can receive an aggregate payoff smaller than x(N − \ {k}) Therefore, a reallocation at x of one unit of payoff from player i to player k improves θ, which means that x / ∈ ν * (Γ t ), also a contradiction.
In all, it cannot be true that x ∈ ν * (Γ t ) and x i < −1 or x i > t for some i ∈ N. Lemma 7. Let Γ t be a generalized simple game.If x ∈ ν * (Γ t ), then −t ≤ x i ≤ t for all i ∈ N.
Proof.Take any x ∈ ν * (Γ t ).Note that part (b) of the proof of Lemma 6 does not depend on the monotonicity of Γ t or on the convention that v(∅) = 0.With I * (Γ t ) being redefined as denoting the set x ∈ Z n : x(N) = t , the assumption that v(N) = t is also not needed.Hence, x i ≤ t.Now assume x i ≤ −(t + 1).It then follows from x ∈ I * (Γ t ) that there must be a player k ∈ N with x k ≥ 1. Letting µ := max i∈S⊆N\{k} e(S, x) and τ := max k∈T⊆N\{i} e(T, x), we conclude-analogous to part (b) of the proof of Lemma 6-that µ − τ ≥ x k − t − x i ≥ 1 + x k ≥ 2. Consequently, a reallocation at x of one unit of payoff from player k to player i improves θ, which contradicts the assumption that x ∈ ν * (Γ t ).Therefore, if x ∈ ν * (Γ t ), then x i ≥ −t.
The following statement can be proved with methods similar to those used in Section 2 (cf. the proofs of Lemmas 1 and 2).The proof is thus omitted: Lemma 8. Let Γ be a game, and suppose x ∈ ν * (Γ).If i D j for two players i, j ∈ N, then x i ≥ x j .If i ∼ D j, then |x i − x j | ∈ {0, 1}.Remark 8. Let Γ be a game.If z is a payoff vector that differs from x ∈ ν * (Γ) only in that the payoffs of two symmetric players are permuted, then z ∈ ν * (Γ), analogous to Remark 1.