Multi-mode fluctuating selection in host-parasite coevolution

selection our of spatial and temporal diversity in nature. Host-parasite theory has classically assumed fluctuations either occur between highly specific genotypes (Matching Alleles: MA) or from specialism to generalism (Gene-for-Gene: GFG). However, while MA can only generate one mode of fluctuating selection, we show that GFG can in fact produce both rapid “within-range” fluctuations (among genotypes with identical levels of investment but which specialise on different subsets of the population) and slower cycling “between ranges” (different levels of investment), emphasising that MA is a subset of GFG. Our findings closely match empirical observations, although sampling rates need to be high to detect these novel dynamics empirically. Within-range cycling is an overlooked process by which fluctuating selection can occur in nature, suggesting that fluctuating selection may be a more common and important process than previously thought in generating and maintaining diversity. generate high-frequency fluctuating selection within-ranges and low-frequency fluctuating selection between ranges. We discuss our results in the context of empirical observations and the wider theoretical literature.


Introduction
Fluctuating selection -where the strength or direction of selection changes through time -is a core concept in evolutionary biology (Haldane and Jayakar 1963). The causes and implications of fluctuating selection are therefore the focus of much theoretical and empirical research. This is especially true in the context of host-parasite coevolution, where fluctuating selection driven by antagonistic interactions is central to the theories of spatial and temporal diversity (Clarke 1979;Meyer and Thomson 2001), the evolution of sex (Maynard Smith 1978;Hamilton 1980), and parasite-mediated sexual selection (Hamilton and Zuk 1982;Ashby and Boots 2015). Fluctuating selection is of particular importance in antagonistic coevolution because unlike directional selection (arms races), which must eventually be curtailed due to fitness costs or limits to adaptation (e.g. Hall et al. 2011), fluctuating selection can potentially be maintained indefinitely. However, not all forms of fluctuating selection are alike, both in terms of the gene frequency dynamics (e.g. periodic, chaotic, or stochastic cycling) and, importantly, the phenotypic dynamics (e.g. fluctuations among specialists, or between specialists and generalists). The precise nature of the genetic and phenotypic dynamics is crucial for theories that depend on fluctuating selection (Parker 1994;Peters and Lively 1999) and for understanding empirical observations of host-parasite coevolution (Dybdahl and Lively 1998;Decaestecker et al. 2007;Gomez and Buckling 2011;Hall et al. 2011;Luijckx et al. 2013;Gómez et al. 2015). Improving our understanding of this process, in particular how it depends on genetic interactions and the environment, has important implications across a wide range of questions in evolutionary biology.
Theoreticians have largely focused on studying how the underlying genetic interactions between hosts and parasites affect the mode of fluctuating selection. As a result two frameworks, known as "matching allele" (MA) and "gene-for-gene" (GFG), have emerged as the dominant paradigms for understanding the role of genetic interactions in shaping coevolutionary dynamics. Although both models readily produce fluctuating selection, the underlying assumptions and resulting dynamics  Multi-mode fluctuating selection in host-parasite coevolution. Ecol. Lett. 4 differ greatly. In the MA model -which emerged from classical niche theory and resembles self/nonself recognition systems in animals (Grosberg and Hart 2000) -parasites need to genetically "match" a host for successful infection. Hosts therefore attempt to avoid the most common parasite and parasites seek to match the most common host (Yu 1972;Seger andHamilton 1988,Frank 1993b).
This indirect negative frequency dependence typically leads to fluctuating selection between equally highly specific genotypes. In contrast, the GFG model -which originally stemmed from observations of plant-pathogens (Flor 1956;Thompson and Burdon 1992) -assumes that hosts and parasites vary in the range of genotypes that can be resisted or infected, with broader ranges potentially associated with fitness costs (Mode 1958;Jayakar 1970;Leonard 1977,Frank 1993aParker 1994;Sasaki 2000;Segarra 2005,Tellier andBrown 2007a,b). The GFG model produces a much wider variety of outcomes than the MA model, including stable genetic polymorphisms either within a single range of infectivity or defence (Sasaki 2000;Segarra 2005) or across multiple ranges if there is direct frequency dependence (Tellier and Brown 2007a,b), and fluctuating selection between narrow-range specialists and broad-range generalists (i.e. cycling between ranges) (e.g . Leonard 1994;Sasaki 2000;Agrawal and Lively 2002). Continuous analogues of the MA and GFG models exhibit broadly similar dynamics to their discrete counterparts, with pure "matching" models akin to MA only exhibiting fluctuating selection between equally highly specific genotypes and "range" models akin to GFG generating stable mono-or polymorphism or fluctuating selection between specialism and generalism (Best et al. 2010;Boots et al. 2014).
The contrasting assumptions and dynamics of MA and GFG genetics have sparked considerable debate as to which model is more realistic (Frank 1993a(Frank ,b, 1996Parker 1994Parker , 1996, leading to the development of multiple variations on the core frameworks (Parker 1994;Lively 2002, 2003;Fenton et al. 2009Fenton et al. , 2012Gómez et al. 2015) and experiments to detect the underlying genetics or coevolutionary dynamics of real systems (Dybdahl and Lively 1998;Buckling and Rainey 2002;Thrall and Burdon 2003;Decaestecker et al. 2007;Hall et al. 2011;Scanlan et al. 2011;Luijckx et al. 2013). There is no reason to suspect that all host-parasite interactions will conform to a single  Multi-mode fluctuating selection in host-parasite coevolution. Ecol. Lett. 5 framework -in fact, Parker (1994) and Agrawal and Lively (2002) argue that MA and GFG can be considered as the extremes of a continuum -yet the majority of empirical evidence (from bacteria and phages: Bohannan and Lenski 2000;Mizoguchi et al. 2003;Scanlan et al. 2011;Flores et al. 2011; fruit flies and sigma virus: Bangham et al. 2007;and plant-pathogens: Flor 1956;Thompson and Burdon 1992) supports the notion that hosts and parasites vary in their degree of specialisation, in general agreement with the GFG model (although see Dybdahl and Lively 1998;Luijckx et al. 2013 for examples of limited variation in the degree of specialisation).
The potential for other modes of fluctuating selection in the GFG model and their implications for core biological phenomena have been overlooked in existing theory. For example, empirical observations of fluctuating selection among specialists are taken to be indicative of MA rather than GFG genetics (Dybdahl and Lively 1998;Luijckx et al. 2013). Additionally, the MA model is thought to be much more favourable to the evolution of sex than the GFG model due to the nature of the cycles (Parker 1994;Peters and Lively 1999;Lively 2010), yet this is based on the prediction that the GFG model only generates fluctuating selection between, but not within, ranges. There is therefore a clear need to understand the full range of fluctuating selection dynamics in the GFG model. Given the high level of interest in how infection genetics shape coevolutionary dynamics, especially their influence on whether fluctuating selection occurs within or between ranges, we conduct a thorough reanalysis of the GFG framework. We primarily explore the dynamics of a simple population genetics model that lacks ecology, but we verify our key results using a more realistic epidemiological model that includes density-dependence. Despite being overlooked in a large number of theoretical studies, we find that the GFG framework can indeed readily generate within-range cycling. We go on to demonstrate that the GFG model can simultaneously generate high-frequency fluctuating selection within-ranges and low-frequency fluctuating selection between ranges. We discuss our results in the context of empirical observations and the wider theoretical literature.  Multi-mode fluctuating selection in host-parasite coevolution. Ecol. Lett.

Non-ecological model
We adapt a simple multilocus gene-for-gene (GFG) model of host-parasite coevolution where population sizes are assumed to be constant (Sasaki 2000). Both populations have overlapping generations, are haploid, asexual, well mixed, and sufficiently large so that we can ignore the effects of drift. Host and parasite genotypes ( and , respectively) are each characterised by biallelic loci (i.e. = { 1 , 2 , … , } and = { 1 , 2 , … , }), which represent the presence, 1, or absence, 0, of resistance or infectivity alleles. We define the 'range' of a genotype to be the proportion of loci that have resistance or infectivity alleles (Ashby et al. 2014a,b). For example, a genotype represented by the binary string 00101 has a range of 2/5 and a genotype represented by the string 11101 has a range of 4/5. Each resistance allele is only effective in the absence of an infectivity allele at the corresponding locus. The total number of effective resistance alleles is therefore = , and the probability of successful exploitation is ( , ). Investment in resistance and infectivity is associated with a fitness cost given by (| |) for hosts and (| |) for parasites, where | | is the range of genotype . Note that (| |) and (| |) are decreasing functions, with (0) = (0) = 1 (i.e. lower values of (| |) and (| |) imply higher costs). Adapting Sasaki (2000) accordingly, the fitnesses of hosts ( ) and of parasites ( ) are given by: where and are the effects of successful exploitation on host and parasite fitness, and ( ) and ( ) are the frequencies of genotypes and , respectively. Genotype frequencies change according to the following ordinary differential equations: intermediate range) must be optimal. This is because there is no variation at extreme ranges in the GFG model (i.e. there is only one genotype with a range of 0 or 1) and so fluctuating selection cannot occur. Suppose the optimal resistance range is and the optimal infectivity range is (note that the optimal range for hosts may differ to the optimal range for parasites). For and to be stable the following conditions must be satisfied for all other permissible ranges ' ≠ and ' ≠ : where ̅ , is the mean infectivity at equilibrium (i.e. with all genotypes at the same frequency), and ̅ ′ , and ̅ , ′ are the mean susceptibility and mean infectivity of rare host and parasite genotypes with ranges ' and ', respectively, with all other genotypes at equilibrium frequencies. When the first condition is satisfied no other hosts can invade and when the second condition is satisfied no other parasites can invade. Biologically, these conditions imply that the fitness gain due to increased resistance or infectivity above the optimal range is less than the associated increase in pleiotropic fitness costs, and similarly that the fitness loss due to decreased resistance or infectivity below the optimal range is greater than the associated decrease in fitness costs. It is straightforward to intuit that the cost functions must eventually accelerate faster than the infection terms for intermediate ranges to be stable in both populations (otherwise the system will fluctuate between ranges or an extreme genotype will exclude all others in at least one population).  Multi-mode fluctuating selection in host-parasite coevolution. Ecol. Lett.

8
We will now explore if genotypes with the optimal number of alleles tend towards a stable equilibrium or cycle indefinitely. Suppose that there are ≥ 2 loci and suitable cost and interaction terms have been chosen such that the optimal number of resistance and infectivity alleles is 0 < < and 0 < < , respectively. Assuming all possible genotypes are present, the system contains ℎ 0 = ( ) hosts and 0 = ( ) parasites, where the brackets correspond to binomial coefficients (" choose " and " choose "). There is no inherent difference between genotypes with the same number of resistance or infectivity alleles, so we can ignore the cost functions and only need to consider the stability of the fixed point ( ) = 1/ℎ 0 and ( ) = 1/ 0 for all suitable genotypes and . Note that we can always reduce the dimensionality of the system because genotype frequencies must sum to one. The Jacobian of the system at the internal fixed point is of the form: where and are (ℎ 0 − 1) × (ℎ 0 − 1) and ( 0 − 1) × ( 0 − 1) matrices. At the fixed point, the system contains imaginary eigenvalues of the form = ± √− (with , > 0) and so the system can exhibit fluctuating selection in the form of neutrally stable cycles. This means that the amplitude of the cycles depends on the initial conditions, and so hosts and parasites will not settle into a stable limit cycle. Simulations reveal that the system does indeed exhibit within-range fluctuating selection (figure 1). Interestingly, the system effectively becomes indistinguishable from a partial matching allele or inverse matching allele model when an intermediate number of alleles is optimal for both populations (figure 2). In other words, all genotypes experience the same costs and specialise on different subsets of the other population. Figure 3 shows a phase diagram for the non-ecological model with suitable cost and interaction functions. The system can exhibit three qualitatively different coevolutionary dynamics: (i) equilibrium (when at least one population maximises or minimises investment); (ii) fluctuating  Multi-mode fluctuating selection in host-parasite coevolution. Ecol. Lett.
9 selection between genotypes with the same range (when an optimal intermediate range exists for both populations); and (iii) fluctuating selection between genotypes with different ranges (when there is no optimal range). In fact, the two types of fluctuating selection are not mutually exclusive: when fluctuating selection occurs between ranges the system also exhibits within-range cycling, although the latter usually occurs over much shorter timescales (figure 4).
It is interesting to note that our model predicts a much larger number of coevolutionary outcomes than previous GFG theory, since any combination of intermediate host and parasite ranges can be optimal depending on the curvature and relative strength of the fitness costs. As fitness costs are likely to vary by environment due to factors such as resource availability and parasite abundance, we should therefore expect to see divergence in optimal resistance and infectivity ranges between populations even if the qualitative dynamics (i.e. within-range cycling) are similar (figure 5).
In summary, our simple non-ecological model reveals that if an intermediate number of alleles is optimal for both populations, the system will exhibit fluctuating selection within rather than between ranges. Although we have focused our analysis on the fitness functions proposed by Sasaki (2000) and extended by others (e.g. Fenton and Brockhurst 2007), within-range fluctuating selection does not depend in the specific functional forms used in the model. Indeed we found within-range fluctuating selection to be very common, occurring for a variety of functional forms (figures S1-S3).

Ecological model
The simple population genetics model (equations (1)-(4)) assumes that population sizes are constant, but ecological feedbacks can potentially qualitatively alter coevolutionary dynamics. We therefore verify our key results using the following epidemiological model: where: , , and are the densities of susceptible hosts of genotype , hosts infected by parasite genotype , and hosts of genotype infected by parasite genotype ; = ∑ + ∑ is the total population size; and are the baseline birth and death rates, with equal to the strength of density-dependent competition on births and the reduction in births due to infection; , , and are the disease-associated mortality, maximum transmission, and recovery rates.
We determine the coevolutionary dynamics of the epidemiological model numerically, as the presence of ecological feedbacks and hence direct frequency-dependent selection greatly limits analytic tractability. Figure 6 shows that our key results from the non-ecological model -(i) accelerating costs can induce within-range fluctuating selection, and (ii) fluctuating selection within and between ranges can occur simultaneously but over contrasting timescales -carry over to the more realistic epidemiological model. One notable difference in the full epidemiological model is that coevolutionary cycles are damped unless there is full castration ( = 0) and no recovery ( = 0), in which case the model behaves as a predator-prey system (Ashby and Gupta 2014).
However, the strength of damping in the present model is typically very weak and so cycles tend to persist for a very long time.

Discussion
By reanalysing the core assumptions of the classic gene-for-gene (GFG) model we have discovered a previously overlooked form of fluctuating selection. Not only does the GFG model produce fluctuating selection from specialism to generalism (cycling between ranges as predicted by existing theory; Leonard 1994;Sasaki 2000;Agrawal and Lively 2002), it can also generate cycles between genotypes with the same level of investment but which specialise on different subsets of the population (within-range cycling). As such, matching allele (MA)-like fluctuating selection also arises in GFG models. Given the importance of these dynamics for generating and maintaining patterns of spatial and temporal diversity, and the implications for biological phenomena such as sex and mate  Multi-mode fluctuating selection in host-parasite coevolution. Ecol. Lett.

11
choice, our results suggest that fluctuating selection may be much more common in nature than previously thought.
The GFG model generates within-range cycling when costs associated with generalism accelerate such that an intermediate number of alleles is optimal, at which point fluctuating selection proceeds between genotypes that have the same number of resistance or infectivity alleles, but which specialise on different subsets of the population. A key corollary of this result is that the system eventually becomes indistinguishable from an MA or inverse MA model ( figure 2). For example, if there are 3 loci and the optimal range for hosts and parasites is 1/3, then eventually only genotypes 001, 010 and 100 remain in each population. Parasites therefore specialise on a particular "matching" genotype, as in the MA model. If instead the optimal host range is 2/3, then eventually only host genotypes 011, 101 and 110 are present with resistance highest against parasites 100, 010 and 001, respectively (i.e. an inverse MA model). Our study therefore offers an alternative interpretation of the relationship between MA and GFG genetics: MA models can be considered subsets of the GFG framework, rather than each existing at the ends of a continuum (Parker 1994;Agrawal and Lively 2002).
A major insight from our study is that fluctuating selection within and between ranges can occur simultaneously, but typically operate over vastly different timescales (figures 4 and 6). Fluctuating selection between ranges is typically a much slower process than within-range fluctuating selection, with average periods differing by up to two orders of magnitude in our simulations. The stark contrast in frequency can be attributed to the underlying mechanism that generates the cycles.
Within-range cycling is generated by differences in specialisation, which can readily cause large variations in fitness due to negative frequency-dependence, but the advantage is short-lived. Cycling between ranges, however, is caused by differences in fitness costs, which are likely to have a relatively minor impact compared to differences in specialisation. For example, parasite genotype 12 010 are the most common, but parasites genotypes 001 and 010 may gradually invade because they experience marginally lower fitness costs. Our numerical simulations demonstrate that the different mechanisms can lead to long periods where ranges remain roughly constant, before suddenly shifting to another level of investment (e.g. figures 4A and 6B).
We verified our results in a more realistic epidemiological model and found that coevolutionary cycles are damped, in line with previous theory (Kouyos et al. 2007;Ashby and Gupta 2014).
However, the strength of damping in our simulations was typically very weak, allowing fluctuating selection to be maintained over many thousands of generations. In nature, such oscillations are likely to persist indefinitely due to resonance from environmental effects (e.g. seasonal forcing ;Earn et al. 2000), drift (Kouyos et al. 2007), or the synchronisation of ecological processes (e.g. annual births, May 1973). As such, epidemiology impacts the nature and likelihood of fluctuating selection qualitatively as predicted from previous theory (Kouyos et al. 2007; Ashby and Gupta 2014), but does not impact quantitatively on our results or change the key insights from our work.
Given the extensive history of theoretical research on the GFG framework since its inception in the 1950s (Flor 1956;Mode 1958) it is surprising that within-range fluctuating selection has been overlooked for so long, but there are several possible explanations. For example, studies that consider GFG interactions at a single locus cannot generate within-range cycling due to the lack of intermediate ranges in these models (Jayakar 1970;Leonard 1977,Tellier and Brown 2007b. However, a large number of studies do consider multilocus interactions and so in principle should be able to generate within-range fluctuating selection, but instead cycle between ranges or reach a stable equilibrium (Mode 1958,Frank 1993aParker 1994;Sasaki 2000;Agrawal and Lively 2002;Segarra 2005;Fenton and Brockhurst 2007;Fenton et al. 2009). We note that Sasaki (2000) and Segarra (2005) briefly discussed how the GFG model can be "doubly cyclic" in terms of genotype frequencies and range, but neither elaborated on the contrasting nature of the cycles, nor did they find within-range cycling in isolation.  Multi-mode fluctuating selection in host-parasite coevolution. Ecol. Lett.

13
The closest studies to our own are those by Sasaki (2000) and Fenton and Brockhurst (2007), who use the same core fitness functions and genetic interactions used herein. Sasaki (2000) (along with most other studies, e.g . Frank 1993a;Parker 1994;Agrawal and Lively 2002;Segarra 2005;Fenton et al. 2009) only considered decelerating fitness costs (negative epistasis), but as a consequence intermediate ranges are never optimal for both host and parasite and so within-range fluctuating selection cannot occur. Fenton and Brockhurst (2007) extended Sasaki's multilocus GFG model to consider the impact of accelerating and linear fitness costs on the coevolutionary dynamics, but while the authors found that non-negative epistasis tends to increase the likelihood of coevolutionary cycling the study did not report qualitatively new dynamics. However, we have shown that accelerating costs do generate qualitatively new dynamics in the form of within-range cycling. It is likely that these dynamics were simply overlooked, as the authors focused on the impact of epistasis on the propensity for coevolutionary cycling, rather than the nature of the cycles themselves. Moreover, within-range cycling would not have been detected if the qualitative outcomes were determined by measuring variance in individual genotype frequencies rather than variance when genotypes are grouped by resistance or infectivity range. It is noteworthy that although within-range fluctuating selection has not previously been observed in models of hostparasite coevolution, the dynamics are somewhat similar to a recent quantitative trait model of plant-herbivore coevolution, wherein periods of escalation in toxin/antitoxin production generally give way to fluctuations in the levels of different toxins and antitoxins (Speed et al. 2015).
The present study improves our understanding of the relationship between host-parasite genetics and fluctuating selection, with links to a wide range of biological phenomena including the evolution of sex (Maynard Smith 1978;Hamilton 1980), parasite-mediated sexual selection (Hamilton and Zuk 1982;Ashby and Boots 2015), and patterns of diversity across space and time (Clarke 1979;Meyer and Thomson 2001). The theoretical literature on the relationship between genetics and fluctuating selection has been largely driven by the so-called "Red Queen Hypothesis" (RQH), which posits that antagonistic coevolution can offset costs associated with sex (Maynard Smith 1978). High genetic  Multi-mode fluctuating selection in host-parasite coevolution. Ecol. Lett.
14 specificity -hence within-range, rather than between-range cycling -appears to be required to favour sex (Parker 1994) and so most RQH studies use the MA model or variants thereof (see review by Lively, 2010, and discussion by Ashby and King, 2015). Our demonstration that the GFG framework can indeed produce within-range cycling should renew interest in how non-MA genetic interactions affect the RQH. More generally, there is a clear need to study fluctuating selection outside the realm of MA-and GFG-based theory (Best et al. 2010;Ashby and Boots 2015).
Our results help to explain several empirical observations. For example, experimental coevolution of bacteria and phages has shown that: (i) fluctuating selection can simultaneously occur both within and between ranges (Lopez Pascua et al. 2014); (ii) populations can exhibit arms race dynamics with reciprocal increases in resistance and infectivity associated with fitness costs ); (iii) arms race dynamics eventually give way to fluctuating selection between genotypes with similar ranges ); (iv) phages are locally adapted (Vos et al. 2009);and (v) changes in the environment can shift the initial dynamics from an arms race to fluctuating selection (Gómez et al. 2015). To the best of our knowledge, the GFG framework has never been shown to exhibit "true" arms race dynamics where reciprocal increases in resistance and infectivity are not followed by subsequent decreases in range (except in the absence of fitness costs). With accelerating fitness costs, however, we see multiple reciprocal increases in resistance and infectivity until the optimal range is reached, after which the dynamics are dominated by within-range fluctuating selection (figures 1 and 5; explains (ii) and (iii) above). These dynamics promote local adaptation, as even when populations have the same range the within-range cycles are likely to be out of phase with each other (explains (iv) above). Furthermore, there is no single connected region in the phase-plane where cycles occur between ranges (figure 3) and so relatively minor changes in the environment could lead to a sudden shift from arms races to between-range fluctuating selection (explains (v) above). Another empirical example comes from a wild metapopulation of the plant Linum marginale and fungal pathogen Melampsora lini where there is considerable spatial variation in resistance and infectivity ranges (Thrall and Burdon 2003). Our model suggests this pattern can be explained by  Multi-mode fluctuating selection in host-parasite coevolution. Ecol. Lett.
15 variation in fitness costs between patches leading to different optimal ranges in each population (figure 5). Although the notion of a geographic mosaic of coevolution due to environmental variation is well established (Thompson 2005), here we have shown that the GFG model can readily generate such patterns.
In addition to explaining existing data, our findings have a number of important implications for future empirical work. First, the detection of within-range fluctuating selection in empirical studies does not preclude fluctuating selection between ranges over longer timescales. Second, our results suggest that a low sampling rate may provide evidence of fluctuating selection between ranges without capturing higher frequency cycling within-ranges. Finally, there has been much theoretical discussion about whether the MA or GFG framework is more realistic (Frank 1993a(Frank ,b, 1996Parker 1994Parker , 1996 and much empirical research as to whether particular systems conform to one model or the other (Dybdahl and Lively 1998;Scanlan et al. 2011;Luijckx et al. 2013). Our study makes the crucial point that the MA framework is effectively a subset of the GFG model.
In conclusion, we have shown that a simple gene-for-gene model can generate fluctuating selection both within and between levels of infectivity and defence, in contrast to previous theory. Our study clarifies the relationship between the two dominant models of infection genetics and provides a number of useful insights and predictions for empirical work. Crucially, our results suggest that not only is fluctuating selection likely to be more common in nature than previously thought, but also rapid cycling between genotypes with similar levels of infectivity and defence should be widespread. respectively. (Aiv-Civ) and (Av-Cv) show host and parasite ranges, respectively (i.e. the proportion of loci that have resistance or infectivity alleles). The cost function used here is CH(|x|)=1-cH 1 (1exp(cH 2 |x|)/(1-exp(cH 2 )) for hosts, and similarly for parasites. The infectivity function is given by Q(x,y)= σ d(x,y) . Fixed parameters: cH 2 =3, cP 2 =3, βH=1, βP=1, σ=0.85. Other parameters: (A) cH 1 =0.  Figure 3 -Phase diagram for the coevolutionary dynamics of the non-ecological model (equations 1-4). Each plot shows how the coevolutionary dynamics change according to host and parasite costs (using the same functions as described in figure 1). (A) The optimal number of resistance alleles varies between zero (0R) and five (5R), or the system may cycle between ranges (CYC-B). (B) The optimal number of infectivity alleles varies between zero (0I) and four (4I), or the system may cycle between ranges (CYC-B). (C) The system reaches equilibrium (EQL) when the host has five resistance alleles or the parasite has zero infectivity alleles, but otherwise cycles. Fluctuations may be within (CYC-W) or between ranges (CYC-B). Fixed parameters as in figure 1 with n=5. Figure 4 -Fluctuating selection within and between ranges can occur simultaneously, but usually over very different timescales. Within-range cycling tends to be much more rapid than cycling between ranges. Panels show the allele frequencies (greys) and mean range (black) of the (Ai-Bi) host and (Aii-Bii) parasite for the non-ecological model (equations 1-4). The cost function used here is CH(|x|)=1-cH 1 (1-exp(cH 2 |x|)/(1-exp(cH 2 )) for hosts, and similarly for parasites, with (A) cH 1 =0.22, cP 1 =0.2; (B) cH 1 =0.25, cP 1 =0.25. Fixed parameters: a=1, b=0.1, cH 2 =3, cP 2 =3, d=0.5, f=0.5, n=3, α=2, β =2.5, γ=0.5, σ=0.85.  Multi-mode fluctuating selection in host-parasite coevolution. Ecol. Lett.