## Abstract

Peritrichous bacteria synchronize and bundle their flagella to actively swim, while disruption of the bundle leads to a slow motility phase with a weak propulsion. It is still not known whether the number of flagella represents an evolutionary adaptation toward optimizing bacterial navigation. We study the swimming dynamics of differentially flagellated *Bacillus subtilis* strains in a quasi–two-dimensional system. We find that decreasing the number of flagella *N*_{f} reduces the average turning angle between two successive run phases and enhances the run time and the directional persistence of the run phase. As a result, having fewer flagella is beneficial for long-distance transport and fast spreading, while having a lot of flagella is advantageous for the processes that require a slower spreading, such as biofilm formation. We develop a two-state random walk model that incorporates spontaneous switchings between the states and yields exact analytical expressions for transport properties, in remarkable agreement with experiments. The results of numerical simulations based on our two-state model suggest that the efficiency of searching and exploring the environment is optimized at intermediate values of *N*_{f}. The optimal choice of *N*_{f}, for which the search time is minimized, decreases with increasing the size of the environment in which the bacteria swim.

## INTRODUCTION

Many bacterial species swim by the rotation of flagella (*1*). Several flagellation patterns can be distinguished according to the flagellar arrangement on the cell body, ranging from polar (one flagellum at one pole) to peritrichous (helical arrangement on the whole cell body) (*2*). Each flagellum is anchored within the cell membrane to a reversible rotary motor that switches between clockwise and counterclockwise rotation (*3*). The ability of the motor to turn in either direction allows polarly flagellated bacteria, such as *Caulobacter crescentus*, to change the swimming direction of the cell (*4*). A peritrichously flagellated bacterium experiences an alternating sequence of active run and partial propulsion, controlled by the rotational states of each flagellum. When all flagella rotate counterclockwise, they form a bundle and synchronize their rotation. As a result, the bacterium moves forward smoothly (run phase). However, the bundle is partially disrupted when some of the flagella switch their rotational direction, which slows the self-propelled dynamics and facilitates changes in the direction of motion in relatively short time intervals (so-called tumble phase). The run-and-tumble dynamics of bacteria allows them to change their direction of motion. They can also adjust their mean run time in response to environmental changes induced, for example, by temperature, light, or chemical gradients (*1*, *5*). Such an ability is known to be highly advantageous to enhance search efficiency (*6*–*8*), allowing for an optimal navigation toward favorable or away from harmful regions (*9*).

Despite advances in the understanding of underlying mechanisms of bundle formation and disruption (*10*–*17*) and its relationship to the chemotaxis signaling network (*1*, *9*, *18*, *19*), it remains poorly understood how the number of flagella influences the fundamental properties of bacterial propulsion and transport. Attempts to understand the role of flagellation have mainly focused on *Escherichia coli*, which has up to eight flagella, while the flagellar number of many types of bacteria is typically higher. Examples are *Bacillus subtilis*, *Proteus mirabilis*, and hyperflagellated *Salmonella* (*20*–*22*). So far, it has been observed that the torque and thus the swimming speed (*11*) and the fraction of time spent in run or tumble phase (*12*) of peritrichously flagellated bacteria remain roughly independent of the flagellar number *N*_{f}. Recent numerical studies also predict that the swimming speed is only slightly affected by *N*_{f}, assuming that just a single bundle is formed (*23*, *24*). Here, we provide evidences for the formation of multiple bundles, revealing that the former assumption does not hold at least at high flagellar number.

