Combining segregation and integration: Schelling model dynamics for heterogeneous population

The Schelling model is a simple agent based model that demonstrates how individuals' relocation decisions generate residential segregation in cities. Agents belong to one of two groups and occupy cells of rectangular space. Agents react to the fraction of agents of their own group within the neighborhood around their cell. Agents stay put when this fraction is above a given tolerance threshold but seek a new location if the fraction is below the threshold. The model is well known for its tipping point behavior: an initial random (integrated) pattern remains integrated when the tolerance threshold is below 1/3 but becomes segregated when the tolerance threshold is above 1/3. In this paper, we demonstrate that the variety of the Schelling model steady patterns is richer than the segregation-integration dichotomy and contains patterns that consist of segregated patches for each of the two groups alongside patches where both groups are spatially integrated. We obtain such patterns by considering a general version of the model in which the mechanisms of agents' interactions remain the same but the tolerance threshold varies between agents of both groups. We show that the model produces patterns of mixed integration and segregation when the tolerance threshold of most agents is either below the tipping point or above 2/3. In these cases, the mixed patterns are relatively insensitive to the model's parameters.


Introduction
The Schelling model of segregation was introduced by Thomas Schelling in the late 1960s (Schelling 1969(Schelling , 1971(Schelling , 1974(Schelling , 1978. Schelling devised the model in order to demonstrate how individuals' relocation decisions entail global segregation. Schelling noted that his abstract model could reflect different spatial phenomena, but his main concern was the residential segregation of blacks and whites in United States cities (Schelling 1969, p488). In this interpretation, the model consists of households that make residential decisions based on the ethnic composition of neighborhoods.
Using today's terminology, the Schelling model is an agent-based model. Agents belong to one of two groups and occupy cells of rectangular space. A cell can either be empty or occupied by a single agent. Agents react to the fraction f of friends (i.e. agents of their own group) in the local neighborhood around their cell. An agent is satisfied with its cell when the fraction of friends is above the threshold F. However, an agent is dissatisfied when the fraction is below F (f < F), and consequently the agent tries to relocate to an empty cell where the fraction of friends within the cell's neighborhood is satisfactory (f ≥ F). F is the minimum fraction of friends required by an agent to be satisfied, and is known as the tolerance threshold.
A wide spectrum of formal representations of the Schelling mechanism exhibit a wellknown tipping point behavior: An initial random pattern remains, in time, integrated for F < F critical , while it converges to segregation for F ≥ F critical . The tipping point F critical is about 1/3, indicating that a relatively weak individual tendency to segregate is sufficient for global segregation. Schelling used the moderate value of F critical to demonstrate that residential segregation in cities could form even when all of the individuals are willing to live within integrated neighborhoods and no ethnic discriminatory mechanism or economically-induced segregation exist (Schelling 1971).
Schelling's simplistic mechanism of residential relocation constitutes the core of more comprehensive models of residential dynamics (Ellis et al. 2012). Thus, it is important to reveal the spectrum of patterns that it can generate. In this paper, we demonstrate that the model's repertoire is not limited to merely integration ( Figure   1a) or segregation (Figure 1b), but also include intermediate patterns of mixed integration and segregation. We refer to them as mixed patterns.
In the context of this study, we define mixed patterns as patterns that contain segregated patches for each population group as well as patches where both groups coexist (Figure 1c). We obtain mixed patterns by introducing variation in the agents' tolerance thresholds. The idea is to consider a population where part of the agents have tolerance thresholds below the tipping point (F< F critical ) while others have tolerance thresholds above (F ≥ F critical ). We study different distributions of tolerance thresholds and identify the ones that produce mixed patterns.
The paper has the following structure: Section 2 demonstrates the relevance of mixed patterns to the spatial ethnic patterns of cities. Section 3 presents a brief review of studies regarding the Schelling model. Section 4 includes a formal description of the model and Section 5 describes the tolerance distributions used in the investigation of the model. The indices that are used to characterize the patterns are described in Section 6, followed by the results in Section 7. We summarize our findings in Section 8.

Schelling's original studies
Schelling introduced the original version of the model in 1969 (Schelling 1969). He referred to it as the linear model because it has the form of a one-dimensional array.
The array is populated by "stars" ("+") and "zeros" ("0") representing agents belonging to two groups. An agent is dissatisfied when the fraction of friends in the four nearest cells of each side is below the tolerance threshold. If so, the agent relocates to the nearest position where the fraction of friends is above the threshold.
Because all cells are occupied, the agent is inserted into its new position by shifting the position of the other agents. The model is updated in discrete steps by considering one agent at a time using a predefined order. Schelling illustrated that for F=0.5, an initial random pattern segregates into a long sequence of stars and zeroes.
In a later publication (Schelling 1971), Schelling presented the two-dimensional version of the model. In this model, agents are not shifted sideways in order to make room for relocating agents; instead, Schelling introduced empty cells as potential destinations for relocating agents. Agents move to the nearest empty cell that has a sufficient fraction of friends when dissatisfied with their local 3-by-3 neighborhood.
In that paper, Schelling revealed for the first time that F critical is essentially below the intuitive value of 1/2 and is close to 1/3. That is, for F < 1/3, an initially random residential pattern remains random-like while for F ≥ 1/3, the pattern converges to a state of global segregation (Schelling 1971, p158).

Later studies
The body of literature on the Schelling model has been accumulating since the 1970s, and thus, it is far too large and fragmented to allow for a comprehensive review within this paper. Hence, we limit our review to relevant publications. Benenson and Hatna (2011) were the first to reveal that the Schelling model can generate patterns where integration and segregation co-exist. More specifically, they demonstrated that when the two groups are of different sizes and F < F critical, the model produces a segregated patch for the majority group while the rest of the area is occupied by both groups. In a later study, Hatna and Benenson (2012) showed that the model generates similar patterns when the tolerance thresholds are group-specific. Under these settings, the model generates similar patterns when the tolerance threshold of one group is above F critical, but moderate while the tolerance threshold of the second group is below F critical. It is worth noting that the patterns generated in these two studies are simpler than the mixed patterns that are the focus of this paper. Xie and Zihaou (2012) were the first to study a Schelling model where each agent holds a personal preference concerning the ethnic composition of neighborhoods.
Their model is an extension of the model developed by Mare (2006, 2009) where all white and black agents have the same utility functions. They based the agents' tolerance regarding neighborhood composition on a US survey that revealed large heterogeneity in whites' tolerance for black neighbors. The model generates lower level of racial residential segregation when compared to the case of common racial tolerance. The authors mention that tolerant agents reside within less segregated neighborhoods, but did not indicate whether the model produces patterns of mixed integration and segregation. Vinkovic and Kirman (2006) provide a general insight into the relation between rules and patterns by considering a continuous analog of the Schelling model. The authors describe two fundamental types of relocation rules. The first includes rules that enable relocation to a better location only. These rules generate patterns that stall with an essential fraction of discontent agents who are unable to find a better location. The second rules enable relocation to cells of the same utility. They generate patterns that do not stall, even when all agents are satisfied. In time, the patterns converge to a state where the statistical characteristics of the patterns (such as level of segregation) do not change. Vinkovic and Kirman (2006) demonstrate that the patterns are very sensitive to parameters when the rules allow for relocation to better cells only. For example, the size of the clusters depends on the fraction of empty cells. In contrast, rules that allow for relocation to cells of the same utility produce patterns that are far less sensitive to the model settings. For example, all segregated patterns consist of two clusters (one for each group) when a torus grid is used.
In this study, we follow Vinkovic and Kirman's (2006) insight and employ relocation rules that allow for agent's movement between cells of the same utility. However, we restrict such movements to satisfied agents. Dissatisfied agents migrate to the better cell only.

Model rules
The rules of the model used in this study follow Hatna and Benenson (2012). Space is represented by a N × N array of cells on a torus. A cell is either vacant or populated by a single agent. We denote an agent as a, a cell as c, and the Moore n × n neighborhood of c, excluding c itself, as U(c). Each agent a belongs to one of two color groups: blue or green, and has a personal tolerance threshold F a . An agent considers other agents of the same color as belonging to its own group; we refer to them as friends. Agent a can calculate the fraction of friends f a (c) among all agents located in U(c). Hence, it ignores the vacant cells of U(c).
Agent a evaluates the utility u a (c) of cell c within a non-empty neighborhood according to the fraction of friends and its personal tolerance threshold F a : The utility of a cell in an empty neighborhood is defined as 0.
According to (1), the utility varies on [0,1]. The agent is satisfied with c if the fraction of friends within the U(c) is F a or higher. In this case, u a (c)=1. If the fraction of friends in U(c) is lower than F a , then the u a (c)=f a (c)/F a ; that is, the more friends the better.
Agent a, located in cell h, performs its relocation decision in two steps: Step 1: The agent decides whether to relocate: • It generates a random number p, uniformly distributed on [0, 1).
• If u a (h) < 1 or (u a (h) = 1 and p < m), then it tries to relocate, otherwise it stays at h. That is, an agent tries to relocate in two cases: (a) when it is dissatisfied or (b) at probability m if satisfied.
Step 2: If agent a decides to relocate, then it searches for a new location and decides whether to move: • It constructs a set V a of opportunities for potential relocation by randomly selecting w unoccupied cells from all cells that are unoccupied at that moment.
• It estimates a utility u a (v) of each v∈V a and selects the one with the highest utility u a (v best ). If there are several best vacancies in V a , it chooses one of them randomly.
• It moves to v best if either of the following two conditions are met (otherwise it stays at h): o u a (h) < 1 and u a (v best ) > u a (h), i.e., it is dissatisfied with its current cell h and v best is better than h.
o u a (h) = 1 and u a (v best ) = 1, i.e., it is satisfied with h but moves to v best which is also satisfactory.
At every time step, each agent performs the above steps once. Following Schelling's original approach, we use asynchronous updating (Cornforth et al. 2005) and allow each agent to make its decision based on the instantaneous state of the pattern.
Agents are processed in random order, which is established anew at each time step.
Our model rules differ from Schelling's description in the following respects: • A satisfied agent tries to relocate with nonzero probability m. Schelling's assumption is m = 0.
• The distance between cells has no effect on agents' relocation. In Schelling's model, agents move to the closest satisfactory position.
• Agents can move from one unsatisfactory cell to another if the relocation increases the number of neighboring friends. In Schelling's description, agents can only move to cells that they find satisfactory 2 .

The tolerance thresholds of agents
We explore different distributions of agents' tolerance thresholds in order find the ones that produce mixed patterns. We limit our investigation to symmetric cases where the tolerance distribution within each color group is identical.
We examine two families of discrete distributions: 1. Dichotomous: Blue and green populations consist of two subgroups: The tolerance threshold is F 1 for a fraction α of agents (of each color) and F 2 for the rest.
2. Beta-binomial: It is sufficiently flexible for generating a variety of tolerance threshold distributions.
We explore different fractions of blue and green agents as well. We denote β as the fraction of blue agents, e.g. β = 0.5 indicates equal numbers of blue and green agents.
We use a 5×5 Moore neighborhood, which results in 25 values of F ∈ {0/24, 1/24, ..., 24/24} for the majority of the situations 3 . We choose a 5x5 neighborhood because the classical 3×3 neighborhood masks the fine details of the model's dependency on F, as it entails only nine values of F.

General settings
Unless otherwise stated, we use the following settings in all of the experiments: • Grid dimensions of 50×50 cells.
• 98% of the grid is occupied, that is, 50 cells are vacant.
• Equal number of blue and green agents (Β=0.5) • An agent evaluates w = 30 unoccupied cells per time step when considering relocation.
• The probability of a relocation attempt by a satisfied agent is m=0.01.
• The initial color and tolerance patterns are random.

Evaluation of the model outcomes
We estimate the long-term behavior of the model by running it for 50,000 time steps. For most of the experiments presented in this study, the model patterns converge to a quasi-stable state in which their statistical properties do not change.
This quasi-stable state is independent of the initial spatial configuration of agents.
The model's patterns can stall when none of the agents have suitable relocation opportunities. For the settings used in this study (section 5.2) and a homogeneous tolerance threshold F for all agents, the patterns stall at a highly segregated configuration when F≥14/24.
The model produces two patterns: a pattern of color (i.e., blue and green agents) and a pattern of the agents' tolerance thresholds. We follow Hatna and Benenson (2012) in characterizing these patterns using the three measures listed below.

Measuring segregation by color (I C ) and tolerance (I T )
The level of segregation of the color and tolerance pattern is measured using the Moran's I index of spatial association (Anselin 1995). We denote I C as the index for color and I T as the index for tolerance segregation. For random (integrated) patterns, I is close to zero (Figure 1a), while for fully segregated patterns, I is close to 1 (Figure 1b limitation of I C, we introduce the C index.

Identifying mixed patterns (C index)
We employ the C index to identify mixed patterns. The index evaluates how closely a color pattern resembles a mixed pattern with three equal sized (green, blue and integrated) patches, such as the one shown in Figure 1c.
The index is based on partitioning the color pattern into three regions: (1) pure blue, (2) pure green and (3) integrated. The partition includes the boundary between the three regions as well (Figure 3). We define the C index as the size of the smallest region relative to the size of the entire grid. A region that is not present in the pattern has a size of zero.

Results
We first review the classic case of common F and demonstrate its dependence on m.
Then, we explore the patterns produced by dichotomous tolerance thresholds.
Finally, we investigate the patterns for a beta-binomial distribution of the agents' tolerance.

Cases of common tolerance threshold for all agents
We consider the case where all agents have the same tolerance threshold F for demonstrating the dependence of the model's steady patterns on the rate m of relocation attempts by satisfied agents.    two large patches, one for each group, are formed. Afterwards, the length of the boundary between the two patches converges to a minimum. Figure 6 illustrates that the process is slower for the critical value of F=5/24 as compared with F=8/24.
It is worth noting that during the growth of the blue and green patches, the patterns contain integrated areas as well. Such patterns are mixed according to the value of C, but they dissolve as the blue and green patches take over the entire pattern.

Two equal sized groups of different tolerance thresholds
Up to this point, all agents had the same tolerance thresholds. We now pay attention to cases where each color group is composed of two equal sized subgroups: half of blue and green agents (α=0.5) have a tolerance threshold F 1 , while the other half has a tolerance threshold F 2 . We keep the number of blue and green agents equal as well (β=0.5).
We study the model dynamics for four values of F 1 : (a) zero -0/24, (b) below the tipping point -3/24, (c) tipping point -5/24, (d) above the tipping point -7/24 and then present the general behavior for all (F 1 , F 2 ) pairs. We conclude this section by demonstrating the temporal development of the mixed patterns.
To remind, we average all numeric results for a given set of model parameters over  Moran's I T for tolerance and C for detecting mixed color patterns) on F 2 . When F 2 <5/24, the pattern is integrated. Starting at F 2 = 5/24, the value of I C increases linearly until it reaches a value of 0.46 and stabilizes at F 2 = 18/24. I T is non-zero from F 2 = 12/24, and then increases up to 0.7, exceeding I C at F 2 = 15/24. I T , just as I C , stabilizes at F 2 = 18/24. C clearly indicates that for F 2 ≥ 18/24, the color pattern is mixed (e.g. Figure 7b, F 2 =20/24).
Mixed patterns appear when the tolerance patterns become segregated. Blue and green patches consist of intolerant F 2 agents, while the integrated area is made of the completely tolerant F 1 agents.
When F 2 ≤12/24, the pattern of tolerance is integrated because F 2 agents are content to reside within integrated areas or within the boundary of segregated patches of their own color, where about half of their neighbors are friends, while the completely tolerant F 1 agents are satisfied within any neighborhood. However, for F 2 >12/24, segregation by tolerance is observed as F 2 agents seek local majority and therefore tend to leave diverse areas, while the F 1 agents are willing to stay within integrated areas.

F 1 = 3/24, F 2 varies
When F 1 = 3/24, the F 1 agents slightly react to neighbors. The color pattern is mixed for high values of F 2 , however the dependence of the patterns on F 2 is different form the case of F 1 = 0 ( Figure 8).
For F 2 ≤6/24 (and not 5/24, as above), the color pattern is integrated. Starting from F 2 =7/24, I c gradually increases as the integrated area is replaced by the growing blue and green patches until it reaches a maximum of 0.7 at F 2 =12/24. At this value of F 2 , the steady pattern consists of two segregated patches and only the boundary between the patches is integrated (Figure 8b, F 2 = 12/24).
The value of I T begins to increase at F 2 =9/24, since F 1 agents concentrate at the boundaries of the green and blue patches (Figure 8b, F 2 =12/24). I c begins to drop at F 2 =13/24 while I T continues to increase, indicating that the segregated pattern is replaced by a mixed one. The three indices stabilize at F 2 =16/24, and C indicates that the patterns are mixed (C ~ 0.15).
Note that within the interval 8/24 ≤ F 2 ≤ 15/24, the model patterns are mixed, albeit the area of integration is smaller (0.05 < C< 0.1), and the level of segregation of the tolerance patterns is very low. We will show that this type of pattern is characteristic for F 1 = 3/24 in Section 7.2.5.

Varying F 1 and F 2
The case where both F 1 and F 2 vary (α = 0.5, β = 0.5) is presented in Figure 11.
The heat map of C (Figure 11c) confirms that a mixed pattern emerges when the tolerance of one of the subgroups is at a tipping point of 5/24 or below, while the tolerance of the other subgroup is 16/24 or above. We also see that in these cases, the tolerance patterns are segregated (Figure 11b).
For F 1 ∈ { 0 , 1 /2 4 , 2 /2 4 } , segregation by color (I C ) increases gradually with the increase of F 2 until a mixed pattern is formed. This is indicated by the emergence of segregation by tolerance (I T ) at F 2 = 13/24. Segregation by tolerance exceeds segregation by color at F 2 = 17/24.
For F 1 ∈ {3/24, 4/24, 5/24}, with the increase of F 2 , the pattern become segregated before a mixed pattern emerges. Mixed patterns do not emerge for cases of F 1 > 5/24 that are below the diagonal.
(a) Moran's I for color (b) Moran's I for tolerance (c) C in percentages Figure 11: Heat maps for the three indices for all pairs of F 1 and F 2 at t=50,000.

The formation of mixed patterns
We now demonstrate how the mixed patterns emerge, using the case of F 1 =3/24 and F 2 =20/24. Figure 12a depicts the dynamics of a model run that begins with a fully segregated pattern of color.
The level of color segregation (I C ) of the model pattern decreases, while the level of segregation by tolerance (I T ) and the C-index increase. Visually, the boundary between the segregated parts of the pattern dissolves towards time step 100 and then, between time steps 200 and 500, tolerant F 1 agents form a steady integrated area.
The fraction of migrating F 1 agents, who are highly tolerant, remains close to m during the entire run ( Figure 12b). The relocation rate of intolerant F 2 agents is higher than the one of the F 1 -agents at the first 200 time steps when F 2 agents near the boundary of the segregated parts of the pattern relocate into the internal parts of the patches. These migrations reduce the number of empty cells within the segregated patches, while increasing their number within the integrated boundary area (see patterns for t > 200). As a result, cells that are suitable for the F 2 agents become rare, and the actual migration rate of the F 2 agents decreases far below m, starting from t = 200 (Figure 12a, right). Figure 12b represents the model dynamics for the same tolerance distribution (F 1 =3/24 and F 2 =20/24) using a random initial pattern. At t=0, all of the F 1 agents are satisfied, while all of the F 2 agents are not. As a result, more than 60% of the F 2 agents relocate during the first time step, and during the next 50 time steps, the value of the I C grows. The migration rate of the F 1 -agents remains very close to the value of m (1%). As in the case of a segregated initial pattern, F 2 -agents tend to avoid the boundaries and relocate to the internal parts of the patches of their own color. This initiates the segregation by tolerance that is reflected by the growth of I T and C. The global characteristics of the patterns for the initially segregated and random conditions become identical towards t = 200, while the model patterns remain visually different for a longer period. Figure 12: The formation of a mixed pattern for the case of F 1 =3/24 and F 2 =20/24, starting from a (a) random and a (b) segregated initial pattern.

Varying α, β and m
In the previous section, the number of F 1 and F 2 agents (α=0.5) was equal, as was the number of blue and green agents (β=0.5), while the rate of relocation attempts by a satisfied agents was low (m=0.01). In this section, we explore how α, β and m influence the mixed patterns.
The size of the integrated patch is almost proportional to α. When α is close to zero, the pattern is segregated, because highly intolerant F 2 agents comprise the vast majority of the population. In this case, the F 1 agents are located at the boundary separating the blue and green patches (Figure 13b, α=0.05

Varying fraction β of blue agents
We now explore how the fraction β of blue agents affects the mixed patterns for the same case of F 1 =3/24, F 2 =20/24, but we keep the fraction of F 1 and F 2 agents equal (α=0.5) ( Figure 14).
When the vast majority of agents are green (Figure 14b, β = 0.05), the few blue agents form a small patch. The blue F 2 agents reside within the patch, while the blue F 1 agents occupy the edge but are too few to create a distinct integrated area. As β increases, the integrated area becomes apparent and grows until reaching a maximum at β = 0.5. I T and C increase as β grows to 0.5 and then decrease, while I C behaves in the opposite manner. To investigate the dependence of the mixed patterns on the probability m that a satisfied agent would attempt to relocate, we consider the case of F 1 = 3/34 and vary F 2 and m ( Figure 15).
According to the heat maps, given F 2 ≥ 18/24, mixed patterns emerge for any m≥0.01. For these values of F 2 , the tolerance pattern is always segregated ( Figure   15b) and the value of C is high (Figure 15c).
The heat maps also indicate that for a F 2 between approximately 8/24 and 17/24, the model produces a mixed pattern without the segregation of agents by tolerance.
These patterns are sensitive to the value of m and tend to diminish as m grows. and α, β=0.5.

The dependence of the mixed patterns on neighborhood size
We now test how neighborhood size affects the mixed patterns. We limit the investigation to the case of F 1 = 0/24, F 2 = 20/24 and vary the neighborhood size from 3x3 to 9x9. In order to keep the neighborhood small relative to the grid size, we use a twice as large grid of 100x100 cells. We also increase the number of empty cells w considered by agents when relocating from 30 to 120.
For 3x3 neighborhoods, the intolerant F 2 agents produce many small homogeneous patches while the tolerant F 1 agents occupy the boundaries and produce small integrated areas ( Figure 16). For larger neighborhood sizes, the agents produce mixed patterns that are more distinct. These patterns consist of two large homogeneous patches and an integrated area.

Beta-binomial distribution of tolerance
To go beyond dichotomous distributions of tolerance, we consider cases where agents of both colors are assigned one of 25 ({0/24, 1/24, ..., 24/24}) tolerance thresholds according to a beta-binomial distribution. We keep the number of blue and green agents equal (β=0.5). We compare five qualitatively different cases by varying the distribution parameters ( Figure 18).
The first case is a positively skewed unimodal distribution wherein the tolerance of about 1/3 of the agents is below the tipping point (F < 5/24) and the average is about 7/24 ( Figure 18a). This distribution leads to a pattern that is mixed by color and integrated by tolerance (C=0.07, I C = 0.49, I T = 0.02).
The second case is a symmetric unimodal distribution (Figure 18b) where only about 4% of the agents have a tolerance threshold below the tipping point and the average is 12/24, which is much higher than the tipping point. As expected, the steady color pattern is segregated, while the tolerance pattern remains integrated, I C =0.84, I T =0.03, C = 0.
The third case is a uniform distribution (Figure 18c)  The fourth case is a symmetric U-shaped distribution with about 29% of the agents having tolerance thresholds below the tipping point (Figure 18e), with an average of 12/24 (Figure 18e). The color pattern is somewhat mixed (I C = 0.52, C = 0.09), while the segregation of tolerance is high (I T = 0.45) but still below I C .
The fifth case is another symmetric U-shaped distribution with higher variance. The average tolerance is 12/24 and 39% of the agents have tolerance thresholds below the tipping point. This leads to a mixed color pattern that looks more distinct (C = 0.10) and a level of segregation by tolerance (I T =0.61) that is higher than the level segregation by color (I C =0.46). From this limited investigation, we can hypothesize that mixed patterns become more distinct as the variance of the tolerance distribution increases and the vast majority of agents are either highly tolerant or highly intolerant.

Summary
Stemming from ethnic urban patterns, which in many cases are composed of homogeneous and heterogeneous neighborhoods, we investigated ethnic residential dynamics for a population of individuals that differ in their tolerance to other ethnic groups. Formally, we studied the Schelling model dynamics for a heterogeneous population of agents.
Most of our investigation focused on dichotomous cases, where the level of agents' tolerance is either F 1 or F 2 . We found that in these cases, the model produces mixed patterns when the tolerance of the F 1 agents is equal to or below the tipping point (F 1 ≤ 5/24), while agents of the second group need more than 2/3 of their neighbors to be friends (F 2 ≥ 16/24). For these tolerance distributions, the F 1 -agents are satisfied almost everywhere, while the F 2 -agents are highly intolerant and seek neighborhoods with sufficiently high fractions of friends. The steady pattern of agents' tolerance in these cases is segregated and the blue and green F 2 -agents form two segregated patches, while the F 1 agents of both colors concentrate within the integrated areas that separate the patches of the F 2 -agents.
When we set F 1 ≤ 1/24 and investigated the model patterns, varying F 2 from 0/24 to 24/24, we found that an increase of F 2 causes a gradual transformation from integration to mixed. However, for F 1 ∈ [3/24, 5/24], with the growth of F 2 , the pattern first changes from integration to segregation and only then from segregation to mixed.
Mixed patterns emerge because intolerant agents leave integrated areas and create dense blue and green patches with few empty cells. Tolerant agents stay within the integrated areas and migrate within them for random reasons, but are not able to enter the dense segregated patches. Integrated areas thus serve as extended boundaries between segregated patches.
As long as a part of the population is tolerant, while the rest is highly intolerant, mixed patterns emerge regardless of other model parameters. In particular, the patterns remain mixed irrespective of the fraction α of F 1 -agents, fraction β of blue agents, the rate m of random relocation attempts and the neighborhood size. Model parameters influence the size of the segregated and integrated patches, but the mixed nature of the patterns is always preserved.
If the agents' tolerance is non-dichotomous, but distributed over the entire [0,1] range, mixed patterns became more distinct as the fraction of agents with extreme tolerance threshold increases.
The Schelling model produces mixed patterns due to the relocations of intolerant agents out of the integrated areas. Similar residential movements, such as the relocation of white residents out of ethnically integrated neighborhoods (Crowder 2000), might have contributed to the formation of mixed patterns in cities. However, models that include additional factors, such as economic status and dwelling prices (Benard and Willer 2007;Fossett 2006;Hatna and Benenson 2011), are likely to provide additional insight into the formation of mixed patterns as segregated and integrated neighborhoods may attract different segments of the residents' population of the same ethnicity.

Acknowledgements
Erez Hatna acknowledges support from J. M. Epstein's NIH Director's Pioneer Award, number DP1OD003874 from the National Institute of Health.