Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

# Influence of the number of topologically interacting neighbors on swarm dynamics

## Abstract

Recent empirical and theoretical works on collective behaviors based on a topological interaction are beginning to offer some explanations as for the physical reasons behind the selection of a particular number of nearest neighbors locally affecting each individual's dynamics. Recently, flocking starlings have been shown to topologically interact with a very specific number of neighbors, between six to eight, while metric-free interactions were found to govern human crowd dynamics. Here, we use network- and graph-theoretic approaches combined with a dynamical model of locally interacting self-propelled particles to study how the consensus reaching process and its dynamics are influenced by the number k of topological neighbors. Specifically, we prove exactly that, in the absence of noise, consensus is always attained with a speed to consensus strictly increasing with k. The analysis of both speed and time to consensus reveals that, irrespective of the swarm size, a value of k ~ 10 speeds up the rate of convergence to consensus to levels close to the one of the optimal all-to-all interaction signaling. Furthermore, this effect is found to be more pronounced in the presence of environmental noise.

## Introduction

Dynamic collective behaviors are commonly observed in a host of technological and natural systems. The emergence of spatiotemporal order at the group level has been observed in many biological systems1,2,3—insect colonies, fish schooling, bird flocking, amoebae aggregating, bacteria swarming, in many human activities4,5—pedestrian and automobile traffic and in the artificial world with robotic swarm systems6,7 and sensor networks8,9. These dynamic collective behaviors are believed to emerge from simple local interaction rules governing the dynamics of individual agents10,11. They imply nonindependent individual decisions through local information transfer between group members mediated by one or more signaling mechanisms. One of the most prevalent collective decision-making processes consists in achieving a consensus decision—consensus means the convergence to a common state asymptotically or in a finite time among all group members through local interactions.

Until recently, the vast majority of dynamic models of collective behaviors of mobile agents relied on the basic assumption that each individual's neighborhood of interaction was based on a metric distance corresponding to the fixed range of its sensory capabilities12,13,14,15,16,17,18,19. A recent landmark study from the STARFLAG group imaged and tracked wild flocks of starlings numbering in the thousands and revealed that the neighborhood of interaction actually depends on a topological distance2,3. More precisely, Ballerini et al.2 discovered that each bird interacts on average with a fixed number of nearest neighbors (six to eight). A few very recent studies20,21,22 are starting to offer initial explanations as for why the starlings topologically interact with their seven nearest neighbors. Camperi et al.20 used a self-propelled particles (SPPs) model13 based on the extended formulation by Grégoire et al.23, which they themselves extended to three dimensions. Some results from the STARFLAG experiments were fed back into the model through the parameters controlling the neighborhood of interaction, allowing Camperi et al.20 to find that topological models are more stable than metric ones and that the minimal number of interacting neighbors needed to achieve fully stable cohesion in a spatially balanced model is compatible with the observed value of six to seven. Young et al.21 adopted a system-theoretic approach to analyze some empirical results from the STARFLAG experiments and found that for the range of flocks observed the optimal number of neighbors does not depend on the size of a flock. Instead, Young et al.21 have shown that both the optimal number of neighbors and the peak value of robustness per neighbor depend on the shape of the flock. Komareji & Bouffanais22 used a network-theoretic approach to study the dynamics of the signaling network of interaction between agents and found that a minimum number k* of topologically interacting nearest neighbors is necessary to maintain the connectedness of the signaling network as well as its controllability. Komareji & Bouffanais22 also established that k* does depend on the number of individuals forming the collective, albeit moderately and for group sizes in the thousands, the value of k* is in relatively good agreement with the empirical observations from the STARFLAG experiments.

Here, we address the question of what is the connection between the number k of topologically interacting neighbors tracked by each individual in the swarm and the emergence of consensus. Using network- and graph-theoretic approaches combined with the linear dynamical model by Komareji & Bouffanais22, we prove mathematically that consensus is always attainable in the absence of uncertainty due to environmental noise sources. We also establish analytically the exponential convergence of the system and find the expression of the parameter controlling the rate of convergence to consensus thereby allowing us to define a speed to consensus. This quantity is proved to be strictly increasing with the number k of topologically interacting neighbors. Furthermore, a numerical study of the variations of both speed to consensus and time to consensus with respect to k and for different swarm population sizes—with and without uncertainty due to the possible presence of noise in the signaling mechanisms—reveals that a value of k ~ 10 significantly speeds up the rate of convergence to consensus to levels very close to the optimal level corresponding to an all-to-all interaction signaling. In addition, the rate of variation of the speed to consensus and time to consensus with k are both found to be practically independent on the group size, which for typical collective behaviors ranges from a few dozens to a few thousands (in rare cases tens of thousands)11.

