Achieving social and economic justice for its members is among the most cherished goals of a civilized society1. Fair division of society’s benefits (or burdens) is a long-standing, significant problem and is closely related to social and economic justice2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21. Fair-division problems seek to divide a valuable resource between multiple players based on a certain notion of fairness. Such problems have many practical applications, including international border settlements, divorce and inheritance settlements, allocation of shared computational resources22, and distribution of scarce medical resources (e.g., vaccines) with respect to pandemics, income and wealth redistribution, and tax policy. The fair-division problem is sometimes called the cake-cutting problem23, in which a single divisible good (represented by a cake) should be divided between multiple players fairly and efficiently.

The cake-cutting problem has attracted the attention of mathematicians, computer scientists, economists, and political scientists since the 1940s6,9,13,24,25,26,27,28,29,30. Various notions of fairness have been proposed to solve such problems5,11,31; of these, the most widely used are envy-freeness and proportionality29. Under envy-free division, no player should envy other players for their cake allocations. Under proportional division, each player should receive cake at least in proportion to certain criteria, such as 1/n (n is the number of players), contributions to the production of cake, or needs for the cake.

Since studies of the cake-cutting problem in the 1940s due to Steinhaus and Knaster5,13,32, the best-known method for cake-cutting is cut-and-choose, based on envy-freeness33,34. Steinhaus observed that the cut-and-choose protocol could be extended to three players and asked whether it could be generalized to any number of players35. More recently, Aziz and Mackenzie solved the cake-cutting problem by proposing a discrete and bounded envy-free protocol for any number of players and showing that the maximum number of queries required by the protocol is $$n^{{n^{{n^{{n^{{n^{n} }} }} }} }}$$36.

In general, most existing algorithms for cake-cutting become drastically complex when three or more players participate37. Further, in reality, it should be considered that the cake could be a heterogeneous good, and the participating players may have personal preferences for different parts of it. The heterogeneity of the cake and players’ personal preferences further complicate cake-cutting problems5.

Beyond the complexities, existing cut-and-choose procedures have a fundamental limitation. Previous algorithms for these problems seek a solution in which all players believe they have received a fair share so that they do not envy the other players. These algorithms impose several assumptions on the participating players38 . For example, they implicitly assume that all players act rationally, without emotional decisions or irrational behaviors, and do not try to manipulate the game. They also assume that players lack prior information about the other players’ preferences and choices. However, these assumptions are often impractical and unrealistic, as there always could be greedy, selfish, impulsive, irrational, and cheating players participating in the procedures39,40. As a result, cut-and-choose fair division cannot easily lead to finding peaceful negotiations in today’s major social or economic problems such as income/wealth redistribution.

In contrast to the protocols based on envy-freeness, fair division based on proportionality is rather simple13 and is often used as a common criterion for distributive justice. The fairness notion of proportionality often assumes that all players have equal rights to the cake, and thus everyone agrees that everyone else is entitled to a fair share, that is, at least 1/n. Within this assumption, envy-freeness and proportionality could be equivalent when there are only two players, but not anymore when more than three players are involved5. On the other hand, Aristotle identified distributive justice with “proportionate equality”: that is, the view that goods should be distributed not strictly equally but in proportion to their worth or merit41. In the same vein as Aristotle, weighted proportionality was recently proposed in which the participating players have different rights to the cake42. Fair division based on proportionality is closely related to the key principles of distributive justice: justice as equality (egalitarianism), justice based on contribution (capitalist justice), and justice based on needs (socialism)43.

Fair division based on proportionality has also had its critics. According to the proportionality on equality (egalitarian), goods should be allocated to people in equal portions. Critics argue that egalitarianism ignores some characteristics that should be taken into account in distributing goods such as contributions and needs, therefore leading to a decline in society’s productivity and efficiency43,44. On the other hand, critics of capitalist proportionality claim that some people may be ill, handicapped, too old or too young, or otherwise incapable of contributing anything through personal efforts, and that their minimal needs for the goods cannot be met, therefore leading to the decline in the overall society’s welfare43. Finally, critics of socialist proportionality point out that there would be no relationship between the amount of contribution a person makes and the amount of rewards they receive. They argue that fair division based on socialist proportionality is against human nature, which is essentially self-interested and competitive, therefore leading to declining productivity43,45,46.

