{'fraction_non_alphanumeric': 0.050033303295067194, 'fraction_numerical': 0.017121811699251654, 'mean_word_length': 3.833175534936565, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Nash Social Distancing Games with Equity Constraints: How Inequality Aversion Affects the Spread of Epidemics

In this paper, we present a game-theoretic model describing the voluntary social distancing during the spread of an epidemic. The payoffs of the agents depend on the social distancing they practice and on the probability of getting infected. We consider two types of agents, the vulnerable agents who have a small cost if they get infected, and the non-vulnerable agents who have a higher cost. For the modeling of the epidemic outbreak, a variant of the SIR model is considered, involving populations of susceptible, infected, and recovered persons of vulnerable and non-vulnerable types. The Nash equilibria of this social distancing game are studied. We then analyze the case where the players, desiring to achieve a low social inequality, pose a bound on the variance of the payoffs. In this case, we introduce a notion of Generalized Nash Equilibrium (GNE) for games with a continuum of players and characterize the GNE. We then present some numerical results. It turns out that inequality constraints result in a slower spread of the epidemic and an improved cost for the vulnerable players. Furthermore, it is possible that inequality constraints are beneficial for non-vulnerable players as well.

of many healthcare systems, social distancing is the most effective strategy to reduce the disease spread.
In order to respond efficiently to an epidemic, the strategies that people would adopt should be designed carefully, based on elaborate epidemiological models. In the last century, epidemiologists have made significant progress in the mathematical modeling of the spread of epidemics.
From the seminal works of W.O.Kermack & A.G.McKendrick [1] and R.Ross [2] a prevalent approach in the mathematical modeling of epidemics are the compartmental models. These models consider that each agent belongs in some compartment according to her health state (e.g., Susceptible-Infected-Recovered) and study the evolution of each compartment's population. The literature on these models is extensive, so for a summary we refer to Chapter 2 of [3]. Nowadays, there exist also other elegant approaches to the epidemic modeling, such as the ones that take into consideration the heterogeneous networked structure of human interconnections [4]. Despite that fact, the compartmental models remain a well studied and fruitful approach, widely used in reallife applications. Let us note that the majority of models used in the forecast of hospitalization and the number of COVID-19 deaths in the United States use some compartmental model 1 .
an agent is to maximize selfishly her own payoff ignoring for the social impacts (externalities) of this choice. This can lead to 'free-riding' phenomena in vaccination games [8], [11] or in disobedience of social distancing rules in social distancing games, which can both result in a higher prevalence of the spread of the epidemic [8], [30] and to harmful consequences for the vulnerable members of the society. The phenomenon that the Nash equilibrium strategies result to a social welfare less than the optimal one is well known in game theory community as the Tragedy of the Commons, [31]. Moreover, even in the cases considering that the agents prefer the strategies which maximize a social welfare function, either utilitarian (the average payoff) or egalitarian (the minimum payoff) [32], there still exist inequalities among their payoffs.
In this work, it is attempted a novel approach to model the possible desire of the agents to respect their fellow agents and keep the inequality among their payoffs below a certain threshold.
Especially in the case that an agent has vulnerable relatives, it is rather natural for her to alter her behavior during an epidemic outbreak in order to protect them. Let us note that there is a lot empirical evidence that people are motivated by fairness considerations (e.g. [33], [34]), and that often people are willing to sacrifice some of their own payoff to achieve a more equitable outcome. On a first approach, we consider that the players share a common constraint bounding inequality (variance of their costs).
We consider a compartmental model (SIR) for the spread of an epidemic and a social distancing game among the agents, similarly to [18], [20], [21]. The payoffs of the agents consist of two terms: a cost for the social distancing and a cost proportional to the probability of getting infected. There are two types of agents, the vulnerable agents who have a small cost if they get infected and non-vulnerable agents who have a higher cost. The size of the society is considered to be large, so the game has a continuum of players (it is a non-atomic game). In this game the agents determine the intensity of their social contacts so as to optimize their personal payoff and simultaneously respect a constraint concerning the variance of the payoffs of all the agents. Due to this constraint, the game is, in fact, a generalized game with a non-convex constraint. The majority of the bibliography on generalized games (e.g. [35], [36]) do not analyze generalized games with non-convex constraints. Furthermore, there are a few references on generalized nonatomic games [37], [38], [39]. However, in these papers, the convexity of the constraint set is build into the definition of the GNE. Thus, in this work we define and characterize GNE for constrained non-atomic games.
It turns out that, in the absence of a variance constraint, players either choose complete isolation September 2, 2020 DRAFT or complete sociability (see also Remark 3). It is also interesting that we may have many Nash The rest of the paper is organized as follows. In Section II, the compartmental model for the epidemic outbreak and for the social distancing game between the agents is introduced. In Section III, we analyze the game and characterize its Nash equilibria. In Section IV, we introduce the constraint that concerns the variance of the payoffs and derive an appropriate definition of Nash equilibrium variance constrained games. In section V, we present at first a methodology for the computation of the Nash equilibrium strategies of section III and then present some numerical examples of them. Moreover, in the same section, we compute numerically an equilibrium for the variance constrained game, which satisfies the definition we introduce in section IV. In the Appendix we collocate the proofs of several propositions of the paper.

II. MATHEMATICAL MODEL
This section presents a variation of a popular epidemics model which assumes a continuum of agents. The state of each agent could be Susceptible (S), Infected (I), or Recovered (R). This state evolves according to Markov process of Figure 1. As the Markov process indicates, we assume that an individual recovered from the infection is immune i.e., she could not be infected again. We distinguish between two types of agents: non-vulnerable and vulnerable. We use the index j = 1 for non-vulnerable agents and j = 2 for vulnerable. The difference of the two types of agents is the probability to survive an infection. An infected agent recovers with a probability rate α j and dies with a probability rate α j − α j .
We analyze the behavior of the agents for a time interval proportionally to her probability of being infected at time t. The dynamics are given by: where: The initial conditions are where I 0 is the percentage of infected persons at time 0. Here, we assume that at the beginning of the epidemic, all the agents are infected with a small probability I 0 .
September 2, 2020 DRAFT Before showing the existence of a solution for the initial value problem (1)-(3), we introduce the following function spaces: is the space of continuous functions defined on [u m , u M ] and values on R 4 . The space X equipped with the norm: Proof: See Appendix A.
The cost of agent i consists of two terms. The first term is proportional to the probability of getting infected and the vulnerability of the player. The second term, represents the benefits earned from social interactions that the agent loses in the case she applies social distancing. The cost is given by: where G j = (α j − α j )/α j stands for the probability that a player i of type j does not survive an infection, P i the probability that she gets infected within the time interval [0, T ], andū 1 ,ū 2 the mean actions of the players of types j = 1 and j = 2 respectively. Note that G 2 > G 1 .
Remark 1: The second term in (4) captures the utility player i receives from her contact with people of types j = 1 and j = 2 respectively. To keep things simple, we assume that the number of people in these types is approximately constant with time. This approximation is accurate in epidemics with a low mortality rate and duration small compared to the average human life. Let us then compute the probability of getting infected P i . The probability S i ju i (t) that an agent i of either type (j = 1 or j = 2) is not infected up to time t evolves according to: Thus, we have: Here, we assume that at the beginning of the epidemic, all the agents are infected with a small dt the cost is written as: Since we assume a very large population of players, each one of them is not able to affect the distributions µ 1 , µ 2 . It is interesting to observe that the individual cost J i is concave in u i . To see this take the second derivative of J i with respect to u i : Therefore, the possible actions minimizing the individual cost are u i = u m and u i = u M . Thus, to compute the Nash equilibria, we focus on distributions assigning the entire mass on {u m , u M }.
Remark 3: The fact that the cost function J i is concave in u i simplifies the analysis a lot, implying that players either choose complete isolation or complete sociability. It further allows us to describe dynamics using a finite-dimensional model. Let us note that the first term of J i , describing the expected cost of an infection, is concave on the player's action, and the second term i.e., −s j1 u iū1 − s j2 u iū2 , is linear in u i . In a more general model with a non-linear second term, the cost function would not necessarily be concave.

III. NASH EQUILIBRIUM
To analyze the Nash equilibrium we focus on distributions having all the mass on {u m , u M }.
The dynamics is given by: September 2, 2020 DRAFT where the total mass of 'free infected people' I f is given by: Denoting byũ j the percentage of players of type j using u M , the initial conditions are given by: Denote by φ z u 1 ,ũ 2 (t) the z-part of the solution of the differential equation (5) with initial condition (6). Then it holds:

Remark 4:
The situation is simplified for u m = 0. In this case, we have a set of five ODEs instead of nine. (i) 0 <ũ j < 1 and: (ii)ũ j = 0 and: (iii)ũ j = 1 and: Proof : The proof is immediate, observing that (i) corresponds to the case where the players of type j are indifferent between u m and u M and (ii), (iii) correspond to preference of u m over u M and u M over u m respectively.
The existence of a Nash equilibrium is a consequence of Theorem 1 of [40].

IV. THE VARIANCE CONSTRAINED GAME
This section analyzes a game situation, where the players pose a shared bound on the variance of their costs. To do so, we first introduce a notion of equilibrium with a shared constraint, for non-atomic games, and then characterize it in terms of small variations. We assume that the strategies of the players are symmetric(that is all the players of the same type use the same strategy), allowing for randomization. Consider a pair of distributions (µ 1 , µ 2 ) for the actions of the players. Then, the players of type j randomize according toμ j (·) = µ j (·)/n j .
The variance of the costs is given by: whereJ = (n 1J1 + n 2J2 )/(n 1 + n 2 ), and: We then describe a notion of equilibrium for the generalized game with variance constraints.
Ideally, to have an equilibrium, the actions of each player should minimize the cost subject to the variance constraint. The difficult point here is that, since we have a continuum of players, the variance does not depend on the actions of individual players. To define a meaningful notion of equilibrium, instead of analyzing the effect of a deviation of a single player, we consider the deviation of a small fraction of players of type j and see how a variation from the nominal mixed strategyμ j affects the cost of this small group of players and the total variance. Then, we take the limit as the total mass of the group of players tends to zero.
Denote by j the type of players containing the deviating group and by −j the other type of players. Assume that the total mass of deviating players is ε and that the deviating players use a mixed strategyμ j (note that it holdsμ j ([u m , u M ]) = 1). Then, the distribution of the actions of the players of type j is given by: The mean cost of the deviating players after the deviation is: while before the deviation isJ j .
Lemma 1: For all µ −j it holds: is written as: where K j µ 1 ,µ 2 ∈ Y and Y is the space of bounded linear functionals on Y . (ii) The directional derivative of the variance V (µ j , µ −j ) in the direction δµ j is expressed as: where L j µ 1 ,µ 2 ∈ Y . Furthermore, L j µ 1 ,µ 2 can be written as: is a Generalized Nash Equilibrium (GNE) with variance constraint V ≤ C if either: (i) V (µ 1 , µ 2 ) < C and for j = 1, 2 and for any probability measureμ j , it holds: where δµ j =μ j −μ j , or (ii) V (µ 1 , µ 2 ) = C and for j = 1, 2 and for any probability measureμ j , it holds: where δµ j =μ j −μ j .
Remark 6: In the first case of the definition, any small group of players is not sufficient to increase the variance above C. Thus, if µ 1 , µ 2 is an equilibrium, there is no profitable deviation, and the definition coincides with the equilibrium of Section III. In the second case, µ 1 , µ 2 is an equilibrium, if any profitable deviation for a small group of players, increases the variance above C.
Remark 7: In [37], [38], [39] notions of GNE for games with a continuum of players are introduced. However, these definitions assume a convex constraint set. Let us note that Definition 1 is neither a generalization nor a special case of the corresponding definitions in [37], [38], [39].
We then introduce a refinement of GNE, called non-singular GNE. It turns out that non-singular GNE are easier to compute.
Proof: The direct part is immediate. Assume that the converse is not true, that is, there is a probability measureμ j such that: Then, since (µ 1 , µ 2 ) is not variance stationary, there is a probability measureμ j such that L j µ 1 ,µ 2 (μ j −μ j ) < 0. Hence, there is a θ ∈ (0, 1) such that: But this contradicts (9).
Assume that V A (µ 1 , µ 2 ) = C and (µ 1 , µ 2 ) is not variance stationary. Then, (µ 1 , µ 2 ) is an equilibrium if and only if there is no δµ j =μ j −μ j such that: Proposition 3: If there is a probability measureμ j such that (10) holds true, then there is another probability measureμ j supported on at most two points which also satisfies (10)  Let us introduce the following quantities: where d u is a Dirac measure supported on u. Using these quantities we have the following necessary (Corollary 3), and necessary and sufficient conditions (Corollary 4).

A. Computing Unconstrained Nash Equilibria
The computation of the value of F (ū 1 ,ū 2 ) corresponds to the numerical integration of (5).
The search for pure Nash equilibria needs just the computation of F (0, 1), F (1, 0), and F (1, 1) and checking the corresponding inequalities.
Let us then describe the procedure to find equilibria in the form of the (ũ 1 , 0) or (ũ 1 , 1). We have first to find the solutions of: with respect toũ 1 , for a fixed value ofũ 2 = 0, 1. To do so we use line search (an alternative, would be to use a multi-start Newton algorithm). Having found a solution of Hũ 2 (ũ 1 ) = 0 for u 2 = 0 orũ 2 = 1 we need also to check the corresponding inequality. The computation of possible equilibria in the form (0,ũ 2 ) or (1,ũ 2 )is similar.
Let us compute any possible Nash equilibrium where both types use mixed strategies (internal Nash equilibria). Then we should have: Any solution of this equation should belong to the line: or equivalently: Therefore, to find any internal Nash equilibria, we examine using line search if there are solution of (11) on the line (12). We then present some examples with concrete values for the parameters. The following table presents the Nash equilibria when G2/G1 = 5 for various values of G 1 .  are not Pareto dominated. This shows that, even in the absence of regulations, there is a need for coordination.

B. Computing Constrained Equilibria
We then search for generalized Nash equilibria with variance constraints. Let us first note that if the pair (µ 1 , µ 2 ) satisfies Definition 1.(i) then it also is an unconstrained Nash equilibrium.
Thus, it is sufficient to check if the Nash equilibria computed in the previous section satisfy the constraint V (µ 1 , µ 2 ) ≤ C.
We then compute GNE, satisfying Definition 1.(ii), in the case where the policies (µ 1 , µ 2 ) are of the form µ 1 = n 1 d u 1 , µ 2 = n 2 d u 2 , where d u is a Dirac measure concentrated on u. We use a grid to find the pairs (u 1 , u 2 ) such that the equality V (µ 1 , µ 2 ) = c holds approximately. These points are candidates for GNE. For each of these points in the grid, we compute the functions g K j,µ 1 ,µ 2 (u) and g L j,µ 1 ,µ 2 (u) for j = 1, 2 and a grid of points u. The details of the computation of g K j,µ 1 ,µ 2 (u) and g L j,µ 1 ,µ 2 (u) are given in Appendix D. We then use Corollary 4 to find to check weather each of these points is a GNE. Under the constraint V ≤ 0.1 there is a small interval of GNE, consisting of pure strategies.
One of them is (μ 1 ,μ 2 ) = (d 0.44 , d 0.29 ). Figure 3 shows that the cost for both groups of players is smaller under the inequality constraint. In this case, the prevalence of the epidemic is 0.0574.
The GNE for various values of c are illustrated in Figure 4.  Figure 6 illustrates the prevalence of the epidemics as a function of c. We observe that, as the constraint becomes more restrictive i.e., c decreases the prevalence of the epidemic decreases as well.

VI. CONCLUSION
We analyzed social distancing games, involving vulnerable and non-vulnerable populations of players, characterized the Nash equilibria and investigated how inequality constraints influence the epidemic spread and the costs of the players. It turns out that, in the absence of constraints, each player uses either maximum or minimum socialization. We also defined a Generalized Nash equilibrium concept for non-atomic games with variance constraints, and characterized it in terms of single-point-supported deviations. Inequality constraints are always beneficial for the vulnerable players, and in some cases they could be beneficial for the non-vulnerable players as well. Furthermore, inequality constraints delay the spread of epidemics and reduce its prevalence.
There are several directions for future research. Some of them involve the use real data to check the predictions of the model, the modeling of the dynamic response of players and the study of other applications of the variance constrained games defined.

A. Proof of Proposition 1
Equation (1) can be written as:ẋ where M ∈ X with: Note that M ≤ n 1 + n 2 . The initial conditions are Lemma 3: Any solution of (13) with the given initial conditions satisfies 0 ≤ x 1u , . . . , x 4u ≤ 1.
Proof : Let h(t) = Mx(t). Then, 0 ≤ h(t) ≤ n 1 + n 2 . The solution ofẋ 1u = −ruh(t)x 1u given by: depends continuously on u, t. A similar argument shows that x 2u is continuous on u, t. Then, observe that, the third equation of (13) can be written as: where b(u, t) = rux 1u · Mx is continuous on u and bounded by u M r(n 1 + n 2 )(1 − I 0 ). The solution of this differential equation is: which is again continuous on u, t. A similar argument shows that x 4u is continuous on u, t.
We then proceed to the proof of the proposition. Consider a saturated version of (13): where sat 1 (z) = max{min{z, 1}, 0} and sat 2 (z) = max{min{z, n 1 + n 2 }, 0}. Due to Lemma 3, any solution of (13), with the given initial conditions, is also a solution of the modified system.
Denote this system in compact form asẋ =f (x). It is not difficult to see thatf : X → X is Lipschitz with constant: show that there is no solution of (13) not belonging to C([0, T ], X).
Remark 9: Note thatf is uniformly Lipschitz. The constant is uniform in µ 1 , µ 2 , for positive measures of total mass n 1 , n 2 .

B. Proof of Lemma 1
We then proceed to the proof Lemma 1 and the computation of a formula for the directional derivative of the variance. To this end, we first consider the sensitivity of the solution of (1) with respect to the deviation εδµ j .
We first compute the directional derivative of f µ 1 ,µ 2 (x) in the direction δµ. The value of f µ 1 ,µ 2 (x) depends on µ j through the quantity I f (t). This quantity can be written as: where I j· (t) : [u m , u M ] → R with u → I ju (t) and T µ ∈ (C([u m , u M ], R)) with: The directional derivative of f µ 1 ,µ 2 (x) in the direction δµ j is: Observe that, due to the form of T δµ j in (15), there is a bounded linear operator B µ 1 ,µ 2 (t) : Y → X such that: The linearized version of (1), around the trajectories (S 1u , S 2u , I 1u , I 2u ), is given by: where I f = I f µ 1 ,µ 2 as in (2). Thus, (16) is a LTV system in the form: Lemma 5: Denote by φ µ 1 ,µ 2 (t) the solution of (1). Then, the directional derivatives x lu = D δµ j φ lu µ 1 ,µ 2 (t), for l = 1, . . . , 4 and x 5 = D δµ j φ 5 µ 1 ,µ 2 (t) satisfy (17), with zero initial conditions. Proof: Consider the function:f : Y × X → X with: and the set D = X 0 × {µ ∈ Y : µ = n j } The functionf (μ, x) is continuously Fréchet differentiable with respect to x. Its derivative is the operator A µ 1 ,µ 2 (t) given in (16)- (17), which is continuous and bounded in D. The directional derivative: is also continuous in x and bounded in D. Furthermore, X 0 is positively invariant. Thus, Theorem 1 of [42] applies and the proof is complete.
Therefore, F is continuous in µ j and J j (u , µ j , µ −j ) is continuous in µ j , uniformly in u . This proves (8).
Lemma 6: There is a continuous function f var j,F,µ 1 ,µ 2 (u) such that the directional derivative of F (µ 1 , µ 2 ) on the δµ j direction is given by: Proof: Observe that B µ 1 ,µ 2 (t) : Y → X can be written as a composition of two linear operators B 1 µ 1 ,µ 2 (t) : Y → R and B 2 µ 1 ,µ 2 (t) : R → X with: B 1 µ 1 ,µ 2 (δµ) = T δµ j I j· and The solution of the LTV system (17) with zero initial conditions is written in the form ( [43] paragraph 1.4): where Ψ(t, s) : X → X is the state transition operator.
Denote by C : X → R the operator picking the last component i.e., C(x ) = x 5 . Then, x 5 (T ) can be written as: Note that ψ t = CΨ(T, t)B 2 µ 1 ,µ 2 is a linear function ψ t : R → R. Write this function as ψ t (l) = ϕ(t) · l. Thus: Define: Observe that, since x j+2,u (t) is continuous with respect to u, the function f var j,F,µ 1 ,µ 2 (u) is also continuous in u. Thus: and the proof is complete The directional derivative ofū j is given by: The directional derivative of the cost of a player of type j who uses an action u is given by: where: f var j,J j ,µ 1 ,µ 2 (u , u) = G j (1 − I 0 )ue −uF f var j,F,µ 1 ,µ 2 (u ) − s j j uu /n j , is a continuous function of u , u. The directional derivative of the mean cost of the players of type j (the same with the type of the deviating players) is given by: Substituting (18) into the last equation and using Fubini's theorem, we get: Similarly: Combining the last two equations we compute the variation of the mean cost: D δµ jJ = (n 1 D δµ jJ 1 + n 2 D δµ jJ 2 )/(n 1 + n 2 ) = f var j,J,µ 1 ,µ 2 (u )δµ j (du ).
We then proceed to the computation of the directional derivative of the variance in two steps.
The first part is: In the second equality the interchange of the integral with the limit is possible, because the convergence lim ε→0 [J j (u, µ j + εδµ j , µ −j ) − J j (u, µ j , µ −j )]/ε is uniform in u. In the last equality we use again Fubini's theorem. Note that f var j,V j ,µ 1 ,µ 2 (u ) is continuous in u . Similarly: Therefore, the directional derivative of the variance is written as: for a continuous function f var j,V,µ 1 ,µ 2 (u ).
This completes the proof of the claim.
Claim 2: We may choose a ρ ∈ [0, 1] such that: Indeed for ρ in the interval: y i 0 αz j 0 + y i 0 < ρ < y i 0 x j 0 + y i 0 , both inequalities are valid. The interval is not empty, since αz j 0 > x j 0 .
Choose such a ρ. Then, using the form of x, y, z, w, there are k 1 , k 2 such that: where d u is the Dirac measure at u, and the proof is complete.

D. Computation of GNE
Consider a discrete set U d ⊂ [u m , u M ] and a grid U d × U d of pairs (u 1 , u 2 ). We first find the set of pairs (u 1 , u 2 ) on the grid, such that V (n 1 d u 1 , n 2 d u 2 ) = C approximately holds. The dynamics becomes:Ṡ 1u 1 = −ru 1 I f S 1u 1 ,Ṡ 2u 2 = −ru 2 I f S 2u 2 , where I f (t) = u 1 n 1 I 1u 1 (t) + u 2 n 2 I 2u 2 (t).
For every point on the grid that V (n 1 d u 1 , n 2 d u 2 ) = C approximately holds, we compute the function g K j,µ 1 ,µ 2 (u), for u ∈ U , as: For j = 1, 2 and a grid of values of u ∈ U , we solve the pair of differential equations: where I f is the quantity computed during the solution of (21).