Matthijs Van Veelen
email: c.m.vanveelen@uva.nl

Julián García
email: j.garcia@feweb.vu.nl

Leticia Avilés

It takes grouping and cooperation to get sociality

Keywords: grouping, cooperation, sociality, balanced polymorphism

Cooperation and grouping are regularly studied as separate traits. The evolution of sociality however requires both that individuals get together in groups and that they cooperate within them. Because the level of cooperation can in uence selection for group size, and vice versa, it is worth studying how these traits coevolve. Using a generally applicable two-trait optimization approach, we provide analytical solutions for three specic models. These solutions describe how cooperative associations of nonrelatives evolve, and predict how large and how cooperative they will be. The analytical solutions help understand how changes in parameter values, such as the group carrying capacity and the costs of cooperation, aect group size and the level of cooperation in equilibrium. Although the analytical model makes a few simplifying assumptionspopulations are assumed to be monomorphic for grouping as well as for cooperative tendencies, and group size is assumed to be deterministic -simulations show that its predictions are matched quite closely by results for settings where these assumptions do not hold.

A c c e p t e d m a n u s c r i p t 1 Introduction

The formation of groups and the evolution of cooperation within them -the two essential ingredients of sociality [START_REF] Alexander | The evolution of social behavior[END_REF] -have largely been treated separately in ecological and evolutionary models of social evolution. Group formation and group size evolution have been the main focus of ecological models such as for instance those of [START_REF] Giraldeau | Genetic relatedness and group size in an aggregation economy[END_REF] and [START_REF] Higashi | What determines animal group size? Insideroutsider con ict and its resolution[END_REF]. The evolution of cooperation, on the other hand, has been studied with models in which group size is xed, or, more generally, with models in which the structure of who can aect whom by cooperating or not cooperating is exogenously given (see the overview by Lehmann & Keller 2006, and references therein). It is natural to expect, however, that group size and cooperation will have an eect on each other. Whether or not selection will for instance favour an increase in cooperation may very well depend, not only on the current level of cooperation, but also on current group size. The same holds for grouping;

whether or not it pays to form larger groups may depend on the level of cooperation as well as on the size of the group. In a series of recent papers [START_REF] Avilés | Solving the freeloaders paradox: Genetic associations and frequency dependent selection in the evolution of cooperation among relatives[END_REF] and [START_REF] Avilés | Population ecology, nonlinear dynamics, and social evolution. I. Associations among nonrelatives[END_REF][START_REF] Avilés | The kin composition of social groups: Trading group size for degree of altruism[END_REF]) use an individual-based and genetically explicit simulation model to explore the evolution of grouping and cooperation, treating these two traits as coevolving dynamic variables. These simulations are used to describe how group size and cooperation respond jointly to ecological and demographic parameters for this particular model.

Using a two-trait optimization approach, here we provide analytical solutions for the joint evolution of cooperation and grouping, while allowing for the possibility that they feed back into each other. We consider three alternative models. The rst is the model from [START_REF] Avilés | Cooperation and non-linear dynamics: An ecological perspective on the evolution of sociality[END_REF][START_REF] Avilés | Solving the freeloaders paradox: Genetic associations and frequency dependent selection in the evolution of cooperation among relatives[END_REF] and [START_REF] Avilés | Population ecology, nonlinear dynamics, and social evolution. I. Associations among nonrelatives[END_REF][START_REF] Avilés | The kin composition of social groups: Trading group size for degree of altruism[END_REF]. The second and third model are alternative possibilities for how cooperation and grouping can aect tness.

We explore analytically the similarities and dierences among the three models and consider the dierent ecological circumstances they may represent.

We also compare the analytical solutions to simulation results. The reason why these two might diverge, is that the analytical approach makes the simplifying assumption that populations are monomorphic in equilibrium. In the simulation model of [START_REF] Avilés | Solving the freeloaders paradox: Genetic associations and frequency dependent selection in the evolution of cooperation among relatives[END_REF] and [START_REF] Avilés | Population ecology, nonlinear dynamics, and social evolution. I. Associations among nonrelatives[END_REF], that is not the case; because grouping and cooperative tendencies are coded as polygenic traits, and because they evolve to intermediate levels, sexual reproduction maintains some variance in the population. In addition, group size is inherently stochastic in the simulation model, while in the analytical model we assume

A c c e p t e d m a n u s c r i p t

that group size is deterministic. The simulation results are nonetheless rather similar to the analytical predictions of the simplied monomorphic model. With the analytical solutions for the simplied case at hand, we are therefore much better able to describe and understand how and why the equilibrium values for group size and cooperativeness react to changes in parameter values in the simulation model. We also show that the same holds for other models that are implemented in simulations in a similar way.

The model

We assume that individuals have the possibility to come together in groups in order to perform a task that might be done more e!ciently together than alone. There are two things that will matter for group productivity, or the success with which the task is performed: group size and the level of cooperation. In the model, both of them ultimately depend on individual characteristics. Group size depends on how eager individuals are to get together and form groups. Once within a group, individuals can contribute to the overall success of the group by being cooperative. Cooperation increases total group productivity, but lowers the relative tness of cooperators within their group. A natural setting one can think of is one where individuals form onegeneration breeding associations, after which the ospring produced within the groups join a global pool from which they disperse to restart a new cycle of group formation.

Following [START_REF] Avilés | Cooperation and non-linear dynamics: An ecological perspective on the evolution of sociality[END_REF][START_REF] Avilés | Solving the freeloaders paradox: Genetic associations and frequency dependent selection in the evolution of cooperation among relatives[END_REF] and [START_REF] Avilés | Population ecology, nonlinear dynamics, and social evolution. I. Associations among nonrelatives[END_REF][START_REF] Avilés | The kin composition of social groups: Trading group size for degree of altruism[END_REF], we assume that the number of ospring produced by an individual is a function of the size of the group it is in, of the cooperativeness of the other group members, and of the cooperativeness of the individual itself. We also assume that this function is hump-shaped with respect to the size of the group. We will focus on three such functions. The rst is taken from [START_REF] Avilés | Cooperation and non-linear dynamics: An ecological perspective on the evolution of sociality[END_REF][START_REF] Avilés | Solving the freeloaders paradox: Genetic associations and frequency dependent selection in the evolution of cooperation among relatives[END_REF], the other two are dierent specications that imply dierent dynamic behaviour.

i l (q> > l ) = h u h 3fq q (1 + ( l ))

(1)

j l (q> > l ) = h u h 3fq (1 + q) (1 + ( l )) (2)
k l (q> > l ) = h u h 3fq q (1 + ( l )) (3)

A c c e p t e d m a n u s c r i p t

