Next Article in Journal
How the Outliers Influence the Quality of Clustering?
Next Article in Special Issue
Recent Developments in the Theory and Applicability of Swarm Search
Previous Article in Journal
Heterogeneous Diffusion and Nonlinear Advection in a One-Dimensional Fisher-KPP Problem
Previous Article in Special Issue
Space-Air-Ground Integrated Mobile Crowdsensing for Partially Observable Data Collection by Multi-Scale Convolutional Graph Reinforcement Learning
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Locust-Inspired Model of Collective Marching on Rings

1
Department of Computer Science, Technion—Israel Institute of Technology, Haifa 3200003, Israel
2
Department of Computer Science, Bar-Ilan University, Ramat Gan 5290002, Israel
*
Author to whom correspondence should be addressed.
Entropy 2022, 24(7), 918; https://doi.org/10.3390/e24070918
Submission received: 7 June 2022 / Revised: 25 June 2022 / Accepted: 29 June 2022 / Published: 30 June 2022
(This article belongs to the Special Issue Swarms and Network Intelligence)

Abstract

:
We study the collective motion of autonomous mobile agents in a ringlike environment. The agents’ dynamics are inspired by known laboratory experiments on the dynamics of locust swarms. In these experiments, locusts placed at arbitrary locations and initial orientations on a ring-shaped arena are observed to eventually all march in the same direction. In this work we ask whether, and how fast, a similar phenomenon occurs in a stochastic swarm of simple locust-inspired agents. The agents are randomly initiated as marching either clockwise or counterclockwise on a discretized, wide ring-shaped region, which we subdivide into k concentric tracks of length n. Collisions cause agents to change their direction of motion. To avoid this, agents may decide to switch tracks to merge with platoons of agents marching in their direction. We prove that such agents must eventually converge to a local consensus about their direction of motion, meaning that all agents on each narrow track must eventually march in the same direction. We give asymptotic bounds for the expected time it takes for such convergence or “stabilization” to occur, which depends on the number of agents, the length of the tracks, and the number of tracks. We show that when agents also have a small probability of “erratic”, random track-jumping behavior, a global consensus on the direction of motion across all tracks will eventually be reached. Finally, we verify our theoretical findings in numerical simulations.

1. Introduction

Birds, locusts, human crowds, and swarm-robotic systems exhibit interesting collective motion patterns. The underlying autonomous agent behaviors from which these patterns emerge have attracted a great deal of academic interest over the last several decades [1,2,3,4,5,6]. In particular, the formal analysis of models of swarm dynamics has led to varied and deep mathematical results [7,8,9,10]. Rigorous mathematical results are necessary for understanding swarms and for designing predictable and provably effective swarm-robotic systems. However, multi-agent swarms have a uniquely complex and “mesoscopic” nature [11], and relatively few standard techniques for the analysis of such systems have been established. Consequently, the analysis of new models of swarm dynamics is important for advancing our understanding of the subject.
In this work, we study the dynamics of “locust-like” agents moving on a discrete ringlike surface. The model we study is inspired by the following well-documented experiment [12]. Place many locusts on a ringlike arena at random positions and orientations. They start to move around and bump into the arena’s walls and into each other, and as they do, remarkably, over time, they begin to collectively march in the same direction–either clockwise or counterclockwise (see Figure 1). Inspired by observing these experiments, we asked the following question: What are simple and reasonable myopic rules of behavior that might lead to this phenomenon? Our goal is to study this question from an algorithmic perspective by considering a swarm of autonomous and identical discretized mobile agents that act according to a local algorithm. The precise mechanisms underlying locusts’ behaviors are very complex and subject to intense ongoing research, e.g., [3,12,13,14,15]. Consequently, as with much of the literature on swarm dynamics [7,16,17], our goal is not to study an exact mathematical model of locusts in particular, but to study the kinds of algorithmic local interactions that lead to collective marching and related phenomena. The resulting model is idealized and simple to describe, but the patterns of motion that emerge while the locusts progress toward a “stabilized” state of collective marching are surprisingly complex.
The starting point for this work is the following postulated “rationalization” of what a locust-like agent wants to do. It wants to keep moving in the same direction of motion (clockwise or counterclockwise) for as long as possible. We can therefore consider a model of locust-like agents that never change their heading unless they collide head-on with agents marching in the opposite direction and are forced to do so due to the pressure which is exerted on them. When possible, these agents prefer to bypass agents that are headed toward them rather than collide with those agents. This is accomplished by changing lanes, moving in an orthogonal manner between concentric narrow tracks which partition the ringlike arena. The formal description of this “rationalized” model is given in Section 3, and will be our subject of study.

Contribution

We describe and study a stochastic model of locust-inspired agents in a 2D discretized ringlike arena which is subdivided into k tracks, each consisting of n locations. We show that our agents eventually reach a “local consensus” about the direction of marching, meaning that all agents on the same track will march in the same direction. We give asymptotic bounds for the time this takes based on the number of agents and the physical dimensions of the arena. Due to the idealized deterministic nature of our model, a global consensus where all locusts walk in the same direction is not guaranteed, since locusts in different tracks might never meet. However, we show that when a small probability of “erratic”, random behavior is added to the model, such a global consensus must occur. We verify our claims via simulations and make further empirical observations that may inspire future investigations into the model.
Despite being simple to describe, analyzing the model proved tricky in several respects. Our analysis strategy is to show that the model oscillates between two phases: one in which it is “chaotic”, and locusts are moving about without a discernible pattern; and one in which it is “orderly”, and all locusts are stuck in dense deadlock situations where collisions are frequent. We derive our asymptotic bounds from studying orderly phases while bounding the amount of time the locusts can spend in the chaotic phases.
Previous works in the literature (e.g., [18,19]) have explained collective marching by appealing to a principle of local averaging, wherein each agent attempts to average its direction of motion with its neighbors’. It is interesting to note that our model attains collective marching from nearly the opposite set of assumptions. Our agents’ primary motivation is to avoid changing their direction of motion, and any change to it is thus the result of an unavoidable conflict. We refer the reader to the Related Work section below for further discussion.

2. Related Work

Some of our results were presented at DARS2021 [20]. Here we extend our work by improving the time bounds for reaching consensus (Theorem 2) by substantially expanding and restructuring the technical analysis to include the full details which were omitted in [20] and by adding new simulation results, technical figures, and references.
The locust experiments inspiring our work are discussed in [3,12,13,14,18,19]. The phenomenon was originally studied by Buhl et al. [18]. They show that above a certain critical density, a rapid transition occurs from disordered movements of locust nymphs to highly aligned collective motion. Buhl et al., and subsequently Yates et al. [19], hypothesize that a main cause of this behavior is the locusts’ tendency to change their direction to align with neighbors within a local interaction range (a common modeling assumption in multi-agent dynamics [9]) and that individual behavior does not change in relation to group density. In this work, we show how collective marching might emerge from almost the opposite set of assumptions; the locust-like agents we describe try to avoid changing their direction of motion for as long as possible, going as far as actively avoiding locusts that are headed in the opposite direction However, consensus eventually occurs as a result of unavoidable conflicts where locusts bump into each other. The assumption that locusts want to maintain their direction of motion is critical for enabling collective marching in our model, since it characterizes the stable states of the system. Bazazi et al. [21] hypothesize collective marching occurs due to a model of cannibalistic pursuit wherein locusts attempt to pursue locusts in front of them and evade locusts behind them to bite and avoid being bitten. Our model includes an element of evasion, too, but it is motivated by the locusts’ desire to avoid changing their direction of motion. All previous models assume local interactions between locusts, i.e., locusts are only affected by neighboring locusts. Interactions in our model consist of conflicts between adjacent locusts and track changes that occur as a result of trying to avoid said conflicts. Conflicts are by definition local. Track-changing rules can be assumed either local or global, and our analysis applies in both cases.
Notably, in [18,19], it is observed that at intermediate densities swarms of locusts exhibit periodic directional switching, and at low densities the directions of motion are random. Our model does not replicate these phenomena; we show that our locust-like agents converge to local consensus at every density (or global consensus, assuming noise). Interestingly, we note that if we assume each locust has a small probability r > 0 of randomly flipping their heading at the beginning of a time step, such directional switching becomes possible. The probability of directional switching under such a postulate is inversely proportional to the density, thus likelier at low and intermediate densities than at high densities. We emphasize, however, that unlike works such as Buhl et al., replicating all features of locust swarms is not the goal of this work. Whereas the works we discussed seek to model actual locusts, our work can be characterized as trying to find a minimalistic locust-inspired set of assumptions that provably attains collective marching and to study it analytically for the sake of deepening our understanding of multi-agent systems.
More generally, the mathematical modeling of the collective motion of natural organisms, such as birds, locusts, and ants, and the convergence of such systems of agents to stable formations, has been discussed in numerous works including [5,9,10,22]. The most relevant to us among these are works within the field of natural algorithms, which assert that the behavior of natural organisms can be understood using concepts from the theory of robotics and computer science [11,16,17], such as complexity analysis, look-compute-move phases, and decision-making based on discrete internal states. Natural algorithms open up interplay between biology and computer science, allowing us to study nature via the language of algorithms and vice versa, allowing us to translate principles, algorithms, and mechanisms gleaned from nature to the design of systems that are meant to service or interact with humans, such as autonomous vehicles and warehouse robots.
The central focus of this work regards consensus. Do the agents eventually converge to the same direction of motion, and how long does it take? These questions bear mathematical and conceptual resemblance to questions in the field of opinion dynamics [23,24,25]. If the agents’ direction of motion (clockwise or counterclockwise) is considered an “opinion”, and the agents’ interactions that cause changes in the direction of motion are considered social pressure, we can ask how long it takes for the agents to arrive at a consensus of opinions. Building on this analogy, we note that when there are no empty locations in the environment, our agent model is distinctly similar to the voter model on a ring network with two opinions. The voter model is a classical model in opinion dynamics explored in numerous works (we refer the reader to the survey [26]).
The comparison to the voter model breaks when we introduce empty locations and multiple ringlike tracks at which point we must take into account the agents’ dynamically changing positions. Unlike the voter model, where only an agent’s static neighborhood can influence its opinion, in our model, an agent’s current location determines which agents can influence it. Several works have explored models of opinion dynamics in a ring environment where the agents’ physical location is taken into account [27,28]. Our model is distinct from these in several respects. First, in our model, an agent’s internal state—its direction of motion—plays an active part in the algorithm that determines which locations an agent may move to. Second, we partition our ring topology into several narrow rings (“tracks”) that agents may switch between, and an agent’s decision to switch tracks is influenced by the presence of platoons of agents moving in its direction in the track that it wants to switch to. In other words, we model agents that actively attempt to “swarm” together with agents moving in their direction of motion. We believe our work is unique in that we study, in a single model, both how an agent’s physical location affects its opinion (via conflicts with nearby agents), and how an agent’s opinion affects its physical location (via the desire to swarm with agents of the same opinion or equivalently, evade those of a different opinion).
Protocols for achieving consensus about a value, location, or the collective direction of motion have also been investigated in swarm robotics and distributed algorithms [29,30,31,32]. The purpose of these protocols is typically to be as efficient as possible in terms of parameters such as time, computational load, and distance traveled. However, in this work, we are not searching for a protocol that is designed to efficiently bring about consensus; we are investigating a protocol that is inspired by natural phenomena and want to see whether it leads to consensus and how long this process is expected to take.
Broadly speaking, some mathematical similarities may be drawn between our model and interacting particle systems such as the simple exclusion process, which has been used to understand biological transport and traffic phenomena [33,34]. Such particle systems have been studied on rings [35]. In these discrete models, as in our model, agents possess a physical dimension, which constrains the locations they might move to in their environment. These are not typically multi-agent models where agents have an internal state (such as a persistent direction of motion), but rather models of particle motion and diffusion, and the research focus is quite different. The main point of similarity to our model is in the way that a given discrete location can only be occupied by a single agent and in the random occurrence of “traffic shocks” where agents line up one after the other and are prevented from moving for a long time.