In summary, our analysis allows us to prove that the remarkably small number of topological neighbors (approx. 10) as compared to the swarm size—at least two orders of magnitude—may find its origins not only in obvious environmental and natural limitations, as observed in3,24, but also more fundamentally in the structural properties and dynamics of the signaling network. In particular, our study reveals for the first time that it significantly enhances the consensus reaching process, which is key to most swarming behaviors.

## Results

### Relationship between speed to consensus and the network dynamics

First, we investigated the swarm dynamics based on the topological dynamic model governed by Eq. (11) (See Methods) in the ideal case where noise is absent. A central point to always keep in mind is the fact that the directed swarm signaling network (SSN)—which is the information transfer channel underpinning the swarm dynamics—has a dynamics that is evolving hand in hand with the dynamics of the mobile agents in the physical space. In other words, signaling network structure and information dynamics change on the same time scale and are strongly interwoven. The SSN has been found to be a homogeneous small-world and moderately clustered network22. It is worth reminding that small-world effects have been shown to directly influence the speed to consensus; indeed fast consensus is achieved when the topology of the directed information flow possesses the small-world characteristic25,26.

The speed of convergence to consensus is classically assessed by means of the spectral properties of the graph Laplacians. Specifically, the second smallest eigenvalue of the graph Laplacians λ2—a.k.a. algebraic connectivity—quantifies that speed of convergence in the presence of a static and balanced digraph. This is for instance the approach considered by Young et al.21, where the H2 nodal robustness per neighbor was considered, as well as the consensus speed which was defined as the real part of λ2. This approach was made possible by the fact that Young et al.21 considered a fixed static sensing graph corresponding to the steady state. In the present study, we consider the full transient swarm dynamics for which the graph Laplacian of the SSN is both switching and not balanced—in general, for each agent, the indegree is different from the fixed outdegree k22, hence a more general approach is required.

Throughout the complete dynamical process, the SSN maintains a constant number of nodes and a constant number of edges. However, at each instant a certain number of link failures occurs which exactly amounts to the number of newly created ones. The rate at which those links are destroyed and created is governed by the pace of the physical dynamics of the swarm as well as the degree of alignment—or long-range synchronization. Hence, we are in the presence of a switching network for the SSN. At this point, it is crucial pondering over the precise nature of these topological switchings. Indeed, such switching events intrinsically occur at nonuniform time intervals, whenever at least one agent stop interacting with another agent—a link is knocked down—in favor of a newly closer neighbor—a new link is formed. Knowing the exact instants at which such switchings occur is not necessary to gain insight into the effects of network switching on consensus reaching. Without loss of generality, we will assume that those switching events are evenly distributed in time, meaning that tm+ 1 = tm + τ for all m, where τ is a characteristic SSN switching time scale. From the statistical physics standpoint, τ is directly related to the decorrelation time scale of the matrix of correlations between normalized velocities Cij = 〈si · sj〉 also known as directional correlation function11, where notations from27 are used. As all the agents move at the same speed v0, the decorrelation time scale is therefore strictly equivalent to the spatial decorrelation scale, which given our topological neighborhood of interaction is directly related to k27.

### Consensus reaching process

Switching networks are generally modeled using a dynamic graph Gs(t) parameterized with a switching signal s(t) that takes its values in an index set 26. That is equivalent to choosing τ = 1, thereby imposing one specific choice of the unit of time of the swarm dynamics. Following that approach, let G(N, k) denote the random k-nearest neighbor digraph model representing the SSN of a group of N topologically interacting agents randomly and uniformly distributed on a unit square28,29,30. We randomly choose a sequence in G(N, k) and subsequently generate a Markovian dynamical random network G(t) such that

Note that the random character of the above Markovian dynamics reflects the fact that between two consecutive instants m − 1 and m, the interagent normalized velocity correlations matrix Cij is fully decorrelated according to the above choice of time scale.