In all three functions, q is the size of the group the individual is in, represents the average cooperative tendency of the members of the group, l is the cooperative tendency of the individual itself, u is an intrinsic rate of growth parameter, f is the inverse of a group carrying capacity parameter, and re ects the cost of cooperation. Given these denitions, h u represents the intrinsic growth in the absence of cooperative or competitive interactions, h 3fq re ects the negative eects of crowding and competition, given limited resources available to a group, and 1+ ( l ) describes how individuals that are more cooperative than average within their group, have a lower than average tness compared to their fellow group members, and vice versa. The factor that diers between the three -q in (1), 1 + q in (2) and q in (3) -represents the eect of cooperation on the average productivity within the group.

In [START_REF] Avilés | Population ecology, nonlinear dynamics, and social evolution. I. Associations among nonrelatives[END_REF][START_REF] Avilés | The kin composition of social groups: Trading group size for degree of altruism[END_REF] the rst three factors are presented together, while the last one is presented separately. Here we present the compound function, because for the analytical derivations it is more convenient to have the whole formula at once. It is nonetheless worth realising that the rst three terms represent the average reproductive success of members of a group, or, when multiplied by the total number of group members, the total group productivity (i.e., the size of the pie), while the last term describes the share an individual gets of the group productivity pie. This helps interpreting the derivations made on the individual level, but it also helps understand how this is still a model where dierential group productivity and two levels of selection are involved (see also the end of Section 3). We also note that in this model all group members, including the cooperator, receive a share of the benets of the cooperative behaviour, which makes it, in [START_REF] Pepper | Relatedness in group-structured models of social evolution[END_REF] terminology, a "whole group" rather than an "others only" model of social evolution.

For equations ( 1) and (3) the functions are all one-humped with respect to q whenever is larger than zero; the function is only decreasing for = 0 with equation [START_REF] Alexander | The evolution of social behavior[END_REF] and at for = 0 with equation (3). For equation ( 2) the function is one-humped when A f, and only decreasing for ? f.

Results

If we simplify matters by assuming that in equilibrium a population consists of individuals that all have equal grouping and cooperative tendencies, and that group size is a deterministic function of an individuals grouping tendency and of the average grouping tendency in the rest of the population, then we can think of evolution as a two-trait summarized in Table 1 and Figure 1. Fitness function Derivative to grouping is 0 Derivative to cooperation is 0

i l q = f = ln q q31 j l q = 1 f 1 = 1 (q31) 1 q k l q = 1 f = 1 (q31)
The equations tell us that in order to know the direction of selection, we can just look at two values: group size and cooperativeness. The state space of the two traits is divided into four regimes by the conditions from Table 1, as depicted below in Figure 1 for each of the three functions. Similarly, the blue lines separate parameter values for which the derivative to grouping is positive (left) and negative (to the right)

The simple, rst prediction that follows from the analysis above is that a population will converge to the intersection of the two lines in the pictures. Levels of cooperation and group sizes at equilibrium thus depend only on the group carrying capacity f and the costs of cooperation parameter , and not on the intrinsic rate of growth u. The only eect u can have -everything else being equal -is that if it falls below a threshold level, the population will go extinct. A change in u however has no eect on predicted group size and level of cooperation.

We also see how changes in values of the parameters f and aect the stable xed point. If current cooperation is strictly between 0 and 1, then a decrease in , that is, a decrease in relative tness costs of cooperation, will make the cooperation isoclines (red in Figure 1) shift to the right. This implies that the new xed point has an increased level of cooperation for all models, and an increased group size in (1) and (2), while group size remains constant in [START_REF] Avilés | Cooperation and non-linear dynamics: An ecological perspective on the evolution of sociality[END_REF]. If group carrying capacity goes up (that is, if f goes down) then the group size isocline (blue in Figure 1) rotates clockwise, with the origin xed, in Figure 1a, and moves to the right in 1b and 1c. Group size then goes up in models (2) and (3) but remains constant in (1), while cooperation goes down in all models. The eect of changes in group carrying capacity on group size in model [START_REF] Alexander | The evolution of social behavior[END_REF] can at rst be perceived as a bit counterintuitive; one would expect that group carrying capacity will rst of all have an eect on group size, and perhaps also on cooperation.

Here, however, the prediction is that an increase of the group carrying capacity only aects cooperation (it goes down) while group size remains the same. This can be understood, if we see that after an increase in group carrying capacity, initially groups will indeed grow in size. This however then makes cooperation unfavourable, which reduces cooperativeness, and that, in turn, causes large groups to be selected against.

The population will then spiral towards the new equilibrium, which has the same group size as before the increase in group carrying capacity, but a lower level of cooperation.

A c c e p t e d m a n u s c r i p t