In order to overcome the complexities and limitations of the existing methods, a fair division from a completely different perspective is required. In this article, we develop a fair division method inspired by the physical principle, the Boltzmann distribution.

In the physical sciences, the Boltzmann distribution describes the equilibrium probability distribution of physical particles in a physical system’s energy substates47. The description is valid in a classical physics regime in which each particle of the system is identical to but distinguishable from the others, and the interactions between them are negligible. In the Boltzmann distribution, the probability Pj that a particle can be found in the jth substate is inversely proportional to the exponential function of the substate energy Ej (i.e.,$$P_{j} \propto e^{{ - \beta E_{j} }}$$). The β value in the Boltzmann distribution is defined as 1/kT (k: Boltzmann constant, T: absolute temperature) and is directly related to the total energy of the physical system. Therefore, the β value is related to the ‘degree of spread’ of the overall distribution and is independent of physical substates. The Boltzmann distribution is based on entropy maximization and provides the most probable, natural, and unbiased distribution of a physical system at thermal equilibrium. When brought to the social sciences, the Boltzmann distribution would inherently incorporate the concept of fairness, as it provides a most probable, natural, and unbiased distribution for division problems48,49.

In this article, the mathematical model of the Boltzmann division was developed for both homogeneous and heterogeneous cake-cutting problems, where players’ contributions, needs, and preferences for heterogeneous portions could be successfully integrated. Then the Boltzmann division was optimized by maximizing the players’ total utility. Through the analysis of empirical data, we found that the Boltzmann fair division is a well-balanced division method and has superior aspects beyond the conventional division methods.

The Boltzmann fair division is simple but highly versatile and can be easily fine-tuned to apply to a variety of division problems. Thus, we believe that our work makes a seminal contribution to the feasible fair division for complex, real-world problems.

## Results

Conventional approaches to the cake-cutting problem seek a solution in which all participating players believe they have received a fair share. In reality, however, it is almost impossible to find such a solution, especially when players contribute different amounts to producing the cake, and different players have different amounts of need for it. If finding a fair division that makes all players “feel” satisfied is practically impossible to achieve, we need to search for a fair solution from a different perspective. Below, we develop a fair division in which players’ human factors (such as contributions, needs, and preferences) are properly incorporated, but the players’ subjective feelings are excluded during the division process. In the division method, the divisible goods need to be divided spontaneously among participating players naturally and unbiasedly. This unbiased (or fair) cake division can be achieved by using the Boltzmann distribution48,49.

The Boltzmann distribution in the physical sciences describes the most probable distribution that nature follows, in which physical particles are allocated to multiple physical substates of various energy levels. In this paper, we consider the cake-cutting problem, in which pieces of cake are allocated to multiple participating players who have various factors (such as talent or contribution) to the cake’s production. To apply the Boltzmann distribution to the cake-cutting problem, the concept of the physical particle is replaced by the cake unit (an infinitesimal piece of the cake). The idea of the physical substates is replaced by the participating players. Then, the probability that a cake unit is allocated to a player j is proportional to the exponential function of the division potential Ej, i.e. $$P_{j} \propto e^{{\beta E_{j} }}$$, where the division potential Ej of player j could be a measure of the player’s talent or contribution to the cake’s production. Note that β is a division constant ($$\beta \ge 0$$) and is independent of the participating players. In addition, as opposed to the Boltzmann distribution in the physical sciences, the probability exponent has a positive sign in front of βEj. Based on this definition, when a player has a higher division potential, cake units would be more likely to be distributed to the player.

The cake division {Nj; share of cake allocated to player j} obtained from the Boltzmann division is simple yet highly versatile with the single adjustable division constant β. If the division constant β approaches 0, all players receive an equal amount of cake, representing uniform cake division (egalitarian). When β increases to a large value, only a few players having made the highest cake contributions receive most of the cake, representing a highly skewed cake division. Thus, cake-cutting using the Boltzmann division can represent a wide range of cake divisions, from an idealistic uniform division to a highly skewed division. The optimal Boltzmann division with the division constant β* can be determined at the maximum point of the total utility function, in which the players’ need for the cake can be incorporated. Details on the Boltzmann fair division developed for both homogeneous and heterogeneous cake-cutting problems can be found in Methods.