3. Model and Definitions

We postulate a locust-inspired model of marching in a wide 2D ringlike arena which is discretized into k narrow concentric rings, each consisting of n locations. Each narrow concentric ring is called a track. This discretized environment is topologically equivalent to the surface of a discretized cylinder of height k partitioned into k narrow rings of length n which are layered on top of each other. For example, the environment of Figure 2 corresponds to k = 3 , n = 8 (3 tracks of length 8). The coordinate ( x , y ) refers to the xth location on the yth track (which can also be seen as the xth location of a ring of length n wrapped around the cylinder at height y). We define x , ( x + n , y ) ( x , y ) .
A swarm of m identical agents, or “locusts", which we label A 1 , , A m , are dispersed at arbitrary locations and move autonomously at discrete time steps t = 0 , 1 , . A given location ( x , y ) can contain at most one locust. Each locust A i is initiated with either a “clockwise” or “counterclockwise” heading, which determines their present direction of motion. We define b ( A i ) = 1 when A i has clockwise heading, and b ( A i ) = 1 when A i has a counterclockwise heading.
The locusts move synchronously at discrete time steps t = 0 , 1 , . At every time step, locusts try to take a step in their direction of motion. If locust A is at ( x , y ) , it will attempt to move to ( x + b ( A ) , y ) . A clockwise movement corresponds to adding 1 to x, and a counterclockwise movement corresponds to subtracting 1. The locusts have physical dimension, so if the location a locust attempts to move to already contains another locust at the beginning of the time step, the locust instead stays put. If A i and A j are both attempting to move to the same location, one of them is chosen uniformly at random to move to the location, and the other stays put.
Locusts that are adjacent exert pressure on each other to change their heading. If A i has a clockwise heading and A j has a counterclockwise heading, and they lie on the coordinates ( x , y ) and ( x + 1 , y ) , respectively, then at the end of the current time step, one locust (chosen uniformly at random) will flip its heading to the other locust’s heading. An equivalent way to model these dynamics is as follows: at the start of a conflict, each of the two locusts uniformly samples a random number r i , r j ( 0 , 1 ) called ’pressure’. The locust with lower pressure “loses” the conflict and changes its heading (noting that the probability of r i = r j is 0). Such an event is called a conflict between A i and A j . A conflict is “won” by the locust that successfully converts the other locust to their heading.
Let A be a locust at ( x , y ) . If the locust A has a clockwise heading, then the front of A is the first locust after A in the clockwise direction, and the back of A is the first locust in the counterclockwise direction. The reverse is true when A has a counterclockwise heading. Formally, let i > 0 be the smallest positive integer such that ( x + b ( A ) i , y ) contains a locust, and let j > 0 be the smallest positive integer such that ( x b ( A ) j , y ) contains a locust. The front of A is the locust in ( x + b ( A ) i , y ) , and the back of A is the locust in ( x b ( A ) j , y ) . The locusts in the front and back of A are denoted A and A , respectively, and are called A’s neighbors; these are the locusts that are directly in front of and behind A. Note that when a track has two or less locusts, A = A . When a track has one locust, i = j = n , and A = A = A .
At any given time step, besides moving in the direction of their heading within their track, locust A at ( x , y ) can switch tracks, moving vertically from ( x , y ) to ( x , y + 1 ) or ( x , y 1 ) unless this would cause it to go above track k or below track 1. Such vertical movements occur after the horizontal movements of locusts along the tracks but on the same time step where those horizontal movements took place. Locusts are incentivized to move vertically when this enables them to avoid changing their heading (“inertia”). Specifically, A may move to the location E = ( x , y ± 1 ) at time t when:
  • At the beginning of time t, A and A are not adjacent to each other and b ( A ) b ( A ) .
  • Once A moves to E, the updated A and A in the new track will have heading b ( A ) .
  • No locust will attempt to move horizontally to E at time t + 1 .
Condition (1) states that there is an imminent conflict between A and A which is bound to occur. Condition (2) guarantees that, by changing tracks to avoid this conflict, A is not immediately advancing toward another collision; A’s new neighbor will have the same heading as A. Condition (3) guarantees that the location A wants to move to on the new track is not being contested by another locust already on that track. Together, these conditions mean that locusts only change tracks if this results in avoiding collisions and in “swarming” together with other locusts marching in the same direction of motion. If a locust cannot sense that all three conditions (1)–(3) are fulfilled, it does not switch tracks.
Besides these conditions, we make no assumptions about when locusts move vertically. In other words, locusts do not always need to change tracks when they are allowed to by rules (1)–(3); they may do so arbitrarily, say with some probability q or according to any internal scheduler or algorithm, and we may impose visibility range constraints on the locusts such that they only switch tracks when they can see that rules (1)–(3) are fulfilled. We do not determine in any sense the times when locusts move between tracks, but only determine the preconditions required for such movements. Our results in the following sections remain true regardless. This makes our results general in the sense that they hold for many different track-switching “swarming” rules, as long as those rules do not break the conditions (1)–(3).
Figure 2 illustrates one time step of the model, split into horizontal and vertical movement phases.
To slightly simplify our analysis of the model, we assume that every track has at least two locusts at all times, although our results remain true without this assumption.
Although we work in a discrete time model where movement is instantaneous, it is helpful for the sake of formal analysis to define the beginning of a time step as the configuration of the swarm at that time step before any locusts moved, and the end of a time step as the configuration at that time step after all locust movements are complete. Somewhat idiosyncratically, the end of time t is precisely the beginning of time t + 1 —both terms refer to the same thing. By default and unless stated otherwise, the words “time step t” refer to the beginning of that time step.

4. Stabilization Analysis

We will mainly be interested in studying the stability of the headings of the locusts over time. Does the model reach a point where the locusts stabilize and stop changing their heading? If so, are their headings all identical? How long does it take?
In the case of a single track ( k = 1 ), we shall see that the locusts all eventually stabilize with identical heading and bound the expected time for this to happen in terms of m and n. In the multi-track case, we shall see that the locusts stabilize and agree on a heading locally (i.e., all locusts on the same track eventually have the identical heading and thereafter never change their heading) and bound the expected time to stabilization in terms of m , n , k . In the multi-track case, we further show that adding a small probability of “erratic” track-switching behavior to the model induces global consensus: all locusts across all tracks eventually have the identical heading.

4.1. Locusts on Narrow Ringlike Arenas ( k = 1 )