For a symmetric matrix , we denote its spectrum in the increasing order as

Let . We want to show the following result

#### Theorem A

Assume that k ≥ 1. For almost all random sequencesin G(N, k), the switching system

does reach consensus. Here L(t) is the corresponding (outdegree) graph Laplacian of G(t) and.

If k ≥ 3, then the system has exponential convergence and the rate of convergence of consensus is dictated by the quantity ν (0, 1) defined by

where · is the Euclidean norm of a vector. (see Supplementary Information for a detailed proof of Theorem A).

This very general result guarantees that consensus will be reached in the absence of any environmental noise sources. It is quite clear that the speed of convergence to consensus will also be influenced by the possible presence of noise. Given the above expression of ν, the rate of convergence to consensus, or speed to consensus, can be explicitly defined as

This choice of definition can easily be understood when turning to the particular case of a static fixed and balanced graph G = L/k, for which one would get CS ~ λ2(G)26.

### Influence of the number of neighbors on speed to consensus

We then turned to the investigation of the influence of the number of interacting neighbors—namely k given our k-nearest neighbors topological neighborhood of interactions—on the consensus reaching process. The following corollary shows that the rate of convergence to consensus of system (3) strictly increases with k. In our dynamical model of collective swarm behavior, the outdegree k characterizes the density of information transfer channels and the degree of connectivity of the SSN. Therefore, it is intuitively imaginable that a higher k leads to faster consensus since the connectivity of the network underpinning the dynamics of the interacting swarming agents affects profoundly the consensus capability—in general, higher degree of connectivity yields higher rate of convergence to consensus31,32,33,34.

#### Corollary B

Let k* be the optimal value which provides the fastest rate of convergence to consensus, i.e.,

Then k* = N − 1. Moreover, ν(k) is strictly decreasing with respect to k. (see Supplementary Information for a detailed proof of Corollary B).

The result in Corollary B, although general and remarkable, does not inform us about the exact dependence and variations of the consensus speed with respect to the number of topologically interacting agents k. To allow for a comparison between different swarm populations, we consider the normalized consensus speed

based on the highest speed to consensus—given by Corollary B—achieved with the all-to-all SSN connectivity corresponding to k = N − 1. In Fig. 1.A, we show the normalized consensus speed as a function of k for various sizes of SSNs numbering in the hundreds to 1100. Firstly, we observe that the consensus speed monotonously increases with respect to k as predicted by Corollary B. Secondly, by examining the trend of the graphs for increasing values of the swarm population N, we observe that seems to be converging as N goes to infinity. The most important fact of all is that for relatively small values of k, in the range from 3 to 10, the consensus speed varies very little with N for a given value of k but actually has a very rapid increase— is approximately tripled when going from k = 3 to 10—with the number of nearest neighbors k. This fact is much better appreciated when looking at Fig. 1.B, where the rate of variation with k of sharply decreases in the interval 3 ≤ k ≤ 10. This fact implies that edges added in the process of increasing k, say from 3 to 10, do contribute significantly to a larger algebraic connectivity of the SSN36. The result shown in Fig. 1.B is also remarkable as it reveals an apparently complete independence on N of the rate of variation of the consensus speed with k.

### Influence of noise on the consensus reaching process

Up to this point, our study did not account for the ubiquitous presence of noise in the environment in which the agents are evolving. To include those effects, we integrate numerically Eq. (11) (see Methods) with switching events occuring every time unit—the choice of time unit is still associated with τ = 1—following the same Markovian dynamical random network switching model for the SSN as before. At each switching event, uncorrelated noise effects are added to the N state variables θi, with the same noise level η (see Methods). We let the system evolve and observe the convergence, or not, towards a consensus value. The consensus is said to be reached when the criterion (max1 ≤ iN θi − min1 ≤ jN θj) ≤ ε is satisfied; the parameter ε characterizes the accuracy level in the consensus reaching process. We now focus on the time to consensus TC defined as the time at which the above consensus criterion is achieved. Note that TC, like CS, depends on both N and k. Similarly to what was done with CS and to allow for a comparison between different swarm populations, we consider the normalized time to consensus