A key question from an evolutionary point of view is based on which criteria the flagellar number of bacteria has been evolved. Here, we investigate bacterial motility over a wide range of the flagellar number and clarify how the run-and-tumble dynamics is influenced by the choice of *N*_{f}. We study *B. subtilis*, a rod-shaped bacterium commonly found, for example, in soil and the gastrointestinal tract of humans. The number of flagella is regulated by the master regulator *swrA* in *B. subtilis* (*20*). Deletion of the gene leads to a reduction from 26 to 10 flagella, while cells that overexpress *swrA* exhibit up to 40 flagella. The corresponding strains are denoted by ΔswrA and swrA^{++} throughout the paper, respectively. Therefore, we used a wild-type (WT) *B. subtilis* (NCIB3610 strain) with 26 flagella, a ΔswrA strain deficient for *swrA* (9 flagella), and an swrA^{++}, which carries *swrA* under the control of an isopropyl-β-d-thiogalactopyranoside (IPTG)–inducible promoter (41 flagella; Fig. 1A). We find that the speeds in both run and tumble phases and the mean tumble time show no systematic dependence on *N*_{f}. However, the run time, the directional persistence of the run phase, and the average turning angle between two successive run phases vary monotonically with *N*_{f}. Thus, our results reveal that smaller values of *N*_{f} are more favorable for long-distance transport and fast spreading because of longer run times and more persistent trajectories in the run phase. On the other hand, increasing *N*_{f} facilitates tumbling, leading to a slower spreading. We develop a coarse-grained analytical approach to study the run-and-tumble dynamics of bacteria, which enables us to identify the contributions of the influential factors and map out the phase diagrams in the space of the relevant parameters of run-and-tumble statistics. Our simulation results suggest that, by adopting intermediate values of *N*_{f} (for example, in the WT strain), the search efficiency and the ability to explore the environment can be optimized.

## RESULTS

We report and compare the swimming dynamics of three strains of *B. subtilis* with different flagellar numbers *N*_{f} obtained using genetic manipulation (see Materials and Methods for details). The strains ΔswrA, WT (WT NCIB3610), and swrA^{++} have 9 ± 2, 26 ± 6, and 41 ± 6 flagella, respectively (Fig. 1A) (*25*). In contrast to studies on tumbling of trapped cells (*12*), here, we track the motion of freely swimming cells. A few typical trajectories of each strain are shown in Fig. 1B, which consist of successive active run and tumble phases. It is known that cell surface interactions affect the run-and-tumble statistics, as the cell experiences orbiting motility and circular tracks and rarely tumbles in the vicinity of the surface (*26*, *27*). We carefully analyze the data to exclude the influence of the lateral walls, as explained in Materials and Methods. Thus, the extracted run-and-tumble parameter values in the following represent the intrinsic dynamics of freely swimming bacteria far from the lateral walls and boundaries.

### Distinct motility patterns

Strikingly, we find that the curvatures of the trajectories strongly depend on the flagellar number. The paths are less curved with decreasing *N*_{f}, a pattern that may originate either from the change in their tumbling statistics or from having a larger persistence length in the run phase. While the influence of *N*_{f} on the run-and-tumble statistics will be discussed in the next section, we focus here on the latter possibility, that is, the variations of the persistency in the run phase with changing *N*_{f}. To characterize the run persistency, we note that each run trajectory comprises a set of recorded positions of the bacterium. Given these data, one can extract the local direction of motion α and thus the directional change θ along the trajectory, resulting in the distribution of directional changes *P*(θ) (*28*). Then, the persistency *p* of the run phase can be obtained as the Fourier transform of *P*(θ), that is, (*29*, *30*). Alternatively, the curvature of the trajectories can be characterized by calculating the rotational mean square displacement RMSD(τ) = 〈(α(*t* + τ) − α(*t*))^{2}〉 = 2*D*_{r} τ, from which one can extract the asymptotic rotational-diffusion coefficient *D*_{r}. The results shown in Fig. 1D reveal that the directional persistency in the run phase remarkably depends on the flagellar number; the run paths are less curved for smaller *N*_{f}.

### Run-and-tumble statistics

Next, we turn to studying the statistics of run and tumble events. A detailed description of the tumbling detection procedure can be found in Materials and Methods. According to the results shown in Fig. 2A, the tumble speed is smaller (but non-negligible) compared to the run speed (*31*). Moreover, the speeds in both run and tumble phases show no systematic dependence on *N*_{f}. A closer look at the probability distributions of the instantaneous speeds (see for example, the run speed data in Fig. 2B) reveals that even the distributions of a given strain slightly differ from one culture to another due to minor inevitable differences in experimental conditions. For example, the age of the inoculation on an LB agar plate is not the same for all cultures, and the optical densities may slightly differ from one culture to another. The culture dependence is observed for the probability distributions of both run and tumble speeds in all strains. By approximating the bundle as a single helix (*4*, *23*, *32*), simple models based on the resistive force theory predict a weak (logarithmic) increase of the run speed with *N*_{f}, although experiments have shown that hydrodynamic dissipation along the cell body considerably weakens the effect (*11*). In addition, the assumption of a single bundle does not hold in general, according to our observations of fluorescently stained flagella of swimming bacteria and other reports in the literature (*33*, *34*); even multiple bundles may form during the active run phase (several examples of a WT strain with multiple bundles are shown in Fig. 2C). The prediction of the net propulsive force and swimming speed in different strains is complex due to the diversity of the locations, spatial orientations (with respect to the cell body), and interactions between the bundles. Even the propulsion force of individual bundles depends on the bundle rotation rate and the geometrical properties of the bundle such as its width and pitch length of the helix, which vary from one strain to another.