We start by studying the case k = 1 ; that is, we study a swarm of m locusts marching on a single track of length n. Throughout this section, we assume this is the case, except in Definition 1, which is also used in later sections.
For the rest of this section, let us call the swarm non-stable at time t if there are two locusts A i and A j such that b ( A i ) b ( A j ) ; otherwise, the swarm is stable. A swarm which is stable at time t remains stable thereafter. We wish to bound the number of time steps it takes for the system to become stable, which we denote T s t a b l e . Our goal is to prove Theorem 1, which tells us that the expected time to stabilization grows quadratically in the number of locusts m and linearly in the track length n.
Theorem 1.
For any configuration of m locusts on a ring with a single track, E [ T s t a b l e ] m 2 + 2 ( n m ) . This bound is asymptotically tight; there are initial locust configurations for which E [ T s t a b l e ] = Ω ( m 2 + n m ) .
Theorem 1 tells us that all locusts must have identical bias within a finite expected time. This fact in isolation (without the time bounds in the statement of the theorem) is relatively straightforward to prove by noting that the evolution of the locusts’ headings and locations can be modeled as a finite Markov chain, and the only absorbing classes in this Markov chain are ones in which all locusts have the same heading (see [36]).
Next we define segments: sets of consecutive locusts on the same track which all have the same heading. This allows us to partition the swarm into segments such that every locust belongs to a unique segment (see Figure 3). Although this section focuses on the case of a single track (and claims in this section are made under the assumption that there is only a single track), the definition is general, and we will use it in subsequent sections.
Definition 1.
Let A be a locust for which b ( A ) b ( A ) at time t, and consider the sequence of locusts B 0 = A , B i + 1 = B i . Let B q be the first locust in this sequence for which b ( B q ) b ( B 0 ) . The set { B 0 , B 1 , B q 1 } is called the segment of the locusts B 0 , B q 1 at time t. The locust B q 1 is called the segment head, and A is called the segment tail of this segment.
Only locusts which are segment heads at the beginning of a time step can change their heading by the end of that time step. When the heads of two segments are adjacent to each other, the resulting conflict causes one to change its heading, leave its previous segment, and instead become part of the other segment. If the head of a segment is also the tail of a segment, the segment is eliminated when it changes heading. Two segments separated by a segment of opposite heading merge if the opposite-heading segment is eliminated, which decreases the number of segments by two. No other action by a locust can change the segments. Hence, the number of segments and segment tails can only decrease.
Since our model is stochastic, different sequences of events may occur and result in different segments. However, by the above argument, we can conclude that in any such sequence of events, there must always exist at least one locust which remains a segment tail at all times t < T s t a b l e and never changes its heading (since at least one segment must exist as long as t < T s t a b l e ). Arbitrarily, we denote one such segment tail “ A W ”.
Definition 2.
The segment of A W at the beginning of time t is called the winning segment at time t and is denoted S W ( t ) . The head of S W ( t ) is labelled H W ( t ) . For convenience, if at time t 0 the swarm is stable (i.e., t 0 T s t a b l e ), then we define S W ( t 0 ) as the set that contains all m locusts.
Lemma 1.
The expected number of time steps t < T s t a b l e in which | S W ( t ) | changes is bounded by m 2 .
Proof. 
Let C m denote the number of changes to the size of S W ( t ) that occurs before time T s t a b l e . Note that T s t a b l e is the first time step where | S W ( t ) | = m . | S W ( t ) | can only decrease, by one locust at a time, if H W ( t ) conflicts with another locust and loses. | S W ( t ) | can increase in several ways, for example, when it merges with other segments. In particular, | S W ( t ) | increases by at least one whenever H W ( t ) conflicts with a locust and wins, which happens with probability at least 1 2 . Hence, whenever S W ( t ) changes in size, it is more likely to grow than to shrink. We can bound E [ C m ] by comparing the growth of | S W ( t ) | to a random walk with absorbing boundaries at 0 and m:
Consider a random walk on the integers which starts at | S W ( 0 ) | . At any time step t, the walker takes a step left with probability 1 2 , otherwise it takes a step right. If the walker reaches either 0 or m, the walk ends. Denote by C m * the time it takes the walk to end. Using coupling (cf. [37]), we see that E [ C m ] E [ C m * | the walker never reaches 0 ] , since per the previous paragraph, | S W ( t ) | clearly grows at least as fast as the position of the random walker (note that | S W ( t ) | > 0 is always true, which is analogous to the walker never reaching 0).
Let us show how to bound E [ C m * | the walker never reaches 0 ] . Since the walk is memoryless, we can think of this quantity as the number of steps the random walker takes to get to m, assuming it must move right when it is at 0, and assuming the step count restarts whenever it moves from 0 to 1. If we count the steps without resetting the count, we realize that this is simply the expected number of steps it takes a random walker walled at 0 to reach position m, which is at most m 2 (cf. [38]). Hence E [ C m * | the walker never reaches 0 ] m 2 . □
Lemma 2.
The expected number of time steps t < T s t a b l e in which | S W ( t ) | does not change is bounded by 2 ( n m ) .
Lemma 2 will require other lemmas and some new definitions to prove.
Definition 3.
Let A and B be two locusts or two locations which lie on the same track. The clockwise distance from A to B at time t is the number of clockwise steps required to get from A’s location to B’s location and is denoted d i s t c ( A , B ) . The counterclockwise distance from A to B is denoted d i s t c c ( A , B ) and equals d i s t c ( B , A ) .
For the rest of this section, let us assume without loss of generality that the winning segment’s tail A W has a clockwise heading. Label the empty locations in the ring at time t = 0 (i.e., the locations not containing locusts at time t = 0 ) as E 1 , E 2 , E n m , sorted by their counterclockwise distance to A W at time t = 0 , such that E 1 minimizes d i s t c c ( E i , A W ) , E 2 has the second smallest distance, and so on. We will treat these empty locations as having persistent identities. Whenever a locust A moves from its current location to E i , we will instead say that A and E i swapped, and so E i ’s new location is A’s old location.
We say a location E i is inside the segment S W ( t ) at time t if the two locusts which have the smallest clockwise and counterclockwise distance to E i , respectively, are both in S W ( t ) . Otherwise, we say that E i is outside  S W ( t ) . A locust or location A is said to be between  E i and E j , j > i , if d i s t c ( E i , A ) < d i s t c ( E i , E j ) .
Definition 4.
All empty locations are initially blocked. A location E i becomes unblocked at time t + 1 if all empty locations E j such that j < i are unblocked at time t, and a locust from S W ( t ) swapped locations with E i at time t. Once a location becomes unblocked, it remains that way forever.
Lemma 3.
There is some time step t * n m such that:
1. 
Every blocked empty location E is outside S W ( t * ) (if any exist)
2. 
At least t * empty locations are unblocked.
Proof. 
If E 1 is outside S W ( 0 ) , then the same must be true for all other empty locations, so t * = 0 and we are finished. Otherwise, E 1 becomes unblocked at time t = 1 . If E i becomes unblocked at time t, then at time t, it cannot be adjacent to E i + 1 , since the locust that swapped with E i in the previous time step is now between E i and E i + 1 . By definition, there are no empty locations E j between E i and E i + 1 . Consequently, if E i + 1 is inside S W ( t ) at time t, it will swap with a locust of S W ( t ) at time t, and become unblocked at time t + 1 . If E i + 1 is outside the segment at time t, it will become unblocked at the first time step t > t that begins with E i + 1 inside S W ( t ) . Hence, if E i becomes unblocked at time t, then E i + 1 becomes unblocked at time t + 1 or E i + 1 is outside S W ( t + 1 ) at time t + 1 .
Let t * be the smallest time where there are no blocked empty locations inside S W ( t * ) . By the above, at every time step t t * an empty location becomes unblocked; hence there are at least t * unblocked empty locations at time t * . Moreover, since there are n m empty locations, this implies t * n m . □
Lemma 4.
There is no time t < T s t a b l e where an unblocked location is clockwise-adjacent to H W ( t ) (i.e., there is no time t where an unblocked empty location E is located one step clockwise from H W ( t ) ).
Proof. 
First consider what happens when E 1 becomes unblocked: it swaps its location with a locust in S W ( t ) , and since E 1 is the clockwise-closest empty location to A W , the entire counterclockwise path from E 1 to A W consists only of locusts from S W ( t ) . Hence E 1 will move counterclockwise at every time step until it swaps with A W . Once it swaps with A W , E 1 will not swap with another locust at all times t < T s t a b l e , since for that to occur we must have that b ( A W ) = b ( A W ) , which is impossible since by definition A W remains a segment tail until t = T s t a b l e . E 1 does not swap with H W ( t ) while E 1 moves counterclockwise toward A W nor after E 1 and A W swap as long as the swarm is unstable; hence there is no time step t < T s t a b l e when E 1 is unblocked and swaps with H W ( t ) .
Now consider E 2 . E 2 becomes unblocked at least one time step after E 1 , and there is at least one locust in S W ( t ) which is between E 1 and E 2 at the time step E 1 that becomes unblocked (in particular, the locust in S W ( t ) that swapped with E 1 must be between E 1 and E 2 at that time). Since E 1 subsequently moves toward A W at every time step until they swap, E 2 cannot become adjacent to E 1 until they both swap with A W . Hence the location one step counterclockwise to E 2 must always be a locust until E 2 swaps with A W , meaning that similar to E 1 , E 2 also moves counterclockwise toward A W at every time step after E 2 becomes unblocked until they swap locations. Consequently, just like E 1 , there is no time step t < T s t a b l e when E 2 is unblocked and swaps with H W ( t ) .
More generally, by a straightforward inductive argument, the exact same thing is true of E i : once it becomes unblocked, it moves counterclockwise toward A W at every time step until it swaps with A W . Thus, upon becoming unblocked, E i does not swap with H W ( t ) as long as t < T s t a b l e . □
Using Lemmas 3 and 4, let us prove Lemma 2.
Proof. 
If, at the beginning of time step t, H W ( t ) is adjacent to a locust from a different segment, then | S W ( t ) | will change at the end of this time step due to the locusts’ conflict. Hence, to prove Lemma 2, it suffices to show that out of all the time steps before time T s t a b l e , H W ( t ) is not adjacent to the head of a different segment in at most 2 ( n m ) different steps in expectation.
If all empty locations are unblocked at time n m , then by Lemma 4, H W ( t ) conflicts with the head of another segment at all times t n m . Therefore, | S W ( t ) | will change at every time step n m < t < T s t a b l e , which is what we wanted to prove.
If there is a blocked location at time n m , then by Lemma 2, there must be some time t * n m where at least t * empty locations are unblocked and all blocked empty locations are outside S W ( t * ) . Let E j be the minimal-index blocked location which is outside S W ( t * ) at time t * . Since there are no blocked empty locations inside S W ( t * ) , all locations E i with i < j are unblocked. Hence, E j will become unblocked as soon as it swaps with the head of the winning segment. Since (by the clockwise sorting order of E 1 , E 2 , ) E j + 1 cannot swap with the winning segment head before E j is unblocked, E j + 1 will also become unblocked after the first time step where it swaps the winning segment head. The same is true for E j + 2 , E n m . Hence, every empty location that H W ( t ) swaps with after time t * becomes unblocked in the subsequent time step. By Lemma 2, the total swaps H W ( t ) could have made before time T s t a b l e is thus most t * + ( n m j ) n m . Whenever an empty location is one step clockwise from H W ( t ) , they will swap with probability at least 0.5 (the swap is not guaranteed, since it is possible the location is also adjacent to the head of another segment, and hence a tiebreaker will occur in regards to which segment head occupies the empty location in the next time step). Consequently, the expected number of time steps H W ( t ) is not adjacent to the head of another segment is bounded by 2 ( n m ) . □
The proof of Theorem 1 now follows.
Proof. 
Lemma 2 tells us that before time T s t a b l e , | S W ( t ) | does not change in at most 2 ( n m ) time steps in expectation, whereas Lemma 1 tells us that the expected number of changes to | S W ( t ) | before time T s t a b l e is at most m 2 . Hence, for any configuration of m locusts on a ring of track length n, E [ T s t a b l e ] m 2 + 2 ( n m ) .
Let us now show a locust configuration for which E [ T s t a b l e ] = Ω ( m 2 + n ) , so as to asymptotically match the upper bound we found. Consider a ring with k = 1 , m divisible by 2, and an initial locust configuration where locusts are found at coordinates ( 0 , 1 ) , ( 1 , 1 ) , ( m / 2 , 1 ) with a clockwise heading and at ( 1 , 1 ) , ( 2 , 1 ) , ( m / 2 1 , 1 ) with a counterclockwise heading, and the rest of the ring is empty. This is a ring with exactly two segments, each of size m / 2 . Since after every conflict, the segment sizes are offset by one in either direction, the expected number of conflicts between the heads of the segments that is necessary for stabilization is equal to the expected number of steps a random walk with absorbing boundaries at m / 2 and m / 2 takes to end, which is m 2 / 4 (see [39]). Since the heads of the segments start at distance n m from each other, it takes Ω ( n m ) steps for them to reach each other. Hence the expected time for this ring to stabilize is Ω ( m 2 + n m ) . □