To demonstrate homogeneous and heterogeneous cake-cuttings using the Boltzmann fair division, we performed empirical analysis on five players. We assumed that the five players make different contributions (5%, 10%, 20%, 25%, and 40%; total sum is 100%) to produce the cake, have different needs (4%, 10%, 24%, 34%, 53%; total sum is 125%), and show different preferences for four heterogeneous portions (Table S1). In reality, it is known that participating players in cake division tend to overestimate their human factors50. Therefore, it is assumed that the data of the five players used in our study are collected, normalized (to be 100% for contributions), or adjusted by hypothetical referees of the cake division (such as governments, policymakers, or supervisors) before the Boltzmann fair division. The total number of cake units Nj allocated to a player j was normalized to the allocated share of cake as a percentage.

In the case of homogeneous cake-cutting (Fig. 1), cake units were allocated to players based on the Boltzmann division Pj (Eq. 1 in Methods), where each player’s contribution was used as the division potential Ej. Then, the optimal division constant β* was determined at the maximum point of the total utility function (Eq. 9 in Methods). A hyperbolic tangent function was used as the players’ utility function (Eq. 8 in Methods), with the player’s need for the cake as the need values Dj so that the following condition was satisfied: uj(0) = 0, uj(Dj) = tanh(1)$$\cong$$ 0.762 (Fig. S1). This means that if a player receives what they need (Dj), their utility is ~ 76.2% saturated. Detailed information about the numerical calculations is in Table S2.

Figure 2 shows the total utility of five players as a function of β. The total utility U(β) increases rapidly to reach an optimal value as β increases up to β* = 0.029, and then gradually decreases. Interestingly, the total utility at β = 0 is higher than when the β value is large, and this result shows that the completely uniform cake division (i.e., egalitarian) has a higher total utility than the significantly skewed cake division.

The optimal cake division using the Boltzmann division is summarized in Fig. 3 and Table 1. The results were compared with the three conventional division criteria, Egalitarian (uniform cake division), Proportionality I (contribution), and Proportionality II (need). As shown in Table 1, Player 3, having the middle contribution and need, receives similar amounts of cake (~ 20%), independent of the four criteria: Boltzmann, Egalitarian, Proportionality I (contribution), and Proportionality II (need). By contrast, other players receive different amounts of cake according to these four criteria.

Players 1 and 2, having relatively low contributions and needs, receive the largest amount of cake under Egalitarian. On the other hand, Players 1 and 2 receive the smallest amount of cake under Proportionality II (need) because of their small needs compared with the other players, leading to the largest cake deficiency (received share—need) among four criteria. The preferred criteria for Players 1 and 2 are, in order, Egalitarian, Boltzmann, Proportionality I (contribution), and Proportionality II (need). In contrast, Players 4 and 5, having relatively high contributions and needs, receive the largest amount of cake under Proportionality II (need), resulting in the lowest deficiency. On the other hand, Players 4 and 5 receive an amount of cake equal to that of other players under Egalitarian, leading to the highest deficiency. The preferred criteria for Players 4 and 5 are, in order, Proportionality II (need), Proportionality I (contribution), Boltzmann, and Egalitarian.

The results show that the Boltzmann division is the criterion neither most nor least preferred by the participating players. Yet, of the four criteria, it brings the highest total utility. Note that the range of divided cake shares between five players is smaller in the Boltzmann than in the two Proportionality criteria, which indicates that the Boltzmann division is a balanced division between the Egalitarian and the Proportionality criteria (Fig. 3).

In the case of heterogeneous cake-cutting, it is assumed that the cake has equal portions of four flavors, vanilla, chocolate, strawberry, and broccoli (Fig. 1). The five players’ preferences for the four flavors are given with the weight factor values (Table S1). The cake was allocated to players based on the weighted Boltzmann division probability $$P_{j}^{i}$$(Eq. 5 in Methods). As in the homogenous cake-cutting, each player’s contribution and need were used as the division potential Ej and the need value Dj. Then, the optimal division constant β* in the Boltzmann division was determined at the maximum point of the total utility function (Eq. 9 in Methods). Detailed information about the numerical calculations is in Table S3. Figure 2 shows the total utility of the five players as a function of β. As in the homogeneous case, total utility rapidly increases to an optimal β value and then gradually decreases.