To understand whether and to what extent the flagellar number influences the switching frequencies between run and tumble phases, we plot the average run and rumble times in Fig. 2D. It turns out that the mean tumble time (~0.2 s) and thus the ability of restoring the run phase are not influenced by *N*_{f}. Given the mean tumble time and speed, one finds that the displacement in the tumbling phase is of the order of the cell length (that is, a few micrometers). However, such a swimmer with a run speed of ~30 μm/s in an aqueous medium is expected to stop after only ~0.6 μs and traveling approximately 0.1 Å if the pushing force suddenly stops (*35*). This suggests that the bundles are not fully disrupted in the tumbling phase; thus, the bacterium is partially propelled. The mean run time remarkably depends on the flagellar number. Increasing *N*_{f} enhances the probability of switching from running to tumbling. This finding supports the veto model for bundle disruption (*13*, *19*), which proposes that clockwise rotation of a single or a few flagella (less than ) is sufficient to disrupt the bundle. Figure 2E shows that the tail of the probability distribution of run times is nearly exponential, with a *N*_{f}-dependent slope (data censoring for the first and last incomplete periods sharpens the trend even more). We observe similar exponential decays for the tumble time distributions (not shown), verifying that the switching events between the two states of motility happen spontaneously and can be described using Markov processes.

Another characteristic of the run-and-tumble dynamics that is affected by the number of flagella is the turning angle between successive run phases. We define the turning angle ϕ between two successive runs as the change in the direction of motion from the end of one run to the beginning of the next run (the direction of motion was obtained using a linear fit to four data points for each run phase). The turning-angle distribution *R*(ϕ) obeys left-right symmetry and develops a peak for all strains. However, the peak and, more clearly, the mean of *R*(ϕ) shift toward larger angles with increasing *N*_{f}, as can be seen in Fig. 2 (F and G). Similar to the curvature of run trajectories, we can use the Fourier transform of *R*(ϕ), that is, , as a measure of the directional change between consecutive run phases. R ranges between −1 and 1, with 1, 0, and −1 denoting 0°, 90°, and 180° turning, respectively. R is correlated with the tumble time and speed (*36*) and the strength of the torque exerted on the cell body during the reformation of the bundle (*11*). Since both tumble time and speed are not considerably affected by *N*_{f}, we attribute the reduction of R with increasing *N*_{f} to experiencing a larger torque during the reconstruction of the bundle at higher flagellar numbers. There are numerical and experimental reports showing that the involvement of more clockwise-rotating flagella in the tumble phase exerts a stronger torque on the cell body during the reformation of the bundle and leads to a larger turning angle when switching to the run phase (*11*, *13*, *18*). In our strains with higher *N*_{f}, there are statistically more clockwise-rotating flagella in the tumble phase that need to synchronize their motion to reconstruct the complete bundle. Thus, the turning angle is expected to be larger. Another point is that, except for the probability distributions of speeds, other run-and-tumble statistics exhibit a weak culture dependence, and the trends as a function of *N*_{f} are robust.

We also checked that the direction of motion does not vary significantly when switching from running to tumbling. The distribution of the turning angle *P*(φ) from the run to the tumble phase is sharply peaked at zero with zero mean, as shown in Fig. 3A. This fact and the relatively high speed in the tumble phase once again indicate that the bundles are not fully disrupted in the tumbling phase. As a result, one expects that the tumbling is not a purely random motion and should exhibit directional persistency. In addition, the tumble time is so short that the curvature of the tumble track is often not visible yet. To quantify the bending of the tumble trajectories, we assign a dimensionless number to each tumbling segment of the trajectory, obtained by dividing the end-to-end distance by the total length of the trajectory segment. The probability distribution shown in Fig. 3B develops a sharp peak at , indicating that most of the tumbling trajectories are nearly straight during the relatively short periods of tumbling.

