Asymmetrization of a Set of Degressively Proportional Allocations with Respect to Lexicographic Order. An Algorithmic Approach

: In the case of the proportional allocation of goods and burdens, the shares of all agents with respect to their values are equal, i.e., they form a constant sequence. In a degressively propor ‐ tional allocation this sequence is nondecreasing when agents are increasingly ordered according to their values. The division performed according to this principle is ambiguous, and its selection re ‐ quires many negotiations among participants. The aim of this paper is to limit the range of such negotiations when the problem is complex, i.e., the set of feasible solutions has high cardinality. It can be done thanks to a numerical analysis of the set of all feasible solutions, and eliminating allo ‐ cations favoring or disfavoring some coalitions of agents. The problem is illustrated by the case study of allocating seats in the European Parliament in its 2019–2024 term.


Introduction
The problem of allocation of gains and burdens emerges in many aspects of social life. Local government entities and management boards of large corporations decide about fair distribution, while entire societies participate in general elections to allocate seats in collegial bodies to their representatives. In most cases the fair allocation depends on the values representing the respective participants in the division. Those values are sometimes called entitlements and are typically expressed by numbers. For example, when dividends are paid, the entitlements are specified by the numbers of shares held, and in the example of apportioning seats in the US House of Representatives to individual states, the entitlements are their populations.
A natural and widely applied principle of fair distribution is the rule of proportionality that originated from Aristotle. According to this principle, the share of each agent in the distributed good should be equal to the quotient of its value to the total value of all contenders. This principle functions well when the values of all agents differ moderately. When these differences are considerable, applying proportional division is likely to marginalize the contenders characterized by the smallest values. In practical cases, the common good of all agents implies that the contenders with the largest shares give up some part of their entitlements resulting from the proportionality principle for the sake of those agents whose values are smallest.
One such approach is degressively proportional allocation. In degressively proportional allocation, goods or burdens are divided among the participants of the division according to their entitlements, so that the higher entitlement agents receive several goods no lower than agents with lower entitlements. At the same time, their numbers are limited, i.e., the ratio of the number of goods received to the entitlements of the larger entitlement agent must not exceed the ratio for the smaller entitlement agent. Given the sequence of contender values and a generally defined principle, a problem appears because there is no unique solution, as many different allocations satisfy the above-mentioned inequalities.
This paper presents a new approach to the problem of degressive proportionality. The authors do not try to indicate one concrete solution, but instead focus on a reduction of the set of all feasible allocations. Such an approach is motivated by assuming that when no legislative indications are available to perform the allocation, then a solution is chosen by means of negotiations among those participating in the division. This is the case of how the seats in the European Parliament are allocated.
So far there is no consensus as regards the application of a replicable rule to find the composition of this collegial body. The allocation of seats in successive terms has always been a result of political negotiations. In this context, it is important to know how many possible solutions are available to negotiators for their choice. The fewer the feasible solutions the better the review of possible variants and therefore, the more rational the choice.
To realize this idea, first of all, a LaRsa algorithm [1,2] was applied to find all possible allocations for the 2019-2024 term. The number of all possible allocations was more than 122 million.
Next, the criterion of searching the set of those allocations was specified as favoring or disfavoring a fixed set of agents by given allocation. Favoring and disfavoring are defined here in a similar way to the theory of cooperative games. One assumes that individual agents join a coalition in a fixed order, and they are allocated the maximal number of seats that is available at that time. This implies that a given allocation favors the ordered sequence-the permutation of agents-if it is the maximal element of all possible allocations which are lexicographically ordered with respect to this permutation.
A similar assumption is made for disfavoring-the only difference is that the agents obtain a minimal number of seats at that time. This implies that a given coalition disfavors some fixed permutation of agents if it is the minimal element of all possible allocations, ordered lexicographically with respect to this permutation.
In general, the problem can be brought down to an analysis of the set of all possible permutations. However, it turns out that the constraints resulting from the conditions of degressive proportionality allow this problem to be solved in a reasonable time frame. Implementing the algorithm presented in the paper, despite the high complexity of the problem, made it possible to find all maximal and minimal elements, and those permutations for which those elements are maximum (minimum) ones.
One may assume that such maximal and minimal elements are the hardest for negotiators to accept. Agents are not eager to accept a solution that is the least advantageous for them or that is the most advantageous for another agent. For this reason, by eliminating minimal and maximal elements for all permutations of agents from the set of all feasible solutions, the set under negotiation becomes reduced, with no harm to the choice of a desired solution. This reasoning leads to the exclusion of symmetrical allocations from all allocations, with respect to the order relation subsets, because max min for ⊂ ℝ in lexicographic order. The iterative application of this procedure possibly, with respect to order relation, allows the determination of the most asymmetric subset of the set of all allocations, which, from the point of view of negotiations, is the set of allocations most easily accepted by all participants of the division. In the case of the composition of the European Parliament for the 2019-2024 term the reduction would be tens of thousands of elements of all feasible solutions. It might not be very impressive, but one should remember that the procedure of eliminating maximal and minimal elements can be rerun in subsequent iterations of the proposed algorithm. In addition, some information was gained about favoring and disfavoring sequential coalitions, i.e., that the joining of another agent does not change, respectively, the maximal or minimal element for the entire permutation. As a result, it is possible to determine the best solution of the allocation problem for each sequential coalition. In addition, each agent gains information about advantages and disadvantages of joining a given coalition in a given moment.
A similar procedure of the selection of the set under analysis into favoring and disfavoring elements and neutral elements by means of lexicographic orders has been used in papers from the areas of bargaining games [3,4], cooperative matching games [5] and sequential forward selection [6]. The method presented in this paper is different from the methods presented in the mentioned papers, because it does not require the objective function or other data besides the set of elements under analysis.