We have proved that the consensus is guaranteed in the absence of noise. However, we expect this to cease to be the case in the presence of noise, especially for small values of k. It is worth noting that for the highest possible value k = N − 1, a consensus is still expected, even in the presence of noise, as each agent directly interacts with all the other individuals forming the group. For k < N − 1, we consider that the system does not reach consensus when the dynamics goes beyond 100TC(N − 1, N), which was always found to be a very long duration.

First, we investigated the noiseless case for widely different swarm population sizes numbering from hundreds to ten thousand as is shown in Fig. 2. For each data point, 1000 independent dynamics were computed, hence providing a statistically ample enough sampling. The numerical integration in time was performed using a Runge–Kutta scheme of order 437 with a time step equal to 10−3 guaranteeing an accuracy higher than the consensus reaching threshold ε = 10−4. We found little variation with the particular choice of ε in the range 0.7 to 10−5.

As a last step, we accounted for the effects of noise for two swarm sizes: N = 100 and N = 1000. Two noise levels were considered—moderate η = 0.1π and low η = 0.01π—following the study by Komareji & Bouffanais22. The results, shown in Fig. 3, still yield a decreasing time to consensus with increasing number of topological numbers k. As expected, the addition of noise introduces more variability in the results as is seen in the higher standard deviations. Interestingly, the variations of TC with k in the range 3 ≤ k ≤ 10 are much more rapid with increasing noise levels. Note that a consensus was always reached with the small swarm comprising N = 100 individuals, while some instances of non-convergence to consensus have been observed with k = 3 and 4 for the large swarm made of N = 1000 agents. This last observation can very easily explained by the disruptive effects of noise on the connectedness of the SSN for small values of k22.

## Discussion

As mentioned by Vicsek & Zafeiris in their recent review11, very few exact results about collective motion are actually available. Most relevant to the present study is the exact formulation of the convergence to consensus in a population of autonomous agents achieved by Cucker and Smale based on their own model38. Note that this powerful result was established under the strong assumption of a weighted all-to-all signaling connectivity between agents. The new exact result embodied by Theorem A relies on a much weaker assumption of limited local interactions corresponding to a SSN of the k-nearest neighbor digraph type. It is worth adding that the SSN considered in our model independently switches at each time instant with the characteristic time scale τ = 1. In other words, it follows a Markovian process of order “zero”. This simple yet tractable model represents a very first step in understanding swarm dynamics from the network science standpoint. To allow for a more realistic treatment, the SSN should mathematically be modeled as a continuous-time Markovian process, which would embody the coherent evolution of the signaling network (see Supplementary Information – Continuous-time Markovian process). The multiagent dynamical systems driven by such Markovian switching networks aimed at generating consensus behaviors (see detailed in Supplementary Information) have been extensively studied in control theory over the past few years; see e.g.39,40,41. One of the common restrictive assumptions in these works turns out to be the balance condition as used in Young et al.21. Consequently, these results do not apply here and a further thorough investigation is needed to fully understand the consensus reaching process ruled by topologically interacting neighbors under Markovian SSN.

Corollary B is quite remarkable in the sense that the rate of convergence to consensus CS is shown to strictly increase with the addition of edges (by means of increasing k) in the G(N, k) model. In general, when dealing with directed networks, this is however not the case—simply adding edges may not necessarily lead to faster convergence; only those edges contributing to a larger algebraic connectivity contribute to a faster convergence to consensus (see e.g.36).

The results associated with Fig. 1A and Fig. 1B, relating to the influence of k on the speed to consensus CS and its rate of variation with k, have a far-reaching consequence from the SSN design standpoint: adding more edges to the SSN does accelerate the convergence to consensus but this acceleration is very rapid when going from k = 3 to 10, but quickly becomes negligible when even higher values of k are being considered. Practically, adding more edges by increasing the number of topological agents with whom one is interacting is feasible but only up to a certain extent as there is always a cost associated with information exchange and also due to inherent limits in terms of signaling mechanisms, sensory and cognitive capabilities—for instance, see42 for such biological considerations with pigeons. Therefore, when accounting for the cost of adding new edges, a trade-off value kt for the number of topologically interacting agents emerges from the competition between, on the one hand, faster consensus and higher interaction cost on the other hand. This fact is in complete agreement with the results by Young et al.21 obtained using a fixed static sensing graph corresponding to the steady state.