Finally, we measure the mean square displacement (MSD) MSD(τ) = 〈(*r*(*t* + τ) − *r*(*t*))^{2}〉 for different strains. According to our findings, the strains with lower flagellar number have less curved run trajectories, switch less frequently from run to tumble phase, and experience a smaller turning angle between successive run phases. Consequently, the crossover from a persistent motion to the asymptotic diffusive dynamics is expected to occur at longer times for smaller values of *N*_{f}, a hypothesis that is confirmed by the experimental results shown in Fig. 3C. The asymptotic diffusion coefficient *D* is also a decreasing function of *N*_{f} (see Fig. 3C, inset). These results indicate that, for increasing the efficiency of long-distance transport, it is more beneficial to have fewer flagella. The strains with more flagella spend a larger fraction of time in the tumbling state and have a shorter persistence length when swimming. We note that the trends (as a function of *N*_{f}) discussed in this section are robust against variations of tumbling detection thresholds.

The run-and-tumble parameter values extracted from experiments are given in Table 1 (for the calculation of *p*, we chose ). To ensure that the influence of the remaining cell surface interactions (after discarding all instances of orbiting motility and circular trajectories) on the run-and-tumble statistics is negligible, we further refine the data based on the pixel intensity of the cells and the temporal length of the trajectories to increase the probability of being far away from the boundaries: The average pixel intensity of the cells in grayscale images is maximum around the middle of the chamber, where the focal plane is adjusted. By eliminating half of the tracks, which contain lower pixel values, and then half of the remaining ones because of their long temporal lengths, we keep only 25% of the data. These trajectories are statistically more concentrated around the center of the chamber. The results of the run-and-tumble analysis shown in Table 1 evidence insignificant differences with the initial data set, proving that the interactions with surfaces were effectively excluded by eliminating the circular trajectories in our original data analysis.

### Model

On the basis of our findings, we develop a stochastic coarse-grained model for a random walk with spontaneous switchings between two states of motility. We first validate the approach by comparing the analytical predictions with experimental results. Then, the model enables us to better understand the influence of the flagellar number on bacterial motility by numerically exploring the phase space of the run-and-tumble statistical parameters and identifying the isolated role of each influential factor. Moreover, our simulations based on the two-state model evidence for a nonmonotonic dependence of the mean first-passage time (MFPT) on *N*_{f}.

Stochastic two-state models have been widely used to describe altering phases of motion of, for example, swimmers and cytoskeletal motor proteins or the locomotive patterns in other systems (*37*–*43*). Our analytical formalism enables us to describe a general stochastic process with two active states with independent persistencies. By tuning the persistencies of the two states, one can create an arbitrary combination of random motions such as active-active, active-passive, or active-directed walks. However, aiming at obtaining analytical insight by including only the most prominent characteristics of the bacterial motility pattern into the model, here, we introduce a simplified version of the model with the following states of motility: (i) running with the mean speed and persistency *p* and (ii) tumbling with the mean speed . The switching probabilities from run to tumble state and vice versa are supposed to be asymmetric and denoted by and , respectively. Assuming constant switching probabilities results in exponential distributions for the residence times in each state, which is in agreement with our experimental observations. It is also possible to handle nonexponential distributions within the framework of our analytical formalism by considering, for example, time-dependent switching probabilities. In the run state, a persistent random walk in the continuous space, which is characterized by its speed and the distribution *P*(θ) of directional changes along the run trajectory, is considered. Thus, the directional persistence quantifies the curvature of the run trajectories. As we explained in the previous section, the distribution of the turning angle *P*(φ) when switching from the run to the tumble phase is sharp around φ = 0. We checked that replacing *P*(φ) with a δ function at φ = 0 causes negligible changes in the analytical results. Therefore, to keep the model simple, we assume that the turning angle φ from run to tumble is zero, that is, the direction of motion does not change when entering the tumble phase. As shown in Fig. 3B, the bending of the tumble tracks is often not visible due to the remaining propulsive force in the tumble phase and the relatively short tumble times. Therefore, the tumbling trajectories are approximated by straight lines along the last direction of motion in the run phase. The last key property is the turning angle ϕ between two successive run phases. Using the turning-angle distribution *R*(ϕ), we calculate to quantify the directional change between consecutive run phases. Denoting the time spacing between consecutive frames by Δ*t*, we describe the process in discrete time by introducing the probability densities and to find the walker at position (*x*, *y*) along the direction γ at time *t* in the run and tumble states, respectively. The dynamical evolution is defined by the following set of master equations(1)Using the two terms on the right-hand side of each equation, we consider the possibilities of being at each of the two states in the previous step. On the right-hand side of the second equation, the possibilities of moving along a straight line in the tumble phase or switching from running to tumbling are considered. By means of a Fourier *z*-transform technique (*44*, *45*), we obtain exact analytical expressions for the temporal evolution of arbitrary moments of displacement (see Materials and Methods for the details of the method and the explicit lengthy expression of MSD).