Problem Statement
In this section, we will formally define the analyzed problem. . We will say that one feasible element from set is not less than another element from this set in the relation of lexicographic order under a specific sequence of entities, if the vector of the first element is lexicographically not less than the vector of the second element with respect to this sequence.

Definition 1. (The lexicographic order regarding the permutation )
, Lexicographic relation is a relation of linear order-any two elements of are in relation. Hence each of these relations has got exactly one maximum and one minimum, i.e., the maximal (minimal) element, whereas one element can be the maximal (minimal) element for the relations determined by different permutations.

Definition 2. (Maximal and minimal elements with respect to given permutation) The maximal element for the relation will be denoted by and defined as follows
The minimal element for the relation π will be denoted by S and defined as follows ∈ ⇔ ∃ ∈ : ;

∖ ∪
The set includes elements from set , which are neither maximal nor minimal with respect to no permutation. During negotiations aimed at the selection of one division out of all feasible solutions, no agent will accept the allocation of the minimal number of goods available or the allocation of the maximal amount to another agent. In this case, can be interpreted as a set of allocations which does not favor or disfavor any sequential coalition of agents, so these allocations are more acceptable than elements of sets and . The set can be a basis for efficient and reduced negotiations under transparent and equal conditions for all participants in division.
It should be emphasized that the sets and are symmetrical to each other: the equation holds, and therefore the determination of the set consists of reducing this set by the symmetrical subset ∪ ∪ . Searching for a set of neutral elements can therefore be interpreted as a kind of asymmetrization of the set . The iterative applying of the procedure described in the article, as mentioned earlier in the introduction, thus leads to reducing the set of all allocations to the most asymmetric set of allocations possible.
The method described in this paper was developed for applications with set of degressively proportional divisions with lexicographic order. It has to be mentioned that it can also be, without any changes, applied when is any subset of ℝ with lexicographic order. Moreover, the algorithms presented in the paper can be easily modified for any order different than lexicographic. More precisely, it is enough to modify only four of them: SMAX, SMIN, LEXORDMAX and LEXORDMIN (wherein SMIN and LEXORDMIN are similar to SMAX and LEXORDMAX.

Methodology
Finding the set of maximal (minimal) elements by searching all possible permutations is complex and not efficient, because the number of all permutations is n!. To reduce the number of considered permutations, one may recursively construe subsequent subsets of set formed by the vectors whose determined coordinate, in terms of a given sequence, has got the maximal (minimal) possible values. The more coordinates considered, the smaller the number of elements in subsequent sets. When the generated set is one element set, further iterations are unneeded. Thus, adding another agent to the generated arrangement of agents does not affect the maximal (minimal) element of the relation. Let us introduce the following notation. Let be any subset of the set , then We can also define recursively family of sets Of course, for every , 1 , … , ∅ and this family is descending.
Analogically, we can define family of sets In a similar way, for every , 1 , … , ∅ and this family is descending. As a result, Proposition 1 immediately follows.
To generate the set of favoring (disfavoring) elements, it suffices to iteratively divide the set , concluding with one-element sets, and then to take their sum. By assigning truncated permutations to maximal (minimal) elements, the identification of favoring and disfavoring sequential coalitions is achievable. The elements which are truncated in this procedure form the set of neutral elements.
The idea of the proposed algorithm to split the set into the set of favoring, disfavoring and neutral elements, which can be illustrated by the following example. Table 1 presents the set , , … , with maximas for every coordinate in every vector (marked by overlines) and minima (marked by underlines). The subsets are a result of splitting for maximal elements in regard to one coordinate.
is the maximal element for the orders determined by permutations starting with 1, for the orders determined by permutations starting with 2 and for the orders determined by permutations starting with 3. In this case, considering the orders determined by permutation starting with 5 is redundant, as the set 5,1 will be equal to the set 1 , 5,2 to the set 2 and so on. The sets 4,1 , , 4,2 , and 4,3 remain to be considered, and in the third iteration we get 4,1,2 , 4,1,3 , 4,2,1 and 4,2,3 . The set of favoring elements is the sum of those one-element sets, i.e., , , , , , }. In the same way, we can obtain set , , , , , , .  3  3  3  3  3  3  3  3  3  3  3 The set of neutral elements is formed by elements which are not assigned to none of these sets, i.e.,