4.2. Locusts on Wide Ringlike Arenas ( k > 1 )

Let us now investigate the case where m locusts are marching on k > 1 tracks of length n. The first question we should ask is whether, just as in the case of the k = 1 setting, there exists some time T where all locusts have identical heading. The answer is “not necessarily”: consider for example the case k = 2 where on the k = 1 track, all locusts march clockwise, and on the k = 2 track, all locusts march counterclockwise. According to the track-switching conditions (Section 3), no locust will ever switch tracks in this configuration; hence the locusts will perpetually have opposing headings. As we shall prove in this section, swarms stabilize locally–meaning that eventually, all locusts on the same track have identical heading, but this heading may be different between tracks.
Let us say that the yth track is stable if all locusts whose location is ( · , y ) have the identical heading. Note that once a track becomes stable, it remains this way forever, as by the model, the only locusts that may move into the track must have the same heading as its locusts. Let T s t a b l e be the first time when all the k tracks are stable. Our goal will be to prove the following asymptotic bounds on T s t a b l e :
Theorem 2.
E [ T s t a b l e ] = O ( min ( log ( k ) n 2 , m n ) ) .
Recalling Definition 1, each locust in the system belongs to some segment. Each track has its own segments. Locusts leave and join segments due to conflicts or when they pass from their current segment to a track on a different segment. In this section, we will treat segments as having persistent identities similar to S W in the previous section. We introduce the following notation:
Definition 5.
Let S be a segment whose tail is A at some time t 0 . We define S ( t ) to be the segment whose tail is A at the beginning of time t. If A is not a segment tail at time t, then we will say S ( t ) = (this can happen once A changes its heading or moves to another track, or due to another segment merging with S ( t ) which might cause b ( A ) to equal b ( A ) , thus making A no longer the tail).
Furthermore, define S 1 to be the segment tail of S and S i + 1 = S i .
Let us give a few examples of the notation in Definition 5. Suppose at time t 1 we have some segment S. Then the tail of S is S 1 , and the head is S | S | . S ( t ) is the segment whose tail is S 1 at time t; hence S ( t 1 ) = S . Finally, S ( t ) | S ( t ) | is the head of the segment S ( t ) .
In the k > 1 setting, locusts can frequently move between tracks, which complicates our study of T s t a b l e . Crucially, however, the number of segments on any individual track is non-increasing. This is because, first, as shown in the previous section, locusts moving and conflicting on the same track can never create new segments. Second, by the locust model, locusts can only move into another track when this places them between two locusts that already belong to some (clockwise or counterclockwise) segment.
That being said, locusts moving in and out of a given track make the technique we used in the previous section unfeasible. In the following definitions of compact and deadlocked locust sets, our goal is to identify configurations of locusts on a given track which locusts cannot enter from another track. Such configurations can be studied locally, focusing only on the track they are in. In the next several lemmas, we will bound the amount of time that can pass without either the number of segments decreasing or all segments entering into deadlock.
Definition 6.
We call a sequence of locusts X 1 , X 2 ,  compact if X i + 1 = X i and either:
1. 
every locust in X has a clockwise heading and for every i < | X | , d i s t c ( X i , X i + 1 ) 2 , or
2. 
every locust in X has a counterclockwise heading and for every i < | X | , d i s t c c ( X i , X i + 1 ) 2 .
An unordered set of locusts is called compact if there exists an ordering of all its locusts that forms a compact sequence.
Definition 7.
Let X = { X 1 , X 2 , X j } and Y = { Y 1 , Y 2 , Y k } be two compact sets, such that the locusts of X have a clockwise heading and the locusts of Y have a counterclockwise heading. X and Y are in deadlock if d i s t c ( X j , Y k ) = 1 . (See Figure 4).
A compact set of locusts X is essentially a platoon of locusts all on the same track which are heading in one direction and are all jammed together with at most one empty space between each consecutive pair. As long as X remains compact, no new locusts can enter the track between any two locusts of X because the model states that locusts do not move vertically into empty locations to which a locust is attempting to move horizontally, and the locusts in a compact set are always attempting to move horizontally to the empty location in front of them.
Definition 8.
A maximal compact set is a set X such that for any locust A X , X A is not compact.
A straightforward observation is that locusts can only belong to one maximal compact set:
Observation 1.
Let A be a locust. If X and Y are maximal compact sets containing A, then X = Y .
Lemma 5.
Let X and Y be two sets of locusts in deadlock at the beginning of time t. Then at every subsequent time step, the locusts in X Y can be separated into sets X and Y that are in deadlock, or the locusts in X Y all have identical heading.
Proof. 
Let X = { X 1 , X 2 , X j } and Y = { Y 1 , Y 2 , Y k } be compact sets such that X i + 1 = X i , Y i + 1 = Y i . It suffices to show that if X and Y are in deadlock at time t, they will remain that way at time t + 1 , unless X Y ’s locusts all have identical heading. Let us assume without loss of generality (“w.l.o.g.”) that X has a clockwise heading, and therefore Y has a counterclockwise heading. By the definition of deadlock, at time t, X j and Y k conflict, and the locust that loses joins the other set. Suppose w.l.o.g. that X j is the locust that lost. If | X | = 1 , then the locusts all have an identical heading, and we are finished. Otherwise, set X = { X 1 , X j 1 } and Y = { Y 1 , Y 2 , Y k , X j } . Note that since X and Y are compact at time t, no locust could have moved vertically into the empty spaces between pairs of locusts in X Y . Furthermore the locusts of X and Y all march toward X j and Y k , respectively; hence the distance between any consecutive pair X i , X i + 1 or Y i , Y i + 1 could not have increased. Thus X and Y are compact.
To show that X and Y are deadlocked at time t + 1 , we just need to show that d i s t c ( X j 1 , X j ) is 1 at time t + 1 . Since the distances do not increase, if d i s t c ( X j 1 , X j ) was 1 at time t, we are finished. Otherwise d i s t c ( X j 1 , X j ) = 2 at time t, and since X j did not move (it was in a conflict with Y k ), X j 1 decreased the distance in the last time step, hence it is now 1. □
Lemma 6.
Suppose P and Q are the only segments on track K at time t 0 , and P’s locusts have a clockwise heading. Let d = d i s t c ( P 1 , Q 1 ) . After at most 3d time steps, P ( t 0 + 3 d ) and Q ( t 0 + 3 d ) are in deadlock, or the track is stable.
Proof. 
The track K consists of locations of the form ( x , y ) for some fixed y and 1 x n . For brevity, in this proof we will denote the location ( x , y ) simply by its horizontal coordinate, i.e., x, by writing ( x ) = ( x , y ) .
We may assume w.l.o.g. that t 0 = 0 and that P 1 is initially at ( 0 ) . Note that this means Q 1 is at ( d ) at time 0. If at any time t 3 d the track is stable, then we are finished, so we assume for contradiction that this is not the case. This means that P 1 and Q 1 do not change their headings before time 3 d . This being the case, we get that d i s t c ( P 1 , Q 1 ) is non-increasing before time 3 d . Since the segments P ( t ) and Q ( t ) move toward each other at every time step t 3 d , we may focus only on the interval of locations [ 0 , d ] , i.e., the locations ( 0 ) , ( 1 ) , ( d ) . We then define the distance d i s t ( · , · ) between two locusts in this interval whose x-coordinates are x 1 and x 2 as | x 1 x 2 | .
At any time t 3 d , we may partition the locusts in [ 0 , d ] into maximal compact sets of locusts. This partition is unique, by Observation 1. Let us label the maximal compact sets of locusts that belong to P ( t ) as C 1 t , C 2 t , C c t t , where the segments are indexed from 1 to c t , sorted by increasing x coordinates, such that C 1 t contains the locusts closest to ( 0 ) . Analogously, we label the maximal compact sets that belong to Q ( t ) as W 1 t , W 2 t , W w t t , with indices running from 1 to w t , sorted by decreasing x-coordinates such that W 1 t contains the locusts that are closest to ( d ) (see Figure 5). In this proof, the distance between two sets of locusts X , Y , denoted d i s t ( X , Y ) , is defined simply as the minimal distance between two locusts A X , B Y . Our proof will utilize the functions:
L 1 ( t ) = i = 1 c t 1 d i s t ( C i t , C i + 1 t ) , L 2 ( t ) = i = 1 w t 1 d i s t ( W i t , W i + 1 t ) L 3 ( t ) = d i s t ( C c t t , W w t t ) , L ( t ) = L 1 ( t ) + L 2 ( t ) + L 3 ( t )
L 1 ( t ) is the sum of distances between consecutive clockwise-facing sets in the partition at time t. L 2 ( t ) is the sum of distances between the counterclockwise sets. L 3 ( t ) is the distance between the two closest clockwise and counterclockwise facing sets. The function L ( t ) is the sum of distances between consecutive compact sets in the partition. When L ( t ) = 1 , there are necessarily only one clockwise and one counterclockwise facing sets in the partition, which must equal P ( t ) and Q ( t ) , respectively. Furthermore, L ( t ) = 1 implies that the distance between P ( t ) and Q ( t ) is 1. Hence, when L ( t ) = 1 , P ( t ) and Q ( t ) are both in deadlock. The converse is true as well; hence L ( t ) = 1 if and only if P ( t ) , Q ( t ) are in deadlock. We will use L ( t ) as a potential or “Lyapunov” function [40] and show it must decrease to 1 within 3d time steps. By Lemma 5, once P and Q are in deadlock they will remain in deadlock until one of them is eliminated, which completes the proof.
Let us denote by m a x ( X ) the locust with maximum x-coordinate in X, and by m i n ( X ) the locust with minimal x-coordinate. We may also use m a x ( X ) and m i n ( X ) to denote the x coordinate of said locust. Note that d i s t ( C i t , C i + 1 t ) is the distance between m a x ( C i t ) and m i n ( C i + 1 t ) .
Recall that in the locust model, every time step is divided into a phase where locusts move horizontally (on their respective tracks), and a phase where they move vertically. First, let us show that the sum of distances L 1 ( t ) does not increase due to changes in either the horizontal or vertical phase. Since L 1 ( t ) is the sum of distances between compact partition sets whose locusts move clockwise, and for all C i t except perhaps C c t t , m a x ( C i t ) always moves clockwise, the distance d i s t ( C i t , C i + 1 t ) does not increase as a result of locust movements (note that clockwise movements of m a x ( C i t ) do not result in a new compact set because the rest of the locusts in C i t follow it). Furthermore, since conflicts cannot result in a new maximal compact set in the partition, conflicts do not increase L 1 ( t ) . Hence, L 1 ( t ) does not increase in the horizontal phase. In the vertical phase, clockwise-heading locusts entering the track either create a new set in the partition, which does not affect the sum of distances (as they then merely form a “mid-point” between two other maximal compact sets), or they join an existing compact set, which can never increase L 1 ( t ) . By the locust model, the only locusts that can move tracks are m a x ( C c t t ) and m i n ( W w t t ) , since these are the only locusts for which the condition b ( A ) b ( A ) is true, so locusts moving tracks cannot increase L 1 ( t ) either. In conclusion, L 1 ( t ) is non-increasing at any time step. By analogy, L 2 ( t ) is non-increasing.
Similar to L 1 and L 2 , the distance L 3 ( t ) cannot increase as a result of locusts entering the track. It can increase as a result of a locust conflict which eliminates either W w t t or C c t t , but such an increase is compensated for by a comparable decrease in either L 1 ( t ) or L 2 ( t ) . It is also simple to check that, since P ( t ) and Q ( t ) are always moving toward each other when they are not in deadlock (i.e., when L ( t ) > 1 ), there will be at least two compact sets in the partition that decrease their distance to each other; hence L 1 , L 2 or L 3 must decrease by at least one in the horizontal phase.
To conclude: L 1 ( t ) and L 2 ( t ) are non-increasing. L 3 ( t ) is non-increasing during the horizontal phase and as a result of new locusts entering K . If L ( t ) > 1 , L ( t ) decreases during each horizontal phase. Hence, L ( t ) decreases in every time step where L ( t ) > 1 , and no locusts in K move to another track.
What happens when locusts in K do move to another track? As proven, L 1 ( t ) and L 2 ( t ) do not increase. However, the distance L 3 ( t ) will increase, since the only locusts that can move tracks are m a x ( C w t t ) and m i n ( W c t t ) . It is straightforward to check that when C c t t contains more than one locust, L 3 ( t ) will increase by at most two as a result of m a x ( C w t t ) moving tracks. When C c t t contains exactly one locust, L 3 ( t ) can increase significantly (as L 3 ( t ) then becomes the distance between C c t 1 t and W w t ), but any increase is matched by the decrease in L 1 ( t ) as a result of C c t t being eliminated. Analogous statement hold for W w t t , and hence L 3 ( t ) can increase by at most two as a result of one locust moving out of the track. We need to bound, then, the number of locusts in K that move tracks before time 3 d . We define the potential function F ( t ) :
F ( t ) = i = 1 c t 1 ( d i s t ( C i t , C i + 1 t ) 1 ) + i = 1 w t 1 ( d i s t ( W i t , W i + 1 t ) 1 ) + | P ( t ) Q ( t ) | = L 1 ( t ) + L 2 ( t ) c t w t + | P ( t ) Q ( t ) |
F ( t ) is the sum of the empty locations between consecutive compact sets in the partition whose locusts have the same heading plus the number of locusts in K . Note that F ( t ) 0 at all times t. We will show F ( t ) is non-increasing and that it decreases whenever a locust leaves the track. Hence, at most F ( 0 ) locusts can leave the track.
Let us show that F ( t ) is non-increasing. We already know L 1 and L 2 are non-increasing. In the horizontal phase, | P ( t ) Q ( t ) | is of course unaffected. Then c t and w t can decrease as a result of maximal compact sets merging, hence increasing F, but this can only happen when the distance between two such sets has decreased; hence the resulting increase to F is undone by a decrease in L 1 and L 2 . Hence, F ( t ) does not increase because of locusts’ actions during the horizontal phase.
Likewise, locusts leaving K can decrease c t or w t when they cause a maximal compact set to be eliminated, but this is matched by a comparable decrease in L 1 or L 2 which means that F does not increase due to locusts moving out of the track. Furthermore, | P ( t ) Q ( t ) | decreases when this happens. Hence, a locust moving out of the track decreases F ( t ) by at least one. Finally, let us show that locusts entering the track does not increase F ( t ) .
At time t, locusts can only enter the track at empty locations that are found in intervals of the form [ m a x ( W i t ) , m i n ( W i + 1 t ) ] or [ m a x ( C i + 1 t ) , m i n ( C i t ) ] for some i. In particular, locusts cannot enter empty locations that are between two locusts belonging to the same compact set (because a locust in that set will always be attempting to move to that location in the next time step, and the model disallows vertical movements to such locations), nor can they enter the track on the empty locations between m i n ( C c t t ) and m a x ( W w t t ) . Thus, locusts entering the track at time t decrease the amount of empty locations between two clockwise or counterclockwise compact partition sets (and perhaps cause the sets between which they enter to merge into a single compact set). This will always decrease L 1 ( t ) + L 2 ( t ) c t w t by at least one and increase | P ( t ) Q ( t ) | by 1. On net, we see that new locusts entering K either decrease or do not affect F.
In conclusion, F ( t ) is non-increasing, and any time a locust moves to another track, F ( t ) decreases by one. Thus, at most F ( 0 ) locusts can move from K to another track. Recall that locusts moving out of the track can increase L ( t ) by at most two. Hence after at most L ( 0 ) + 2 F ( 0 ) d + 2 d = 3 d time steps, L ( t ) = 1 . □
Lemma 7.
Let s e g ( t ) denote the set of segments in all tracks at time t. At time t + 3 n , either every segment is in deadlock with some other segment, or | s e g ( t + 3 n ) | < | s e g ( t ) | .
Proof. 
Consider some track K and a segment P which is in that track at time t. Let us assume that | s e g ( t + 3 n ) | = | s e g ( t ) | , and show that P ( t + 3 n ) must be in deadlock with another segment. At any time t t , as long as the number of segments on K does not decrease, the locusts of P ( t ) will be marching toward locusts of another segment, which we will label Q ( t ) . They cannot collide or conflict with locusts belonging to any segment other than Q ( t ) . Hence, other segments in K do not affect the evolution of P ( t ) and Q ( t ) before time t + 3 n , and we can assume w.l.o.g. that P ( t ) and Q ( t ) are the only segments in K at time t. Let d be as in the statement of Lemma 6. Since n d , Lemma 6 tells us that at some time t t * t + 3 n , P ( t * ) and Q ( t * ) must be in deadlock. Since by Lemma 5, P and Q must remain in deadlock until one of them is eliminated, we see that at time t + 3 n they must still be in deadlock, since we assumed | s e g ( t ) | = | s e g ( t + 3 n ) | . □
Theorem 3.
E [ T s t a b l e ] = O ( m n ) .
Proof. 
Let | s e g ( t ) | denote the number of segments at time t. E [ T s t a b l e ] can be computed as the sum of times E [ T 2 + T 4 + + T | s e g ( 0 ) | ] , where T i is the expected time until the number of segments drops below i, if it is currently i (we increment the index by two since segments are necessarily eliminated in pairs).
Let us estimate E [ T 2 i ] . Suppose that at time t, the number of segments is 2 i . Then after 3 n steps at most, either the number of segments has decreased, or all segments are in deadlock. There are in total i pairs of segments in deadlock, and as there are m locusts, there must be a pair P, Q that contains at most min ( m / i , n ) locusts at time t + 3 n . By Lemma 5, P, Q remain in deadlock until either P or Q is eliminated. We can compute how long this takes in expectation, since at every time step after time t + 3 n , the heads of P and Q conflict, resulting in one of the segments increasing in size and the other decreasing. Hence, the expected time it takes P or Q to be eliminated is precisely the expected time it takes a symmetric random walk starting at 0 to reach either | P | or | Q | , which is | P | · | Q | min ( ( m 2 i ) 2 , ( n 2 ) 2 ) . Hence, E [ T 2 i ] 3 n + min ( ( m 2 i ) 2 , ( n 2 ) 2 ) .
Let us first assume m n . Using the fact that min ( ( m 2 i ) 2 , ( n 2 ) 2 ) = ( n 2 ) 2 for i m / n , we have:
E [ T 2 + T 4 + + T | s e g ( 0 ) | ] 3 n · | s e g ( 0 ) | 2 + m / n ( n 2 ) 2 + i = m / n ( m 2 i ) 2 3 2 m n + 1 4 m n + 1 4 m 2 i = 0 ( 1 m / n + i ) 2 7 4 m n + 1 4 m 2 ( n 2 m 2 + n m ) 9 4 m n
where we used the inequalities i = 0 ( 1 m / n + i ) 2 n 2 m 2 + i = 0 ( 1 m / n + i ) 2 = n 2 m 2 + n m and | s e g ( 0 ) | m . If m < n , by using the identity i = 1 ( 1 i ) 2 = π 2 6 we obtain:
E [ T 2 + T 4 + + T | s e g ( 0 ) | ] 3 n · | s e g ( 0 ) | 2 + i = 1 ( m 2 i ) 2 3 2 m n + π 2 24 m 2 ( 3 2 + π 2 24 ) m n
So we see that E [ T s t a b l e ] = O ( m n ) . □
Next we wish to show that E [ T s t a b l e ] = O ( log ( k ) n 2 ) . For this, we require the following result:
Lemma 8.
Consider k independent random walks with absorbing barriers at 0 and 2 n , i.e., random walks that end once they reach 0 or 2 n . The expected time until all k walks end is O ( n 2 log ( k ) ) .
Proof. 
First, let us set k = 1 and estimate the probability that the one walk has not ended by time t. Let P be the transition probability matrix of the random walk, and let v be the vector describing the initial probability distribution of the location of the random walker. Then v P t is the probability distribution of its location after t time steps [41]. The evolution of v P t is well-studied and relates to “the discrete heat equation” [42]. The probability that the walk has not ended at time t is the sum i = 1 2 n 1 v ( i ) . Asymptotically, this sum is bounded by O ( λ t ) , where λ = c o s ( π 2 n ) is the second largest eigenvalue of P (cf. [42]).
Returning to general k, let T k be a random variable denoting the time when all k walks end. By looking at the series expansion of c o s ( 1 / x ) , we may verify that for n > 1 , c o s ( π 2 n ) < 1 1 n 2 . From the previous paragraph, and because the walks are independent, we therefore see that
P r ( T k t ) = 1 P r ( T 1 < t ) k = 1 1 O ( λ t ) k = 1 1 O ( ( 1 1 n 2 ) t ) k
Consequently, for t n 2 , the following asymptotics hold for some constant C:
P r ( T k t ) < 1 ( 1 C e t / n 2 ) k
where we used the fact that ( 1 + x / n ) n e x as n . Note that P r ( T k t + n 2 log ( C ) ) < 1 ( 1 e t / n 2 ) k . Hence:
E [ T k ] = 0 P r ( T k > t ) d t n 2 log ( C ) + 0 1 ( 1 e t / n 2 ) k d t = n 2 log ( C ) + 0 1 j = 0 k k j ( 1 ) j e t j / n 2 d t = n 2 log ( C ) + j = 1 k k j ( 1 ) j 0 e t j / n 2 d t = n 2 log ( C ) + n 2 j = 1 k k j ( 1 ) j j = O ( n 2 log ( k ) )
where we used the equality j = 1 k k j ( 1 ) j j = j = 1 k 1 j log ( k ) . □
Theorem 4.
E [ T s t a b l e ] = O ( log ( k ) · n 2 ) .
Proof. 
Let s e g i ( t ) denote the number of segments in track i at time t, and define M t = max 1 i k s e g i ( t ) . Let us bound the expected time it takes for M t to decrease. Define the set K ( t ) to be all tracks that have | M t | segments at time t. Then M t decreases at the first time t > t when all tracks in K ( t ) have had their number of segments decrease. We may bound this with the following argument: slightly generalizing Lemma 7 to hold for subsets of tracks (Lemma 7 holds not just for the set s e g ( t ) but for the segments in a given subset of tracks, with the proof being virtually identical. Here we apply the Lemma to the subset K ( t + 3 n ) .), if M t does not decrease after 3 n time steps (i.e., M t = M t + 3 n ), all tracks in K ( t + 3 n ) now have all their segments in deadlock. The number of deadlocked segment pairs at every track in K ( t + 3 n ) is M t / 2 , so in every such track there is such a pair with at most 2 n / M t locusts. By Lemma 8, using a similar argument as Theorem 3, these pairs of deadlocked segments resolve into a single segment after at most c · log ( k ) 2 n M t 2 expected time for some constant c. Hence, the number of expected time steps for M t to decrease is bounded above by 3 n + c log ( k ) 2 n M t 2 .
T s t a b l e is the first time when M t = 0 . Let us assume n is even for simplicity (the computation will hold regardless, up to rounding). We have that M 0 n , and M t decreases in leaps of two or more (since segments can only be eliminated in pairs). Hence, T s t a b l e is bounded by the amount of time it takes M t to decrease at most n / 2 times. By linearity of expectation, this time can be bounded by summing 3 n + c log ( k ) 2 n M t 2 over M t = n , n 2 , n 4 , 2 :
E [ T s t a b l e ] n 2 · 3 n + c log ( k ) 2 n n 2 + c log ( k ) 2 n n 2 2 + + c log ( k ) 2 n 2 2 3 2 n 2 + 4 c log ( k ) n 2 i = 1 ( 1 2 i ) 2 = 3 2 n 2 + π 2 6 c log ( k ) n 2 = O ( log ( k ) n 2 )
as claimed. □
The proof of Theorem 2 follows immediately from Theorems 3 and 4 by taking the minimum.