Using the run-and-tumble parameter values given in Table 1 as the input of the model, the time evolution of the MSD can be predicted via Eq. 13 (plotted in Fig. 3C for different strains). We also performed extensive Monte Carlo simulations of a stochastic process with the same parameter values. To reproduce the refined experimental data, we consider an infinite system in simulations to be able to investigate the free dynamics of the walker far from the lateral walls and boundaries. The results agree perfectly with the analytical predictions. The agreement with experiments is also markedly good. Despite all the simplifications, the model recovers the MSDs of all strains over the whole range of time. By introducing and , we obtain the following expression for the asymptotic diffusion coefficient(2)

The measured diffusion coefficients for different strains are in satisfactory agreement with the analytical predictions, as shown in Fig. 3C (inset). Equation 2 reduces to the asymptotic diffusion coefficient of a single-state persistent random walker for and (*46*).

While it is extremely difficult to systematically vary the flagellar number in experiments, we can numerically explore the full phase space of the influential parameters. Among the key elements in determining the transport properties of the *B. subtilis*, the speeds and and the switching probability do not vary significantly with *N*_{f}. Thus, we fix them at their average experimental values, which allows us to reduce the degrees of freedom to three sensitive parameters, that is, R, the directional persistency *p*, and the switching probability . Figure 4 (B to D) show 2D profiles of *D* in the (R, *p*, ) phase space, revealing that *D* varies by several orders of magnitude by varying these key parameters. However, limiting the parameter values to the accessible range in experiments with *B. subtilis* reveals that, here, *D* and the long-distance transport are mainly affected by the variation of the run-phase persistency *p*. For example, by fixing the two other degrees of freedom at their average experimental values and by calculating the variations of the asymptotic diffusion coefficient when the third parameter varies within the accessible range in our experiments, we get , 1.8, and 3.6 for varying R, , and *p*, respectively. More generally, by changing the flagellar number of other types of bacteria, one may deal with other regions of the sixfold phase space.

Our analytical approach allows us to extract further information about the transport properties, such as the crossover time *t*_{c} to asymptotic diffusive regime as a function of the key parameters. The crossover time can be estimated by balancing the linear terms in time and the nonlinear contribution in the MSD equation. We find that *t*_{c} also varies by several orders of magnitude in the (R, *p*, ) phase space (not shown). Note that, due to the interplay between the key parameters, multiple transitions between different types of anomalous diffusive dynamics occur on varying time scales in general (*39*).