Algorithms
This section describes the algorithms which determine the set of favoring and disfavoring elements and their corresponding truncated permutations. It also describes an algorithm which determines a set of neutral elements. So as to handle the potential size of the input set under analysis, these algorithms employ the concept of stack and a map in the form of a rooted tree graph. The main algorithms are Algorithm 1 (whose components are Algorithms 2 and 3) for favoring elements, Algorithm 4 (whose components are Algorithms 5 and 6) for disfavoring elements and Algorithm 7 (whose component is Algorithm 8 and also uses the results of Algorithms 1 and 4) for neutral elements. It can be seen that Algorithms 1 and 4 work symmetrically: the procedure for finding the minimal, with respect to lexicographic order, elements of the set X of all allocations is identical to the procedure for finding its maximal elements, except that the inequality in the corresponding conditional statements changes. Moreover, equality holds, so multiplying all the elements of the set of all allocations by -1 makes the result of Algorithm 6 for the set the same as result of Algorithm 3 for , but with the opposite sign. Complete descriptions of the algorithms are presented in Appendix A.
In the whole of Section 4 and also in description of the algorithms, we will use the following notation. Let 1,2, … , as previously be the set of indices and let ∈ Π be some permutation of . By we denote a truncation of permutation and by we denote extension of by index ∈ which is not an element of . Moreover, for every we denote by the set of all elements favoring (in algorithm LEXORDMAX) or disfavoring (in algorithm LEXORDMIN) truncated permutation .  This algorithm returns a set of all elements from that favor at least one coalition and sets of coalitions favored by individual elements. The output from the LEXORDMAX algorithm is employed here. Given a truncated permutation LEXORDMIN algorithm divides the stack into (not necessarily disjointed) stacks of elements, which disfavor the permutations , … , , where , … , are indexes from the set , which are not elements of permutation . The algorithm returns triplets of the form , , , where is a stack of elements disfavoring the permutation and is its cardinality. This algorithm employs the output from the SMIN algorithm.