Our numerical analysis of the dependence of the time to consensus TC with respect to the number of topological neighbors is in complete agreement with those for the consensus speed, namely: (i) for a given value of k, increases moderately with N, (ii) the time to consensus decreases very rapidly in the range 3 ≤ k ≤ 10 for all values of N as is well illustrated by the sharp increases in in that specific range of values for k, (iii) the rate of variation of the time to consensus with respect to k, , is found to be almost independent on N similarly to what was observed for .

It appears therefore that the effectiveness of the consensus reaching process is seriously impeded for the smallest values of k ~ 3, with either no convergence or a very slow one. On the other side of the spectrum, having k ~ O(N) most likely brings along overwhelming communication costs either for the living organisms or for the resources, with very limited gain in the consensus dynamics. Having the number of topological neighbors in the narrow interval k [8,12] not only speeds up the consensus reaching process significantly compared to the smallest possible values of k, but in addition, appears to be even more effective in the presence of noise.

As mentioned earlier and further detailed in the Methods section below, in the present swarming problem, consensus means the convergence to a common state asymptotically or in a finite time among all group members through local interactions. Hence, our results only apply to this particular type of consensus and not to more sophisticated emergent behaviors such as rendez-vous in space or collision avoidance for instance26. From an analytical standpoint, our specific synchronization or consensus protocol is embedded in Eqs. (10) and (11). It consists of two components: (i) the actual operation performed on the local (here topological) information gathered by a given agent—a linear averaging of the relative agents' states with respect to the actual agent receiving the information. The linearity conveniently enables us to formulate the dynamical problem as in Eq. (11) and to use the powerful results of graph theory. However, nonlinear protocols could be considered as in the case of nonlinearly coupled oscillators on complex networks43. The linearity allows for a complete and insightful analytical investigation of the consensus reaching process; (ii) the set of local neighbors formally represented by the set of indices in Eq. (10) that defines the network connectivity. Both components are embedded into the graph Laplacian L(t). It is worth adding that if one considers more complex collective collectives such as human dynamics on social networks, the more intricate nature of the local interactions gives rise to social networks with properties vastly different from the SSN considered here. Standard social networks are known to be heterogeneous scale-free networks44 while the SSN in our case is homogeneous22. Therefore, the methodology presented here can be applied to more complex social interactions but there is no doubt that the conclusions, somehow, have to be different from those obtained in our study.

In conclusion, all the results reported above shed a completely new light on the physical reasons behind the selection of a particular number of nearest neighbors locally affecting each individual's dynamics. These results are also quantitatively consistent with the number of topological neighbors reported for flocks of starlings.

## Methods

In the past two decades, a wealth of swarming models have been developed and introduced. Most of them are aimed at generating consensus behaviors11,13,18,19,20,21,22,23,31,38,45,46,47,48, often in the form of group alignment or polarization. In our framework, such consensus behaviors amount to swarming that refers to a circumstance in which multiple adaptive agents—be them living creatures or artificial ones—create a certain level of spatiotemporal order characterized by one or more macro-level properties.

Following the work by Komareji & Bouffanais22, we consider a collective of N identical and topologically interacting agents moving at the same speed11. Each individual group member, at any given instant t, is assumed to be fully characterized by a given state variable ψi(t). Such a generic state variable may represent widely different characteristics depending on the nature of the group considered: e.g. employed or unemployed forager state for honey bees, kinematic variables for fish in a school, birds in a flock or robots in an artificial swarm, space available for a pedestrian on a congested sidewalk, etc. Here, the state variable simply reduces to the direction of travel and the achievement of swarm consensus therefore yields an alignment of all the agents, in other words a polarized swarm. Hence, from a formal standpoint, by reaching a consensus, we mean asymptotically converging to a one-dimensional agreement in space characterized by 26.

In the dynamical model considered, the adaptive and interacting swarming agents are modeled as self-propelled particles for which the biological details of the internal origin of an agent's thrust is considered to be irrelevant. Such SPP-based models are a good representation of collective animal behaviors11. Here, these SPPs are moving about a two-dimensional plane with constant speed v0 and subject to a topological neighborhood of interaction (see Fig. 4.A for a schematic of metric versus topological neighborhood of interactions). As mentioned previously, each agent i is fully characterized by its direction of travel—in other words, here ψi(t) = θi(t)—related to the agent's velocity through . The local synchronization protocol, based on relative states, is strictly equivalent to a local linear alignment rule which mathematically can be stated as:

where is the set of outdegree neighbors in the topological neighborhood of interaction of agent i, with cardinal number and wij is the binary weight of the ij communication link. Note that in some models, wij can take a more complicated form than our binary choice38,49,50. Using the k-nearest neighbor rule to define the topological distance, we have (see Fig. 4 for the case k = 7) and the following dynamical equation for each individual agent i in the swarm:

where are its k-nearest neighbors' velocity directions. The dynamics of the agents in the two-dimensional physical space is intricately coupled to the dynamics of the signaling network which is the information transfer channel underlying the swarm dynamics. Constituent links of the swarm signaling network (SSN) of a group whose agents have directed interactions are unidirectional by opposition to bidirectional interactions in a group of agents with undirected interaction edges. The topological neighborhood of interaction based on the k-nearest neighbor rule allows one to locally identify the links between agents (see Fig. 4.B). The topological character of the neighborhood of interaction has a tremendous impact on the properties of interagent connectivity, in particular with induced asymmetry in the relationship whereby if agent j is in the neighborhood of agent i, then i is not necessarily in the neighborhood of j—the interaction is directed as well as the flow of information (see directed edges in Fig. 4.B). Note that with a metric neighborhood, the interagent connectivity is fundamentally symmetric hence leading to an undirected flow of information. The SSN, obtained by a straightforward bottom-up assembly process, is a switching k-nearest neighbor digraph, for which the specific value of k has a direct impact on its strongly connected character22. More precisely, Komareji & Bouffanais22 have shown that the SSN is a homogeneous clustered small-world network facilitating emergent outcomes if connectedness is maintained.

Using a network-theoretic approach, the dynamical equations (10) for the swarm dynamics can be recast in the following global compact form

where and L(t) is the outdegree-based graph Laplacian of the SSN, which is a k-nearest neighbor digraph.

Noise can generally be assumed to be random fluctuations with a normal distribution51. In the sequel, whenever the effects of noise are accounted for, a background noise having a normal distribution—fully characterized by its noise level η—will be considered. Specifically, a random number Δθ chosen with a uniform probability from the interval [−η/2, η/2] will be added to the agent's direction of travel θi at each time step using a discrete-time approach.

## References

1. Camazine, S. et al. Self-Organization in Biological Systems (Princeton University Press, Princeton, New Jersey, 2001).

2. Ballerini, M. et al. Interaction ruling animal collective behavior depends on topological rather than metric distance: Evidence from a field study. Proc. Natl. Acad. Sci. USA 105, 1232–1237 (2008).

3. Ballerini, M. et al. An empirical study of large, naturally occurring starling flocks: a benchmark in collective animal behaviour. Anim. Behav. 76, 201–215 (2008).

4. Helbing, D., Keltsch, J. & Molnár, P. Modelling the evolution of human trail systems. Nature 387, 47–50 (1997).

5. Nagel, K. Particle hopping models and traffic flow theory. Phys. Rev. E 53, 4655–4672 (1996).

6. Hsieh, M. A., Kumar, V. & Chaimowicz, L. Decentralized controllers for shape generation with robotic swarms. Robotica 26, 691–701 (2008).

7. Naruse, K. Velocity correlation in swarm robots with directional neighborhood. In: Lee S., Cho H., Yoon K., & Lee J. E. (eds.) Intelligent Autonomous Systems 12, 843–851 (Advances in Intelligent Systems and Computing, 2013).

8. Akyildiz, I. F., Su, W. L., Sankarasubramaniam, Y. & Cayirci, E. A survey on sensor networks. IEEE Comm. Mag. 40, 102–114 (2002).

9. Leonard, N. E. et al. Collective motion, sensor networks and ocean sampling. Proc. IEEE 95, 48–74 (2007).

10. Krause, J. & Ruxton, G. D. Living in Groups. Oxford Series in Ecology and Evolution (Oxford University Press, Oxford, U.K., 2002).

11. Vicsek, T. & Zafeiris, A. Collective motion. Phys. Rep. 517, 71–140 (2012).

12. Okubo, A. Dynamical aspects of animal grouping: swarms, schools, flocks and herds. Adv. Biophys. 22, 1–94 (1986).

