Achieving social and economic justice for its members is among the most cherished goals of a civilized society 1 . Fair division of society's benefits (or burdens) is a long-standing, significant problem and is closely related to social and economic justice  . 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 resources 23 , 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 problem 24 , 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 1940s 9, 12,13,21,[25][26][27][28][29][30][31] . Various notions of fairness have been proposed to solve such problems 7,15,19 ; of these, the most widely used are envy-freeness and proportionality 31 . 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 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 Knaster 7,21,32 , the best-known method for cake-cutting is cut-and-choose, based on envy-freeness 33,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 players 12,35 . 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 participate 37 . 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 cakecutting problems 7 . 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 players 38 . 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 procedures 39,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 simple 21 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. However, when more than three players are involved, envy-free divisions could be proportional, but not vice versa 7 . 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 merit 41 . In the same vein as Aristotle, weighted proportionality was recently proposed in which the participating players have different rights to the cake 42 . 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 efficiency 43,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 welfare 43 . 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 productivity 43,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 propose a fair division method inspired by the physical principle, the Boltzmann distribution. The mathematical model of the Boltzmann fair 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 fair 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 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. 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 completely different perspective. Below, we propose a fair division in which players' subjective feelings are completely excluded. Instead, we allow the divisible goods to be divided spontaneously among participating players naturally and unbiasedly. This unbiased (or fair) cake division can be achieved by using the Boltzmann distribution 47,48 . In the physical sciences, the Boltzmann distribution describes the equilibrium probability distribution of physical particles in a physical system's energy substates 49 . 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 j th substate is inversely proportional to the exponential function of the substate energy Ej (i.e., absolute temperature)). The Boltzmann distribution is based on entropy maximization and provides the most probable, natural, and unbiased distribution of a physical system at thermal equilibrium. In this paper, we apply the Boltzmann distribution to the cake-cutting problem. The concept of the physical particle is replaced by the cake unit (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., j

, where β is a positive constant. 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 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. Details on the Boltzmann fair division developed for both homogeneous and heterogeneous cake-cutting problems can be found in Methods. To demonstrate optimal cake-cutting using the Boltzmann fair distribution, 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, and have different needs (4%, 10%, 24%, 34%, 53%; total sum is 125%; Table S1). 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 was allocated to players based on the Boltzmann distribution 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). 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) ≅ 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. Fig. 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 biased cake division. The optimal cake division using the Boltzmann distribution 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. The results show that the Boltzmann distribution 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 distribution is a balanced division between the Egalitarian and the Proportionality criteria (Fig. 3). In the case of heterogeneous cake-cutting, 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 distribution probability i j P (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 distribution 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. Fig. 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 of 0.029, and then gradually decreases.
Heterogeneous cake division using the weighted Boltzmann distribution is summarized in Fig. 4 and Table 2. Compared with homogeneous cake-cutting, the results of heterogeneous cakecutting 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 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. Overall, the results show that the weighted Boltzmann distribution can smoothly handle complicated cake-cutting situations by incorporating a variety of factors, such as contributions, needs, and preferences for heterogeneous portions. Distributive justice is concerned with the fair division of society's benefits (or burdens) among people 50 . 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 proposed a method for solving the cake-cutting problem from a different perspective, using the Boltzmann distribution. The Boltzmann distribution is based on the entropy maximization that nature follows at its thermal equilibrium. Note that in a fair division using the Boltzmann distribution, 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 distribution 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 fair division using the Boltzmann distribution has several superior aspects . 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 realworld 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 distribution 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 proposed a fair division using the Boltzmann distribution. We showed that it can 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.
Here 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. Suppose that n players are participating in the cake-cutting problem. Consider that the cake is homogeneous and hypothetically cut into N  cake units, where 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 distribution, 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.,

, β is a division constant ( 0 β ≥ )). Then the total number of cake units that are divided into player j is

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, i j w 51,52 . Then the probability i j P 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. Then the total number ( i j N ) of cake units with flavor i allocated to player j is

where i N  is the total number of cake units with flavor i, s.t. Hence, the total number of cake units (Nj) allocated to player j is

The cake division {N1, N2, ••• , Nn} obtained from the Boltzmann distribution is simple, with the single adjustable division constant β, yet highly versatile. 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 biased cake division. Thus, cake-cutting using the Boltzmann distribution can represent a wide range of cake divisions, from an idealistic uniform division to a highly biased division. Now we want to determine the β value for the optimal cake division in which the total sum of each player's utility,

∑ , is maximized. The player's utility function j u 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,

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,

arg max , ,..., arg max arg max tanh

for homogeneous case for heterogeneous case (10)   In practice, the numerical value of β* can be found from the extremum condition:

Then, the obtained cake division {N1, N2, ••• , Nn} for β* becomes the optimal fair division dictated by the Boltzmann distribution. a Homogeneous cake cutting, in which N  is the total number of cake units, Ej is the division potential of player j, and Pj is the Boltzmann probability that a cake unit is allocated to player j. b Heterogeneous cake cutting, in which i N  is the total number of cake units with flavor i, i j w is the weight factor expressing player j's preference for flavor i, and i j P is the Boltzmann probability that a cake unit of flavor i is allocated to player j. As long as the utility function for each player is upper-bounded, the total utility is a decreasing function at a large enough β where the player with the highest contribution receives most of the cake units. This observation indicates that the total utility function is maximized at a nonzero β if it is an increasing function near β = 0. To clarify this condition, let us first analyze the behavior of the utility function at a small β regime. Using Taylor expansion, the Boltzmann probability for the homogenous cake-cutting (Eq. 1 in Methods) can be approximated as ( )

Then, the number of cake units allocated to each player is further approximated as , and thus it is helpful to apply the Taylor expansion near this uniform division x value, ( )

where j A and j C are the value and slope of ( )

Using Eq. S2, the utility function of player j and the total utility function (U) up to the first order in β is given by . This result indicates that the total utility (U) becomes an increasing function of β and that its maximization at nonzero β is guaranteed when the following condition is satisfied. Such a condition (Eq. S5) is not always satisfied for an arbitrary form of utility function. In this paper, we used a hyperbolic tangent-shaped utility function whose saturation maximum value is set at 1 for each player (Fig S1).
In this case, if the cake is large enough relative to the players' needs so that the individual utility function is nearly saturated for some players, the condition (Eq. S5) can be satisfied when the players with higher contributions have higher needs. On the other hand, if the cake is small relative to the players' needs so that the individual utility is far from 1 for every player, the condition (Eq. S5) can be satisfied when the players with higher contributions have smaller needs. For many realistic fair-division problems, the utility functions do not need to have the same saturation maximum for all players, and it might be possible that the heavy contributor's utility function has the tendency to have a higher slope ( j C ) regardless of the number of allocated cake units. If the individual utility function of a heavy contributor has a higher slope and higher saturation maximum value (Fig. S2), then there will always exist a nonzero β value maximizing the total utility. Introducing heterogeneity to the preference of cake flavor drastically complicates the problem and each player's share is no longer equal to / N n  at β = 0. A simple analysis linearizing the utility function is not available, but the short conclusion mentioned above is still valid to a degree. * β)

* β