STOP.
The NEUTRAL algorithm returns a stack of neutral elements from stack . Running this algorithm requires outputs from all the algorithms described above.

Case Study
The increased interest in degressively proportional allocation, and thereby the growth of research concerning it, has been occurring since 2007, when the Treaty of Lisbon introduced the principle as a basis of allocating mandates in the European Parliament among the member states [7][8][9][10][11][12][13]. In it, the populations of the respective countries are assumed as their values or entitlements. Moreover, in addition to the total number of seats in the European Parliament, which is a natural element of any allocation, this act of law also specifies the so-called boundary conditions of allocation, i.e., the minimal and maximal numbers of seats which can be allocated to the most and least populated countries in the European Union. In this variant, the problem is reduced to only integer allocations under given boundary conditions. Nevertheless, there may be many feasible solutions.
The research into degressive proportionality is markedly carried out in two threads. The first one draws on standard solutions applied in cases of proportional integer allocations [14]. One assumes that the condition of degressive proportionality has to be met before merely rounding to integers [15][16][17][18][19]. The second thread builds upon approaching the rule in its literal wording, and thereby it is assumed that the sequence which performs a given allocation must be degressively proportional [20][21][22][23]. In this case, a numerical analysis of the set of all feasible solutions plays an important role. The paper [1] introduces an algorithm, LaRsa, that allows the generation of such a set for the problem of allocating the seats in the European Parliament. Therefore, the complete analysis of the problem and the choice of one solution according to the predefined criterion are enabled (see also [2] 10341330, 10445783, 10793526, 11289853, 17235349, 19759968, 37967209, 46438422,  61302519, 66661621, 82064489). The data on the populations of the member states (without the United Kingdom), i.e., the terms of the sequence , , … , were acquired from the Eurostat, while the minimal and maximal numbers of seats, that can be assigned to particular country are given by the Treaty of Lisbon, and are equal to 6 and 96, respectively. Furthermore, after Brexit, ℎ 705.
The implementation of the algorithm presented in this paper allowed, despite the high computational complexity, the determination of all maximal elements and their permutations. Thus, defining the best solution is possible for each sequential coalition. Furthermore, each agent gains information about the gains from joining a given coalition in a certain moment, as well as about sequential critical coalitions.
The result was 2455 favoring and 19,786 disfavoring elements in the set of all allocations. Corresponding to these allocations were 42,613 favoring sequential coalitions and 269,023,606 disfavoring sequential coalitions.
Below we present an additional analysis of the set of all favoring and disfavoring sequential coalitions for permutations that did not start from Luxembourg, from Italy or from France. The reason for omitting these coalitions is the number of these coalitions, which causes high complexity in the problem. For example, there were 213,968,740 disfavoring sequential coalitions started from Italy, France and Luxembourg. The analysis of such a large number of sequential coalitions, unfortunately, exceeds our current hardware capabilities.
In every division (favoring, disfavoring or neutral), Slovenia received the same number of seats as Latvia. Similarly, the same amount of goods were received by the set consisting of Slovakia, Denmark and Finland and the set consisting of Greece, Czech Republic, Portugal, Sweden and Hungary. The set of all allocations of parliamentary seats was thus insignificantly reduced (by less than 1%). However, it should be noted that the algorithms presented in this paper, if run many times, significantly reduce the set of all feasible allocations.
The number of divisions favoring and disfavoring at least one n-element critical coalition (due to n) is presented in Table 2. The smallest favoring sequential coalition in the analyzed set was formed by one country. There was only one such coalition, formed by Romania. There were no coalitions disfavoring only one country. The smallest disfavoring sequential coalition was formed by two countries, and there were 23 coalitions of this type. The largest favoring sequential coalitions were formed by twelve member states. There were 12 coalitions of this type. Luxembourg, Cyprus, Estonia and Ireland were present in all of them. The largest disfavoring coalitions were bigger: every one of them was formed by fifteen member states. There were 14,700 coalitions of this size. The most frequent favoring sequential coalitions were formed by nine and ten countries, and the most frequent disfavoring sequential coalition was formed by ten countries. There were 4710 favoring coalitions consisting of nine and 4710 favoring coalitions consisting of ten countries and 13,337,745 disfavoring coalitions consisting of ten countries. Moreover, one can notice that the distribution of the number of disfavoring coalitions with respect to size is symmetrical (with a 10-member coalition at the middle), while same distribution for favoring coalitions is strongly left asymmetrical. Table 3 shows the number of favoring and disfavoring sequential coalitions in which each country participated. Estonia participated in the greatest number of favoring sequential coalitions. This country was a member of 26,526 favoring sequential coalitions. Cyprus participated in the greatest number of disfavoring coalitions, which was 42,013,166. Slovakia, Finland and Denmark were countries which participated in the smallest number of favoring sequential coalitions. Each of these countries was a member of 1739 such coalitions. The countries which participated in the lowest number of disfavoring coalitionswhich was equal to 7,891,381-were Hungary, Sweden, Portugal, Czech Republic and Greece. Since the number of coalitions favored or disfavored by single division changes from one to 1,703,731, we do not present table with data used in analysis below.
There are five favoring divisions of 630 coalitions that is the greatest number of coalitions favored by a single division. Furthermore, 325 divisions favor just one coalition. The greatest number of sequential coalitions disfavored by one division was 1,703,731just one division disfavored such several coalitions. Similarly, just one division disfavored one sequential coalition. The most frequent number of coalitions that were disfavored by one division was 7-there were 840 divisions with this property.

Conclusions
Due to the potentially high cardinality of the set of acceptable (feasible) solutions, the use of the degressive proportionality principle could be a complex problem. So far, none of the allocation rules developed on its basis has gained universal acceptance, and therefore, in every case of its application, such as the allocation of seats in European Parliament, allocation is made through negotiations. If one assumes that the preferences of n participants of the allocation are represented by their lexicographic ordering, then the number of variants to be considered is equal to !. The implementation of the algorithms presented in the paper allows, thanks to the sequential elimination of solutions that are difficult to accept in negotiations, for a significant reduction of the allocation variants necessary to be considered, making the negotiations more effective. Taking advantage of the fact that in the case of the allocation of seats in the European Parliament, in addition to the assumption of degressive proportionality, the boundary conditions of this allocation are also defined, it is possible to reasonably limit the computation time measured by the number of elementary operations. As a result, negotiations aimed at obtaining an allocation under fully transparent and equal circumstances are possible.
The big advantage of the described approach is the possibility of applying it, without any changes, for any set of allocations with lexicographic order, not necessarily degressively proportional. Moreover, after modifying four (in practice, two) algorithms, it is also possible to reduce the set of allocations with any order other than lexicographic.
Moreover, in the problem of allocating seats to the European Parliament, the implementation of the presented algorithms allows, in a reasonable time and without the use of supercomputers, computing clusters, etc., the determination of all favoring and almost all disfavoring sequential coalitions. In practice, this means that a participant in the allocation receives information about the effect of joining an existing sequential coalition has on the allocation of seats.
Moreover, the number of favoring and disfavoring sequential coalitions containing given participant of the allocation, proves its importance among all participants, because remaining outside such coalitions means no influence on the allocation made. In the analyzed case, the mentioned sequential coalitions are not very large. Only in two cases did they exceed half of the total number of participants in the allocation. It follows that in this case, almost always less than half of the participants determine the entire allocation. Because of this, in the perspective of forthcoming research, analysis of allocations which favor or disfavor the sequential coalitions of agents makes it possible and effective to approach the problem of degressively proportional allocation as an issue that can be considered as a concept similar to the concept of Shapley values known from the area of claims problems.  Data Availability Statement: Publicly available datasets were analyzed in this study. This data can be found here: https://ec.europa.eu/eurostat/web/population-demography/demography-population-stock-balance/database accessed on 14 July 2021.

Conflicts of Interest:
The authors declare no conflict of interest.