Finally, we study the MFPT of a two-state persistent random walk in confinement by means of extensive Monte Carlo simulations. The MFPT is defined as the mean time taken by the random walker to reach a particular position in the system for the first time. Here, we consider a confined geometry of size *L* as the MFPT in an unlimited space is trivially infinite. However, we opt to have periodic boundary conditions for consistency, since the run-and-tumble parameter values are taken from the refined experimental data for a freely swimming bacterium far away from the surfaces. For simplicity, random walk on a cubic lattice with periodic boundary conditions is considered, and all run-and-tumble parameters except *p* (that is, the most sensitive factor upon varying *N*_{f}) are fixed at their mean experimental values. The walker is supposed to search for hidden targets during its both states of motility. The results reveal that the MFPT is a nonmonotonic function of *p* and admits a minimum (Fig. 4E). From the monotonic dependence of *p* on *N*_{f} (Fig. 1D), one concludes that the search efficiency is optimized at intermediate values of *N*_{f}. Denoting the size of the confinement with *L*, and the reaction range of the searcher with *ℓ*, the efficient persistency grows with increasing *L*/*ℓ* (Fig. 4E, inset); thus, the optimal number of flagella shifts toward smaller values with increasing the effective system size. Our numerical checks evidence that the above conclusions for the optimal search times qualitatively hold in simulations in continuous space and in the presence of reflecting or partially absorbing boundary walls.

## DISCUSSION

Our investigation of the swimming dynamics of *B. subtilis* revealed that the strains with lower flagellar number *N*_{f} have a longer run time and a higher persistency in the run phase. In addition, their abrupt directional change when switching back to the run phase is smaller. Consequently, having too few flagella enhances the efficiency of long-distance transport (reflected, for example, in their higher translational diffusion coefficient) and causes fast spreading. Increasing the number of flagella considerably increases the probability of switching from running to tumbling and the curvature of the trajectories in the run phase. Moreover, switching from tumbling to running is accompanied by a larger directional change when the bacterium has more flagella. As a result, the overall orientation changes more frequently at higher flagellar numbers. This leads to a slower spreading, which can be beneficial, for example, for the formation of biofilms.

However, the flagellar number of the WT *B. subtilis* falls in the middle of the range, where the search efficiency could be optimized according to our simulation results (see Fig. 4F). Intermittent random walks are known to be beneficial for search efficiency in confined geometries (*47*–*49*). For example, when slow diffusion periods are interrupted by fast relocating ballistic flights, it has been shown that there exists an optimal ratio between the durations of the two states that leads to a global minimum of the search time (*47*). The optimal choice varies with the system size and the reaction range of the searcher. In addition, it has been recently shown for a single-state persistent random walk that the MFPT to find a target admits a minimum as a function of the persistency (*50*). In a general two-state random walk with tumbling and persistent running phases (such as the motion of *B. subtilis*), one expects that further complexity to determine the optimal search time arises due to the interplay between the directional persistency *p* of the run phase, the switching probabilities and between run and tumble (which determine the ratio between the run and tumble times), the size of the confinement, and the characteristics of the bacterial chemotaxis system (especially the reaction range). However, from our experimental findings, we expect that changing the flagellar number of *B. subtilis* influences the dynamics and thus the search time mainly via affecting the run-phase persistency *p*. Although several factors may have played a role in the evolution of the number of flagella, let us suppose for simplicity that *N*_{f} has been solely evolved toward optimizing the search efficiency. Then, our simulation results suggest that *N*_{f} of the WT strain is most appropriate to live in environments with a typical size of the order of a few hundreds larger than the reaction radius of the bacterium. For example, one obtains an environment size of less than a millimeter, assuming that the reaction radius is comparable to the typical size of *B. subtilis* (that is, a few micrometers). Our results thus provide a new insight into the nature of bacterial motility, which goes beyond the mechanochemical description of chemotaxis and mechanisms of flagellar bundle formation and disruption.

## MATERIALS AND METHODS

### Genetic manipulation of bacteria

Allelic replacement was performed using the pMAD-system according to (*51*). All strains originated from the recently described NCIB3610 *B. subtilis* strain, harboring a point mutation in the *comI* gene (*52*). Briefly, the *hag* gene encoding flagellin was amplified including upstream and downstream flanking regions and cloned into the pMAD plasmid. The T209 to C mutation was obtained using quick-change mutagenesis. NCIB3610 *comI*_{Q12I} was transformed, and positive clones were selected according to (*51*). Exchange of the native *hag* gene to the *hag*_{T209C} was confirmed by sequencing and light microscopy. The strain is referred to as WT NCIB3610 in terms of the flagellar number in the text. We thank D. B. Kearns for strain DK1693 [ΔswrA, *amyE* :: P_{hyspank} − swrA; *lacA* :: P_{hag} −*hag*_{T209C} mls (macrolide-lincosamide-streptogramin)]. This strain was used as both ΔswrA and swrA^{++} when induced with IPTG.

### Sample preparation

The temperature was set to 37°C for all steps of the experiment. First, 20 μl of frozen stock *B. subtilis* was streaked onto an LB agar plate. The plate was incubated for ~16 hours, and then, a few colonies of bacteria from the plate were stirred in LB and grown over night. The cultures were diluted to optical density measured at a wavelength of 600 nm (OD_{600}) ~ 0.1 next morning and grown for two more hours to reach the early exponential phase within the optical density range of ~0.5 and 0.8. After dilution, the swrA^{++} strain was induced by 1 mM IPTG solution to synthesize more flagella. The optical density of the cells in the exponential phase was first adjusted to 0.5 and then further diluted (~15-fold) in a fresh LB that had been previously purified using a 0.4-μm syringe filter. Because of the strong sticking of ΔswrA strain to the surface, 0.005% PVP-40 (polyvinylpyrrolidones) was added before the experiments (*53*). For fluorescent labeling of cells, the dye was prepared by solving 1 mg of Alexa Fluor 568 C5-maleimide in 200 μl of dimethyl sulfoxide. One milliliter of the cell culture in OD_{600} ~ 1 was centrifuged at 8000*g* for 1 min and gently washed three times in phosphate-buffered saline (PBS) at pH 7.4 (1×). The pellet was resuspended in 200 μl of PBS together with 5 μl of the dye solution. The suspension was mixed and incubated in the dark at room temperature for 20 min and washed three times again in PBS buffer and re-energized by half-hour outgrowth in LB to observe motile cells.

Fluorescence microscopy samples were prepared by adding 30 μl of labeled cell suspension into a FluoroDish FD35-100 and by covering it with a circular cover glass (diameter, 22 mm; thickness no. 1.5; VWR). A Nikon Eclipse Ti microscope together with a Nikon N Plan Apo λ 60× [numerical aperture (NA), 1.4] oil immersion objective was used for fluorescence microscopy. The dye was excited by a mercury lamp, and images were acquired using a Hamamatsu ORCA-Flash 4.0 camera with a 25-ms exposure time and 2 × 2 binning. A tracking chamber was a superposition of a cover slip (20 × 20 mm, thickness no. 1; VWR) on a microscope slide (76 × 26 mm; Carl Roth GmbH) separated by a thin layer of silicone grease (medium viscosity; GE Bayer Silicones Baysilone) as spacer. The chambers were quasi-2D with a height ranging between 30 and 50 μm. The lateral sides were sealed by silicone grease after filling the cavity with bacterial suspension. Microscopy was performed with a Nikon Eclipse TE2000-s microscope and a Nikon 4× (NA, 0.2) objective in the dark-field mode. For each sample, sequences of images for 2 min with a 60-Hz frame rate were recorded using a Point Grey FL3-U3-88s2cc camera. The experiments were repeated with three different cultures for each strain.

### Trajectory selection and tumbling detection

A triangular smoothing filter was applied to smooth the data. Extremely short tracks and abnormal ones belonging to the cells in late exponential or dividing phase were discarded. Furthermore, the trajectories were visually inspected to discard all instances of orbiting motility, as well as circles and even smooth piecewise curved trajectories in the vicinity of the surface, to make sure that the remaining data are negligibly affected by the surface interactions. More than 2500 trajectories were eventually collected for the entire experiment for further analysis.

The tumbling detection algorithm was based on identifying the marked changes in speed *v*(*t*) and magnitude of angular velocity ω(*t*) of the bacterium (*37*, *54*). First, all local minima (maxima) of *v* (ω) over time were determined. Each minimum (maximum) is surrounded by two maxima (minima) located at *t*_{1} and *t*_{2}. The depth Δ*v* of the minimum or the height Δω of the maximum can be characterized as Δ*v* = max[*v*(*t*_{1}) − *v*(*t*_{min}), *v*(*t*_{2}) − *v*(*t*_{min})] or Δω = max[ω(*t*_{max}) − ω(*t*_{1}), ω(*t*_{max}) − ω(*t*_{2})], respectively. To identify a tumbling event, two criteria were imposed: (i) If Δ*v*/*v*(*t*_{min}) ≥ 0.7, then there can be a tumbling phase around *t*_{min}. The possible tumbling period is limited to those times *t* around *t*_{min}, where *v*(*t*) − *v*(*t*_{min}) ≤ 0.2 Δ*v*. (ii) The local maximum of ω may indicate a tumbling event if the total directional change during the time interval *t*_{2} − *t*_{1} exceeds . The corresponding tumbling period consists of those times *t* around *t*_{max}, where ω(*t*_{max}) − ω(*t*) ≤ Δω. Imposing both conditions to identify a tumbling event ensures that the reduction of speed is accompanied by a sudden change in the direction of motion. See (*37*, *54*) for more details. A sample trajectory with detected tumbling events is shown in Fig. 5 (see also movie S1). Note that, after detecting the tumble events based on both criteria, we determined the duration of tumble by using only the criterion based on the sum of the directional changes, similar to (*5*). By splitting each trajectory into successive run and tumble parts, the corresponding statistics of the two phases (such as their speeds and durations) were recorded separately to obtain the run-and-tumble statistics shown in Figs. 1 to 3. While the average length of each trajectory over all strains was nearly 16 s, the mean number of tumble events per trajectory was nearly 3, 5, and 11 for ΔswrA, WT, and swrA^{++} strains, respectively.

### Analytical approach

To describe the persistent motion of bacteria interrupted by stochastic tumbling periods, we developed an analytical framework for a random walker with two states of motility, as described by the set of master Eq. 1. In the following, we briefly explain how arbitrary moments of displacement can be obtained by a Fourier *z*-transform technique. Here, a 2D motion is considered, but extension to three dimensions is straightforward. The Fourier transform of is defined as(3)
with *j* ∈ {*R*, *T*}. An arbitrary moment of displacement can be obtained as(4)(5)The master Eq. 1 after Fourier transformation read(6)(7)where we used the *k*th order Bessel’s function(8)the Fourier transforms of the turning-angle distribution(9)and the distribution of the directional change along the run trajectory(10)The Fourier transform of the probability can be expanded as a Taylor series(11)and the moments of displacement can be read in terms of the Taylor expansion coefficients. For example(12)Thus, we expanded both sides of the master Eqs. 6 and 7 and collected all terms with the same power in ω. As a result, coupled recursion relations for the Taylor expansion coefficients of terms with the same power in ω can be obtained. Next, the time indices on both sides of these equations can be equalized by means of *z*-transform, which enables us to obtain the moments of displacement in the *z* space. For example, one obtains the following exact expression for the MSD(13)where(14)By inverse *z*-transforming the moments of displacement in the *z* space, the moments can be obtained as a function of time.

## SUPPLEMENTARY MATERIALS

Supplementary material for this article is available at http://advances.sciencemag.org/cgi/content/full/4/9/eaar6425/DC1

Movie S1. A sample bacterial trajectory.

This is an open-access article distributed under the terms of the Creative Commons Attribution-NonCommercial license, which permits use, distribution, and reproduction in any medium, so long as the resultant use is **not** for commercial advantage and provided the original work is properly cited.

## REFERENCES AND NOTES

**Acknowledgments:**We thank D. B. Kearns for providing us with the strain DK1693 and Z. Sadjadi for the fruitful discussions.

**Funding:**M.R.S. acknowledges support by Deutsche Forschungsgemeinschaft (DFG) within SFB 1027 (A7). F.A. thanks the Peter and Traudl Engelhorn Foundation for the financial support. G.B. thanks the CRC-TRR174 of the DFG for support. J.N. and C.W. acknowledge the support by the European Union Interreg project PowderReg.

**Author contributions:**C.W. and G.B. designed the research. F.A. prepared the strains of the bacterium

*B. subtilis*. C.W., T.J., and J.N. designed and built the experimental setup. J.N. carried out the experiments and analyzed the results. M.R.S. developed the analytical model, performed simulations, and drafted the manuscript. All authors contributed to the interpretation of the results.

**Competing interests:**The authors declare that they have no competing interests.

**Data and materials availability:**All data needed to evaluate the conclusions in the paper are present in the paper and/or the Supplementary Materials. Additional data related to this paper may be requested from the authors.

- Copyright © 2018 The Authors, some rights reserved; exclusive licensee American Association for the Advancement of Science. No claim to original U.S. Government Works. Distributed under a Creative Commons Attribution NonCommercial License 4.0 (CC BY-NC).