Erratic Track Switching and Global Consensus

Theorem 2 shows that, after finite expected time, all locusts on a track have an identical heading. This is a stable local consensus, in the sense that two different tracks may have locusts marching in opposite directions forever. We might ask what modifications to the model would force a global consensus, i.e., make it so that stabilization occurs only when all locusts across all tracks have the identical heading. There is in fact a simple change that would force this to occur. Let us assume that at time step t any locust has some probability of acting “erratically” in either the vertical or horizontal phases:
  • With probability r, a locust might behave erratically in the horizontal phase, staying in place instead of attempting to move according to its heading.
  • With probability p, a locust may behave erratically in the vertical phase, meaning that even if the vertical movement conditions (1)–(3) of the model (see Section 3) are not fulfilled, the locust attempts to move vertically to an adjacent empty space on the track above or below them (if such empty space exists).
These behaviors are independent, and so a locust may behave erratically in both the vertical and horizontal phases, in just one of them, or in neither.
The next theorem shows that the existence of erratic behavior forces a global consensus of locust headings. The goal is to prove that there is some finite time after which all locusts must have the same heading. Note that the bound we find for this time is crude and is not intended to approximate T s t a b l e . We study the question of how p affects T s t a b l e empirically in the next section.
Theorem 5.
Assuming there is at least one empty space (i.e., m < n k ), and the probability of erratic track switching is 0 < r , p < 1 , the locusts all have identical heading in finite expected time.
Proof. 
Our goal is to show that all locusts must have identical heading in finite expected time. We will find a crude upper bound for this time. It suffices to show that as long as there are two locusts with different headings in the system (perhaps not on the same track), there is a bounded-above-zero probability q that within a some constant, finite number of time steps C (and shall show C = O ( log ( k ) n 2 + n k ) ), the number of locusts with a clockwise heading will increase. This amounts to showing that there is a sequence of events, each individual event happening with non-zero probability, that culminates in a conflict between two locusts occurring (since any conflict has probability 0.5 of increasing the number of clockwise locusts). Since q > 0 , the only stable state of locust headings is the state where all locusts have the identical heading, as otherwise there is always some probability that all locusts will have a clockwise heading after m · C time steps. This completes the proof.
Let us show such a sequence of events. First let us consider the case where there is a track in which two locusts have non-identical headings. In this case, assuming no locusts behave erratically for O ( log ( k ) n 2 ) steps (which occurs with a tiny but bounded-above-zero probability since p , r > 0 ), Theorem 2 tells us that in expected O ( log ( k ) n 2 ) steps, locusts on the same track will have the identical heading. Hence, there is a sequence of events that happens with non-zero probability which leads to local consensus in the tracks.
If any conflict occurs during this sequence, we are finished. Otherwise, we need to show a sequence of events that leads to a conflict, assuming all tracks are stable. The only thing that causes locusts in local consensus to move tracks is erratic behavior. If two adjacent tracks have locusts with non-identical heading, and there is at least one empty space in one of them, then (since r > 0 ) with some probability within at most n time steps an empty space in one track will be vertically adjacent to a locust in the other track. At this point, with probability p, that locust will move from one track to the other. This creates a situation where in one track there are locusts of different headings again. If the erratic locust moves tracks at the right time, upon moving it will be adjacent to another locust in its new track, whose heading is different. Hence, the erratic locust will enter a conflict in the next time step, which will increase the number of clockwise locusts with probability 0.5 .
Now let us consider a pair of two adjacent tracks with locusts of different headings such that there no empty space in one of them. We note that since there is at least one empty location in some track, erratic behavior can cause that empty location to move vertically in an arbitrary fashion until, after at most k movements, it enters a track from the pair. With non-zero probability, this can take at most n k time steps, after which we are reduced to the situation in the previous paragraph.
A pair of adjacent tracks that have locusts with different headings must exist unless there is global consensus. Hence, in every O ( log ( k ) n 2 + n k ) time steps where there is no global consensus, there is a some probability q > 0 that the number of clockwise-heading locusts will increase. □