13. Vicsek, T., Czirók, A., Ben-Jacob, E., Cohen, I. & Shochet, O. Novel type of phase-transition in a system of self-driven particles. Phys. Rev. Lett. 75, 1226–1229 (1995).

14. Reynolds, C. W. Flocks, herds and schools: A distributed behavioral model. Comp. Graph. 21, 25–34 (1987).

15. Hemelrijk, C. K. & Hildenbrandt, H. Self-organised shape and frontal density of fish schools. Ethology 114, 245–254 (2008).

16. Bajec, I. L. & Heppner, F. H. Organized flight in birds. Anim. Behav. 78, 777–789 (2009).

17. Bhattacharya, K. & Vicsek, T. Collective decision making in cohesive flocks. New J. Phys. 12, 093019 (2010).

18. Jadbabaie, A., Lin, J. & Morse, A. S. Coordination of groups of mobile autonomous agents using nearest neighbor rules. IEEE Trans. Autom. Contr. 48, 988–1001 (2003).

19. Couzin, I. D., Krause, J., Franks, N. R. & Levin, S. A. Effective leadership and decision making in animal groups on the move. Nature 433, 513–516 (2005).

20. Camperi, M., Cavagna, A., Giardina, I., Parisi, G. & Silvestri, E. Spatially balanced topological interaction grants optimal cohesion in flocking models. Interface Focus 2, 715–725 (2012).

21. Young, G. F., Scardovi, L., Cavagna, A., Giardina, I. & Leonard, N. E. Starling flock networks manage uncertainty in consensus at low cost. PLoS Comput. Biol. 9, e1002894 (2013).

22. Komareji, M. & Bouffanais, R. Resilience and controllability of dynamic collective behaviors. PLoS one 8, e82578 (2013).

23. Grégoire, G., Chaté, H. & Tu, Y. H. Moving and staying together without a leader. Physica D 181, 157–170 (2003).

24. Lukeman, R., Li, Y.-X. & Edelstein-Keshet, L. Inferring individual rules from collective behavior. Proc. Natl. Acad. Sci. USA 107, 12576–12580 (2010).

25. Olfati-Saber, R. Ultrafast consensus in small-world networks. In: Proc. Am. Control Conf. 2371–2378 (2005).

26. Olfati-Saber, R., Fax, J. A. & Murray, R. M. Consensus and cooperation in networked multi-agent systems. Proc. IEEE 95, 215–233 (2007).

27. Bialek, W. et al. Statistical mechanics for natural flocks of birds. Proc. Natl. Acad. Sci. USA 109, 4786–4791 (2012).

28. Eppstein, D., Paterson, M. S. & Yao, F. F. On nearest-neighbor graphs. Discrete Comput. Geom. 17, 263–282 (1997).

29. Balister, P., Bollobás, B., Sarkar, A. & Walters, M. Connectivity of random k-nearest neighbour graphs. Adv. Appl. Probab. 37, 1–24 (2005).

30. Balister, P., Bollobás, B., Sarkar, A. & Walters, M. A critical constant for the k-nearest neighbour model. Adv. Appl. Probab. 41, 1–12 (2009).

31. Olfati-Saber, R. & Murray, R. M. Consensus problems in networks of agents with switching topology and time-delays. IEEE Trans. Autom. Control 49, 1520–1533 (2004).

32. Yu, W., Chen, G., Cao, M. & Kurths, J. Second-order consensus for multiagent systems with directed topologies and nonlinear dynamics. IEEE Trans. on Systems, Man and Cybernetics-Part B 40, 881–891 (2010).

33. Mostofi, Y. & Yuan, Y. Impact of heterogeneous link qualities and network connectivity on binary consensus. Am. Control Conf. 1821–1826 (2009).

34. Aragues, R., Shi, G., Dimarogonas, D. V., Sagues, C. & Johansson, K. H. Distributed algebraic connectivity estimation for adaptive event-triggered consensus. Am. Contr. Conf. 32–37 (2012).

35. Abramowitz, M. & Stegun, I. Handbook of mathematical functions (Dover Publications Inc., New York, 1970).

36. Wu, C. W. Algebraic connectivity of directed graphs. Linear Multilinear A. 53, 203–223 (2005).

37. Press, W., Teukolsky, S., Vetterling, W. & Flannery, B. Numerical Recipes in C (Cambridge University Press, Cambridge, UK, 1992).

38. Cucker, F. & Smale, S. Emergent behavior in flocks. IEEE Trans. Autom. Contr. 52, 852–862 (2007).

39. Matei, I., Martins, N. & Baras, J. Almost sure convergence to consensus in Markovian random graphs. In: Proc. of the 47th IEEE Conference on Decision and Control, 3535–3540 (Cancún, Mexico, 2008).

40. Costa, E. F. & do Val, J. B. R. On the observability and detectability of continuous-time Markov jump linear systems. SIAM J. Control Optim. 41, 1295–1394 (2002).

41. Matei, I., Baras, J. & Somarakis, C. Convergence results for the linear consensus problem under markovian random graphs. SIAM J. Control Optim. 51, 1574–1591 (2013).

42. Emmerton, J. & Delius, J. Vision, Brain and Behavior in Birds chap. Beyond sensation: Visual cognition in pigeons, 377–390 (MIT Press, Cambridge MA, 1993), Zeigler H., & Bischof H. J. edn.

43. Arenas, A., Díaz-Guilera, A., Kurths, J., Moreno, Y. & Zhou, C. Synchronization in complex networks. Phys. Rep. 469, 93–153 (2008).

44. Caldarelli, G. Scale-Free Network: complex webs in nature and technology (Oxford University Press, Oxford, UK, 2007).

45. Hemelrijk, C. K. & Kunz, H. Density distribution and size sorting in fish schools: an individual-based model. Behav. Ecol. 16, 178–187 (2005).

46. Cucker, F. & Dong, J. G. Avoiding collisions in flocks. IEEE Trans. Autom. Contr. 55, 1238–1243 (2010).

47. Olfati-Saber, R. Flocking for multi-agent dynamic systems: Algorithms and theory. IEEE Trans. Autom. Control 51, 401–420 (2006).

48. Bode, N. W. F., Wood, A. J. & Franks, D. W. Social networks and models for collective motion in animals. Behav. Ecol. Sociobiol. 65, 117–130 (2011).

49. Mirabet, V., Auger, P. & Lett, C. Spatial structures in simulations of animal grouping. Ecol. Model. 201, 468–476 (2007).

50. Bode, N. W. F., Franks, D. W. & Wood, A. J. Limited interactions in flocks: Relating model simulations to empirical data. J. Roy. Soc. Interface 8, 301–304 (2011).

51. Dusenbery, D. B. Sensory Ecology: How organisms acquire and respond to information (W. H. Freeman and Co., New York, 1992).

## Acknowledgements

We thank Dr. Mohammad Komareji for fruitful and stimulating conversations. This work was supported by a grant from the Temasek Lab (TL@SUTD) under the STARS project (Y.S.) and by a grant from the SUTD-MIT International Design Centre (R.B.).

## Author information

Authors

### Contributions

R.B. devised the study. Y.S. and R.B. analyzed the results and wrote the main manuscript text. Y.S. proved Theorem A and Corollary B. R.B. performed the numerical analysis and generated the figures. All authors reviewed the manuscript.

## Ethics declarations

### Competing interests

The authors declare no competing financial interests.

## Electronic supplementary material

### Supplementary Information

Supplementary Information

## Rights and permissions

Reprints and Permissions

Shang, Y., Bouffanais, R. Influence of the number of topologically interacting neighbors on swarm dynamics. Sci Rep 4, 4184 (2014). https://doi.org/10.1038/srep04184

• Accepted:

• Published:

• ### Effects of water currents on fish migration through a Feynman-type path integral approach under $$\sqrt{8/3}$$ Liouville-like quantum gravity surfaces

• Paramahansa Pramanik

Theory in Biosciences (2021)

• ### Coherent collective behaviour emerging from decentralised balancing of social feedback and noise

• Ilja Rausch
• Andreagiovanni Reina
• Yara Khaluf

Swarm Intelligence (2019)

• ### A stochastic differential game approach toward animal migration

• Hidekazu Yoshioka

Theory in Biosciences (2019)

• ### Consensus in topologically interacting swarms under communication constraints and time-delays

• M. Komareji
• Y. Shang
• R. Bouffanais

Nonlinear Dynamics (2018)

• ### Effect of Correlations in Swarms on Collective Response

• David Mateo
• Yoke Kong Kuan
• Roland Bouffanais

Scientific Reports (2017)