(Figure 2) It is important to realise that this two-trait optimization approach is not at all at odds with this being a model with dierent levels of selection, when cooperation is concerned (see also [START_REF] Van Veelen | Group selection, kin selection, altruism and cooperation: when inclusive tness is right and when it can be wrong[END_REF]. Obviously, within groups, individuals with a lower than average cooperative tendency do better than individuals with a higher than average cooperative tendency. Also, between groups, groups with a higher average cooperative tendency do better than groups with a lower average cooperative tendency. So within groups, cooperativeness is selected against, and between groups cooperativeness is se- Figure 3 shows that the match between the analytical predictions and the simulation results is rather close. There are some dierences though; the simulation results are slightly shifted towards the right for all three models (that is, we nd greater group sizes than predicted; see also Fig. 4). We also nd some distortion towards the edges, in particular where cooperation is close to 0 or close to This grouping tendency in uences the expected size of the group it ends up in; a higher grouping tendency makes the group an individual is in accept more group members, and hence grow larger, while a lower grouping tendency makes the group it is in accept less, all in expectations. Grouping tendencies therefore should rise as long as it would be advantageous for individual group members to have a higher expected group size.

Figure
lected
The value that matters therefore is the group size that an individual can expect to face. This is not the same as the average group size; these two quantities only coincide if all groups are of equal size, but if groups dier in size, the former is larger than the latter, because large groups not only are large, but they also account for more individuals that face a large group.

(Figure 3)

Why the simulation outcomes are shifted

The shift of the simulation outcomes to the right, relative to the analytical predictions (Figs. 3 and4), re ects the asymmetry of the functions around the optimal values of q and , combined with the fact that the analytical approach makes the simplifying assumption that at equilibrium, populations are composed of equally sized groups and are monomorphic for the cooperative tendency of individuals. In the simulations, in contrast, cooperative and grouping tendencies are coded as diploid polygenic traits, and because they evolve to intermediate levels, sexual reproduction maintains some variance in the population. Also the group formation process implies that the group size an individual will face is not deterministic. Even if the population were monomorphous both for grouping and for cooperative tendencies, the group size that an individual faces would still be a draw from a random distribution over group sizes. The size and cooperativeness of the group an individual will nd itself in therefore is a random variable that depends on an individual's own cooperative tendency and its grouping tendency, as well as on those of the others in the population. Below and in the appendix, we focus on group size as a variable.

The asymmetry of the tness function around the optimal values of q here means that being smaller than the optimal group size is worse (further away from the optimal tness) than being just as much larger. Since individuals cannot choose a xed group size, but are restricted in their choice between random distributions over group sizes,

A c c e p t e d m a n u s c r i p t

this implies that the isoclines of the true model can dier from the isoclines from the monomorphic model. How much they will dier, depends on the shape of the random distributions of group sizes the individual can choose from, and the shape of the tness function. Because here, being smaller than optimal is worse than being larger than optimal, the expected size that comes with optimizing over the whole distribution is a bit larger than the optimal size in the monomorphic model, which implies that the group size faced by the average individual in equilibrium moves a bit to the right. This equilibrium would in fact most accurately be described as a xed point in distributions.

Appendix C1 gives examples that illustrate how the group size faced by the average individual in the equilibrium distribution can be larger or smaller than the xed point of the monomorphic model, due to the asymmetry in the tness function and the set of probability distributions that an individual can choose from. Appendix C2 describes how the population being a balanced polymorphism amplies the eect of the asymmetry in the tness function. For grouping tendency, and with sexual reproduction, one could therefore say that the asymmetry of the tness function aects the mean twice; once because there is uncertainty about the group size one will nd itself in, given ones own grouping tendency, and once because there is uncertainty about the grouping tendency of one's ospring. In both cases it is better to be safe than sorry;

ending up in too small a group oneself is relatively bad -compared to ending up in a too large group -and having ospring that happens to have a lower grouping tendency than oneself is worse than ospring that happens to have a higher grouping tendency.

Both uncertainties thereby increases the mean, because deviations from the maximum of the tness function to smaller groups are worse than deviations to larger groups.

Although the variance in cooperativeness is lower than the variance in group size, a similar eect occurs for cooperativeness. Figure 4 has, for all three functions, singled out one of each of the isoclines, and compared the prediction for the monomorphic model with the averaged outcome of the simulation model.

(Figure 4) the f (red) and vice versa (blue). Apart from the shifts caused by the group size being a distribution and the functions i l > j l and k l not being symmetric, we also see that closer to the sides, the red isocline is curved.

A c c e p t e d m a n u s c r i p t 4.2 Distortion of the cooperation isocline towards the edges

In Figure 4, we see that the cooperation isocline is distorted towards the edges. That is especially visible in Fig. 4a; close to the edge where cooperation is 0, the isocline from the simulations bends to the right, and close to the edge where cooperation is 1, it bends to the left. These bends are caused by the fact that close to the edges, mutations become biased against the common allele. In the simulation program, inversions and translocations take precedence over point mutations. This implies that for values of the average cooperative tendency that are not close to 0 or 1, the most common mutations are inversion and translocation, which are unbiased. The whole mutation process therefore is almost unbiased, when not close to the edges. Towards the edges, however, mutations become more likely to actually change the phenotypic value of individuals; if it is not possible to change the genome by inversion or translocation (i.e., if the individual has phenotypic value 0 or 1), then a point mutation will occur. Since point mutations are biased against the common allele, this implies that the mutation process also becomes increasingly biased against the common allele towards the edges.

A precise description of the mutation process is provided with the online version of the simulation program, and helps understand this eect better.

Discussion of the results

Despite being essential ingredients of sociality [START_REF] Alexander | The evolution of social behavior[END_REF]), grouping and cooperation have mostly been considered in isolation (see Avilés 2002 and references therein).

Using a two-trait optimization approach, we have derived the rst analytical solutions for the levels of cooperation and group sizes that are expected to arise from the joint evolution of these two traits. The analysis shows that the tendency to form groups and the tendency to cooperate interact, and that the shape of the functions that describe the number of ospring of an individual makes a dierence for how changes in parameters change equilibrium outcomes. This indicates the importance of not looking at the two traits in isolation; allowing them to evolve together can give predictions that dier from what one would predict if only one of the two is allowed to evolve.

Because not all functions give the same results, and because we want to be able The second common characteristic is that for small groups, it pays o for an individual to cooperate (the derivative of i l to l is larger than 0), while cooperating becomes unfavourable if an individual nds itself in a large group. What "large" is, that is, from where onwards groups are so large that an increase in ones cooperation level decreases ones own tness, of course depends on parameter values and on current cooperativeness, but the idea is that there is such a point, in the same way as that there is an optimal group size. Again, this can be seen as reasonable, if the function re ects the success with which a task is performed; if groups are very large, cooperating -or cooperating more -may pay o too little to compensate for the costs.

to
If we indeed have two such lines, one representing where the maximum of the function with respect to group size lies, and one representing where cooperation stops being to the individual's own benet, then the point where the lines intersect constitutes a xed point of the dynamics. (There can also be xed point where the lines meet the boundary; these xed points must even be there if the two lines for instance do not cross).

The dierence between the functions lies in how extra overall cooperativeness translates to higher values of the three functions. For that purpose, we only need to look at the part that is dierent between them, that is, q in equation ( 1), 1 + q in (2) and q in (3). With equation ( 1), an increase in overall cooperation level makes more of a dierence if is close to 1 than if it is close to 0 (see gure 5). In equations ( 2) and ( 3), an increase in overall cooperation level makes the same dierence everywhere.

The term q in these two functions can therefore be interpreted as the total amount of cooperation; it is simply the sum of the cooperative tendencies of all individuals. A model where every extra bit of help adds just as much would be appropriate for situations where, for instance, resources of an ephemeral and unpredictable nature need

A c c e p t e d m a n u s c r i p t

to be located, so that every additional participant adds just as much to how much of the resource will be found (e.g.,bee hives or marine colonial birds searching for owers or for moving schools of sh, respectively). Looking at those terms as a function of q can also be instructive; in equation ( 1) there are diminishing returns to adding equally cooperative individuals, which would apply to situations such as the joint capture of large prey or the warning of a predator's arrival, where every additional participant would have a smaller contribution to the success of the task One can also think of other functions that may describe how cooperation translates into more ospring. One could, for instance, take the mirror image of (1), where the eect of an overall increase of cooperation (not to be confused with the eect of an increase in an individual's level of cooperation) levels o when cooperativeness goes up, or a function that is S-shaped. The latter would be appropriate for situations when there are thresholds involved in the e!cient performance of a task, such as tree killing bark beetles that need to overcome the defenses of live trees, which they do by attacking in mass [START_REF] Raa | Interacting selective pressures in conifer-bark beetle systems: A basis for reciprocal adaptations?[END_REF]. For those functions, obviously the analytical approach from this paper will again provide predictions for equilibria.