5. Simulation and Empirical Evaluation

Let us explore some questions about the expected value of T s t a b l e through numerical simulations. Certain aspects of the locusts’ dynamics were not studied in our formal analysis, the most interesting of which is the helpful effects of track switching on T s t a b l e . Recall that our model allows locusts to switch tracks if this would enable them to avoid a conflict and join a track where locally, locusts are marching in their same direction. At least in principle, this seems like it should help our locusts achieve local stability faster, hence decrease T s t a b l e . However, recall also that we do not specify when locusts switch tracks, which means that some locusts might never switch tracks, or they might choose to do so in the worst possible moments. Hence, the positive effect track-switching usually has on T s t a b l e cannot be reflected in the bounds we found for E [ T s t a b l e ] , since these bounds must reflect all possible locust behaviors. Under ordinary circumstances, however, it seems as though frequent track switching should noticeably decrease the time to local stabilization. As we shall see numerically, this is indeed the case. This justifies the track-switching behavior as a mechanism that, despite being highly local, enables the locusts to achieve local consensus about the direction of motion sooner.
In Figure 6a,b, we measure T s t a b l e as it varies with n and k, assuming the probabilities of erratic behavior are 0 (i.e., r = p = 0 ). We simulate two different locust configurations: a “dense” configuration and a “sparse” configuration. In the dense configuration, 50 % of locations are initiated with a locust, with the locations chosen at random. In the sparse configuration, 10 % of locations are initiated with a locust (or slightly more, to guarantee all tracks start with two locusts). The locusts are initiated with random heading. We measure the effect of track switching on T s t a b l e ; the opaque lines measure T s t a b l e when locusts switch tracks as often as they can (while still obeying the rules of the model), and the dotted lines measure T s t a b l e when locusts never switch tracks. For every value of n, k, we ran the simulation 2000 times and averaged T s t a b l e over all simulations.
As we can see, in the sparse configuration, track-switching has a significantly positive effect on time to stabilization. For example, with k = 30 , n = 30 , T s t a b l e is approximately 13.5 when locusts switch tracks as soon as they can and approximately 25 when they never switch tracks—nearly double. In the dense configuration, we see that enabling locusts to move tracks has little to no effect, since the locust model rarely allows them to do so due to the tracks being overcrowded.
In column (c) of Figure 6, we measure how a non-zero probability p of erratic behavior affects T s t a b l e . We set r = 0 . As we proved in the previous section, whenever p > 0 , stabilization requires global rather than local consensus. Hence, we cannot directly compare the T s t a b l e of these graphs with columns (a) and (b), where T s t a b l e measures the time to local consensus. We note that the expectation and variance of T s t a b l e approach as p goes to 0, since when p = 0 , global stability can never occur in some initial configurations. E [ T s t a b l e ] decreases sharply as p goes to some critical point around 0.1 , and decreases at a slower rate afterwards. It is interesting to note that low probability of erratic behavior affects E [ T s t a b l e ] significantly more in the sparse configuration, where for p = 0.02 , if locusts also switch tracks whenever the model allows them, E [ T s t a b l e ] was measured as being approximately 1974, as opposed to 669 in the dense configuration. One of the core reasons for this seems to be that in the sparse configuration, when a locust erratically moves to a track with a lot of locusts not sharing its heading, it will often be able to non-erratically move back to its former track, thus preventing locust interactions between tracks of different headings. When we disabled the locusts’ ability to switch tracks non-erratically, T s t a b l e was significantly smaller in the sparse configuration ( E [ T s t a b l e ] 232 for p = 0.02 ).
Based on the above, we make the curious observation that, while non-erratic track switching accelerates local consensus, for some track-switching behaviors it will in fact decelerate the attainment of global consensus. This is seen by the fact that frequent non-erratic track-switching was helpful in Columns (a) and (b) of Figure 6 but increased time to stabilization in Column (c). This is perhaps a very natural observation because agents that aggressively switch tracks will attempt to avoid conflict as often as possible, whereas conflict is necessary to create global consensus.
To finish this section, we also verify the bounds of Theorem 1 by numerical simulation, by fixing k = 1 and measuring T s t a b l e as n goes from 1 to 100—see Figure 7. We again measure both sparse and dense configurations (i.e., m 0.1 n and m 0.5 n , respectively). The average expected time appears asymptotically bounded by m 2 , as expected. We also simulated the asymptotic worst-case locust configuration in the proof of Theorem 1 (not illustrated in Figure 7) and confirmed its stabilization time is asymptotically Ω ( m 2 + n m ) , verifying that the bounds of Theorem 1 are asymptotically tight.

