{'fraction_non_alphanumeric': 0.024948100666496702, 'fraction_numerical': 0.007211275813089558, 'mean_word_length': 4.239076512116008, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Continuous utility factor in segregation models

We consider the constrained Schelling model of social segregation in which the utility factor of agents strictly increases and non-local jumps of the agents are allowed. In the present study, the utility factor u is defined in a way such that it can take continuous values and depends on the tolerance threshold as well as the fraction of unlike neighbours. Two models are proposed: in model A the jump probability is determined by the sign of u only which makes it equivalent to the discrete model. In model B the actual values of u are considered. Model A and model B are shown to differ drastically as far as segregation behaviour and phase transitions are concerned. In model A, although segregation can be achieved, the cluster sizes are rather small. Also, a frozen state is obtained in which steady states comprise of many unsatisfied agents. In model B, segregated states with much larger cluster sizes are obtained. The correlation function is calculated to show quantitatively that larger clusters occur in model B. Moreover for model B, no frozen states exist even for very low dilution and small tolerance parameter. This is in contrast to the unconstrained discrete model considered earlier where agents can move even when utility remains same. In addition, we also consider a few other dynamical aspects which have not been studied in segregation models earlier.


I. INTRODUCTION
Several dynamical phenomena are associated with the mobility of human beings. Pedestrian's movement patterns [1] and associated behaviour, synchronized behaviour such as flocking or herding [2] are some well known examples. Mobility of human beings is often motivated by some definite purpose and emergent phenomena such as segregation and migration may result [3]. Dynamical phenomena associated with movement of human beings and animals have attracted the attention of physicists as many of these can be mapped to dynamical physical systems. For example, pedestrians' movements can be analysed using a social force model [1] and flocking phenomena can be studied in terms of the classical XY model [2].
The segregation phenomena is fundamental in nature and seen to be present in the human society in different forms. In a heterogeneous society, consisting of different racial or cultural groups, it is often found that people prefer to live in the neighborhood of people belonging to the same group [4] which results in a segregation. Segregation may occur due to different factors such as age, income, language, religion, color etc. To achieve segregation in space, one must consider the movements of the agents following certain rules. A simple model of social segregation was proposed by Schelling [5][6][7] long before the issue of residential segregation received serious attention [8]. This model illustrates how an individual's choice of living with the neighbor of the same kind can lead collectively to segregation. The model received attention from physicists as it was realised that its continuous analog, in space and time, corresponds to a dynamical model of solid or liquid flow [9]. On the other hand, it has similarity with magnetic models with conservative dynamics [10,11] and also the dynamical phenomena of phase ordering [12]. Later, several variants of the Schelling model were studied. In [13] a unified mathematical framework was developed for a broad class of models of the Schelling type. In most of the Schelling class models, agents occupy sites of a two dimensional grid. In [14] it was considered that the agents occupy districts (or patches) rather than sites on a two dimensional grid, which improves social realism of the model.
In the original Schelling model, a utility factor is defined based on the fraction of opposing neighbours; if the latter is greater (less) than 1/2, the utility factor is defined to be zero (one). An unsatisfied agent with zero utility tends to move to a vacant site in the neighbourhood only if that makes the utility factor larger (constrained dynamics). However, it was shown later that this leads to segregated clusters which are rather small in size. It was found that the system can reach a segregated state where large clusters are formed provided agents are allowed to move even when the utility remains same [9,15,16] -this is called the unconstrained case. The configurations generated in this way are very similar to those occurring in the phase separation dynamics.
Whether the dynamics is constrained or unconstrained is a major concern in the Schelling model. In [16] both the constrained and unconstrained cases were considered in one dimension and it was shown that the constrained model shows non-trivial static properties characterised by the presence of a symmetry breaking phase transition. On the other hand, in the unconstrained model the dynamics exhibit coarsening as in Ising-like models with non-conserved order parameter. Also, it was shown in [9] that the constrained case corresponds to "solid-like" flow while the unconstrained case mimics the flow of liquids.
In the present paper, we consider continuous values of the utility factor (details in the next section) and show that even subject to the constrained rule (that unsatisfied agents can move to a different location only if their utility increases), it is possible to obtain good quality seg-regation, i.e segregated clusters are larger in size. This is comparable to the unconstrained case with discrete utility factors.
The case of continuous utility was considered earlier in [17,18] with added degrees of freedom and the effect of continuous utility alone was not obvious. In [19] utility was regarded as a general function of f . But only the case where F = 1/2 was taken and a special form (spiked) of the utility function was used (utility equal to 1 for f = 1/2 and zero otherwise). In [9], where the mapping of the Schelling model to a physical model in continuum had been made, the utility factor was also taken as a continuous function. However, results were obtained only for the case where it has a step function like behaviour.
The reason for considering utility as a continuous valued variable is twofold. First, it gives an idea of the degree of mismatch between the agent and their neigbhours. Secondly, it provides a greater mobility to the unsatisfied agents as they can now move to a different location even when utility does not become positive necessarily but definitely improves. This is close to reality as it is not possible to attain an ideal state always; especially in a single step. So in an indirect manner, the movements of agents become less constrained in the continuous case.
Apart from studying the segregation phenomena (in terms of satisfied agents) and related phase transitions, certain dynamical features are also studied for the two models.
In section II we have defined the models and the quantities calculated and section III gives the details of the simulation. In section IV results are discussed, section V contains study of the correlation function and section VI contains summary and discussions.

II. MODELS AND QUANTITIES CALCULATED
First, we describe the Schelling model with discrete utility factor where the agents belonging to two different groups are located on the sites of a chessboard. Some sites are left vacant, the fraction of vacant sites is denoted by the dilution parameter p. The neighborhood of an agent comprises eight nearest sites (Moore neighborhood). The agents are able to relocate according to the fraction of neighboring agents belonging to their own group. An agent located at the center of a neighborhood where the fraction of neighbors of opposite group (denoted by f ) is greater than a predefined tolerance threshold F , will try to relocate to a neighborhood for which f is less than or equal to F (in the original model, F = 1 2 ). The agents for which f ≤ F , utility factor u is defined to be equal to 1 and the agent is said to be satisfied. Otherwise the agent is unsatisfied and utility factor is 0.
In this paper, we have introduced the utility factor as  [20], with u taking discrete values only. We take a L × L lattice with a fraction p of sites empty at random. Agents belonging to two different groups (of equal size) occupy the rest of the sites randomly in the beginning. If N A and N B denote the number of agents belonging to two different groups, then N A + N B = N , N A = N/2, N B = N/2 and N = (1 − p)L 2 . The fraction of neighbors belonging to the opposite group f is calculated by dividing the number of opposing neighbours by the total number of occupied neighboring sites. For example if 6 neighboring sites are occupied and 2 of them belong to the opposite group then f = 1 3 . The total number of neighbors is a variable and can vary from 0 to 8. If the total number of neighbors of any agent is 0 then the agent is taken as satisfied, i.e., they have a positive utility.
Segregation models are known to exhibit phase transitions. One can vary factors like the threshold value F , the dilution factor p, size of the two groups etc. to investigate the presence of a critical value below/above which segregation can occur. As already mentioned, in [16], a phase transition in the constrained case was observed as the dilution factor was increased. In the unconstrained model considered in [20], where satisfied agents could also move, it was found that by varying p and F , a phase diagram can be obtained. There are two transitions; for very small F the states are frozen, increasing F one can get a segregated state while above a critical F , a mixed state exists.
In the present model, we calculate two important quantities. The first is φ, the fraction of agents with negative utility. If m(u) denotes the fraction of population with utility u, φ is zero for F = 1 trivially. The other quantity is the average utility defined as u = F − f . The average fraction of opposing neighbours f avg helps in understanding qualitatively whether segregation is reached. One can define to be the segregation factor; the larger is s, the better is the degree of segregation. Three types of states may occur; the frozen state where φ has large non-zero value and s is very close to 0.5 (which is the value expected for a completely homogeneous distribution of agents which is initially chosen). This situation is analogous to the jamming transition [14] in segregation model in which large numbers of agents remain stuck in unfavorable states. As F is made larger, s may increase. If s is very close to 1 and φ is negligible, one may call that a segregated state. For even larger F , s will decrease from its maximum value while φ = 0; eventually for F = 1, s = 0.5 and φ = 0, which is of course a mixed state. Our goal is to study whether there are sharp or smooth transitions from one state to another as F is increased.
We have also calculated some dynamical quantities related to the motion of the agents. The first is the persistence probability p move , which is defined as the fraction of agents who have not moved till time t. Another quantity calculated is the mobility factor defined as the average distance travelled by the agents, denoted by d. This is the average Euclidean distance between the initial and final positions (position after reaching steady state) of the agents. These two factors have not been studied in the context of segregation models earlier, to the best of our knowledge.

III. DETAILS OF SIMULATIONS
In the initial configuration the N agents belonging to the two different groups are homogeneously distributed among the L 2 (1 − p) sites. A site is chosen at random at every time step. If the chosen site is occupied then it is tested whether the agents are satisfied or not. If the agents are satisfied they stay at their present site, otherwise they select one unoccupied site at random from all sites that are unoccupied at that moment. We assume that the list of unoccupied locations is available to the agents. The unsatisfied agents move to the randomly chosen empty site provided they become satisfied there (model A) or the utility factor increases (model B). Otherwise they stay at their present site. Only one such attempt is allowed. Dynamics stop when the system reaches an absorbing state; i.e there is no change in the dynamical quantities measured. An absorbing state is always possible here. We have used p values from 0.02 to 0.6 and 0 < F < 1. For each set of parameters 2500 initial configurations are used over which the relevant quantities are averaged. We have used different L values; results for L = 20, 30 and 50 are presented.

A. Steady state behaviour and phase diagram
Model A: We have studied the time dependence of various quantities defined in the last section and observed that they all reach a steady state value in time. We first discuss the behaviour of φ (eq. 2) as a function of time. We find that in general for small F , φ reaches a nonzero saturation value but for larger values of F , the saturation value of φ becomes zero ( Fig. 1 shown for p = 0.3). Plotting the saturation values (inset of Fig.  1), we find that there is a critical value of F = F c where φ decreases to a negligible value (≈ 0) discontinuously. Hence this critical value separates two regions of φ = 0 and φ = 0. F c depends on p.
Next we discuss the behaviour of u (average value of u) in the steady state. As can be seen from Fig. 2, this goes from a negative value to a positive value as F is made larger and crosses zero at a value of F ≃ F c . In analogy with magnetic or liquid-gas phase transition, one can interpret the u = 0 point as a coexistence point. Thus F c acts as a field which separates the two regions with u < 0 and u > 0 much like an external field in magnetic systems below the critical point. For complete characterisation of the system the variation of the saturation value of s, the segregation factor as a function of F is studied. We find that s sharply increases from s ≈ 0.5 to a large value (≈ 1) at a value of F ≃ F c . Hence we find a region where φ > 0 and s ≈ 0.5 which we identify as the frozen state. As φ drops sharply to zero at F c and s also shows a sharp increase at the same point, one can conclude that a transition between a frozen state and a segregated state occurs at F c . Since there is hardly any finite size dependence in the data and all the quantities show sharp changes at F c we conclude that the transition is first order in nature.
Apparently, no sharp transition occurs between the segregated state and mixed state as s decreases for larger values of F approaching ≃ 0.5 as F → 1 monotonically. However we note that s remains almost constant for a range of value of F before decreasing. This suggests there may be another transition occurring at F > F c between a segregated state and a mixed state. As it is difficult to identify the second transition point, we define a "transition point" where s becomes less than 0.9, i.e we define the state as segregated when s ≥ 0.9. Based on these findings, we show the transition points between the three different phases in the p − F plane for Model A in Fig. 4.
We next present some typical snapshots in Fig. 5 to show the effect of increasing F and the quality of segregation. The snapshots show the steady states for p = 0.1 and p = 0.3. For a small value of tolerance threshold F , the probability that an agent is unsatisfied is quite large. However, the probability that a favourable site be found by relocation is also small at small F (unless p is sufficiently large so that the agent has more choice of making movements). For a more detailed discussion see  section VI. Thus the initial grey picture where the agents of two groups are mixed up remains almost unchanged i.e., frozen in time.
As F is made larger, fewer agents will be unsatisfied, however, the probability to find an empty site which will satisfy the agent is larger and the system will undergo a time evolution and the steady state picture will show finite sized domains of agents of the same group making s > 0.5. For smaller value of p, the effect will show up for a larger value of F . If F is made even larger, the need for relocation becomes less since now almost all the agents are satisfied. Although some agents will move, the cluster sizes will be much less. This is apparent in the figures for F = 0.7 (Fig. 5).
We note that the snapshots are very similar to those of the constrained Schelling model (see for example [9]) which is consistent with the fact that model A effectively uses binary utility factors. The cluster sizes, even in the so called segregated state, are small with the interface showing a lot of roughness.
Model B: In model B also we have studied the time dependence of the relevant quantities and observed that they reach a steady state value in time.
The most striking result in model B is that a nonzero value of φ is obtained only for rather small values of p (≤ 0.2) for any value of F > 0. In Fig. 6 we have plotted φ as a function of time for p = 0.1. As in model A, here also φ reaches a nonzero saturation value for smaller F and goes to zero for larger F (shown in the inset of Fig.  6). Although the plot of saturation values of φ with F lacks smoothness, there are two clear indications, first, the saturation values of φ are rather small even for small values of F . Secondly, there is appreciable system size dependence. In fact we find that φ decreases with system size and as the φ values are already 0.1 for L = 50, one can conjecture that φ would vanish for any F in the thermodynamic limit (see Fig. 6 inset).
The behaviour of u in the steady state (Fig. 7) is also completely different from model A and supports the conjecture that φ vanishes for all F and p. In model A, the steady state value of u goes from a negative to a positive value sharply at a particular value of F which is dependent on p. But in model B, the steady state value of u is always positive no matter how small F is (F > 0) and it shows finite size dependence. u is larger for a larger system size; although above F ≈ 0.5, system size dependence is negligible. Hence the value of F c (where u turns positive in model A) is simply equal to zero for model B. Physically this implies that there is no frozen state in model B (see section VI for an argument why this happens).
In Fig. 8 we have shown the behaviour of segregation factor s. From this figure we can see that the steady state value of s is much larger than 0.5 even for small F and remains almost constant over a considerable interval of F before decreasing. The decrease for large F values is due to the same reason as in model A; the agents are satisfied when F is large even with a considerably large value of f . s also shows appreciable system size dependence, it increases with system size and approaches 1 in the thermodynamic limit for smaller values of F . We show in Fig. 9 the transition points between the segregated and mixed phase for model B. Since in model B there is no frozen state, there is only one transition line for non-zero F . As in model A, there is no sharp transition between the segregated and mixed state and the boundary between the segregated state and mixed state is obtained using the same criteria as in model A.
Typical snapshots of the steady states for model B are shown in Fig. 10. The steady state snapshots are almost identical in nature to those occurring for the unconstrained case with discrete utility factors [9] and hence we find that even with the constrained case, it is possible to obtain segregated states with large cluster formation provided the utility factors are continuous. The picture for small F is very similar to that occurring in phase seperation dynamics. We note that the cluster sizes are much larger compared to those in model A especially for small F where s is close to 1. Also the interfaces are much more smooth and the overall scenario is similar to liquid flow dynamics. Even for larger values of F where the mixed state occurs, the cluster sizes are apparently larger compared to model A.

B. Results related to mobility
We have evaluated persistence probability and average distance travelled in both the models.

Model A:
We have plotted the persistence probability p move corresponding to movement of the agents as a function of time in the inset of Fig. 11. The main plot shows the steady state values which drop to a considerably smaller value close to F c . There is also a nonmonotonic behaviour of the steady state values as a function of F . The plots support the picture that for small p, the agents show very little movement leading to frozen states. Once again system size dependence is negligible.
The plot of average distance travelled by the agents d against F are shown in Fig. 12a. From this figure one can see that the average distance moved by the agents suddenly increases close to F = F c and then slowly decays with F . Model B: For model B the persistence probability corresponding to movement of agents with time is plotted in Fig. 13. We have plotted the steady state value of p move for a rather small value of p = 0.05 and have found that there is a monotonic increase as a function of F . Also, the steady state probability is fairly low for F 0.4 signifying the agents have high mobility. Considerable system size effects are present; for larger systems, the persistence probability decreases for F 0.4.
In Fig. 12b the average distance travelled by the agents against F is plotted. There is an overall tendency of a slow decay as F is increased.
The behaviour of p move and d can be easily explained as F is made larger; the need to move decreases as the agents become more tolerant and hence there is less movement making p move large and d small. This is true in both the models.

V. CORRELATION
We have calculated the correlation as a function of distance in the steady state to have an idea of the cluster size, the latter is a measure of the quality of segregation. If the ith site is occupied we have assigned values S i = ±1 corresponding to the two different groups; if it is empty S i = 0. Correlation between two sites at a distance r is defined as C(r) = S i S j where r is the Euclidean distances between the ith and jth sites. Figures 14 and 15 show the decay of correlation C(r) with distance r for model A and model B respectively. The data is fit with the form C(r) ∼ exp(−( r ξ ) a ) and the effective length scale ξ upto which the sites are correlated for different F for both the models is extracted. Values of a depend on the parameters. Figures 16 and 17 show the plots of ξ as a function of F for model A and model B respectively. From these figures it is evident that the cluster sizes are larger in model B compared to model A, i.e, it is possible to obtain a good quality segregation even in the constrained model with continuous utility.

VI. SUMMARY AND DISCUSSIONS
In this paper we have defined continuous utility factors in the constrained Schelling model with non-local jumps. We have introduced utility factor as u = F − f where F is the tolerance parameter and the fraction of opposing neighbor is f . The agents are satisfied if u has a positive value or zero. Thus the utility factor not only carries the information whether the agent is happy or not, it also tells how happy or unhappy they are.  [20] as only movement of unsatisfied agents are considered although in both models nonlocal jumps are allowed. Model A shows a frozen state and a sharp transition to a segregated state at a nonzero value of F . The segregation factor s remains close to 1 before decreasing slowly to 0.5, the value corresponding to a completely mixed state. Defining the segregated state to be that for which s > 0.9, one can obtain a boundary between the segregated and the mixed state.
The most striking observation for model B is that here the frozen state does not exist in the thermodynamic limit in contrast to model A and unconstrained model with discrete utility [20]. One can justify the presence (absence) of the frozen state in model A (model B) for small F in the following way. Let the two groups be labelled X and Y. Let at a particular vacant site all the neighboring sites be occupied (this will be more probable for small p) and y be the number of Y type neighbors. Now the probability that an X type agent which is unsatisfied at its present position will jump to this par- is very small, then only very few terms will contribute to the sum. Hence the probability is rather small and very few unsatisfied agents will be able to move in a finite time (note that only one attempt is allowed) for small F and p. Thus for all practical purposes this makes the majority of the agents stay in their present unsatisfied state. In model B, the probability that an X type unsatisfied agent with y ′ number of Y type neighbors in its present position will jump to this particular vacant site is Obviously this probability is much larger than that in model A and the frozen state ceases to occur in model B.
In model B, the segregation factor remains very close to 1 from F = 0 to a finite value of F and then decreases slowly to 0.5. One can obtain a boundary between a segregated state and mixed state as in the case of model A.
Since model A is identical to the constrained Schelling model with discrete utility, it is not surprising that only small clusters are generated. In model B, large clusters are formed similar to the unconstrained model. This is confirmed from the calculation of the correlation as a function of time. Of course, a rigorous calculation of cluster sizes as a function of the parameter F and p will be able to distinguish model A and model B more quantitatively and will be reputed in a future publication [21]. Other features like persistence probability p move and average distance travelled d also show sharp differences in the two models. In model A, these quantities are largely affected by the presence of the phase transition at F c ; there is non-monotonic behaviour in model A. We may add the remark here that although the behaviour of p move and d have clearly different behaviour in the two models, the variation with F in model A for F > F c and in model B for F > 0 is quite similar for both quantities. Note that in these two regions u > 0 and thus the agents are happy on an average, which seems to be the relevant factor determining the trends of p move and d. It will be interesting to compare these findings with real data, if available, in future studies.
In a way, model B is a semi-constrained model as movements are less restricted here and perhaps it is not entirely surprising that the segregation occurs here to a larger extent. However, the absence of the frozen state is a complete surprise.
The present model with continuous utility (model B) shows that moves which make utility larger, but not necessarily positive, helps in attaining segregated states more effectively. In contrast to the unconstrained model, this is a more realistic strategy as in the unconstrained model, the tendency to move keeping the utility factor unchanged does not seem to be practical. On the other hand, in the study of the constrained model B, we get the important message that even if one cannot achieve the ideal state in a single step, it is worthwhile if an action brings one closer to it.