(Figure 5)

Figure 5. The terms q and 1 + q as functions of overall cooperation level with q = 15.

Furthermore, one more detail of the functions may be interesting for their interpretation, and that is that q = 1 for q = 1, regardless of . This makes sense, because cooperation would be meaningless if there is no-one to cooperate with. On the other hand, 1 + q increases with , also if q = 1. This can make sense for cases where cooperation can be interpreted as the provision of a public good, such as building a (possibly communal) web, building protective structures for a (possibly communal) nest, detoxifying waste products from the common environment or cleaning up the nest. Also on one's own, spending some eort on building a web or on nest defense can be sensible, but it becomes a public good, or a collective eort, if others join the group. W W A detail of lesser importance is that for q , the function i l (equation 1) increases if a single individual, regardless of it's own cooperative tendency, is joined by another individual, even if the joining individual has cooperativeness = 0, since 2 @2 = I 2 A 1 . This peculiarity does not apply to groups with more than one initial individual, since (q + 1) q q+1 = (q + 1) q q+1 ? q if q A 1. It is also excluded for all group sizes in equations ( 2) and (3).

A c c e p t e d m a n u s c r i p t

Equation ( 3), but not equation ( 2), on the other hand, has the peculiarity that if average cooperativeness is 0 in the latter, then q is also 0, which implies that the tness of all individuals is 0. This may describe a habitat in which a certain species could not live without cooperating, whatever its group size, including size 1. Such a harsh environment could, on the other hand, be colonized by an already social species that has evolved su!ciently high levels of grouping and cooperation in another habitat.

The same applies to equations ( 1) and ( 2) for values of u that are too low to have replacement in absence of cooperation and grouping.

One can also make a mix of the functions ( 2) and ( 3) by replacing 1 + q, or q, by + q. This new parameter would then re ect the relative importance of the task that is performed together; the lower , the more important the collective task.

Analysis of the dynamics for this slightly more general function is not more complicated, and is done in Appendix A.

One point worth mentioning here is that the model from Avilés Finally we would like to point out that the ecology can put a limit on the growth of the overall population in dierent ways. One can assume that there is only a limited number of nesting sites, and in Avilés et al. (2002,2004) this is implemented by assuming that the ow from the global pool towards the groups stops as soon as the last nesting site has been occupied by one individual. One can also assume that the global density negatively aects individual tnesses. A third option is to assume that every generation, the global pool is reduced to a xed number of individuals before they leave in order to form groups. For the simulations reported here, we chose the limited nesting sites model, but all three possibilities are all coded in the program.

A c c e p t e d m a n u s c r i p t

This program can be found online, and comes together with a precise description of the dynamics.

The most important distinctive feature of the global density dependence version is that this version, in combination with particular choices of the parameters, can allow for cyclical or chaotic behaviour of the size of the total population. This can describe population dynamics in for instance social spiders [START_REF] Avilés | Causes and consequences of cooperation and permanent-sociality in spiders[END_REF][START_REF] Avilés | Cooperation and non-linear dynamics: An ecological perspective on the evolution of sociality[END_REF] and tree killing bark beetles [START_REF] Berryman | Population-dynamics of r engraver, Scolytus ventralis (Coleoptera-Scolytidae). Analysis of population behavior and survival from 1964 to 1971[END_REF][START_REF] Avilés | Solving the freeloaders paradox: Genetic associations and frequency dependent selection in the evolution of cooperation among relatives[END_REF]. With cycles or chaotic behaviour at the population level, the optimum levels of grouping and cooperative tendencies then become moving targets. Nonetheless, average cooperative tendencies and group sizes are not that dierent from those in the limited nesting sites model. Compared to the theoretical prediction, the shift of the f-isocline -that re ects the group size dynamics -to the right is only a bit more pronounced if there are cycles or if there is chaotic behaviour. The reason is that the asymmetry of the tness function around the optimum now not only punishes chance deviations from the optimal group size asymmetrically, but it also punishes deviations from the (moving) optimum over time asymmetrically (see also the online simulation model and results there). This also explains why u does have a small eect with global density dependence; by increasing the u we go from a stable system to cycles to chaos.

Acknowledgements

All three authors would like to thank the Wissenschaftskolleg in Berlin for their hospitality. Julián García gratefully acknowledges nancial support by the Netherlands'

Organization for Scientic Research (NWO) and Leticia Avilés gratefully acknowledges funding from an NSERC Discovery Grant (Canada).

A Derivations of the stability conditions

A.1 Function (1)

Before taking derivatives of the function i l , we rewrite it, using = P q m=1

m q i l (q> > l ) = h u h 3fq q (1 + ( l )) = h u h 3fq q S q m6 =l m q + l q μ 1 + μ X q m6 =l m q q 1 q l ¶ ¶

A c c e p t e d m a n u s c r i p t

Then we take the derivative to an individual's own cooperativeness.

gi l g l = h u h 3fq q S q m6 =l m q ln q q q l q (1 + ( l )) + h u h 3fq q μ μ q 1 q ¶ ¶ = h u h 3fq q μ ln q q (1 + ( l )) q 1 q ¶
The rst part of the tness function -h u h 3fq q -re ects group productivity, or the size of the pie, while the last term -(1 + ( l )) -re ects the share that individual l gets. The rst part of this derivative -h u h 3fq q ln q q (1 + ( l )) -therefore re ects the fact that if l increases its cooperative tendency l , then the pie gets larger. The second part of this derivative -h u h 3fq q ¡ q31 q ¢ -re ects the fact that increasing l also implies that l gets a reduced share of the pie.

Now we can evaluate this derivative in = l , which implies that gi l g l = 0 if ln q = (q 1). So if q W solves = ln q q31 , then any value for could be a xed point with respect to cooperativeness, since the derivative gi l g l goes through 0 at l = . If, however, ? ln q q31 , then gi l g l is positive at l = , which implies that the average will be pulled up, whatever the average is, and if A ln q q31 , then gi l g l is negative at l = , and the average will be pulled down, whatever the average is.