6. Concluding Remarks

We studied collective motion in a model of discrete locust-inspired swarms, and bounded the expected time to stabilization in terms of the number of agents m, the number of tracks k, and the length of the tracks n. We showed that when the swarm stabilizes, there must be a local consensus about the direction of motion. We also showed that, when the model is extended to allow a small probability of erratic behavior to perturb the system, global consensus eventually occurs.
A direct continuation of our work would be to find upper bounds on time to stabilization when there is some probability of erratic behavior. Furthermore, our empirical simulations suggest several curious phenomena related to erratic behavior. First, there seems to be a clash between “erratic” and non-erratic, “rational” track-switching, as when locusts switch tracks non-erratically to avoid collisions. This seems to accelerate the attainment of local consensus but mostly hinder the attainment of global consensus. Second, increasing the probability of erratic track-switching p behavior was helpful in accelerating global consensus up to a point, but in simulations, its impact seemed to fall off past a small critical value of p. In future work, it would be interesting to investigate these “phase transition” aspects of the model.
As discussed in the Related Work section, in [18,19] it is observed that at intermediate densities, swarms of locusts exhibit periodic directional switching, and at low densities the directions of motion are random. Although this phenomenon does not occur in our model, if we assume each locust has a small probability r > 0 of randomly flipping their heading at the beginning of a time step, such directional switching becomes possible, with probability inversely proportional to the density (or so we expect). This extension of our model, of course, does not have stable states, thus cannot be studied by the same methods we used in this work. Nevertheless, we would be interested in studying it in terms of the expected time the swarm spends in consensus or near-consensus about the direction of motion before directional switching occurs.
For the sake of mathematical theory, the authors would be very interested in rigorous results established over a fully asynchronous version of this model where locust wake-up times are determined independently. In such a model, the winner of a conflict between two locusts can be determined as the locust that wakes up first (thus exerts pressure on the other locust first), which is perhaps more elegant. We speculate that most of the conclusions will not be majorly affected by transitioning to an asynchronous model.
Although our agent marching model is inspired by experiments on locusts, it can be understood in more abstract terms as a model that describes a situation where many agents that wish to maintain a direction of motion are confined to a small space where they exert pressure on each other. It is natural to ask what kinds of collective dynamics, if any, we should expect when this small space has a different topology; rather than a ringlike arena, we might consider, e.g., a square arena. We believe that rich models of swarm dynamics can be discovered through observing natural organisms exert pressure on each other in such environments. In the introduction, we mentioned points of similarity between our model and models of opinion dynamics. We suspect that these points of similarity will remain in settings with non-ringlike arenas and might provide a starting point for formally modeling and analyzing them.

Author Contributions

Conceptualization, M.A., N.A. and A.M.B.; Formal analysis, M.A.; Writing—original draft, M.A.; Writing—review & editing, N.A. and A.M.B. All authors have read and agreed to the published version of the manuscript.

Funding

This research was partially supported by the Israeli Science Foundation grant no. 2306/18, and partially by the Israeli Smart Transportation Research Center (ISTRC).

Data Availability Statement

Not applicable.

Acknowledgments

This research was partially supported by the Israeli Science Foundation grant no. 2306/18, and partially by the Israeli Smart Transportation Research Center (ISTRC). The authors would like to thank Amir Ayali (Tel Aviv University) for bringing our attention to the locust experiments and for graciously letting us use the image in Figure 1, and Ofer Zeitouni (Weizmann Institute of Science) for helpful discussions. We are grateful to the anonymous referees for their insightful feedback, and for bringing our attention to several important references.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Altshuler, Y.; Pentland, A.; Bruckstein, A.M. Introduction to Swarm Search. In Swarms and Network Intelligence in Search; Springer: Berlin/Heidelberg, Germany, 2018; pp. 1–14. [Google Scholar]
  2. Wagner, I.A.; Altshuler, Y.; Yanovski, V.; Bruckstein, A.M. Cooperative cleaners: A study in ant robotics. Int. J. Robot. Res. 2008, 27, 127–151. [Google Scholar] [CrossRef] [Green Version]
  3. Ariel, G.; Ayali, A. Locust Collective Motion and Its Modeling. PLoS Comput. Biol. 2015, 11, e1004522. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  4. Fridman, N.; Kaminka, G.A. Modeling pedestrian crowd behavior based on a cognitive model of social comparison theory. Comput. Math. Organ. Theory 2010, 16, 348–372. [Google Scholar] [CrossRef]
  5. Garnier, S.; Combe, M.; Jost, C.; Theraulaz, G. Do Ants Need to Estimate the Geometrical Properties of Trail Bifurcations to Find an Efficient Route? A Swarm Robotics Test Bed. PLoS Comput. Biol. 2013, 9, e1002903. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  6. Altshuler, Y.; Yanovsky, V.; Wagner, I.A.; Bruckstein, A.M. Efficient cooperative search of smart targets using UAV Swarms1. Robotica 2008, 26, 551–557. [Google Scholar] [CrossRef] [Green Version]
  7. Bruckstein, A.M. Why the ant trails look so straight and nice. Math. Intell. 1993, 15, 59–62. [Google Scholar] [CrossRef]
  8. Chaté, H.; Ginelli, F.; Grégoire, G.; Peruani, F.; Raynaud, F. Modeling collective motion: Variations on the Vicsek model. Eur. Phys. J. B 2008, 64, 451–456. [Google Scholar] [CrossRef]
  9. Czirók, A.; Vicsek, M.; Vicsek, T. Collective motion of organisms in three dimensions. Phys. A Stat. Mech. Its Appl. 1999, 264, 299–304. [Google Scholar] [CrossRef] [Green Version]
  10. Ried, K.; Müller, T.; Briegel, H.J. modeling collective motion based on the principle of agency: General framework and the case of marching locusts. PLoS ONE 2019, 14, e0212044. [Google Scholar] [CrossRef] [Green Version]
  11. Chazelle, B. Toward a theory of Markov influence systems and their renormalization. arXiv 2018, arXiv:1802.01208. [Google Scholar]
  12. Amichay, G.; Ariel, G.; Ayali, A. The effect of changing topography on the coordinated marching of locust nymphs. PeerJ 2016, 4, e2742. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  13. Ariel, G.; Ophir, Y.; Levi, S.; Ben-Jacob, E.; Ayali, A. Individual pause-and-go motion is instrumental to the formation and maintenance of swarms of marching locust nymphs. PLoS ONE 2014, 9, e101636. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  14. Knebel, D.; Sha-Ked, C.; Agmon, N.; Ariel, G.; Ayali, A. Collective motion as a distinct behavioral state of the individual. Iscience 2021, 24, 102299. [Google Scholar] [CrossRef] [PubMed]
  15. Knebel, D.; Ayali, A.; Guershon, M.; Ariel, G. Intra-versus intergroup variance in collective behavior. Sci. Adv. 2019, 5, eaav0695. [Google Scholar] [CrossRef] [Green Version]
  16. Chazelle, B. Natural algorithms and influence systems. Commun. ACM 2012, 55, 101–110. [Google Scholar] [CrossRef]
  17. Amir, M.; Bruckstein, A.M. Probabilistic pursuits on graphs. Theor. Comput. Sci. 2019, 795, 459–477. [Google Scholar] [CrossRef] [Green Version]
  18. Buhl, J.; Sumpter, D.J.; Couzin, I.D.; Hale, J.J.; Despland, E.; Miller, E.R.; Simpson, S.J. From disorder to order in marching locusts. Science 2006, 312, 1402–1406. [Google Scholar] [CrossRef] [Green Version]
  19. Yates, C.A.; Erban, R.; Escudero, C.; Couzin, I.D.; Buhl, J.; Kevrekidis, I.G.; Maini, P.K.; Sumpter, D.J. Inherent noise can facilitate coherence in collective swarm motion. Proc. Natl. Acad. Sci. USA 2009, 106, 5464–5469. [Google Scholar] [CrossRef] [Green Version]
  20. Amir, M.; Agmon, N.; Bruckstein, A.M. A Discrete Model of Collective Marching on Rings. In International Symposium Distributed Autonomous Robotic Systems; Springer: Cham, Switzerland, 2021; pp. 320–334. [Google Scholar]
  21. Bazazi, S.; Buhl, J.; Hale, J.J.; Anstey, M.L.; Sword, G.A.; Simpson, S.J.; Couzin, I.D. Collective motion and cannibalism in locust migratory bands. Curr. Biol. 2008, 18, 735–739. [Google Scholar] [CrossRef]
  22. Shiraishi, M.; Aizawa, Y. Collective patterns of swarm dynamics and the Lyapunov analysis of individual behaviors. J. Phys. Soc. Jpn. 2015, 84, 054002. [Google Scholar] [CrossRef]
  23. Altshuler, Y.; Pan, W.; Pentland, A.S. Trends prediction using social diffusion models. In Proceedings of the International Conference on Social Computing, Behavioral-Cultural Modeling, and Prediction, College Park, MD, USA, 3–5 April 2012; Springer: Berlin/Heidelberg, Germany, 2012; pp. 97–104. [Google Scholar]
  24. Yildiz, E.; Ozdaglar, A.; Acemoglu, D.; Saberi, A.; Scaglione, A. Binary opinion dynamics with stubborn agents. ACM Trans. Econ. Comput. (TEAC) 2013, 1, 1–30. [Google Scholar] [CrossRef]
  25. Xia, H.; Wang, H.; Xuan, Z. Opinion dynamics: A multidisciplinary review and perspective on future research. Int. J. Knowl. Syst. Sci. (IJKSS) 2011, 2, 72–91. [Google Scholar] [CrossRef] [Green Version]
  26. Dong, Y.; Zhan, M.; Kou, G.; Ding, Z.; Liang, H. A survey on the fusion process in opinion dynamics. Inf. Fusion 2018, 43, 57–65. [Google Scholar] [CrossRef]
  27. Chandra, A.K.; Basu, A. Diffusion controlled model of opinion dynamics. Rep. Adv. Phys. Sci. 2017, 1, 1740008. [Google Scholar] [CrossRef] [Green Version]
  28. Hegarty, P.; Martinsson, A.; Wedin, E. The Hegselmann-Krause dynamics on the circle converge. J. Differ. Equ. Appl. 2016, 22, 1720–1731. [Google Scholar] [CrossRef] [Green Version]
  29. Barel, A.; Manor, R.; Bruckstein, A.M. Come together: Multi-agent geometric consensus. arXiv 2017, arXiv:1902.01455. [Google Scholar]
  30. Cortés, J. Distributed algorithms for reaching consensus on general functions. Automatica 2008, 44, 726–737. [Google Scholar] [CrossRef]
  31. Manor, R.; Bruckstein, A.M. Chase your farthest neighbour. In Distributed Autonomous Robotic Systems; Springer: Berlin/Heidelberg, Germany, 2018; pp. 103–116. [Google Scholar]
  32. Olfati-Saber, R.; Fax, J.A.; Murray, R.M. Consensus and cooperation in networked multi-agent systems. Proc. IEEE 2007, 95, 215–233. [Google Scholar] [CrossRef] [Green Version]
  33. Chou, T.; Mallick, K.; Zia, R. Non-equilibrium statistical mechanics: From a paradigmatic model to biological transport. Rep. Prog. Phys. 2011, 74, 116601. [Google Scholar] [CrossRef]
  34. Amir, M.; Bruckstein, A.M. Fast uniform dispersion of a crash-prone swarm. arXiv 2019, arXiv:1907.00956. [Google Scholar]
  35. Kriecherbauer, T.; Krug, J. A pedestrian’s view on interacting particle systems, KPZ universality and random matrices. J. Phys. A Math. Theor. 2010, 43, 403001. [Google Scholar] [CrossRef]
  36. Grinstead, C.M.; Snell, J.L. Introduction to Probability; American Mathematical Society: Providence, RI, USA, 2012. [Google Scholar]
  37. Lindvall, T. Lectures on the Coupling Method; Courier Corporation: North Chelmsford, MA, USA, 2002. [Google Scholar]
  38. Aldous, D.; Fill, J. Reversible Markov chains and random walks on graphs. J. Theor. Prob. 1999, 2, 91–100. [Google Scholar] [CrossRef]
  39. Epstein, R.A. The Theory of Gambling and Statistical Logic; Academic Press: Cambridge, MA, USA, 2012. [Google Scholar]
  40. La Salle, J.; Lefschetz, S. Stability by Liapunov’s Direct Method with Applications; Elsevier: Amsterdam, The Netherlands, 2012. [Google Scholar]
  41. Levin, D.A.; Peres, Y.; Wilmer, E.L. Markov Chains and Mixing Times; American Mathematical Society: Providence, RI, USA, 2009. [Google Scholar]
  42. Lawler, G.F. Random Walk and the Heat Equation; American Mathematical Society: Providence, RI, USA, 2010; Volume 55. [Google Scholar]