Heterogeneous cake division using the weighted Boltzmann division is summarized in Fig. 4 and Table 2. Compared with homogeneous cake-cutting, the results of heterogeneous cake-cutting are affected not only by the players’ contributions/needs but also by their flavor preferences. The major difference in heterogeneous cake-cutting is manifested in the comparison between Player 3 and Players 1 and 4. Player 3 has a strong preference for chocolate; therefore, the player’s weight value for chocolate is set at 1, and the values for the other flavors are 0 (Table S1). Chocolate is also preferred by three other players. Thus, although the largest share of the chocolate-flavored cake is allocated to Player 3, the total allocated share of the cake is significantly smaller than in the homogeneous cake-cutting. On the other hand, Players 1 and 4 prefer the least popular flavor, broccoli (Table S1); therefore, all the broccoli-flavored cake was allocated to them. Thus, Players 1 and 4 receive a larger share of cake than in the homogeneous cake-cutting, and Player 1 receives even a larger share of cake than Player 2. Based on the results, it is expected that strategic allocations of each player’s preferences would be developed to increase the individual player’s share of cake. Overall, the empirical analysis shows that the weighted Boltzmann division can smoothly handle complicated cake-cutting problems by incorporating a variety of realistic human factors, such as contributions, needs, and preferences for heterogeneous portions.

## Discussion

Distributive justice is concerned with the fair division of society’s benefits (or burdens) among people51. Questions of distributive justice arise when different people make claims on society’s benefits, and not all claims can be satisfied. The central cases are those where there is a scarcity of benefits compared with the numbers and desires of those who want these goods. The final goal of fair division is to make all players believe they have received a fair share. However, what each player thinks is a fair share could be subjective and might differ depending on whom each player shares it with. The degree of fair share that each player perceives might differ depending on the degree of players’ factors such as talents, contributions, needs, or personal preferences. For example, when a cake is given to a group of players, and none of the players have contributed to its production, it could be natural to assume that everyone is equally entitled to it. However, when the players have made different contributions to the cake’s production, an asymmetry is inherent in the problem, and it becomes drastically difficult to reach a harmonious solution. The most critical issues of distributive justice are concerned with how to divide social goods when participating players have different factors (such as contributions or needs) with respect to the goods and display egocentric and irrational behaviors.

In this paper, we developed a method for solving the cake-cutting problem from a different perspective, using the Boltzmann division. The Boltzmann division is based on the entropy maximization that nature follows at its thermal equilibrium. In the Boltzmann fair division, once the participating players’ human factors (such as contributions, needs, or preferences) are given, participating players cannot subjectively claim how much and which parts they should receive. Instead, the cake units are spontaneously distributed to players purely depending on the Boltzmann probability. This spontaneous division is the modus operandi of the maximum entropy principle that underlies the most equitable and impartial distribution of resources in nature. Therefore, in the Boltzmann fair division, players’ emotional, irrational decisions or cheating behaviors are fundamentally limited.

We believe that the Boltzmann fair division has several superior aspects compared with conventional methods. Compared with the fair division based on envy-freeness (such as cut-and-choose), the Boltzmann fair division can easily apply to otherwise extremely complicated cases, where heterogeneous goods should be fairly divided among multiple players who make different contributions to their products and different preferences for different parts of the goods. Compared with the fair divisions based on proportionality (Egalitarian, Capitalist, and Socialist), the Boltzmann fair division can simultaneously integrate various key factors of the participating players, such as contributions or needs.

Note that the Boltzmann fair division involves total utility maximization; therefore, it pursues the maximization of social welfare. Our empirical analysis shows that it is a balanced solution compared with the conventional fair divisions. It should be emphasized that the Boltzmann probability takes the form of the exponential function $$P_{j} \propto e^{{\beta E_{j} }}$$. Thus, even when a player’s contribution is 0, the Boltzmann probability becomes a non-zero value. As opposed to the Boltzmann fair division, in the Capitalist proportionality, no goods would be allocated to the player. The result shows that the Boltzmann fair division is favorable to the socially disadvantaged or underprivileged; therefore, it could serve as a guideline to reduce inequality in various social and economic problems.

The Boltzmann fair division in this study can be further fine-tuned for application to real-world division problems. The hyperbolic tangent utility function in our study could be modified with other forms of functions to reflect a more realistic utility of the players. For example, the utility function can be further generalized by allowing its maximum saturation value to vary (Fig. S2). Although it is not very sensible to differentiate an individual’s utility maximum, it may well find justification for a group of individuals or communities having distinct population sizes and/or value systems. Another meaningful extension of the utility function is to introduce sigmoidal behavior with an inflection point at x > 0 to capture the transitional characteristics of the marginal utility. In fact, most of the named cumulative probability distributions, including normal, gamma, and logistic functions, are sigmoidal at least for certain combinations of their scale and shape parameters. Additional considerations of the Boltzmann probability and total utility maximization are described in the Supplementary Information.

As proof of principle, we considered only five players in our empirical analysis, but it will be straightforward to extend our model to a larger number of players. The division potential (Ej) and need (Dj) in the Boltzmann division could be modified by considering not only contributions and needs but also factors such as players’ talents, efforts, and physical properties (age and health conditions). It would also be possible to extend our model from the fair division of beneficial goods to the fair division of burdens. For this purpose, the contributions (Ej) and needs (Dj) in our study would be replaced by players’ responsibilities and abilities. The fine-tuned Boltzmann fair divisions could then be applicable to a variety of social and national issues, such as negotiations on climate change between developed and developing nations.

In conclusion, we developed a fair division using the Boltzmann division. We showed that it could be modeled over the complexities and limitations of conventional fair divisions and successfully applied to realistic division problems. We anticipate that our model could serve as a feasible fair division for complex real-world problems, leading our societies one step closer to distributive justice.

## Methods

Below we describe mathematical models of the Boltzmann fair division for the cake-cutting problems. First, we consider a simple case in which the cake is a homogeneous good. Then, we extend our model to a more general case of heterogeneous goods. Finally, we optimize the Boltzmann division by maximizing the players’ total utility.

### Cake-cutting using the Boltzmann division: homogeneous case

Suppose that n players are participating in the cake-cutting problem. Consider that the cake is homogeneous and hypothetically cut into $$\tilde{N}$$ cake units, where $$\tilde{N}$$ is a large number so that the cake unit is infinitesimally small. A player j has cake-division potential Ej, which reflects the contribution of player j to producing the cake. Based on the Boltzmann division, the probability Pj that a cake unit is allocated to player j is proportional to the exponential function of the division potential Ej (i.e. $$P_{j} \propto e^{{\beta E_{j} }}$$, β is a division constant ($$\beta \ge 0$$)). Then the total number of cake units that are divided into player j is $$N_{j} = \tilde{N} \times P_{j}$$.

Considering the normalization condition ($$\sum\limits_{j = 1}^{n} {P_{j} } = 1$$), the probability Pj and the total number of cake units Nj allocated to player j (= 1,2,…, n) can be expressed as

$$P_{j} = \frac{{e^{{\beta E_{j} }} }}{{\sum\limits_{k = 1}^{n} {e^{{\beta E_{k} }} } }}$$
(1)
$$N_{j} = \tilde{N} \times P_{j} = \frac{{\tilde{N}e^{{\beta E_{j} }} }}{{\sum\limits_{k = 1}^{n} {e^{{\beta E_{k} }} } }}$$
(2)

### Cake-Cutting using the boltzmann division: heterogeneous case

Now, we want to extend our model to a more complicated case in which the divisible good is heterogeneous. Let us assume that the cake has m different flavors such as vanilla, chocolate, strawberry, broccoli, and so forth. Each of n participating players may have different preferences for these flavors, and the preference of player j for flavor i can be expressed with a weight factor, $$w_{j}^{i}$$52,53. Then the probability $$P_{j}^{i}$$ that a cake unit of flavor i is allocated to player j depends not only on the contribution of player j to producing the cake but also on the player’s preference for flavor i.

$$P_{j}^{i} \propto w_{j}^{i} e^{{\beta E_{j} }}$$
(3)
$$\sum\limits_{i = 1}^{m} {w_{j}^{i} } = 1,{\text{ for each player}}\,j$$
(4)

With the constraint on $$w_{j}^{i}$$(Eq. 4), the weighted Boltzmann division reduces to the Boltzmann division for the homogeneous case, when $$w_{j}^{i} = {1 \mathord{\left/ {\vphantom {1 m}} \right. \kern-\nulldelimiterspace} m}$$ for any i and j.

Considering the normalization condition ($$\sum\limits_{j = 1}^{n} {P_{j}^{i} } = 1$$), the probability ($$P_{j}^{i}$$) can be expressed as follows.

$$P_{j}^{i} = \frac{{w_{j}^{i} e^{{\beta E_{j} }} }}{{\sum\limits_{k = 1}^{n} {w_{k}^{i} e^{{\beta E_{k} }} } }}$$
(5)

Then the total number ($$N_{j}^{i}$$) of cake units with flavor i allocated to player j is

$$N_{j}^{i} = \tilde{N}^{i} \times P_{j}^{i}$$
(6)

where $$\tilde{N}^{i}$$ is the total number of cake units with flavor i, s.t. $$\sum\limits_{i = 1}^{m} {\tilde{N}^{i} } = \tilde{N}$$.

Hence, the total number of cake units (Nj) allocated to player j is

$$N_{j} = \sum\limits_{i = 1}^{m} {N_{j}^{i} }, {\text{ for}}\, j \, = {1},{2}, \ldots ,n$$
(7)

### Optimal cake division via utility maximization

Now we want to determine the β value for the optimal cake division in which the total sum of each player’s utility, $$U = \sum\limits_{j = 1}^{n} {u_{j} }$$, is maximized. The player’s utility function $$u_{j}$$ should reflect the realistic welfare (well-being, happiness, and satisfaction) that each player feels as the number of allocated cake units increases. The utility function would start at 0 and increase rapidly as the number of allocated cake units increases. However, as the number of allocated cake units increases beyond the player’s need, the utility would be saturated, after which it would increase rather slowly. This characteristic of individual utility can be modeled using various mathematical functions with an asymptotic saturation point. Of the numerous choices commonly made in biochemistry, ecology, the natural sciences, and economics, we chose, for its analytical simplicity, the hyperbolic tangent function with individual need as a scale parameter: that is,

$$u_{j} \left( x \right) = \tanh \left( {\frac{x}{{D_{j} }}} \right), {\text{for}}\, j \, = {1},{2}, \, \ldots ,n$$
(8)

where x is the share of allocated cake units and Dj is a constant reflecting player j’s need of the cake.

Therefore, we want to find β*, which maximizes the total utility, that is,

$$\beta^{*} = \arg \mathop {\max }\limits_{\beta } \mathrm{ }U\left( {N_{1} ,N_{2} , \ldots ,N_{n} } \right) = \arg \mathop {\max }\limits_{\beta } \mathrm{ }\sum\limits_{j = 1}^{n} {u_{j} \left( {N_{j} } \right)} = \arg \mathop {\max }\limits_{\beta } \mathrm{ }\sum\limits_{j = 1}^{n} {\tanh \left( {\frac{{N_{j} \left( \beta \right)}}{{D_{j} }}} \right)}$$
(9)

subject to

$$N_{j} \left( \beta \right) = \left\{ {\begin{array}{*{20}l} {\tilde{N} \times \frac{{e^{{\beta E_{j} }} }}{{\sum\limits_{k = 1}^{n} {e^{{\beta E_{k} }} } }}} \hfill & {\left( {{\text{for}}\;{\text{homogeneous}}\;{\text{case}}} \right)} \hfill \\ {\sum\limits_{i = 1}^{m} {N_{j}^{i} } = \sum\limits_{i = 1}^{m} {\left( {\frac{{\tilde{N}^{i} w_{j}^{i} e^{{\beta E_{j} }} }}{{\sum\limits_{k = 1}^{n} {w_{k}^{i} e^{{\beta E_{k} }} } }}} \right)} } \hfill & {\left( {{\text{for}}\;{\text{heterogeneous}}\;{\text{case}}} \right)} \hfill \\ \end{array} } \right.$$
(10)

In practice, the numerical value of β* can be found from the extremum condition:

$$\frac{\partial U}{{\partial \beta }} = \sum\limits_{j = 1}^{n} {\frac{\partial U}{{\partial N_{j} }} \cdot } \frac{{\partial N_{j} }}{\partial \beta } = 0$$
(11)

Then, the obtained cake division {N1, N2, , Nn} for β* becomes the optimal fair division dictated by the Boltzmann division.