Before taking the derivative to individual grouping tendency, we need to write the size of the group an individual will end up in as a function of its own grouping tendency and of the average grouping tendency in the rest of the population. In the simulations, the size of the group an individual will nd itself in is a complex random variable that we cannot compute. It is however clear that this distribution depends on the grouping tendencies of all other individuals, on the grouping tendency of the individual itself, and on of the population size. The latter matters, because if the population is larger, then that means that there are more individuals soliciting for admittance, so the expected group size is also larger (see details on http://sta.feweb.vu.nl/j.garcia/sociality). Fortunately we will see that the equilibrium is invariant to what can be seen as mere rescaling of the relation between grouping tendency and group size, so this will turn out not to matter.

We simplify the stochastic simulation model to a deterministic version, where the group size an individual will nd itself in depends on the average grouping tendency

A c c e p t e d m a n u s c r i p t

of the population, excluding the individual itself, and on the grouping tendency of the individual itself. The dependence on the population size will be suppressed, so at the onset, we will just be computing the derivative for a specic population size. We will, as mentioned above, nd out that the specics of the function will not matter, as long as it satises a very modest and natural assumption. Population size will therefore not feature in the nal characterization of the equilibrium. This minimal assumption that we need is that the derivative of the group size an individual nds itself in to the grouping tendency of that individual itself is positive. (Although it is not used, it also seems obvious that the derivative to the average grouping tendency of the rest of the population should be positive.) So if l is is the individual's own grouping tendency, and is the average grouping tendency in the population, then we assume that

Cq(> l) C A 0 and Cq(> l) C l A 0.
Then we take the derivative to an individual's own grouping tendency as follows.

gi l g l = Cq C l © fh u h 3fq q (1 + ( l )) ª + Cq C l © h u h 3fq q 31 (1 + ( l )) ª = Cq C l h u h 3fq q μ q f ¶ (1 + ( l )) At = l , we get gi l g l = Cq C l h u h 3fq q μ q f ¶
Given that Cq C l A 0, this implies that gi l g l A 0 if and only if q A f, that is, if q ? f .

We therefore have a xed point of the function i l if = ln q q 1 and q = f A.2 Functions (2) and (3)

For the other two functions, we do the derivation by considering a function

j >l (q> > l ) = h u h 3fq ( + q) (1 + ( l ))
Before taking derivatives, we rewrite this function, using = P q m=1 m q A c c e p t e d m a n u s c r i p t

j >l (q> > l ) = h u h 3fq ³ + X q m6 =l m + l ´μ1 + μ X q m6 =1 m q q 1 q l ¶ ¶
Then we take the derivative to an individual's own cooperativeness.

gj >l g l = h u h 3fq (1 + ( l )) + h u h 3fq ( + q) μ μ q 1 q ¶ ¶ = h u h 3fq ³ 1 + ( l ) ³ q + ´(q 1)
Ńow we can evaluate this derivative in l = , which implies that

gj >l g l = 0 if 1 = (q 1) ¡ q + ¢ . Therefore, if = 1 (q31)
q , then cooperativeness does not change at . If, however, ?

q , then gj >l g l is positive at l = , and the average will be pulled up until = 1 (q31) q , and if A 1 (q31) q , then gj >l g l is negative at l = , and the average will be pulled down until = 1 (q31) q .

If we take the derivative with respect an individual's own grouping tendency, assuming that = l , we get

gj >l g l = Cq C l © fh u h 3fq ( + q) (1 + ( l )) ª + Cq C l h u h 3fq (1 + ( l )) = Cq C l h u h 3fq ( f ( + q))
Hence, since Cq C l A 0, we nd that

gj >l g l A 0 if f ( + q) A 0, that is, if q ? 1 f .
We therefore have a xed point of the function j >l if = 1 (q 1) q and q = 1 f

For the function j l , we would take = 1, which means that the xed point is described by = 1 (q 1) 1 q and q = 1 f

1

A c c e p t e d m a n u s c r i p t

For the function k l , we would take = 0, which means that the xed point is described by = 1 (q 1) and q = 1 f

B Stability of the xed points

If we assume that the speed of selection is proportional to the derivatives computed above for the function i l , then we get, after dividing both by h u h 3fq q (31) and taking

l = and = q = Cq C =
, the following dierential equations.

= q = μ Cq C ¶ 2 ( fq) = = (lnq (q 1))
Without specifying Cq C there is not much one can say, but if we assume that it is constant, and if we add an extra parameter d, which governs the relative speed between the two traits (that can be tuned by changing relative genome sizes in the simulations), then this is equivalent to looking at = q = fq = = d (ln q (q 1))

If we write that relative to the xed point (q W > W ), which then becomes the new origin, where q W solves = ln q q31 and W = fq W , then we get

= Q = fQ = = d (ln (Q + q W ) (Q + q W 1))
The matrix of rst derivatives, evaluated in the origin, then becomes:

5 7 1 f 0 d ¡ 1 q W ¢ 6 8

A c c e p t e d m a n u s c r i p t

the eigenvalues of which are

; ? = 1 2 f ± 1 2 s f 2 4d if f 2 4d A 0 1 2 f ± 1 2 l s 4d f 2 if f 2 4d ? 0
Because both d and f are larger than 0, the eigenvalues, or their real parts, are smaller than 0, hence the xed point is locally stable.

For the functions j l and k l a similar exercise can be done, but for the function k l inspection of Figure 1c is already enough; the isocline for group size is vertical there, which precludes trajectories crossing it. Hence all trajectories stay on the same side of the isocline, which guarantees stability, given the direction of selection in the areas surrounding it.

C Why the simulation results dier (a bit) from the prediction of the simplied analytical model

In the analytical model, the direction of selection is determined for a population where all individuals have the same level of cooperativeness as well as the same grouping tendency. Also it is assumed that individual grouping tendencies translate to group size in a deterministic way. An equilibrium of the analytical model therefore represents a population that is monomorphic for cooperative and for grouping tendencies, and in which, since group formation is deterministic, groups of equal size form.

In the simulations, in contrast, cooperative and grouping tendencies are coded as diploid polygenic traits that naturally maintain some variance in the population. Also the group formation process implies that the group size an individual will face is not deterministic. Even if the population were monomorphous both for grouping and for cooperative tendencies, the group size that an individual faces would still be a draw from a random distribution over group sizes. The size and cooperativeness of the group an individual will nd itself in therefore is a random variable that depends on an individual's own cooperative tendency and its grouping tendency, as well as on those of the others in the population.

For a precise analytical solution of the simulation model, one would need to look for a stable distribution of the two tendencies, where not only the means should not change, but also the actual distributions should be stable. As a rst simplifying step,

A c c e p t e d m a n u s c r i p t

however, it seems natural to expect that a close match would be provided by looking only at whether an average individual could benet from deviating from the average. This would ask for a solution of the following system.

gEi l g l ¯l = = 0 and gEi l g l ¯l = = 0

Here l and l are an individual's own cooperative and grouping tendency, respectively, and and are the average cooperative and grouping tendency in the population. The expectation is taken over the distribution of group sizes and compositions. This implies that for every value for the average cooperative and grouping tendencies, one would still need to nd the correct distribution of cooperative and grouping tendencies over the population that goes with it. And with those at hand, one would then have to nd the probability distribution over dierent group sizes and dierent average cooperative tendencies of those groups that these imply for the individual. Finding these distributions analytically is impossible (see the online tutorial at http://sta.feweb.vu.nl/j.garcia/sociality for a description of the group formation procedure in order to get an impression of the second step).

This motivates the choice for the following simplifying assumptions. We assume that the population is monomorphous with respect to grouping and cooperative tendencies, and we assume that group formation is deterministic. Then we solve the following system.

gi l g l ¯l = = 0 and gi l g l ¯l = = 0

Here is the average cooperative tendency in group, which by the assumption of monomorphous populations also equals the average cooperative tendency in the whole population.

Below we discuss both simplifying assumptions in reverse. First Appendix C1 considers how the group formation process being random makes a dierence. For our tness functions, being in a group that is too small is worse than being in a group that is too large, which suggests that the isoclines for the simulations could be right of the isoclines in the monomorphic analytical model; it might be optimal to be on the safe side.

Then Appendix C3 considers how it matters that in the actual simulation model the population is not monomorphic. We do mostly get results where tness is maximized is not symmetric around the optimum, we will see that the population being a balanced polymorphism amplies the eect of the asymmetry in the tness function described

above. An intuitive way of rephrasing this is that individuals not only want to be on the safe side themselves, but they also want to be on the safe side as to what type their ospring will be.

Of course we would like to check if this indeed adds up to the dierence between the simplied analytical model and the more complex simulation model. By lack of an analytical expression for the equilibrium distribution of types in the population and for the group size distributions given the distribution of types, we will have to rely for both on the observed distributions, once in equilibrium. These distributions will be dierent for dierent parameter values, so what we did in the appendix is just look at one choice for the parameter values, just consider group size, and see if these distributions agree with the explanation of the dierence. It turns out that the agreement is very good.

C.1 Optimizing over probability distributions is not the same as nding the optimal (deterministic) group size Individuals in the simulations are restricted to "choose" between dierent random variables. They cannot choose a xed group size, but they do have a choice between dierent probability distributions over group sizes. That implies that a xed point of the dynamics is not just a combination of values for cooperativeness and group size, but a distribution of group sizes and cooperative tendencies that remains stable. Below we will see that the mean of the best choice for a distribution over group sizes in general does not coincide with the optimum of the tness function, which is where we would expect to nd the population if individuals could choose a xed, deterministic group size, rather than a distribution over group sizes.

We would like to use a few examples to show how both the set of probability distributions they can choose from and the shape of the tness function can make the group size faced by the average individual dier from the optimum of the tness function.

The examples are a bit constructed, in order to keep the point simple, but at the end of this appendix, we will look at one equilibrium point from the simulations and see what the distributions are that individuals actually can choose from. For elegance and conciseness, we use continuous variables. Everything could be done with discrete valued

A c c e p t e d m a n u s c r i p t

probability distributions just the same, but that would only be harder to digest.

We rst assume that the number of ospring depends on group size v in the following way:

; A A ? A A = v 1 if v 5 [1> 1 + ] 2 (v 1) if v 5 [1 + > 1 + 2] 0 if v 5 [1 + 2> 4]
which makes a tent-shaped function with the peak at 1 + Then suppose that the density function of the random variable of the size of a randomly chosen group is

o w (v) = 1 ln (w + 1) v 31 > v 5 [1> 1 + w]
With this random variable, expected group size is

Z 1+w 1 v • 1 ln (1 + w) v 31 gv = Z 1+w 1 1 ln (1 + w) gv = w ln (1 + w)
More important, however, is that, if we take a random draw from the population, with every individual having equal probability, then this randomly drawn individual is v@x

A c c e p t e d m a n u s c r i p t

times as likely to come from a particular group of size v than it is to come from a particular group of size x. So the probability that a randomly drawn individual nds itself in a group of size v should be proportional to v times o w (v). This gives the uniform distribution on [1> 1 + w], written as follows

n w (v) = 1 w > v 5 [1> 1 + w]
The latter will be referred to as the group size faced by the average individual. This random variable has expected group size

1+w Z 1 v 1 w gv = 1 w 1 2 v 2 ¸1+w 1 = 1 + 1 2 w
Both densities are pictured in gure C2. For this combination of the tness function and the set of distributions the individual can choose from, the expected tness is:

; A A ? A A = R 1+w 1 1 w (v 1) gv if w 5 [0> ] R 1+ 1 1 w (v 1) gv + R 1+w 1+ 1 w (2 (v 1)) gv if w 5 [> 2] R 1+ 1 1 w (v 1) gv + R 1+2 1+ 1 w (2 (v 1)) gv if w 5 [2> 4]

A c c e p t e d m a n u s c r i p t

Below, this is plotted as a function of the group size faced by the average individual (1 + 1 2 w). The gure shows that for the optimal distribution, the group size faced by the average individual is smaller than the size in the optimum of the tness function. This is understandable, because the optimum lies in a point where the average of the tness function over [1> 1 + w] equals the value of that same function in the point 1 + w, which cannot be true if w 2. The actual optimum can be found by taking the derivative to w, which gives w = s 2.

Hence it holds here that for any of the tent-shaped tness functions, that is, for any , the group size faced by the average individual is smaller than the optimum of the

tness function; 1 + 1 2 w = 1 + 1 2 s 2 ? 1 + .
An example of a set of distributions for which the mean of the optimal distribution coincides with the peak, when using this tness function, is the set of uniform distributions on [w 1> w + 1], where the individual can choose a w A 2, and an example where the mean of the optimal distribution lies right of the optimum of the tness function, is the set of probability distributions where the individual nds itself in a group of size 1 + w with probability 2 3 and in a group of size 1 + 4w with probability 1 3 .

Now suppose we keep to the rst set of probability distributions -uniform on [1> 1 + w]

-but replace the tness function with the following one: Then expected tness becomes: The optimum can again be found by taking the derivative to w, which gives w = p 2 + . Therefore, if we choose A 3, we now get 1 +

; A A ? A A = v 1 if v 5 [1> 1 + ] ( + (v 1)) if v 5 [1 + > 1 + + ] 0 if v 5 [1 + + > 4]
; A A ? A A = R 1+w 1 1 w (v 1) gv if w 5 [0> ] R 1+ 1 1 w (v 1) gv + R 1+w 1+ 1 w ( + (v 1)) gv if w 5 [> + ] R 1+ 1 1 w (v 1) gv + R 1++ 1+ 1 w ( + (v 1)) gv if w 5 [ + > 4]
1 2 w = 1 + 1 2 p 2 + A 1 + 1 2 p 4 2 = 1 +
. This implies that for A 3, which for instance is the case in Figure C5, the group size faced by the average individual in the optimal choice for a distribution is now larger than the optimum of the tness function.

A c c e p t e d m a n u s c r i p t C.2 Data from the simulations

We will make a similar comparison for a simulation run; we will compare the optimal group size with the expected group size for the optimal probability distribution.

The functions i l > j l and k l from the paper are all asymmetric in the same way that the last tness function is; mistakes left from the optimum are worse than mistakes of the same size right of the optimum. For the simulation model, the distributions over group sizes that an individual faces, depending on the value of its grouping tendency, are actually rather hard to compute analytically. In the group formation process there, individuals leave a pool in random order, and one after the other seek admittance to a sequence of already formed groups. Their probability of being admitted depends on their own grouping tendency and the average grouping tendency of the members of the group it seeks admittance to. This implies that the probabilities of events at every step of this process are not independent, which makes computing the probabilities for the group sizes that a randomly chosen individual faces, given its grouping tendency, seriously time consuming. Once we have reached an equilibrium in a simulation run, we can however look at the empirical distributions there. Figure C6 below pictures this empirical set of distributions, where every grouping tendency comes with a dierent distribution; the frequencies with which individuals with a low grouping tendency nd themselves in groups of dierent sizes make the distributions up front, starting with the blue one, and the frequencies with which individuals with a high grouping tendency nd themselves in groups of dierent sizes make the distribution at the back. Obviously, the distributions shift to the right as grouping tendencies increase; with a high grouping tendency, one can still end up in a small group, but the odds are just getting smaller as grouping tendency increases. and f = 1 15 , the simulation program counted how many times individuals with a given grouping tendency nd themselves in groups of dierent sizes. This gives the empirical distributions pictured above. The distribution for grouping tendency 0 is not pictured, because they end up by themselves in groups of size 1 with probability 1, and grouping tendencies larger than 10 30 occurred too infrequently to produce proper distributions.

For each of those distributions, we computed the expected tness and group size faced by the average individual (see Figure C7). It turns out that expected tness is maximized at a grouping tendency of 3 30 , which comes with a group size faced by the average individual of 8=2. This we should compare to what we get if we just optimize over group size. Optimizing over group size † gives a group size of 6=1. Note that it is not that an average group size closer to 6=1 was not feasible with the dierent discrete options for grouping tendencies; with a grouping tendency of 1 30 the average group size was 5=79, which is much closer to 6=1 than 8=2 is. Please note that the value of the tness function in the integer that is closest to the optimal group size (6) to is 3=77 and that expected tnesses for all grouping tendencies in gure C7 are lower than that. This does make and parameter values = 0=31 and f = 1 15 was 0=406. With this value, the expected tness is computed given the distributions as follows:

E (i l | = 0=406) = P 40 q=0 P (group size = q) • i l (q> 0=406> 0=406).
Still the actual group size faced by the average individual is not 8=2 but 8=8, and grouping tendencies of larger than 3 30 constitute a substantial part of the population; average grouping tendency is 0=14 A 3 30 . While choosing between distributions over group sizes -rather than between deterministic group sizes -explains part of the dierence (the part between 6=1 and 8=2), the remaining part of the dierence in group size can be explained by the fact that the equilibrium is (in fact, must be) a balanced polymorphism, where the expected tness as a function of grouping tendency is asymmetric. Especially the low tness for a grouping tendency of 0 30 plays a role here (see C7).

C.3 Balanced polymorphism

The standard example of a balanced polymorphism is sickle-cell anaemia; in the presence of malaria threat, the heterozygote has the highest tness, while both homozygotes have a lower tness. Because the one homozygote that causes sickle-cell anaemia has a (much) lower tness than the other homozygote that has an increased risk of contraction of malaria, the equilibrium value for the allele in the population is (well) below 50%, even The principle in this case is the same. It is driven by the fact that, just as with sickle-cell anaemia, the tnesses around the optimum are not symmetric; if we look at C7, we see that individuals with grouping tendencies to the left of the optimum do worse than those to the right; 2 30 does worse than 4 30 > 1 30 does worse than 5 30 , and 0 30 does much worse than 6 30 . Here selection disproportionally punishes having too little of the gene. The population average in equilibrium is therefore higher than the value that corresponds to the frequency in a population where all individuals are at the maximum expected tness. The group size will therefore be even further to the right; 8=8 instead of 8=2. Especially the low tness for grouping tendency at 0 plays a role here.

We also nd that the balanced polymorphism part of the dierence goes away if the version without sexual reproduction is run with a very low mutation rate. (The mutation rate needs to be low in order to be comparable, because mutation is much more biased against the common allele in the version without sex. It does take much longer to get to equilibrium though, with very low mutation rates).

For grouping tendency, and with sexual reproduction, one could therefore say that the asymmetry of the tness function aects the mean twice; once because there is uncertainty about the group size one will nd itself in, given ones own grouping tendency, and once more because there in uncertainty about the grouping tendency of ones ospring. In both cases, uncertainty increases the mean, because deviations from the maximum of the tness function to smaller groups are worse than deviations to larger groups.

A c c e p t e d m a n u s c r i p t

  optimization process. Taking the derivative of an individual's tness function with respect to its own cooperative tendency l then indicates when cooperative tendencies are expected to go up and when they are expected to go down. Taking the derivative with respect to an individual's grouping tendency does the same for grouping tendencies. The derivations are provided in Appendix A, and the resulting conditions are

A c c e p t e d m a n u s c r i p t (Figure 1 )Figure 1

 11 Figure 1 Direction of selection for the three functions The red lines separatethe parameter values for which the derivative of the functions i l > j l and k l (equations 1-3) to cooperation is positive (left of it) from those for which it is negative (right).

A c c e p t e d m a n u s c r i p t 4

 4 Match between model and simulationsIn order to determine to what extent the analytical predictions are matched by simulation output, we coded a new Java version of the[START_REF] Avilés | Population ecology, nonlinear dynamics, and social evolution. I. Associations among nonrelatives[END_REF] and[START_REF] Avilés | Solving the freeloaders paradox: Genetic associations and frequency dependent selection in the evolution of cooperation among relatives[END_REF] simulation model and extended it so that it contains all three functions (equations 1-3) and a few additional options. The original simulation model is described in Avilés et al.(2002, 2004) and[START_REF] Avilés | Solving the freeloaders paradox: Genetic associations and frequency dependent selection in the evolution of cooperation among relatives[END_REF]. A complete and detailed description of the new version of the model, with extensions and modications, along with an on-line version of the program, is provided at http://sta.feweb.vu.nl/j.garcia/sociality.

A c c e p t e d m a n u s c r i p tFigure 3 .

 3 Figure 3. Analytical predictions and simulation results. The gures on the left depict the analytical predictions for the levels of cooperation and for group sizes for, from top to bottom, the functions (1), (2) and (3). The intersections of the isoclines for the 's (red) and the f's (blue) are the xed points of the dynamics for monomorphic populations for dierent values of and f. The results of the simulations are pictured in the gures on the right. Runs, two for every combination of parameter values, lasted 15 000 generations, of which we took the last 6 000 to 12 000 to compute the average cooperative tendency and group size, depending on the time it takes for runs to get close to a stable xed state. With the last function, initiation at a level of cooperation of 0 leads to immediate extinction of the population, because k l (q> 0> 0) = 0. The xed points are therefore only reached if the population is initiated at a su!ciently large level of cooperativeness. This would match the situation of a habitat in which sociality could not evolve from solitary living, but where already social animals could invade.

Figure 4 .

 4 Figure 4. Shifted isoclines for functions i l > j l and k l (equations 1-3). The isoclines from the simulation model are estimated by keeping the constant and varying

  (2002) is classied in[START_REF] Lehmann | The evolution of cooperation and altruism -A general framework and a classication of models[END_REF] as a model where altruism evolves due to a greenbeard eect. With the analysis in this paper, we can conclude that in their classication, it would fall under cooperation rather than under altruism, and would be explained by direct benets instead of a greenbeard eect. More precisely, one can say that the dynamics in the model bring the population to a point at which the costs (f in Lehmann & Keller 2006) of marginal changes in behaviour are 0; in equilibrium, derivatives to group size and, more importantly, to cooperation are 0. Alternatively, one can use the terminology of[START_REF] Wilson | Structured demes and train-group variation Am[END_REF], in which case that would translate to the dynamics bringing the population up to a point where further, marginal changes in behaviour are on the border between weak and strong altruism, or, in the terminology of[START_REF] Kerr | Individualist and multi-level perspectives on selection in structured populations[END_REF], between class I and class II altruism.

A c c e p t e d m a n u s c r i p t

  at intermediate values for cooperative and grouping tendencies. In those cases sexual reproduction always maintains variance in the population. Because the tness function

C1

  Tent-shaped tness function with = 4

C2

  Desities of group size (blue) and group size faced by a randomly chosen individual (red) for w = 5.

C3

  Expected payo for = 4

A c c e p t e d m a n u s c r i p tC4

  which is, unlike the rst tness function, not symmetric: Asymmetric tness function with = 4> = 15

C5

  Expected tness for = 4 and = 15

A c c e p t e d m a n u s c r i p t C6

 t Conditional distributions. For the function i l with parameter values = 0=31

A c c e p t e d m a n u s c r i p t

A c c e p t e d m a n u s c r i p t

  though the heterozygote has maximum tness and comes with 50% of each allele. One way to intuitively understand how this works is to see that selection is much harder on instances of having too much of the gene for malaria protection (which implies getting sickle-cell anaemia) than it is on having too little and suering an increased risk of contracting malaria. Only in the case where both homozygotes have the same suboptimal tness, does the frequency in the polymorphism coincide with the frequency in the optimal genotype.

Figure 1 : 1 A

 11 Figure 1: Direction of selection for the three functions.

Figure 3 :

 3 Figure 3: Analytical predictions and simulation results.

Figure 4 :

 4 Figure 4: Shifted isoclines for functions f i , g i and h i (equations 1-3).

Figure 5 :

 5 Figure 5: The terms n γ and 1 + nγ as functions of overall cooperation level γ with n = 15.

Figure 1 : 1 A

 11 Figure 1: Direction of selection for the three functions.

Figure 2 :

 2 Figure 2: Increase of group carrying capacity.

Figure 3 :

 3 Figure 3: Analytical predictions and simulation results.

Figure 4 :

 4 Figure 4: Shifted isoclines for functions f i , g i and h i (equations 1-3).

4

 4

Figure 5 :

 5 Figure 5: The terms n γ and 1 + nγ as functions of overall cooperation level γ with n = 15.

Table 1 .

 1 Conditions under which group size (derivative to individual grouping tendency

is 0) and level of cooperation (derivative to individual cooperation tendency is 0) are expected not to change.

  This can be regarded as a rather reasonable assumption, re ecting the idea that there is an optimal group size for the performance of a task. A humped-shaped function has in fact been demonstrated for a variety of social organisms (e.g.,[START_REF] Caraco | Ecological determinants of groups sizes of foraging lions[END_REF][START_REF] Nudds | Convergence of group size strategies by mammalian social carnivores[END_REF][START_REF] Buss | Group living, competition, and the evolution of cooperation in a sessile invertebrate[END_REF][START_REF] Raa | Interacting selective pressures in conifer-bark beetle systems: A basis for reciprocal adaptations?[END_REF][START_REF] Heinsohn | Cooperative enhancement of reproductive success in whitewinged choughs[END_REF][START_REF] Cash | Short-and long-term consequences of grouping and group foraging in the free-living atworm Dugesia tigrina[END_REF][START_REF] Komdeur | Experimental evidence for helping and hindering by previous ospring in the cooperative-breeding Seychelles warbler Acrocephalus sechellensis[END_REF][START_REF] Wiklund | Natural selection of colony size in a passerine bird[END_REF][START_REF] Booth | Juvenile groups in a coral-reef damselsh: Density-dependent eects on individual tness and population demography[END_REF], Jeanne and Nordheim 1996,Avilés and

	Tuño 1998) and is a common assumption for models of group living (Vehrencamp 1983;
	Pulliam and Caraco 1984; Slobodchiko 1984; Giraldeau 1988; Emlen 1991, Krause and
	Ruxton 2002)

match dierent functions with dierent biological situations, it is worth guring out what characteristics they share, and what sets them apart. The rst characteristic they share is that, for constant levels of cooperation, they all are hump-shaped with respect A c c e p t e d m a n u s c r i p t to group size (or more precisely: they do not have more than one local maximum).

  sense, because they are restricted to probability distributions, which imply that one cannot avoid being in groups of the suboptimal size; one can only balance the odds. The average cooperativeness from the run with function i l

		3.5
	Expected fitness	3
		2.5
	Grouping tendency	0/30	1/30	2/30	3/30	4/30	5/30	6/30	7/30	8/30	9/30	10/30
	Group size	1	5.79	7.39	8.23	8.82	9.34	9.8	10.24 10.65 11.01 11.37
	C7 Expected tnesses.

† In all the computations we used the average cooperativeness from the run to compute tness.