Figure 1. Image from locust experiments, courtesy of Amir Ayali. The collective clockwise marching of locusts in a ring arena is shown. Locusts were initiated at random positions and orientations in the arena but converged to clockwise marching over time.
Figure 1. Image from locust experiments, courtesy of Amir Ayali. The collective clockwise marching of locusts in a ring arena is shown. Locusts were initiated at random positions and orientations in the arena but converged to clockwise marching over time.
Entropy 24 00918 g001
Figure 2. One step of the locust model with k = 3 , n = 8 split into horizontal and vertical movements: (a) shows the initial configuration at the beginning of the current time step t; (b) illustrates changes to the configuration after conflicts and horizontal movements; and (c) is the configuration at the beginning of time t + 1 (or equivalently the end of time t) after vertical movements. The front and back of the blue locust are the red and green locusts, respectively. The purple locusts conflict with each other. Since conditions (1)–(3) are fulfilled, the blue locust may switch tracks, and it does so in the illustration.
Figure 2. One step of the locust model with k = 3 , n = 8 split into horizontal and vertical movements: (a) shows the initial configuration at the beginning of the current time step t; (b) illustrates changes to the configuration after conflicts and horizontal movements; and (c) is the configuration at the beginning of time t + 1 (or equivalently the end of time t) after vertical movements. The front and back of the blue locust are the red and green locusts, respectively. The purple locusts conflict with each other. Since conditions (1)–(3) are fulfilled, the blue locust may switch tracks, and it does so in the illustration.
Entropy 24 00918 g002
Figure 3. A locust configuration with n = 8 , k = 3 . Locusts are colored based based on the segment they belong to (Definition 1). There are 8 segments in total.
Figure 3. A locust configuration with n = 8 , k = 3 . Locusts are colored based based on the segment they belong to (Definition 1). There are 8 segments in total.
Entropy 24 00918 g003
Figure 4. Two segments in deadlock, colored green and red (Definition 7).
Figure 4. Two segments in deadlock, colored green and red (Definition 7).
Entropy 24 00918 g004
Figure 5. A partition into maximal compact subsets as in our construction. In this configuration, L 1 ( t ) = 3 , L 2 ( t ) = 3 , L 3 ( t ) = 1 , and L ( t ) = 7 . Note that although C 1 , C 2 are compact, P ( t ) = C 1 C 2 is not compact, and similarly Q ( t ) is not compact; thus P ( t ) and Q ( t ) are not in deadlock, and L ( t ) 1 .
Figure 5. A partition into maximal compact subsets as in our construction. In this configuration, L 1 ( t ) = 3 , L 2 ( t ) = 3 , L 3 ( t ) = 1 , and L ( t ) = 7 . Note that although C 1 , C 2 are compact, P ( t ) = C 1 C 2 is not compact, and similarly Q ( t ) is not compact; thus P ( t ) and Q ( t ) are not in deadlock, and L ( t ) 1 .
Entropy 24 00918 g005
Figure 6. Simulations of the locust model. The y axis is T s t a b l e . Column (a) measures T s t a b l e for k = 1 30 , with n fixed at 30. Column (b) measures T s t a b l e for n = 1 60 , with k fixed at 5. Column (c) measures T s t a b l e with n = 30 , k = 5 , and p (the probability of erratic behavior) going from 0 to 1. The top row measures T s t a b l e in sparse locust configurations ( m 0.1 n ), while the bottom row does so for dense configurations ( m 0.5 n ). The dashed red line estimates T s t a b l e when locusts never switch tracks (except while behaving erratically in column (c)); the blue line estimates T s t a b l e when locusts switch tracks as often as the model rules allow. Error bars show the standard deviations.
Figure 6. Simulations of the locust model. The y axis is T s t a b l e . Column (a) measures T s t a b l e for k = 1 30 , with n fixed at 30. Column (b) measures T s t a b l e for n = 1 60 , with k fixed at 5. Column (c) measures T s t a b l e with n = 30 , k = 5 , and p (the probability of erratic behavior) going from 0 to 1. The top row measures T s t a b l e in sparse locust configurations ( m 0.1 n ), while the bottom row does so for dense configurations ( m 0.5 n ). The dashed red line estimates T s t a b l e when locusts never switch tracks (except while behaving erratically in column (c)); the blue line estimates T s t a b l e when locusts switch tracks as often as the model rules allow. Error bars show the standard deviations.
Entropy 24 00918 g006
Figure 7. Simulations of the locust model fixing k = 1 and letting n run from 1 to 100. The y axis is T s t a b l e . The orange line denotes dense locust configurations ( m 0.5 n ), and the green line denotes sparse configurations ( m 0.1 n ) . Error bars show the standard deviations.
Figure 7. Simulations of the locust model fixing k = 1 and letting n run from 1 to 100. The y axis is T s t a b l e . The orange line denotes dense locust configurations ( m 0.5 n ), and the green line denotes sparse configurations ( m 0.1 n ) . Error bars show the standard deviations.
Entropy 24 00918 g007
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Amir, M.; Agmon, N.; Bruckstein, A.M. A Locust-Inspired Model of Collective Marching on Rings. Entropy 2022, 24, 918. https://doi.org/10.3390/e24070918

AMA Style

Amir M, Agmon N, Bruckstein AM. A Locust-Inspired Model of Collective Marching on Rings. Entropy. 2022; 24(7):918. https://doi.org/10.3390/e24070918

Chicago/Turabian Style

Amir, Michael, Noa Agmon, and Alfred M. Bruckstein. 2022. "A Locust-Inspired Model of Collective Marching on Rings" Entropy 24, no. 7: 918. https://doi.org/10.3390/e24070918

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop