# Optimal run-and-tumble in slit-like confinement

T. Pietrangeli, C. Ybert, C. Cottin-Bizonne, F. Detcheverry

► To cite this version:

T. Pietrangeli, C. Ybert, C. Cottin-Bizonne, F. Detcheverry. Optimal run-and-tumble in slit-like confinement. Physical Review Research, 2024, 6 (2), pp.023028. 10.1103/PhysRevResearch.6.023028 hal-04538338

HAL Id: hal-04538338

https://hal.science/hal-04538338

Submitted on 9 Apr 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Optimal run-and-tumble in slit-like confinement

T. Pietrangeli, C. Ybert, C. Cottin-Bizonne, F. Detcheverry

► To cite this version:

T. Pietrangeli, C. Ybert, C. Cottin-Bizonne, F. Detcheverry. Optimal run-and-tumble in slit-like confinement. Physical Review Research, 2024, 6 (2), pp.023028. 10.1103/PhysRevResearch.6.023028 hal-04538338

HAL Id: hal-04538338

https://hal.science/hal-04538338v1

Submitted on 9 Apr 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Optimal run-and-tumble in slit-like confinement

T. Pietrangeli, C. Ybert, C. Cottin-Bizonne, and F. Detcheverry

University of Lyon, Université Claude Bernard Lyon 1, CNRS, Institut Lumière Matière, F-69622 Villeurbanne, France

<figure><img src="image_2.png" /></figure>

(Received 30 November 2023; accepted 7 March 2024; published 5 April 2024)

Run-and-tumble is a basic model of persistent motion and a motility strategy widespread in micro-organisms and individual cells. In many natural settings, movement occurs in the presence of confinement. While accumulation at the surface has been extensively studied, the transport parallel to the boundary has received less attention. We consider a run-and-tumble particle confined inside a slit, where motion in the bulk alternates with intermittent sojourns at the wall. We first propose a discrete-direction model that is fully tractable and obtain the exact diffusion coefficient characterizing the long-time exploration of the slit. We then use numerical simulations to show that with an adequate choice of parameters, our analytical prediction provides a useful approximation for the diffusion coefficient of run-and-tumble with continuous direction. Finally, we identify the conditions that maximize diffusion within the slit and discuss the optimal mean run time. For swimming bacteria, we find that the optimum is typically reached when the mean run length is comparable to the confinement size.

DOI: 10.1103/PhysRevResearch.6.023028

# I. INTRODUCTION

Current research around self-propelled objects and active matter [1–3] has raised a renewed interest in models of persistent random walks. Along with the active Brownian particle and the active Ornstein-Uhlenbeck particle [4–6], the most prominent model may be the run-and-tumble particle, inspired by bacterial swimming where bouts of persistent motion are interspersed with sudden reorientations [7,8]. Run-and-tumble in its simplest form involves ballistic movement at constant velocity, with isotropic reorientations governed by a Poissonian process. In contrast to Brownian motion, it involves persistence, leading to distinctive features that have been explored recently. A first line of research focuses on the fundamental properties of stochastic processes such as probability distribution [9], survival probability [10,11], first-passage [9,12], local time [13], and maximum [14]. Another strand of work considers thermodynamical quantities such as entropy production [15,16] or investigates situations with additional physical ingredients, including confining potentials [17,18] and generic force field [19], obstacle [20], absorption [21–23], or activated escape [24]. Together with its generalizations [25,26], the run-and-tumble particle is currently one of the most studied paradigm of persistent random motion.

Though a model of intrinsic interest and highly idealized, the run-and-tumble particle is relevant to a large variety of random motions observed in the living world, from swimming micro-organisms such as bacteria [8,27,28], to motor proteins [29,30], crawling cells [31–33], and animals [34]. In many of these cases, motion occurs not only in unbounded free

space but also in the presence of surfaces and confinement [35]. In particular, the natural habitats of micro-organisms may include porous environments, such as body tissues, soils, sediments and porous rocks [36–39]. Confinement is also found in medical devices, anatomic ducts or materials with a large amount of interfaces such as foams [40]. The frequent interaction with the surfaces, resulting in trapping, guiding or bouncing, may deeply alter the distribution of particles and their transport properties.

One generic phenomenon that has received considerable attention is the accumulation of confined persistent swimmers at boundaries [41,42]. On the experimental side, it is known that the hydrodynamic interactions [43], the run-and-tumble features [44], and the swimming strategy [45] can all have an influence. On the theoretical side, an exact description of the swimmer distribution in the presence of a wall has proven challenging. For an active Brownian particle, the problem has been explored using a variety of approaches and approximations [46–53]. For a run-and-tumble particle, the one-dimensional case is fully tractable [54–56], and as regards higher dimensions, it has been shown [57,58] that the fraction of particles at the wall and the steady density profile depend on the run-and-tumble features such as run time distribution.

Given the large amount of work done on accumulation at surfaces, it may come as a surprise that much less attention has been devoted so far to the transport along the boundary direction. Such a process, however, is critical because it determines whether micro-organisms or motile cells can invade, escape from, or travel through interstitial spaces. Very different outcomes may be anticipated depending on the interplay between the confinement size, the run-and-tumble features and the particle behavior at the surface. While previous studies examined motion in disordered porous media [59–65], here we consider the case of a slit-like pore. This basic configuration has been instrumental in the understanding of porous media phenomena because it is geometrically simple and

<footnote>Published by the American Physical Society under the terms of the Creative Commons Attribution 4.0 International license. Further distribution of this work must maintain attribution to the author(s) and the published article's title, journal citation, and DOI.</footnote>
Optimal run-and-tumble in slit-like confinement

T. Pietrangeli, C. Ybert, C. Cottin-Bizonne, and F. Detcheverry

University of Lyon, Université Claude Bernard Lyon 1, CNRS, Institut Lumière Matière, F-69622 Villeurbanne, France

<figure><img src="image_2.png" /></figure>

(Received 30 November 2023; accepted 7 March 2024; published 5 April 2024)

Run-and-tumble is a basic model of persistent motion and a motility strategy widespread in micro-organisms and individual cells. In many natural settings, movement occurs in the presence of confinement. While accumulation at the surface has been extensively studied, the transport parallel to the boundary has received less attention. We consider a run-and-tumble particle confined inside a slit, where motion in the bulk alternates with intermittent sojourns at the wall. We first propose a discrete-direction model that is fully tractable and obtain the exact diffusion coefficient characterizing the long-time exploration of the slit. We then use numerical simulations to show that with an adequate choice of parameters, our analytical prediction provides a useful approximation for the diffusion coefficient of run-and-tumble with continuous direction. Finally, we identify the conditions that maximize diffusion within the slit and discuss the optimal mean run time. For swimming bacteria, we find that the optimum is typically reached when the mean run length is comparable to the confinement size.

DOI: 10.1103/PhysRevResearch.6.023028

I. INTRODUCTION

Current research around self-propelled objects and active matter [1–3] has raised a renewed interest in models of persistent random walks. Along with the active Brownian particle and the active Ornstein-Uhlenbeck particle [4–6], the most prominent model may be the run-and-tumble particle, inspired by bacterial swimming where bouts of persistent motion are interspersed with sudden reorientations [7,8]. Run-and-tumble in its simplest form involves ballistic movement at constant velocity, with isotropic reorientations governed by a Poissonian process. In contrast to Brownian motion, it involves persistence, leading to distinctive features that have been explored recently. A first line of research focuses on the fundamental properties of stochastic processes such as probability distribution [9], survival probability [10,11], first-passage [9,12], local time [13], and maximum [14]. Another strand of work considers thermodynamical quantities such as entropy production [15,16] or investigates situations with additional physical ingredients, including confining potentials [17,18] and generic force field [19], obstacle [20], absorption [21–23], or activated escape [24]. Together with its generalizations [25,26], the run-and-tumble particle is currently one of the most studied paradigm of persistent random motion.

Though a model of intrinsic interest and highly idealized, the run-and-tumble particle is relevant to a large variety of random motions observed in the living world, from swimming micro-organisms such as bacteria [8,27,28], to motor proteins [29,30], crawling cells [31–33], and animals [34]. In many of these cases, motion occurs not only in unbounded free

space but also in the presence of surfaces and confinement [35]. In particular, the natural habitats of micro-organisms may include porous environments, such as body tissues, soils, sediments and porous rocks [36–39]. Confinement is also found in medical devices, anatomic ducts or materials with a large amount of interfaces such as foams [40]. The frequent interaction with the surfaces, resulting in trapping, guiding or bouncing, may deeply alter the distribution of particles and their transport properties.

One generic phenomenon that has received considerable attention is the accumulation of confined persistent swimmers at boundaries [41,42]. On the experimental side, it is known that the hydrodynamic interactions [43], the run-and-tumble features [44], and the swimming strategy [45] can all have an influence. On the theoretical side, an exact description of the swimmer distribution in the presence of a wall has proven challenging. For an active Brownian particle, the problem has been explored using a variety of approaches and approximations [46–53]. For a run-and-tumble particle, the one-dimensional case is fully tractable [54–56], and as regards higher dimensions, it has been shown [57,58] that the fraction of particles at the wall and the steady density profile depend on the run-and-tumble features such as run time distribution.

Given the large amount of work done on accumulation at surfaces, it may come as a surprise that much less attention has been devoted so far to the transport along the boundary direction. Such a process, however, is critical because it determines whether micro-organisms or motile cells can invade, escape from, or travel through interstitial spaces. Very different outcomes may be anticipated depending on the interplay between the confinement size, the run-and-tumble features and the particle behavior at the surface. While previous studies examined motion in disordered porous media [59–65], here we consider the case of a slit-like pore. This basic configuration has been instrumental in the understanding of porous media phenomena because it is geometrically simple and

<footnote>Published by the American Physical Society under the terms of the Creative Commons Attribution 4.0 International license. Further distribution of this work must maintain attribution to the author(s) and the published article's title, journal citation, and DOI.</footnote>
<figure><img src="image_3.png" /><figcaption>FIG. 1. Run-and-tumble particle confined in a slit. (a) Illustration of the situation inspiring this work: a bacterium swimming between two walls. (b) Approximate description in the four-direction model. Parameters are described in Sec. II A.</figcaption></figure>

characterized by a unique length scale. By discarding the additional complexity of structural disorder, it allows to focus on the effect of confinement only. Besides, we examine the effect of swimming strategy and rotational noise which have remained little explored so far. For a finite-size active Brownian particle, it is known that spreading in confinement depends on particle shape [66]. For run-and-tumble particles, in spite of recent advances [44,65,67], a generic picture has been missing.

In this work, we investigate the transport of a run-and-tumble particle confined in a slit, where bouts of bulk motion alternate with intermittent sojourns at the wall. We focus on the diffusion coefficient, the essential quantity to characterize the long-time exploration along the slit. Our main finding is a prediction for the diffusion coefficient, that allows to understand its dependence on run-and-tumble features, surface behavior and slit size. We show how spreading may be maximized by choosing an optimal mean run time, which can be given in explicit form if the particle is motionless at the wall. Discussing the implications for bacteria and cells, we find that the long-time exploration is most efficient when the mean run length is comparable to the confinement size. Given the flexibility of the run-and-tumble model, our optimality criterion could be applicable for a host of micro-organisms.

The remainder of this article is organized as follows. In Sec. II, we introduce a discrete-direction model and derive a simple but exact formula for the diffusion coefficient. In Sec. III, we use numerical simulations to explore confined run-and-tumble with continuous direction and find that our analytical prediction provides a good approximation, if we allow for simply defined effective parameters. Finally, we investigate in Sec. IV the optimality criterion by identifying the conditions whereby the diffusion coefficient is highest. Section V gives a summary and some perspectives.

## II. ANALYTICAL APPROACH: THE FOUR-DIRECTION MODEL

Our goal is to characterize the longitudinal spreading of a run-and-tumble particle when confined in a slit. Throughout the study, only the single-body problem is considered: There is only one particle or, in an equivalent manner, an ensemble of noninteracting particles. As illustrated in Fig. 1, a complete description of the run-and-tumble motion in a the slit would involve tumbling events, rotational diffusion and motion along

the wall, the combination of which appears challenging to handle analytically. In fact, even for the simpler question of the density profile across the slit, previous works indicate that the particular case of active Brownian particles is already difficult [46–53]. Therefore, it appears necessary for the sake of tractability to resort to a simplified description. We introduce the four-direction model, depicted in Fig. 1(b), because it is exactly solvable, as we now describe. The relevance of this approximate model for realistic run-and-tumble motions will be demonstrated in Sec. III.

### A. Summary: Model and main result

We consider a minimalistic model where motion is two-dimensional and restricted to a discrete set of directions, an approximation already employed in several works [46,68–71]. As shown in Fig. 1(b), the run motion occurs in the vertical plane along the four cardinal directions, namely left, right, up and down (R, L, U, D). Within the slit of width W, the particle moves with velocity $v_o$ and tumbles with rate $\lambda$, not necessarily in an isotropic manner. When hitting the wall, the particle chooses a random initial direction, left ($\bar{L}$) or right ($\bar{R}$) with equal probability, and subsequently performs along the surface a one-dimensional run-and-tumble process with velocity $\bar{v}$ and tumbling rate $\bar{\lambda}$ [72]. Finally, a particle at the surface may escape, i.e., go back to the slit inner space, with rate $\mu$.

Our main result is the longitudinal diffusion coefficient D that characterizes the long-time asymptotic spreading behavior. Though exact, it turns out to be remarkably simple, as it can be expressed as

$$D = \phi D_b + \frac{\bar{\phi} \bar{D}}{1 + \mu / \bar{\lambda}} \quad (1)$$

Here $D_b = v_o^2/2\lambda(1 - \alpha)$, with $\alpha \equiv \langle \cos \theta_{\text{turn}} \rangle$ the mean cosine of turning angle $\theta_{\text{turn}}$ induced by a tumble [73], is the diffusion coefficient in the bulk. $\bar{D} = \bar{v}^2/\bar{\lambda}$ is the diffusion coefficient for motion occurring at the surface only. Besides, $\phi$ and $\bar{\phi} \equiv 1 - \phi$ are respectively the fraction of particles in the slit and at the surface, once steady values are reached, with

$$\phi = \frac{1}{1 + v_o / 2\mu W} \quad (2)$$
<figure><img src="image_3.png" /><figcaption>FIG. 1. Run-and-tumble particle confined in a slit. (a) Illustration of the situation inspiring this work: a bacterium swimming between two walls. (b) Approximate description in the four-direction model. Parameters are described in Sec. II A.</figcaption></figure>

characterized by a unique length scale. By discarding the additional complexity of structural disorder, it allows to focus on the effect of confinement only. Besides, we examine the effect of swimming strategy and rotational noise which have remained little explored so far. For a finite-size active Brownian particle, it is known that spreading in confinement depends on particle shape [66]. For run-and-tumble particles, in spite of recent advances [44,65,67], a generic picture has been missing.

In this work, we investigate the transport of a run-and-tumble particle confined in a slit, where bouts of bulk motion alternate with intermittent sojourns at the wall. We focus on the diffusion coefficient, the essential quantity to characterize the long-time exploration along the slit. Our main finding is a prediction for the diffusion coefficient, that allows to understand its dependence on run-and-tumble features, surface behavior and slit size. We show how spreading may be maximized by choosing an optimal mean run time, which can be given in explicit form if the particle is motionless at the wall. Discussing the implications for bacteria and cells, we find that the long-time exploration is most efficient when the mean run length is comparable to the confinement size. Given the flexibility of the run-and-tumble model, our optimality criterion could be applicable for a host of micro-organisms.

The remainder of this article is organized as follows. In Sec. II, we introduce a discrete-direction model and derive a simple but exact formula for the diffusion coefficient. In Sec. III, we use numerical simulations to explore confined run-and-tumble with continuous direction and find that our analytical prediction provides a good approximation, if we allow for simply defined effective parameters. Finally, we investigate in Sec. IV the optimality criterion by identifying the conditions whereby the diffusion coefficient is highest. Section V gives a summary and some perspectives.

## II. ANALYTICAL APPROACH: THE FOUR-DIRECTION MODEL

Our goal is to characterize the longitudinal spreading of a run-and-tumble particle when confined in a slit. Throughout the study, only the single-body problem is considered: There is only one particle or, in an equivalent manner, an ensemble of noninteracting particles. As illustrated in Fig. 1, a complete description of the run-and-tumble motion in a the slit would involve tumbling events, rotational diffusion and motion along

the wall, the combination of which appears challenging to handle analytically. In fact, even for the simpler question of the density profile across the slit, previous works indicate that the particular case of active Brownian particles is already difficult [46–53]. Therefore, it appears necessary for the sake of tractability to resort to a simplified description. We introduce the four-direction model, depicted in Fig. 1(b), because it is exactly solvable, as we now describe. The relevance of this approximate model for realistic run-and-tumble motions will be demonstrated in Sec. III.

### A. Summary: Model and main result

We consider a minimalistic model where motion is two-dimensional and restricted to a discrete set of directions, an approximation already employed in several works [46,68–71]. As shown in Fig. 1(b), the run motion occurs in the vertical plane along the four cardinal directions, namely left, right, up and down (R, L, U, D). Within the slit of width W, the particle moves with velocity $v_o$ and tumbles with rate $\lambda$, not necessarily in an isotropic manner. When hitting the wall, the particle chooses a random initial direction, left ($\bar{L}$) or right ($\bar{R}$) with equal probability, and subsequently performs along the surface a one-dimensional run-and-tumble process with velocity $\bar{v}$ and tumbling rate $\bar{\lambda}$ [72]. Finally, a particle at the surface may escape, i.e., go back to the slit inner space, with rate $\mu$.

Our main result is the longitudinal diffusion coefficient D that characterizes the long-time asymptotic spreading behavior. Though exact, it turns out to be remarkably simple, as it can be expressed as

$$D = \phi D_b + \frac{\bar{\phi} \bar{D}}{1 + \mu / \bar{\lambda}} \quad (1)$$

Here $D_b = v_o^2/2\lambda(1 - \alpha)$, with $\alpha = \langle \cos \theta_{\text{turn}} \rangle$ the mean cosine of turning angle $\theta_{\text{turn}}$ induced by a tumble [73], is the diffusion coefficient in the bulk. $\bar{D} = \bar{v}^2/\bar{\lambda}$ is the diffusion coefficient for motion occurring at the surface only. Besides, $\phi$ and $\bar{\phi} = 1 - \phi$ are respectively the fraction of particles in the slit and at the surface, once steady values are reached, with

$$\phi = \frac{1}{1 + v_o / 2\mu W} \quad (2)$$
## B. Method of resolution

The model is fully solvable analytically. Before presenting the derivation in detail, let us give the gist of the method. Since there is only a finite number of directions for motion, it is straightforward to write the evolution equation for each group of particles, as is classically done in the Telegraph process [74–78]. Using Fourier transforms for space variables ($x \to q$ and $z \to k$) and Laplace transform for time variable ($t \to s$), the coupled equations are turned into a linear system that can be solved within the slit inner space. The next step is then to identify the correct boundary condition, connecting the surface distribution and the slit distribution in the vicinity of the wall. The final result is a set of explicit expressions for the probability distributions at the surface and within the slit, which eventually give access to the diffusion coefficient.

For clarity, we first explain the method in the simplest case where (i) tumbles are isotropic and (ii) the particle is motionless at the surface, i.e., $\bar{v} = 0$. The calculation is then extended to a more general case. The reader interested only in the final result may proceed directly to Sec. II D. In the following, for conciseness, quantities are made dimensionless by taking $v_0$ as unit velocity and the slit half-width $w \equiv W/2$

$$ \begin{bmatrix} s + 3\lambda' - iq & -\lambda' & -\lambda' \\ -\lambda' & s + 3\lambda' + iq & -\lambda' \\ -\lambda' & -\lambda' & s + 3\lambda' - ik \\ -\lambda' & -\lambda' & -\lambda' \end{bmatrix} $$

Such a linear system is readily solved. The solution describes the particle distribution within the slit only, since loss and source terms associated with the surface are not taken into account at this point. From now on, we assume that the particles are released at the origin with isotropically distributed initial direction [80], which gives $R_{in} = L_{in} = U_{in} = D_{in}$ and $R_{in}(x, z) = \delta(x)\delta(z)/4$. Given those initial conditions and the slit symmetry, the distributions of particle on the upper and lower surfaces are identical at all time, and denoted as $W(x, t)$.

## 2. Boundary condition

We now seek the boundary condition applying at the surfaces for $z = \pm w$. Though a solution may be sought for each of the individual $R$, $L$, $U$, and $D$ distribution, it is actually sufficient for our purpose to focus on the group of vertically moving particle, whose distribution is $V \equiv U + D$. Proceeding as previous work on confined Telegraph process [54], we first combine Eqs. (3c) and (3d) to get

$$ \partial_t [U - D](x, z, t) = -\partial_z V - \lambda [U - D], \quad (5) $$

an equation that holds anywhere within the slit. Now, for a position approaching the upper surface ($z \to w$), one has

$$ U(x, w, t) = \mu W(x, t) + \partial_t W(x, t), \quad (6a) $$

$$ D(x, w, t) = \mu W(x, t). \quad (6b) $$

as unit length [79]. The slit spans the interval $[-1, 1]$. Even if $z = 1$ and $-1$ at the upper and lower surface respectively, we write $z = \pm w$ to remind that those positions correspond to the walls.

### 1. Evolution equation within the slit

Let us introduce $R(x, z, t)$ the distribution of particle located at position $(x, z)$ at time $t$ and moving rightward. A similar definition applies for distributions $L$, $U$, and $D$. In terms of $(x, z, t)$ variables, the four distributions evolve according to the governing equations

$$ \partial_t R = -\partial_x R - \lambda R + \lambda' P, \quad (3a) $$

$$ \partial_t L = +\partial_x L - \lambda L + \lambda' P, \quad (3b) $$

$$ \partial_t U = -\partial_z U - \lambda U + \lambda' P, \quad (3c) $$

$$ \partial_t D = +\partial_z D - \lambda D + \lambda' P, \quad (3d) $$

where $P \equiv R + L + U + D$ is the total density within the slit and $\lambda' = \lambda/4$ is the tumbling rate toward motion in a particular direction. Switching to $(q, k, s)$ variables by using Fourier transforms for $x$ and $z$, and Laplace transform for $t$, and denoting as $X_{in}$ the initial value of distribution $X$, one gets

$$ \begin{bmatrix} -\lambda' & -\lambda' & -\lambda' \\ -\lambda' & -\lambda' & -\lambda' \\ -\lambda' & -\lambda' & -\lambda' \\ s + 3\lambda' + ik & -\lambda' & -\lambda' \end{bmatrix} \begin{bmatrix} R(q, k, s) \\ L(q, k, s) \\ U(q, k, s) \\ D(q, k, s) \end{bmatrix} = \begin{bmatrix} R_{in}(q, k) \\ L_{in}(q, k) \\ U_{in}(q, k) \\ D_{in}(q, k) \end{bmatrix}. \quad (4) $$

The first equality is an evolution equation for the surface distribution $W(x, t)$, with a flux $\mu W$ of particles leaving the surface and a flux $U(x, w, t)$ coming from the slit. The second equality requires that in the immediate vicinity of the upper wall, downward-moving particles originate from the surface. Switching to transformed variables and using $W_{in}(x) = 0$ gives

$$ (s + \mu)W(q, s) = U(q, w, s), \quad (7a) $$

$$ \mu W(q, s) = D(q, w, s). \quad (7b) $$

Exploiting Eq. (5) finally gives for $V(q, z, s)$ the Robin boundary condition [81]

$$ \partial_z V|_{z=w} = - \frac{s(s + \lambda)}{s + 2\mu} V|_{z=w}. \quad (8) $$

The boundary condition at the lower surface $z = -w$ is obtained by symmetry.

## 3. Resolution

We are now in a position to find an explicit solution for the distribution of vertically moving particle $V(q, k, s)$. With $f(z) \equiv V(q, z, s)$ for conciseness, the solution of Eq. (4) gives $f(k) = c_1/(c^2 + k^2)$ and [82]

$$ c^2 f(z) - f''(z) = c_1 \delta(z), \quad (9) $$
## B. Method of resolution

The model is fully solvable analytically. Before presenting the derivation in detail, let us give the gist of the method. Since there is only a finite number of directions for motion, it is straightforward to write the evolution equation for each group of particles, as is classically done in the Telegraph process [74–78]. Using Fourier transforms for space variables ($x \to q$ and $z \to k$) and Laplace transform for time variable ($t \to s$), the coupled equations are turned into a linear system that can be solved within the slit inner space. The next step is then to identify the correct boundary condition, connecting the surface distribution and the slit distribution in the vicinity of the wall. The final result is a set of explicit expressions for the probability distributions at the surface and within the slit, which eventually give access to the diffusion coefficient.

For clarity, we first explain the method in the simplest case where (i) tumbles are isotropic and (ii) the particle is motionless at the surface, i.e., $\bar{v} = 0$. The calculation is then extended to a more general case. The reader interested only in the final result may proceed directly to Sec. II D. In the following, for conciseness, quantities are made dimensionless by taking $v_0$ as unit velocity and the slit half-width $w \equiv W/2$

$$ \begin{bmatrix} s + 3\lambda' - iq & -\lambda' & -\lambda' \\ -\lambda' & s + 3\lambda' + iq & -\lambda' \\ -\lambda' & -\lambda' & s + 3\lambda' - ik \\ -\lambda' & -\lambda' & -\lambda' \end{bmatrix} \begin{bmatrix} R(q, k, s) \\ L(q, k, s) \\ U(q, k, s) \\ D(q, k, s) \end{bmatrix} = \begin{bmatrix} R_{\text{in}}(q, k) \\ L_{\text{in}}(q, k) \\ U_{\text{in}}(q, k) \\ D_{\text{in}}(q, k) \end{bmatrix} \quad (4) $$

Such a linear system is readily solved. The solution describes the particle distribution within the slit only, since loss and source terms associated with the surface are not taken into account at this point. From now on, we assume that the particles are released at the origin with isotropically distributed initial direction [80], which gives $R_{\text{in}} = L_{\text{in}} = U_{\text{in}} = D_{\text{in}}$ and $R_{\text{in}}(x, z) = \delta(x)\delta(z)/4$. Given those initial conditions and the slit symmetry, the distributions of particle on the upper and lower surfaces are identical at all time, and denoted as $W(x, t)$.

## 2. Boundary condition

We now seek the boundary condition applying at the surfaces for $z = \pm w$. Though a solution may be sought for each of the individual $R$, $L$, $U$, and $D$ distribution, it is actually sufficient for our purpose to focus on the group of vertically moving particle, whose distribution is $V \equiv U + D$. Proceeding as previous work on confined Telegraph process [54], we first combine Eqs. (3c) and (3d) to get

$$ \partial_t [U - D](x, z, t) = -\partial_z V - \lambda [U - D], \quad (5) $$

an equation that holds anywhere within the slit. Now, for a position approaching the upper surface ($z \to w$), one has

$$ U(x, w, t) = \mu W(x, t) + \partial_t W(x, t), \quad (6a) $$

$$ D(x, w, t) = \mu W(x, t). \quad (6b) $$

as unit length [79]. The slit spans the interval $[-1, 1]$. Even if $z = 1$ and $-1$ at the upper and lower surface respectively, we write $z = \pm w$ to remind that those positions correspond to the walls.

### 1. Evolution equation within the slit

Let us introduce $R(x, z, t)$ the distribution of particle located at position $(x, z)$ at time $t$ and moving rightward. A similar definition applies for distributions $L$, $U$, and $D$. In terms of $(x, z, t)$ variables, the four distributions evolve according to the governing equations

$$ \partial_t R = -\partial_x R - \lambda R + \lambda' P, \quad (3a) $$

$$ \partial_t L = +\partial_x L - \lambda L + \lambda' P, \quad (3b) $$

$$ \partial_t U = -\partial_z U - \lambda U + \lambda' P, \quad (3c) $$

$$ \partial_t D = +\partial_z D - \lambda D + \lambda' P, \quad (3d) $$

where $P \equiv R + L + U + D$ is the total density within the slit and $\lambda' = \lambda/4$ is the tumbling rate toward motion in a particular direction. Switching to $(q, k, s)$ variables by using Fourier transforms for $x$ and $z$, and Laplace transform for $t$, and denoting as $X_{\text{in}}$ the initial value of distribution $X$, one gets

$$ \begin{bmatrix} -\lambda' \\ -\lambda' \\ -\lambda' \\ s + 3\lambda' + ik \end{bmatrix} \begin{bmatrix} R(q, k, s) \\ L(q, k, s) \\ U(q, k, s) \\ D(q, k, s) \end{bmatrix} = \begin{bmatrix} R_{\text{in}}(q, k) \\ L_{\text{in}}(q, k) \\ U_{\text{in}}(q, k) \\ D_{\text{in}}(q, k) \end{bmatrix}. \quad (4) $$

The first equality is an evolution equation for the surface distribution $W(x, t)$, with a flux $\mu W$ of particles leaving the surface and a flux $U(x, w, t)$ coming from the slit. The second equality requires that in the immediate vicinity of the upper wall, downward-moving particles originate from the surface. Switching to transformed variables and using $W_{\text{in}}(x) = 0$ gives

$$ (s + \mu)W(q, s) = U(q, w, s), \quad (7a) $$

$$ \mu W(q, s) = D(q, w, s). \quad (7b) $$

Exploiting Eq. (5) finally gives for $V(q, z, s)$ the Robin boundary condition [81]

$$ \partial_z V|_{z=w} = - \frac{s(s + \lambda)}{s + 2\mu} V|_{z=w}. \quad (8) $$

The boundary condition at the lower surface $z = -w$ is obtained by symmetry.

## 3. Resolution

We are now in a position to find an explicit solution for the distribution of vertically moving particle $V(q, k, s)$. With $f(z) \equiv V(q, z, s)$ for conciseness, the solution of Eq. (4) gives $f(k) = c_1/(c^2 + k^2)$ and [82]

$$ c^2 f(z) - f''(z) = c_1 \delta(z), \quad (9) $$
where the positive constants c and c₁ are independent of z and read as

$$c^2 = \frac{(s + \lambda)[q^2(2s + \lambda) + 2s(s + \lambda)^2]}{2q^2 + 2s^2 + 3\lambda s + \lambda^2}, \quad (10a)$$

$$c_1 = \frac{(s + \lambda)[q^2 + (s + \lambda)^2]}{2q^2 + 2s^2 + 3\lambda s + \lambda^2}. \quad (10b)$$

Given the boundary conditions, the solution is

$$V(q, k, s) = \frac{c_1}{2c} \frac{cs_{2\mu} \cosh(c\tilde{z}) + ss_{\lambda} \sinh(c\tilde{z})}{ss_{\lambda} \cosh(c) + cs_{2\mu} \sinh(c)}, \quad (11)$$

where for brevity we used the notation $s_κ ≡ s + κ$ and $\tilde{z} ≡ 1 - |z|$. The distribution of horizontally moving particle $H ≡ R + L$ follows from the solution to Eq. (4), giving

$$H(q, k, s) = \frac{k^2 + (s + \lambda)^2}{q^2 + (s + \lambda)^2} V(q, k, s), \quad (12)$$

from which $H(q, z, s)$ can be deduced explicitly. Note that $H(q, z, s)$ satisfies a boundary condition similar to Eq. (8), presumably because the only source of horizontally moving particle is the population of vertically moving particle. Finally, the distribution of particle within the slit, whatever their direction of motion, is $P(q, z, s)$, with $P = H + V$ and the distribution at the surface $W(x, t)$ derived from Eqs. (7a) and (7b) is

$$W(q, s) = \frac{V(q, w, s)}{s + 2\mu}. \quad (13)$$

With $P(q, z, s)$ and $W(q, s)$ known explicitly, one can check the conservation of particle number

$$\int_{-\infty}^{\infty} dx \int_{-w}^{w} dz P(x, z, t) + 2 \int_{-\infty}^{\infty} dx W(x, t) = 1, \quad (14)$$

or in a equivalent manner $\lim_{q \to 0} [P(q, s) + 2W(q, s)] = 1/s$, where $P(x, t)$ denotes the density integrated over the slit height.

### 4. Longitudinal diffusion coefficient

If the long-time and large-scale spreading behavior is diffusive, then the expansion at small $s$ and $q$ has the form $P(q, s) \sim 1/(s + Dq^2)$. This is satisfied for $P, W$ and the total distribution $T ≡ P + W$ with the same coefficient $D$. An alternative route to the diffusion coefficient is to consider the second moment $M(t) = \int_{-\infty}^{\infty} dx x^2 T(x, t)$. Its Laplace transform is $M(s) = -\lim_{q \to 0} \partial_{qq}^2 T(q, s)$ and the diffusion coefficient is $D = \lim_{s \to 0} s^2 M(s)/2$. Once all calculations are done, the final result for the longitudinal diffusion coefficient in dimensionless form is $D = 2\mu/\lambda(1 + 4\mu)$, in agreement with Eq. (1) for the simplified situation ($\bar{v} = 0$ and isotropic tumbling) considered so far.

### C. Extensions

#### 1. Anisotropic tumbling

In contrast to the simplest version of run-and-tumble particle, real instances of run-and-tumble in micro-organisms and cells exhibit reorientation events that are generally not anisotropic. Accordingly, we consider an extended run-and-tumble model and introduce $\lambda_f, \lambda_r$ and $\lambda_s$, the rate of

tumbling in respectively forward, reverse and side direction. As an example, the evolution equation for the distribution of upward-moving bacteria $U(x, z, t)$ is now

$$\partial_t U = -\partial_z U - \lambda U + \lambda_f U + \lambda_r D + \lambda_s (R + L). \quad (15)$$

Denoting as $\lambda$ the total rate of tumbling and assuming no chirality in motion, one has $\lambda_s = (\lambda - \lambda_f - \lambda_r)/2$. The steps taken afterwards are similar to those described above for the isotropic case.

#### 2. Motion at the surface

The escape mechanism need not be specified in the four-direction model, as long as it can be characterized by a rate $\mu$. For bacteria, it could for instance involve tumbling [83,84] or unscrewing by flagellar wrapping [85,86]. However, the motion at the surface must be described explicitly. It was postulated so far that until a successful escape event occurs, the particle at the wall remains at rest. Such an assumption may serve as an elementary approximation when the interaction between the micro-organism and the wall leads to trapping [35,43,87–89], transient surface adhesion events [90] or surface bound state [91,92]. However, displacement along the surface may also be relevant and a variety of behaviors has been reported, including scattering [93,94], landing [95], sliding [96] and bouncing [97]. Our model is not designed to account for the physics of such system-specific behavior but only to capture some simple limiting cases. In this spirit, a natural and flexible choice is to assume that a particle at the wall moves according to a one-dimensional run-and-tumble process, whose parameters may differ from those applying within the slit.

Denoting as $\bar{v}$ and $\bar{\lambda}$ the velocity and tumbling rate at the surface, the evolution equations for the distribution of left-moving and right-moving surface particle are

$$\partial_t \bar{R} = -\bar{v} \partial_x \bar{R} - (\bar{\lambda}' + \mu) \bar{R} + \bar{\lambda}' \bar{L} + S(x, t), \quad (16a)$$

$$\partial_t \bar{L} = +\bar{v} \partial_x \bar{L} - (\bar{\lambda}' + \mu) \bar{L} + \bar{\lambda}' \bar{R} + S(x, t), \quad (16b)$$

where $\bar{\lambda}' = \bar{\lambda}/2$. Because arrivals to the surface population come from particles moving upward near the surface, the source term is $S(x, t) = U(x, w, t)/2$. The factor 1/2 is introduced because upon hitting the surface, a particle has an equal probability to choose the right or left direction for motion along the surface. Switching to Fourier-Laplace variables, using the initial condition $\bar{R}_{in} = \bar{L}_{in} = 0$ and solving the linear system yield a kernel $K(q, s)$ that relates the density at the surface to the incoming flux of particle

$$K(q, s) \equiv \frac{U(q, w, s)}{W(q, s)} = s + \mu + \frac{\bar{v}^2 q^2}{s + \bar{\lambda} + \mu}. \quad (17)$$

Retracing the steps of Sec. II B, the generalized boundary condition for the vertically moving particle distribution $V(q, z, s)$ is found to be

$$\partial_z V|_{z=w} = (s + \lambda - \lambda_f + \lambda_r) \frac{\mu - K(q, s)}{\mu + K(q, s)} V \Big|_{z=w}, \quad (18)$$

whereas the distribution at the surface now reads as

$$W(q, s) = \frac{V(q, w, s)}{\mu + K(q, s)}. \quad (19)$$
where the positive constants c and $c_1$ are independent of z and read as

$$c^2 = \frac{(s + \lambda)[q^2(2s + \lambda) + 2s(s + \lambda)^2]}{2q^2 + 2s^2 + 3\lambda s + \lambda^2}, \quad (10a)$$

$$c_1 = \frac{(s + \lambda)[q^2 + (s + \lambda)^2]}{2q^2 + 2s^2 + 3\lambda s + \lambda^2}. \quad (10b)$$

Given the boundary conditions, the solution is

$$V(q, k, s) = \frac{c_1}{2c} \frac{cs_{2\mu} \cosh(c\bar{z}) + ss_{\lambda} \sinh(c\bar{z})}{ss_{\lambda} \cosh(c) + cs_{2\mu} \sinh(c)}, \quad (11)$$

where for brevity we used the notation $s_κ ≡ s + κ$ and $\bar{z} ≡ 1 - |z|$. The distribution of horizontally moving particle $H ≡ R + L$ follows from the solution to Eq. (4), giving

$$H(q, k, s) = \frac{k^2 + (s + \lambda)^2}{q^2 + (s + \lambda)^2} V(q, k, s), \quad (12)$$

from which $H(q, z, s)$ can be deduced explicitly. Note that $H(q, z, s)$ satisfies a boundary condition similar to Eq. (8), presumably because the only source of horizontally moving particle is the population of vertically moving particle. Finally, the distribution of particle within the slit, whatever their direction of motion, is $P(q, z, s)$, with $P = H + V$ and the distribution at the surface $W(x, t)$ derived from Eqs. (7a) and (7b) is

$$W(q, s) = \frac{V(q, w, s)}{s + 2\mu}. \quad (13)$$

With $P(q, z, s)$ and $W(q, s)$ known explicitly, one can check the conservation of particle number

$$\int_{-\infty}^{\infty} dx \int_{-w}^{w} dz P(x, z, t) + 2 \int_{-\infty}^{\infty} dx W(x, t) = 1, \quad (14)$$

or in a equivalent manner $\lim_{q \to 0} [P(q, s) + 2W(q, s)] = 1/s$, where $P(x, t)$ denotes the density integrated over the slit height.

### 4. Longitudinal diffusion coefficient

If the long-time and large-scale spreading behavior is diffusive, then the expansion at small $s$ and $q$ has the form $P(q, s) \sim 1/(s + Dq^2)$. This is satisfied for $P, W$ and the total distribution $T ≡ P + W$ with the same coefficient $D$. An alternative route to the diffusion coefficient is to consider the second moment $M(t) = \int_{-\infty}^{\infty} dx x^2 T(x, t)$. Its Laplace transform is $M(s) = -\lim_{q \to 0} \partial_{qq}^2 T(q, s)$ and the diffusion coefficient is $D = \lim_{s \to 0} s^2 M(s)/2$. Once all calculations are done, the final result for the longitudinal diffusion coefficient in dimensionless form is $D = 2\mu/\lambda(1 + 4\mu)$, in agreement with Eq. (1) for the simplified situation ($\bar{v} = 0$ and isotropic tumbling) considered so far.

### C. Extensions

#### 1. Anisotropic tumbling

In contrast to the simplest version of run-and-tumble particle, real instances of run-and-tumble in micro-organisms and cells exhibit reorientation events that are generally not anisotropic. Accordingly, we consider an extended run-and-tumble model and introduce $\lambda_f, \lambda_r$ and $\lambda_s$, the rate of

tumbling in respectively forward, reverse and side direction. As an example, the evolution equation for the distribution of upward-moving bacteria $U(x, z, t)$ is now

$$\partial_t U = -\partial_z U - \lambda U + \lambda_f U + \lambda_r D + \lambda_s (R + L). \quad (15)$$

Denoting as $\lambda$ the total rate of tumbling and assuming no chirality in motion, one has $\lambda_s = (\lambda - \lambda_f - \lambda_r)/2$. The steps taken afterwards are similar to those described above for the isotropic case.

#### 2. Motion at the surface

The escape mechanism need not be specified in the four-direction model, as long as it can be characterized by a rate $\mu$. For bacteria, it could for instance involve tumbling [83,84] or unscrewing by flagellar wrapping [85,86]. However, the motion at the surface must be described explicitly. It was postulated so far that until a successful escape event occurs, the particle at the wall remains at rest. Such an assumption may serve as an elementary approximation when the interaction between the micro-organism and the wall leads to trapping [35,43,87–89], transient surface adhesion events [90] or surface bound state [91,92]. However, displacement along the surface may also be relevant and a variety of behaviors has been reported, including scattering [93,94], landing [95], sliding [96] and bouncing [97]. Our model is not designed to account for the physics of such system-specific behavior but only to capture some simple limiting cases. In this spirit, a natural and flexible choice is to assume that a particle at the wall moves according to a one-dimensional run-and-tumble process, whose parameters may differ from those applying within the slit.

Denoting as $\bar{v}$ and $\bar{\lambda}$ the velocity and tumbling rate at the surface, the evolution equations for the distribution of left-moving and right-moving surface particle are

$$\partial_t \bar{R} = -\bar{v} \partial_x \bar{R} - (\bar{\lambda}' + \mu) \bar{R} + \bar{\lambda}' \bar{L} + S(x, t), \quad (16a)$$

$$\partial_t \bar{L} = +\bar{v} \partial_x \bar{L} - (\bar{\lambda}' + \mu) \bar{L} + \bar{\lambda}' \bar{R} + S(x, t), \quad (16b)$$

where $\bar{\lambda}' = \bar{\lambda}/2$. Because arrivals to the surface population come from particles moving upward near the surface, the source term is $S(x, t) = U(x, w, t)/2$. The factor 1/2 is introduced because upon hitting the surface, a particle has an equal probability to choose the right or left direction for motion along the surface. Switching to Fourier-Laplace variables, using the initial condition $\bar{R}_{in} = \bar{L}_{in} = 0$ and solving the linear system yield a kernel $K(q, s)$ that relates the density at the surface to the incoming flux of particle

$$K(q, s) \equiv \frac{U(q, w, s)}{W(q, s)} = s + \mu + \frac{\bar{v}^2 q^2}{s + \bar{\lambda} + \mu}. \quad (17)$$

Retracing the steps of Sec. II B, the generalized boundary condition for the vertically moving particle distribution $V(q, z, s)$ is found to be

$$\partial_z V|_{z=w} = (s + \lambda - \lambda_f + \lambda_r) \frac{\mu - K(q, s)}{\mu + K(q, s)} V \Big|_{z=w}, \quad (18)$$

whereas the distribution at the surface now reads as

$$W(q, s) = \frac{V(q, w, s)}{\mu + K(q, s)}. \quad (19)$$
The resulting longitudinal diffusion coefficient in dimensionless form is

$$D = \frac{2\mu}{\lambda(1-\alpha)(1+4\mu)} + \frac{\bar{v}^2}{(1+4\mu)(\mu+\bar{\lambda})}, \quad (20)$$

where we used the fact that the mean cosine of turning angle is $\alpha = (\lambda_f - \lambda_r)/\lambda$. Equation (1) is finally recovered when reverting to dimensional quantities.

### 3. Effective rotational diffusion

Our description so far assumes that changes of direction originate in tumble events only and that runs, however long, may remain perfectly ballistic. Yet, for bacteria, cells or artificial microswimmers, the persistence length is never infinite because of thermal fluctuations and active noise induced by the surrounding medium and propulsion process. The resulting nonzero rotational diffusion is an essential feature that must be accounted for.

Even if rotational diffusion is a gradual process, its influence at large length and timescales can be included in the four-direction model in an effective manner, by assuming, in addition to tumbling events, some isotropic reorientation events. Those events will ensure a finite persistence even in the absence of tumble. Their rate $\tau_r^{-1} = D_r$, with $D_r$ the rotational diffusion coefficient, is fixed so that the decay time of the orientational correlation function is the same in the discrete and continuous cases [98]. Now, because tumbling events and the effective rotational diffusion events are two independent Poisson processes, they can be easily integrated within the framework of the four-direction model. The only change required is to modify the rates $\lambda_f$, $\lambda_r$ and $\lambda_s$ introduced above to describe anisotropic tumbling. Specifically, if a run-and-tumble has parameters $\lambda$ and $\alpha$, then the modified values in the presence of effective rotational diffusion with rate $\tau_r^{-1}$ are, respectively [99],

$$\lambda_{\text{mod}} = \lambda + \tau_r^{-1}, \quad \alpha_{\text{mod}} = \alpha \frac{\lambda}{\lambda + \tau_r^{-1}}. \quad (21)$$

These relations will be useful in Secs. III and IV.

### D. Discussion

There are a number of limiting values to check from Eq. (1) for the diffusion coefficient $D$. For an infinitely wide slit ($W \to \infty$) or a reflecting surface ($\mu \to \infty$), the particle lays mostly inside the slit and the diffusion coefficient approaches its bulk value $D_b$ as expected. Conversely, for a quasi-absorbing boundary ($\mu \to 0$), the particle is found predominantly at the wall and $D$ converges to the surface value $\bar{D}$. To further ascertain the validity of Eq. (1), we conducted numerical simulations of the four-direction model which are detailed in Appendix A. For all parameters explored, an excellent agreement was found, with a relative deviation between theoretical and numerical values of the diffusion coefficient typically below one percent.

Though in the following we focus essentially on the longitudinal diffusion coefficient $D$, one may wonder what the density profile $P(z, t)$ across the slit is, if the longitudinal position $x$ of particles is discarded. From $P(q, z, s)$ computed above, one can obtain $P(z, s) = \lim_{q \to 0} P(q, z, s)$ and for the

steady state

$$P_{\text{st}}(z) = \lim_{t \to \infty} P(z, t) = \lim_{s \to 0} sP(z, s) = \frac{2\mu}{1+4\mu}, \quad (22)$$

in dimensionless form. Similar to the case of the confined Telegraph process, the density profile is flat. The fraction of particles in the slit is $\int_{-w}^{w} P_{\text{st}}(z)dz = 4\mu/(1+4\mu)$, which leads to Eq. (2).

The simplest expectation for the diffusion coefficient of confined run-tumble particles would be a mean of the bulk and surface diffusion coefficients, weighted by the fraction of particles in each place. Equation (1) indicates that this expectation does not hold exactly. This is in contrast to other situations such as Poissonian bimodal motions with alternating type of displacement, where diffusion coefficients may be additive [100]. Here, the discrepancy lies in the correction factor $(1 + \mu/\bar{\lambda})^{-1}$ in the second term of Eq. (1). It reduces to unity only if $\mu \to 0$, a trivial situation where all particles remain at the wall, or when $\bar{\lambda} \to \infty$. The latter case is relevant if motion at the surface becomes diffusive, thus with vanishing persistence [101]. This suggests that the departure between Eq. (1) and a simple weighted value originates in the interplay between the escape process and the persistence of surface motion. In fact, we note that for a very thin slit ($W \to 0$), the diffusion coefficient is not $\bar{D}$ but $\bar{v}^2/(\bar{\lambda} + \mu)$. This is understandable because an escape event in a narrow slit becomes equivalent to a tumble at the wall [102], thus resulting in an effective surface tumble rate $\bar{\lambda} + \mu$. The correction factor in Eq. (1) is thus most intuitively interpreted in the limiting case of extreme confinement.

### III. APPROXIMATING THE DIFFUSION COEFFICIENT OF A CONTINUOUS MODEL

Before investigating the implications of Eq. (1), we first examine its broader validity. Indeed, given the strong simplifying assumptions involved in the four-direction model, one may wonder whether it is of any use to describe “realistic” run-and-tumble motions, which involve continuous direction and rotational diffusion. In this section, we provide a positive answer. Using numerical simulations, we show that the diffusion coefficient predicted by the discrete model is actually a good approximation for that of the continuous model, provided one makes an appropriate choice of effective parameters.

#### A. Simulations and parameters

We consider a run-and-tumble particle that can move without any restriction on its direction of motion, a situation that for convenience is referred to as the “continuous model.” Its definition and parameters mirror those of the four-direction model [103] except for two differences. First, the particle orientation is now subject to standard rotational diffusion and thus evolves continuously during a run as a Brownian motion. Second, when a particle escapes from the surface, the direction chosen initially is random, and irrespective of the swimming strategy, it is sampled from a uniform distribution over directions pointing inside the slit. Such an assumption is the most natural to maintain the analogy with the
The resulting longitudinal diffusion coefficient in dimensionless form is

$$D = \frac{2\mu}{\lambda(1 - \alpha)(1 + 4\mu)} + \frac{\bar{v}^2}{(1 + 4\mu)(\mu + \bar{\lambda})}, \quad (20)$$

where we used the fact that the mean cosine of turning angle is $\alpha = (\lambda_f - \lambda_r)/\lambda$. Equation (1) is finally recovered when reverting to dimensional quantities.

### 3. Effective rotational diffusion

Our description so far assumes that changes of direction originate in tumble events only and that runs, however long, may remain perfectly ballistic. Yet, for bacteria, cells or artificial microswimmers, the persistence length is never infinite because of thermal fluctuations and active noise induced by the surrounding medium and propulsion process. The resulting nonzero rotational diffusion is an essential feature that must be accounted for.

Even if rotational diffusion is a gradual process, its influence at large length and timescales can be included in the four-direction model in an effective manner, by assuming, in addition to tumbling events, some isotropic reorientation events. Those events will ensure a finite persistence even in the absence of tumble. Their rate $\tau_r^{-1} = D_r$, with $D_r$ the rotational diffusion coefficient, is fixed so that the decay time of the orientational correlation function is the same in the discrete and continuous cases [98]. Now, because tumbling events and the effective rotational diffusion events are two independent Poisson processes, they can be easily integrated within the framework of the four-direction model. The only change required is to modify the rates $\lambda_f$, $\lambda_r$ and $\lambda_s$ introduced above to describe anisotropic tumbling. Specifically, if a run-and-tumble has parameters $\lambda$ and $\alpha$, then the modified values in the presence of effective rotational diffusion with rate $\tau_r^{-1}$ are, respectively [99],

$$\lambda_{\text{mod}} = \lambda + \tau_r^{-1}, \quad \alpha_{\text{mod}} = \alpha \frac{\lambda}{\lambda + \tau_r^{-1}}. \quad (21)$$

These relations will be useful in Secs. III and IV.

### D. Discussion

There are a number of limiting values to check from Eq. (1) for the diffusion coefficient $D$. For an infinitely wide slit ($W \to \infty$) or a reflecting surface ($\mu \to \infty$), the particle lays mostly inside the slit and the diffusion coefficient approaches its bulk value $D_b$ as expected. Conversely, for a quasi-absorbing boundary ($\mu \to 0$), the particle is found predominantly at the wall and $D$ converges to the surface value $\bar{D}$. To further ascertain the validity of Eq. (1), we conducted numerical simulations of the four-direction model which are detailed in Appendix A. For all parameters explored, an excellent agreement was found, with a relative deviation between theoretical and numerical values of the diffusion coefficient typically below one percent.

Though in the following we focus essentially on the longitudinal diffusion coefficient $D$, one may wonder what the density profile $P(z, t)$ across the slit is, if the longitudinal position $x$ of particles is discarded. From $P(q, z, s)$ computed above, one can obtain $P(z, s) = \lim_{q \to 0} P(q, z, s)$ and for the

steady state

$$P_{\text{st}}(z) = \lim_{t \to \infty} P(z, t) = \lim_{s \to 0} sP(z, s) = \frac{2\mu}{1 + 4\mu}, \quad (22)$$

in dimensionless form. Similar to the case of the confined Telegraph process, the density profile is flat. The fraction of particles in the slit is $\int_{-w}^{w} P_{\text{st}}(z)dz = 4\mu/(1 + 4\mu)$, which leads to Eq. (2).

The simplest expectation for the diffusion coefficient of confined run-tumble particles would be a mean of the bulk and surface diffusion coefficients, weighted by the fraction of particles in each place. Equation (1) indicates that this expectation does not hold exactly. This is in contrast to other situations such as Poissonian bimodal motions with alternating type of displacement, where diffusion coefficients may be additive [100]. Here, the discrepancy lies in the correction factor $(1 + \mu/\bar{\lambda})^{-1}$ in the second term of Eq. (1). It reduces to unity only if $\mu \to 0$, a trivial situation where all particles remain at the wall, or when $\bar{\lambda} \to \infty$. The latter case is relevant if motion at the surface becomes diffusive, thus with vanishing persistence [101]. This suggests that the departure between Eq. (1) and a simple weighted value originates in the interplay between the escape process and the persistence of surface motion. In fact, we note that for a very thin slit ($W \to 0$), the diffusion coefficient is not $\bar{D}$ but $\bar{v}^2/(\bar{\lambda} + \mu)$. This is understandable because an escape event in a narrow slit becomes equivalent to a tumble at the wall [102], thus resulting in an effective surface tumble rate $\bar{\lambda} + \mu$. The correction factor in Eq. (1) is thus most intuitively interpreted in the limiting case of extreme confinement.

### III. APPROXIMATING THE DIFFUSION COEFFICIENT OF A CONTINUOUS MODEL

Before investigating the implications of Eq. (1), we first examine its broader validity. Indeed, given the strong simplifying assumptions involved in the four-direction model, one may wonder whether it is of any use to describe “realistic” run-and-tumble motions, which involve continuous direction and rotational diffusion. In this section, we provide a positive answer. Using numerical simulations, we show that the diffusion coefficient predicted by the discrete model is actually a good approximation for that of the continuous model, provided one makes an appropriate choice of effective parameters.

#### A. Simulations and parameters

We consider a run-and-tumble particle that can move without any restriction on its direction of motion, a situation that for convenience is referred to as the “continuous model.” Its definition and parameters mirror those of the four-direction model [103] except for two differences. First, the particle orientation is now subject to standard rotational diffusion and thus evolves continuously during a run as a Brownian motion. Second, when a particle escapes from the surface, the direction chosen initially is random, and irrespective of the swimming strategy, it is sampled from a uniform distribution over directions pointing inside the slit. Such an assumption is the most natural to maintain the analogy with the
<table><caption>TABLE I. Parameters of the continuous model and range explored in simulations. Indicated are the minimum and maximum values, as well as the total number *n* of values considered. Values for $\hat{\lambda}$, $\hat{\lambda}$, $\hat{\mu}$ and $\hat{D}_r$ are equally spaced on a logarithmic scale, whereas values for $\hat{v}$ are equally spaced in linear scale.</caption><thead><tr><th>Parameter</th><th>Symbol</th><th>Unit</th><th>Min.</th><th>Max.</th><th>n</th></tr></thead><tbody><tr><td>Bulk tumbling rate</td><td>$\hat{\lambda}$</td><td>$T_s^{-1}$</td><td>0.05</td><td>50</td><td>8</td></tr><tr><td>Surface tumbling rate</td><td>$\hat{\lambda}$</td><td>$T_s^{-1}$</td><td>0.05</td><td>50</td><td>8</td></tr><tr><td>Escape rate</td><td>$\hat{\mu}$</td><td>$T_s^{-1}$</td><td>0.05</td><td>50</td><td>8</td></tr><tr><td>Rotational diffusion coefficient</td><td>$\hat{D}_r$</td><td>$T_s^{-1}$</td><td>1/3</td><td>3</td><td>5</td></tr><tr><td>Surface velocity</td><td>$\hat{v}$</td><td>$v_0$</td><td>0</td><td>1.5</td><td>4</td></tr><tr><td>Mean cosine of turning angle</td><td>$\hat{\alpha}$</td><td>—</td><td>-1</td><td>0.375</td><td>3</td></tr></tbody></table>

four-direction model and is also the simplest for a model that remains generic.

To characterize the transport of a continuous run-and-tumble in confinement, we resorted to simulations. The equations of motion of a particle are integrated numerically using an Euler-Maruyama algorithm with a time step of $10^{-2} T_s$ to produce trajectories lasting typically $10^5 T_s$. Here $T_s \equiv W/v_0$, the time necessary to cross the slit, is taken as the unit time, together with the slit width $W$ as unit length [104]. The longitudinal diffusion coefficient $D$ is obtained from the long-time behavior of the mean-squared displacement along the slit. Because the appropriate time interval to consider depends on the tumbling type and escape rate, it must be adapted for each simulation. It was checked systematically that $D$ is computed over a time range where the mean-square displacement is linear [105]. Finally, for a given set of parameters, the diffusion coefficient reported is the average obtained over 10 independent trajectories. When used for a particle in free space or adapted to reproduce the four-direction model, our simulations give diffusion coefficients that match the analytical predictions. The typical deviation is around one percent, which provides an estimate for the uncertainty of our numerical results.

We conducted a systematic exploration of the parameter space. With $W$, $T_s$ and $v_0$ equal to one by choice of units, the model still involves no less than six parameters: the tumbling rates in the slit and at the wall ($\hat{\lambda}$ and $\hat{\lambda}$), the escape rate $\hat{\mu}$, the rotational diffusion coefficient $\hat{D}_r$, the velocity at the wall $\hat{v}$, and the swimming pattern, as indicated by the parameter $\hat{\alpha}$. For clarity and later use, parameters of the continuous model are all indicated with a circumflex symbol. As detailed in Table I, each parameter was varied over a large range, covering up to three orders of magnitude. The three patterns considered are inspired by those of bacteria [8]: run-reverse, isotropic run-and-tumble, and run-and-tumble with reorientation events that reproduce *Escherichia coli*'s distribution of turning angle [106]. The $\alpha$ parameters are, respectively, -1, 0, and 0.375. The simulation data is organized in two subsets. The first subset assumes no motion at the wall and includes 960 parameter combinations that were all simulated. The second subset accounts for motion at the wall, which adds two parameters and would involve a total of 23 040 cases. To keep computational time reasonable, we considered only 1040 cases, sampled at random within the parameter space.

<figure><img src="image_4.png" /><figcaption>FIG. 2. Fraction of particles within the slit as a function of surface escape rate. Dots show the simulation data for all parameter combinations. Curves show the four-direction model predictions of Eq. (2), with an escape rate that is uncorrected (dashed line) or effective (continuous line).</figcaption></figure>

Altogether, our data set for diffusion coefficients thus comprises 2000 parameter combinations.

## B. Effective parameters

We now examine how simulation data for the continuous model compare with the prediction of the four-direction model. If one simply equates the parameters of the discrete model to those of the continuous model, then agreement is poor, with a relative deviation that is typically 25% and can reach 40%. However, as we proceed to show, a slight adjustment of parameters allows for considerable progress.

Let us first examine the fraction of particles moving within the slit. According to the four-direction model and Eq. (2), this quantity depends only on the escape rate $\mu$. As visible in Fig. 2, the numerical results for $\hat{\phi}$ in the continuous model are very consistent with this prediction: they show a pronounced variation with the escape rate $\hat{\mu}$ but a very weak dependence, if at all, on all other parameters. Yet, significant deviations between simulation and prediction are apparent if one keeps the identity $\mu = \hat{\mu}$ (dashed line). A quantitative agreement can be achieved by introducing a correction $\mu = \hat{\mu}/a$. A fit to numerical data yields $a \simeq 1.4$ (continuous line) and as detailed in Appendix B, a heuristic argument suggests $a = \sqrt{2}$, a value that we therefore adopt from now on.

Next, we turn our attention to the longitudinal diffusion coefficient. In spite of the correction in the escape rate, the agreement between simulation and prediction remains unsatisfactory (not shown). Given the very different treatment of rotational diffusion in the continuous and discrete model, it is natural to question the equality between $D_r$ and $\hat{D}_r$. We thus treat $D_r$ as a free parameter in a fit of the diffusion coefficient according to Eq. (1) [107]. The resulting effective rotational diffusion coefficient $D_r$ is shown in Fig. 3 as a function of $\hat{D}_r$ [108]. The relationship between the two coefficients appears
<table><caption>TABLE I. Parameters of the continuous model and range explored in simulations. Indicated are the minimum and maximum values, as well as the total number *n* of values considered. Values for $\hat{\lambda}$, $\hat{\lambda}$, $\hat{\mu}$ and $\hat{D}_r$ are equally spaced on a logarithmic scale, whereas values for $\hat{v}$ are equally spaced in linear scale.</caption><thead><tr><th>Parameter</th><th>Symbol</th><th>Unit</th><th>Min.</th><th>Max.</th><th>n</th></tr></thead><tbody><tr><td>Bulk tumbling rate</td><td>$\hat{\lambda}$</td><td>$T_s^{-1}$</td><td>0.05</td><td>50</td><td>8</td></tr><tr><td>Surface tumbling rate</td><td>$\hat{\lambda}$</td><td>$T_s^{-1}$</td><td>0.05</td><td>50</td><td>8</td></tr><tr><td>Escape rate</td><td>$\hat{\mu}$</td><td>$T_s^{-1}$</td><td>0.05</td><td>50</td><td>8</td></tr><tr><td>Rotational diffusion coefficient</td><td>$\hat{D}_r$</td><td>$T_s^{-1}$</td><td>1/3</td><td>3</td><td>5</td></tr><tr><td>Surface velocity</td><td>$\hat{v}$</td><td>$v_0$</td><td>0</td><td>1.5</td><td>4</td></tr><tr><td>Mean cosine of turning angle</td><td>$\hat{\alpha}$</td><td>—</td><td>-1</td><td>0.375</td><td>3</td></tr></tbody></table>

four-direction model and is also the simplest for a model that remains generic.

To characterize the transport of a continuous run-and-tumble in confinement, we resorted to simulations. The equations of motion of a particle are integrated numerically using an Euler-Maruyama algorithm with a time step of $10^{-2} T_s$ to produce trajectories lasting typically $10^5 T_s$. Here $T_s \equiv W/v_0$, the time necessary to cross the slit, is taken as the unit time, together with the slit width $W$ as unit length [104]. The longitudinal diffusion coefficient $D$ is obtained from the long-time behavior of the mean-squared displacement along the slit. Because the appropriate time interval to consider depends on the tumbling type and escape rate, it must be adapted for each simulation. It was checked systematically that $D$ is computed over a time range where the mean-square displacement is linear [105]. Finally, for a given set of parameters, the diffusion coefficient reported is the average obtained over 10 independent trajectories. When used for a particle in free space or adapted to reproduce the four-direction model, our simulations give diffusion coefficients that match the analytical predictions. The typical deviation is around one percent, which provides an estimate for the uncertainty of our numerical results.

We conducted a systematic exploration of the parameter space. With $W$, $T_s$ and $v_0$ equal to one by choice of units, the model still involves no less than six parameters: the tumbling rates in the slit and at the wall ($\hat{\lambda}$ and $\hat{\lambda}$), the escape rate $\hat{\mu}$, the rotational diffusion coefficient $\hat{D}_r$, the velocity at the wall $\hat{v}$, and the swimming pattern, as indicated by the parameter $\hat{\alpha}$. For clarity and later use, parameters of the continuous model are all indicated with a circumflex symbol. As detailed in Table I, each parameter was varied over a large range, covering up to three orders of magnitude. The three patterns considered are inspired by those of bacteria [8]: run-reverse, isotropic run-and-tumble, and run-and-tumble with reorientation events that reproduce *Escherichia coli*'s distribution of turning angle [106]. The $\alpha$ parameters are, respectively, -1, 0, and 0.375. The simulation data is organized in two subsets. The first subset assumes no motion at the wall and includes 960 parameter combinations that were all simulated. The second subset accounts for motion at the wall, which adds two parameters and would involve a total of 23 040 cases. To keep computational time reasonable, we considered only 1040 cases, sampled at random within the parameter space.

<figure><img src="image_4.png" /><figcaption>FIG. 2. Fraction of particles within the slit as a function of surface escape rate. Dots show the simulation data for all parameter combinations. Curves show the four-direction model predictions of Eq. (2), with an escape rate that is uncorrected (dashed line) or effective (continuous line).</figcaption></figure>

Altogether, our data set for diffusion coefficients thus comprises 2000 parameter combinations.

## B. Effective parameters

We now examine how simulation data for the continuous model compare with the prediction of the four-direction model. If one simply equates the parameters of the discrete model to those of the continuous model, then agreement is poor, with a relative deviation that is typically 25% and can reach 40%. However, as we proceed to show, a slight adjustment of parameters allows for considerable progress.

Let us first examine the fraction of particles moving within the slit. According to the four-direction model and Eq. (2), this quantity depends only on the escape rate $\mu$. As visible in Fig. 2, the numerical results for $\hat{\phi}$ in the continuous model are very consistent with this prediction: they show a pronounced variation with the escape rate $\hat{\mu}$ but a very weak dependence, if at all, on all other parameters. Yet, significant deviations between simulation and prediction are apparent if one keeps the identity $\mu = \hat{\mu}$ (dashed line). A quantitative agreement can be achieved by introducing a correction $\mu = \hat{\mu}/a$. A fit to numerical data yields $a \simeq 1.4$ (continuous line) and as detailed in Appendix B, a heuristic argument suggests $a = \sqrt{2}$, a value that we therefore adopt from now on.

Next, we turn our attention to the longitudinal diffusion coefficient. In spite of the correction in the escape rate, the agreement between simulation and prediction remains unsatisfactory (not shown). Given the very different treatment of rotational diffusion in the continuous and discrete model, it is natural to question the equality between $D_r$ and $\hat{D}_r$. We thus treat $D_r$ as a free parameter in a fit of the diffusion coefficient according to Eq. (1) [107]. The resulting effective rotational diffusion coefficient $D_r$ is shown in Fig. 3 as a function of $\hat{D}_r$ [108]. The relationship between the two coefficients appears
<figure><img src="image_5.png" /><figcaption>FIG. 3. Effective rotational diffusion coefficient $D_r$ as a function of bare coefficient $\hat{D}_r$. Dots show values of $D_r$ obtained by fitting simulation data of the continuous model with the analytical prediction of the discrete model. The particle is motionless at the wall. Lines correspond to linear regression.</figcaption></figure>

surprisingly simple, as it involves only a shift by a constant, with $D_r = \hat{D}_r + c$ and $c \simeq 0.4$ in $T_s^{-1}$ unit.

The origin of such an additive correction in rotational diffusion can be qualitatively understood. In the four-direction model, a particle arriving at or escaping from the wall moves perpendicular to it. Therefore, except for the reversal, it keeps perfect memory of its moving direction. In the continuous model, by contrast, the direction chosen on escape is randomized. The loss in directional memory thus acts as a localized source of rotational diffusion. It is a surface effect, whose rate is governed by the inverse crossing time $T_s^{-1} = v_o/W$, and which would disappear for an infinitely large slit. The constant $c = 0.4$ is suspiciously close to $4/\pi^2$, a value that is used in the following for convenience, even though an argument to justify this choice remains elusive [109].

In view of the data analysis, we thus propose that the diffusion coefficient of the continuous model may be described by the discrete model prediction Eq. (1) combined with effective parameters

$$ \mu = \mu/\sqrt{2}, \qquad (23a) $$

$$ D_r = \hat{D}_r + c v_o / W, \quad c \equiv 4/\pi^2, \qquad (23b) $$

and no correction in other parameters. To assess the predictive capability of this approximation, it was tested on the simulation data set. Figure 4 shows the distribution of relative deviation $\delta$ between the prediction and the simulation data. It turns out that across all hundreds of parameter combinations the relative deviation never exceeds 10% and remains below 5% in 95% of the cases. This result holds with and without motion at the wall. We conclude that provided one uses effective parameters, the analytical approach of the four-direction model offers an approximate but reliable prediction for the diffusion coefficient of a continuous run-and-tumble particle in confinement.

<figure><img src="image_6.png" /><figcaption>FIG. 4. Cumulative distribution of relative deviation $\delta$ between the diffusion coefficient from prediction and simulation. Shown are the cases without and with surface motion ($\bar{v} = 0$ and $\bar{v} > 0$ respectively).</figcaption></figure>

## IV. MAXIMIZING THE DIFFUSION COEFFICIENT

In this section, we explore the conditions under which long-time exploration is most efficient. For simplicity, we use the four-direction prediction that allows for analytical understanding. Implications for the continuous model can be deduced by switching from bare to effective parameters.

### A. Optimal mean run time

We first investigate whether spreading along the slit can be maximized by an appropriate choice of run time. This question is relevant for micro-organisms whose run-and-tumble characteristics might be modulated by environmental conditions [110] and for artificial microswimmers or microrobots whose navigation strategy could be tailored at will. Throughout Sec. IV A, the mean run time $\tau$ is thus the parameter that can be varied, while the slit width $W$ and the swimming velocity $v_o$ remain fixed. In this situation, for conciseness of formulas, it is natural to take $W$ and $v_o$ as unit length and unit velocity respectively. The unit time is then the crossing time $T_s \equiv W/v_o$.

#### 1. Without surface motion

We start with the simplest case where the particle remains at rest when at the surface ($\bar{v} = 0$). The tumble rate is $\lambda = \tau^{-1}$. As regards the escape rate $\mu$, we now choose a specific value inspired by the behavior of real micro-organisms. A simple and natural assumption is that escape events are possible only by tumbling, suggesting $\mu = (\eta\tau)^{-1}$, with a prefactor $\eta \ge 1$ indicating how many tumbles are necessary on average for a successful escape. The longitudinal diffusion coefficient in dimensionless form is then

$$ D = \frac{\tau}{\alpha'(\eta\tau + 2)}, \qquad (24) $$

where we introduced $\alpha' \equiv 1 - \alpha$ for brevity. The function $D(\tau)$ is monotonously increasing and reaches a plateau at large $\tau$. Such a behavior is simply understood. As $\tau \to \infty$,
<figure><img src="image_5.png" /><figcaption>FIG. 3. Effective rotational diffusion coefficient $D_r$ as a function of bare coefficient $\hat{D}_r$. Dots show values of $D_r$ obtained by fitting simulation data of the continuous model with the analytical prediction of the discrete model. The particle is motionless at the wall. Lines correspond to linear regression.</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>FIG. 4. Cumulative distribution of relative deviation $\delta$ between the diffusion coefficient from prediction and simulation. Shown are the cases without and with surface motion ($\bar{v} = 0$ and $\bar{v} > 0$ respectively).</figcaption></figure>

surprisingly simple, as it involves only a shift by a constant, with $D_r = \hat{D}_r + c$ and $c \simeq 0.4$ in $T_s^{-1}$ unit.

The origin of such an additive correction in rotational diffusion can be qualitatively understood. In the four-direction model, a particle arriving at or escaping from the wall moves perpendicular to it. Therefore, except for the reversal, it keeps perfect memory of its moving direction. In the continuous model, by contrast, the direction chosen on escape is randomized. The loss in directional memory thus acts as a localized source of rotational diffusion. It is a surface effect, whose rate is governed by the inverse crossing time $T_s^{-1} = v_o/W$, and which would disappear for an infinitely large slit. The constant $c = 0.4$ is suspiciously close to $4/\pi^2$, a value that is used in the following for convenience, even though an argument to justify this choice remains elusive [109].

In view of the data analysis, we thus propose that the diffusion coefficient of the continuous model may be described by the discrete model prediction Eq. (1) combined with effective parameters

$$ \mu = \mu/\sqrt{2}, \qquad (23a) $$

$$ D_r = \hat{D}_r + c v_o / W, \quad c \equiv 4/\pi^2, \qquad (23b) $$

and no correction in other parameters. To assess the predictive capability of this approximation, it was tested on the simulation data set. Figure 4 shows the distribution of relative deviation $\delta$ between the prediction and the simulation data. It turns out that across all hundreds of parameter combinations the relative deviation never exceeds 10% and remains below 5% in 95% of the cases. This result holds with and without motion at the wall. We conclude that provided one uses effective parameters, the analytical approach of the four-direction model offers an approximate but reliable prediction for the diffusion coefficient of a continuous run-and-tumble particle in confinement.

## IV. MAXIMIZING THE DIFFUSION COEFFICIENT

In this section, we explore the conditions under which long-time exploration is most efficient. For simplicity, we use the four-direction prediction that allows for analytical understanding. Implications for the continuous model can be deduced by switching from bare to effective parameters.

### A. Optimal mean run time

We first investigate whether spreading along the slit can be maximized by an appropriate choice of run time. This question is relevant for micro-organisms whose run-and-tumble characteristics might be modulated by environmental conditions [110] and for artificial microswimmers or microrobots whose navigation strategy could be tailored at will. Throughout Sec. IV A, the mean run time $\tau$ is thus the parameter that can be varied, while the slit width $W$ and the swimming velocity $v_o$ remain fixed. In this situation, for conciseness of formulas, it is natural to take $W$ and $v_o$ as unit length and unit velocity respectively. The unit time is then the crossing time $T_s \equiv W/v_o$.

#### 1. Without surface motion

We start with the simplest case where the particle remains at rest when at the surface ($\bar{v} = 0$). The tumble rate is $\lambda = \tau^{-1}$. As regards the escape rate $\mu$, we now choose a specific value inspired by the behavior of real micro-organisms. A simple and natural assumption is that escape events are possible only by tumbling, suggesting $\mu = (\eta\tau)^{-1}$, with a prefactor $\eta \ge 1$ indicating how many tumbles are necessary on average for a successful escape. The longitudinal diffusion coefficient in dimensionless form is then

$$ D = \frac{\tau}{\alpha'(\eta\tau + 2)}, \qquad (24) $$

where we introduced $\alpha' \equiv 1 - \alpha$ for brevity. The function $D(\tau)$ is monotonously increasing and reaches a plateau at large $\tau$. Such a behavior is simply understood. As $\tau \to \infty$,
<figure><img src="image_7.png" /><figcaption>FIG. 5. Dependence of diffusion coefficient on mean run time, for several rotational diffusion time. The particle is motionless at the wall ($\bar{v} = 0$), $\eta = 2$ and $\alpha = 0$. Unit time is $T_s \equiv W/v_o$. The dashed lines show the lowest order limiting behavior predicted from Eq. (25) for small and large $\tau$.</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>FIG. 6. Dependence of diffusion coefficient on mean run time (first scenario). The critical value at which the maximum disappears is $\bar{v}_c = v_o/2$, as given by Eq. (C2). Parameters are $\eta = 2$, $\tau_r = 1$ and $\alpha = 0$.</figcaption></figure>

the fraction $\phi$ of particles within the slit vanishes as $\phi \sim \tau^{-1}$ but the bulk diffusion coefficient diverges as $D_b \sim \tau$, thus resulting in a limiting constant value for $D$. Hence, transport is most efficient for a vanishing tumbling rate, if run motion is assumed perfectly ballistic.

However, for any micro-organism, pure ballistic motion is not realistic and as discussed in Sec. II C 3, rotational diffusion should be accounted for. From now on, if not mentioned otherwise, then we thus assume a finite rotational diffusion with characteristic time $\tau_r$. Using the modified parameters of Eq. (21) in combination with Eq. (1) yields the diffusion coefficient

$$D = \frac{\tau \tau_r}{(\tau + \alpha' \tau_r)(\eta \tau + 2)} \quad (25)$$

As illustrated in Fig. 5, the diffusion coefficient now varies nonmonotonously with the mean run time $\tau$. A maximum $D_m$ is reached at an optimal mean run time $\tau_m$ with

$$\tau_m = \sqrt{2\alpha'\tau_r/\eta}, \quad D_m = \frac{\tau_r}{2 + 2\sqrt{2\alpha'\eta\tau_r + \alpha'\eta\tau_r}} \quad (26)$$

A rationale for the maximum may be given as follows. In the limit of frequent tumbling ($\tau \to 0$), the particle is mostly within the slit and the diffusion coefficient takes its bulk value $D \simeq \tau/2\alpha' \sim \tau$, which increases with $\tau$. In the limit of rare tumbling ($\tau \to \infty$), the particle remains essentially at the wall and sporadic excursions within the slit result only in limited displacement, because persistence is bounded by rotational diffusion, leading to $D \simeq \tau_r/\eta\tau \sim \tau^{-1}$ and a decrease with $\tau$. Those two limiting trends must be separated by a maximum of the diffusion coefficient. As regards the maximal value $D_m$, there are also two regimes separated by a rotational time $\tau_r^* \equiv 2/\alpha'\eta$. For $\tau_r \ll \tau_r^*$, $D_m \simeq \tau_r/2$ is controlled by rotational diffusion whereas for $\tau_r \gg \tau_r^*$, $D_m \simeq 1/\alpha'\eta$ is governed by escape from the wall. Note finally that in the limit of high rotational persistence $\tau_r \to \infty$, the maximum becomes less pronounced and shifts to longer runs, thus approaching the plateau behavior predicted by Eq. (25) for pure ballistic runs.

To conclude on this first analysis, long-time spreading in a slit with no wall motion is maximized by choosing a finite mean run time, which involves not only the slit crossing time but also the rotational diffusion, the swimming pattern and the wall escape efficiency.

## 2. With surface motion

When the particle remains mobile at the slit boundary, the maximum in diffusion coefficient reached at a finite $\tau_m$ may disappear. Keeping $\lambda$ and $\mu$ as above, we fix $\bar{\lambda} = \lambda - \mu$. With such a choice, reorientation events occur at surfaces with the same frequency as in the slit and may result in escape, with rate $\mu$, or in surface tumble, with rate $\bar{\lambda}$. The diffusion coefficient in dimensionless form is

$$D = \frac{\tau \tau_r [\tau + \tau_r + \eta \bar{v}^2 \tau (\tau + \alpha' \tau_r)]}{(\tau + \tau_r)(\tau + \alpha' \tau_r)(\eta \tau + 2)} \quad (27)$$

It turns out that there is a critical velocity $\bar{v}_c$ which separates two regimes, illustrated in Fig. 6. For $\bar{v} < \bar{v}_c$, there is a maximum at finite $\tau_m$ whereas for $\bar{v} > \bar{v}_c$, the highest value is reached for an infinite run time [111]. In other words, for slow wall motion, optimal transport requires a finite run time whereas for fast wall motion, it is advantageous to eliminate tumbling entirely.

The dependence of $\tau_m$ near the critical velocity $\bar{v}_c$ may follow two distinct scenarios. In the first scenario, visible in Fig. 6, there is an absolute maximum whose location continuously shifts to higher $\tau_m$, leading to a function $\tau_m(\bar{v})$ that diverges at $\bar{v}_c$. In the second scenario, illustrated in Fig. 7, there is at the critical velocity a local maximum whose height equates the plateau reached for $\tau_m \to \infty$. In this case, $\tau_m(\bar{v})$ remains finite for $\bar{v} < \bar{v}_c$, before jumping discontinuously at $\bar{v}_c$ to an infinite value. Note that if one defines $\tau_m^{-1}$ as an order parameter, the first and second scenarios are reminiscent of second and first-order transition respectively. Because the optimal mean run time $\tau_m$ obeys a fourth-order equation, it
<figure><img src="image_7.png" /><figcaption>FIG. 5. Dependence of diffusion coefficient on mean run time, for several rotational diffusion time. The particle is motionless at the wall ($\bar{v} = 0$), $\eta = 2$ and $\alpha = 0$. Unit time is $T_s \equiv W/v_o$. The dashed lines show the lowest order limiting behavior predicted from Eq. (25) for small and large $\tau$.</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>FIG. 6. Dependence of diffusion coefficient on mean run time (first scenario). The critical value at which the maximum disappears is $\bar{v}_c = v_o/2$, as given by Eq. (C2). Parameters are $\eta = 2$, $\tau_r = 1$ and $\alpha = 0$.</figcaption></figure>

the fraction $\phi$ of particles within the slit vanishes as $\phi \sim \tau^{-1}$ but the bulk diffusion coefficient diverges as $D_b \sim \tau$, thus resulting in a limiting constant value for $D$. Hence, transport is most efficient for a vanishing tumbling rate, if run motion is assumed perfectly ballistic.

However, for any micro-organism, pure ballistic motion is not realistic and as discussed in Sec. II C 3, rotational diffusion should be accounted for. From now on, if not mentioned otherwise, then we thus assume a finite rotational diffusion with characteristic time $\tau_r$. Using the modified parameters of Eq. (21) in combination with Eq. (1) yields the diffusion coefficient

$$D = \frac{\tau \tau_r}{(\tau + \alpha' \tau_r)(\eta \tau + 2)} \quad (25)$$

As illustrated in Fig. 5, the diffusion coefficient now varies nonmonotonously with the mean run time $\tau$. A maximum $D_m$ is reached at an optimal mean run time $\tau_m$ with

$$\tau_m = \sqrt{2\alpha'\tau_r/\eta}, \quad D_m = \frac{\tau_r}{2 + 2\sqrt{2\alpha'\eta\tau_r + \alpha'\eta\tau_r}} \quad (26)$$

A rationale for the maximum may be given as follows. In the limit of frequent tumbling ($\tau \to 0$), the particle is mostly within the slit and the diffusion coefficient takes its bulk value $D \simeq \tau/2\alpha' \sim \tau$, which increases with $\tau$. In the limit of rare tumbling ($\tau \to \infty$), the particle remains essentially at the wall and sporadic excursions within the slit result only in limited displacement, because persistence is bounded by rotational diffusion, leading to $D \simeq \tau_r/\eta\tau \sim \tau^{-1}$ and a decrease with $\tau$. Those two limiting trends must be separated by a maximum of the diffusion coefficient. As regards the maximal value $D_m$, there are also two regimes separated by a rotational time $\tau_r^* \equiv 2/\alpha'\eta$. For $\tau_r \ll \tau_r^*$, $D_m \simeq \tau_r/2$ is controlled by rotational diffusion whereas for $\tau_r \gg \tau_r^*$, $D_m \simeq 1/\alpha'\eta$ is governed by escape from the wall. Note finally that in the limit of high rotational persistence $\tau_r \to \infty$, the maximum becomes less pronounced and shifts to longer runs, thus approaching the plateau behavior predicted by Eq. (25) for pure ballistic runs.

To conclude on this first analysis, long-time spreading in a slit with no wall motion is maximized by choosing a finite mean run time, which involves not only the slit crossing time but also the rotational diffusion, the swimming pattern and the wall escape efficiency.

## 2. With surface motion

When the particle remains mobile at the slit boundary, the maximum in diffusion coefficient reached at a finite $\tau_m$ may disappear. Keeping $\lambda$ and $\mu$ as above, we fix $\bar{\lambda} = \lambda - \mu$. With such a choice, reorientation events occur at surfaces with the same frequency as in the slit and may result in escape, with rate $\mu$, or in surface tumble, with rate $\bar{\lambda}$. The diffusion coefficient in dimensionless form is

$$D = \frac{\tau \tau_r [\tau + \tau_r + \eta \bar{v}^2 \tau (\tau + \alpha' \tau_r)]}{(\tau + \tau_r)(\tau + \alpha' \tau_r)(\eta \tau + 2)} \quad (27)$$

It turns out that there is a critical velocity $\bar{v}_c$ which separates two regimes, illustrated in Fig. 6. For $\bar{v} < \bar{v}_c$, there is a maximum at finite $\tau_m$ whereas for $\bar{v} > \bar{v}_c$, the highest value is reached for an infinite run time [111]. In other words, for slow wall motion, optimal transport requires a finite run time whereas for fast wall motion, it is advantageous to eliminate tumbling entirely.

The dependence of $\tau_m$ near the critical velocity $\bar{v}_c$ may follow two distinct scenarios. In the first scenario, visible in Fig. 6, there is an absolute maximum whose location continuously shifts to higher $\tau_m$, leading to a function $\tau_m(\bar{v})$ that diverges at $\bar{v}_c$. In the second scenario, illustrated in Fig. 7, there is at the critical velocity a local maximum whose height equates the plateau reached for $\tau_m \to \infty$. In this case, $\tau_m(\bar{v})$ remains finite for $\bar{v} < \bar{v}_c$, before jumping discontinuously at $\bar{v}_c$ to an infinite value. Note that if one defines $\tau_m^{-1}$ as an order parameter, the first and second scenarios are reminiscent of second and first-order transition respectively. Because the optimal mean run time $\tau_m$ obeys a fourth-order equation, it
<figure><img src="image_9.png" /><figcaption>FIG. 7. Dependence of diffusion coefficient on mean run time (second scenario). For $\bar{v} < \bar{v}_c \simeq 0.24 v_o$, the highest value is reached at the maximum for a finite $\tau$. For $\bar{v} > \bar{v}_c$, the highest value is attained in the limit $\tau \to \infty$. Parameters are $\eta = 2$, $\tau_r = 10$, and $\alpha = 1/2$.</figcaption></figure>

<figure><img src="image_10.png" /><figcaption>FIG. 8. Dependence of diffusion coefficient on slit width for several wall velocities. The particular velocity where diffusion is independent of width is $\bar{v}^*/v_o = 1/\sqrt{2}$. Parameters are $\alpha = 0$, $\tau_r = 1$, and $\eta = 2$.</figcaption></figure>

can not be written explicitly in the general case. Appendix C presents a few cases where approximations are possible.

## B. Monotonous dependence on slit width

We investigate here how exploration in a confined environment is impacted by the slit size, for a particle whose motility strategy is kept fixed. In contrast to what happens for the mean run time, the dependence of diffusion coefficient on slit width is always monotonous, forbidding the existence of a maximum. However, the slope of the $D(W)$ function may change sign at a value $\bar{v}^*$ given by

$$ \frac{\bar{v}^*}{v_o} = \sqrt{\frac{\tau + \tau_r}{2(\tau + \alpha' \tau_r)}}. \quad (28) $$

For $\bar{v} = \bar{v}^*$, the slit width has no influence on the longitudinal diffusion. For $\bar{v} < \bar{v}^*$, diffusion is maximal when $W \to \infty$ and $D = D_b$. For $\bar{v} > \bar{v}^*$, the highest value is reached when $W \to 0$ and $D = \bar{v}^2/(\tau^{-1} + \tau_r^{-1})$. Those two regimes are illustrated in Fig. 8. Somewhat counter-intuitively, even if displacement at the wall is slower than in the interstitial space, spreading might be facilitated in a narrow slit. The reason is that motion at the surface is one-directional, resulting in more efficient exploration along the slit.

## C. Discussion: Optimal transport criterion

In discussing conditions required for maximal transport, we assume no motion at the wall, a choice motivated by several reasons. First, the maximum is known explicitly in this case, which simplifies the analysis. More importantly, whereas perfectly flat and smooth walls are often used in laboratory experiments, they may be less common in natural settings. In rocks, soils, gels or body porous environments, boundaries that are irregular, rough, or fuzzy may hinder surface displacement. A case in point is the model porous media

made of hydrogel particles wherein bacteria remains trapped at the surface [35,112].

Given those assumptions, the optimal mean run time $\tau_m$ is a slit of width $W$ is

$$ \tau_m^2 = \frac{\sqrt{2(1-\alpha)}}{\eta} \left[ 1 + c \frac{\tau_r v_o}{W} \right]^{-1} \frac{\tau_r W}{v_o}, \quad (29) $$

which derives from Eq. (26) and the effective parameters from Eqs. (23a) and (23b). Depending on the ratio between $\tau_r$ and the crossing time $T_s \equiv W/v_o$, two limiting cases are possible. For $\tau_r \ll T_s$, meaning that orientation will be lost before the particle can cross the slit, $\tau_m \sim \sqrt{\tau_r T_s}$ is the geometric average of the rotational and crossing times. For $\tau_r \gg T_s$, which indicates quasi-ballistic motion at the slit scale, $\tau_m$ is simply proportional to the crossing time and the optimal mean run length $l_m \equiv v_o \tau_m$ is given by

$$ \frac{l_m}{W} = \sqrt{\frac{\sqrt{2}(1-\alpha)}{c\eta}}. \quad (30) $$

Unless escape by tumbling is very inefficient and $\eta$ very large, the $l_m/W$ ratio is typically of order unity. If rotational diffusion is negligible, then the optimum in longitudinal transport is reached when the mean run length is of same order as the confinement size. Intuitively, runs should be sufficiently long to move efficiently within the slit but short enough to avoid losing time blocked at the wall.

Though our approximate model can only capture generic features, it is interesting to evaluate its predictions in some real systems. Because their motility strategies are generally fixed, we ask in which confined environment would the actual motions of micro-organisms be optimal, considering in turn bacteria and cells.

**Bacteria.** Typical parameters for *Escherichia coli* are $\tau_m = 1$ s, $\tau_r = 2.5$ s [113], $\alpha = 1/3$, $v_o = 30 \, \mu\text{m s}^{-1}$, and $\eta = 3$, which yields $l_m/W \simeq 0.5$. More generally, one can consider a range of values that is representative of bacterial motion: $\tau_m = 0.3 - 1$ s, $\eta = 2 - 4$ [84,114], $v_o = 20-40 \, \mu\text{m s}^{-1}$ and $\alpha$
<figure><img src="image_9.png" /><figcaption>FIG. 7. Dependence of diffusion coefficient on mean run time (second scenario). For $\bar{v} < \bar{v}_c \simeq 0.24 v_o$, the highest value is reached at the maximum for a finite $\tau$. For $\bar{v} > \bar{v}_c$, the highest value is attained in the limit $\tau \to \infty$. Parameters are $\eta = 2$, $\tau_r = 10$, and $\alpha = 1/2$.</figcaption></figure>

<figure><img src="image_10.png" /><figcaption>FIG. 8. Dependence of diffusion coefficient on slit width for several wall velocities. The particular velocity where diffusion is independent of width is $\bar{v}^*/v_o = 1/\sqrt{2}$. Parameters are $\alpha = 0$, $\tau_r = 1$, and $\eta = 2$.</figcaption></figure>

can not be written explicitly in the general case. Appendix C presents a few cases where approximations are possible.

## B. Monotonous dependence on slit width

We investigate here how exploration in a confined environment is impacted by the slit size, for a particle whose motility strategy is kept fixed. In contrast to what happens for the mean run time, the dependence of diffusion coefficient on slit width is always monotonous, forbidding the existence of a maximum. However, the slope of the $D(W)$ function may change sign at a value $\bar{v}^*$ given by

$$ \frac{\bar{v}^*}{v_o} = \sqrt{\frac{\tau + \tau_r}{2(\tau + \alpha' \tau_r)}}. \quad (28) $$

For $\bar{v} = \bar{v}^*$, the slit width has no influence on the longitudinal diffusion. For $\bar{v} < \bar{v}^*$, diffusion is maximal when $W \to \infty$ and $D = D_b$. For $\bar{v} > \bar{v}^*$, the highest value is reached when $W \to 0$ and $D = \bar{v}^2/(\tau^{-1} + \tau_r^{-1})$. Those two regimes are illustrated in Fig. 8. Somewhat counter-intuitively, even if displacement at the wall is slower than in the interstitial space, spreading might be facilitated in a narrow slit. The reason is that motion at the surface is one-directional, resulting in more efficient exploration along the slit.

## C. Discussion: Optimal transport criterion

In discussing conditions required for maximal transport, we assume no motion at the wall, a choice motivated by several reasons. First, the maximum is known explicitly in this case, which simplifies the analysis. More importantly, whereas perfectly flat and smooth walls are often used in laboratory experiments, they may be less common in natural settings. In rocks, soils, gels or body porous environments, boundaries that are irregular, rough, or fuzzy may hinder surface displacement. A case in point is the model porous media

made of hydrogel particles wherein bacteria remains trapped at the surface [35,112].

Given those assumptions, the optimal mean run time $\tau_m$ is a slit of width $W$ is

$$ \tau_m^2 = \frac{\sqrt{2(1-\alpha)}}{\eta} \left[ 1 + c \frac{\tau_r v_o}{W} \right]^{-1} \frac{\tau_r W}{v_o}, \quad (29) $$

which derives from Eq. (26) and the effective parameters from Eqs. (23a) and (23b). Depending on the ratio between $\tau_r$ and the crossing time $T_s \equiv W/v_o$, two limiting cases are possible. For $\tau_r \ll T_s$, meaning that orientation will be lost before the particle can cross the slit, $\tau_m \sim \sqrt{\tau_r T_s}$ is the geometric average of the rotational and crossing times. For $\tau_r \gg T_s$, which indicates quasi-ballistic motion at the slit scale, $\tau_m$ is simply proportional to the crossing time and the optimal mean run length $l_m \equiv v_o \tau_m$ is given by

$$ \frac{l_m}{W} = \sqrt{\frac{\sqrt{2}(1-\alpha)}{c\eta}}. \quad (30) $$

Unless escape by tumbling is very inefficient and $\eta$ very large, the $l_m/W$ ratio is typically of order unity. If rotational diffusion is negligible, then the optimum in longitudinal transport is reached when the mean run length is of same order as the confinement size. Intuitively, runs should be sufficiently long to move efficiently within the slit but short enough to avoid losing time blocked at the wall.

Though our approximate model can only capture generic features, it is interesting to evaluate its predictions in some real systems. Because their motility strategies are generally fixed, we ask in which confined environment would the actual motions of micro-organisms be optimal, considering in turn bacteria and cells.

**Bacteria.** Typical parameters for *Escherichia coli* are $\tau_m = 1$ s, $\tau_r = 2.5$ s [113], $\alpha = 1/3$, $v_o = 30$ µm s$^{-1}$, and $\eta = 3$, which yields $l_m/W \simeq 0.5$. More generally, one can consider a range of values that is representative of bacterial motion: $\tau_m = 0.3-1$ s, $\eta = 2-4$ [84,114], $v_o = 20-40$ µm s$^{-1}$ and $\alpha$
between −1 and 1/2. The $l_m/W$ ratio then spans a range 0.3–1.7 that is quite limited, and remains in order of magnitude not far from unity, as predicted by Eq. (30). Depending on the specific case, the corresponding slit size is $W = 3–120$ µm. Interestingly, such cavity sizes may be relevant for several bacterial habitats. Mature biofilms [115], gels such as fibronectin and collagen for instance [112,116], as well as sandstone, sand and soil aggregates [117–119] contain micro-pores with size in the 1–100 µm range.

*Cells.* Though less commonly employed, the run-and-tumble model provides a general framework to describe cell movement. Indeed, it can account for changes of direction that are either continuous, through rotational diffusion, or discontinuous, through tumbles. In particular, a widespread motility strategy among eukaryotic cells is amoeboid crawling, where the cells proceeds by extending in turn pseudopodia, whose appearance may be treated as an effective tumble event [32,120,121]. Though harder to characterize than for bacteria, the ratio $\tau_m/\tau_r$ for cells appears to be somewhat higher and is fixed here to unity. Taking again $\eta = 2–4$ for comparison purpose, $\alpha = 0$ for simplicity, velocity $v_o = 1–5$ µm mn$^{-1}$ and $\tau_m = 5–20$ mn [122,123], the $l_m/W$ ratio is now below unity, falling in the interval 0.3–0.6. The confinement size where motion is optimal is in the range 8–300 µm, which may also be relevant in bodily environments such as interstitial spaces and ducts.

Before concluding, we discuss our criterion for optimal transport with respect to earlier findings in different but related contexts. For active polymers moving in a model porous media made of randomly placed overlapping spheres, Kurzthaler and coworkers [63] found that the diffusion coefficient is highest when the mean run length obeys $l_m = O(1)L_{c,max}$, where $L_{c,max}$ is a maximal chord length, typically six times the average pore size [124]. The rotational diffusion coefficient does not appear here because it is fixed at a value specific to the system considered. In contrast to what is predicted by Eq. (30), the optimal mean run length is several times higher than the characteristic pore size. A different criterion is not unexpected in view of the two situations considered. Instead of punctual particles in a simple geometry, Ref. [63] investigated active polymers with size comparable to pores and moving in a highly disordered medium. Still, the difference in criterion reveals that each has a limited range of applicability. In which conditions one should switch from one criterion to the other remains to be clarified.

Finally, we leave the bacteria-inspired motility pattern and consider the recently introduced reverse-when-stuck strategy [67]. In this case, a reversal event is triggered when displacement is hampered by an obstacle, which requires a sensing ability for the velocity. Numerical simulations indicate that the reverse-when-stuck strategy outperforms other types of bacterial swimming pattern. Is reverse-when-stuck also efficient in a slit? The answer is positive, as we can show here on analytical grounds. We assumed up to now an escape rate $\mu$ governed by tumbling rate but within our framework, it can be taken as a free parameter. Focusing again on the case without motion at the wall for simplicity, Eq. (1) indicates that the diffusion coefficient is an increasing function of $\mu$ and is highest for $\mu \to \infty$, a conclusion that holds also in

the continuous model [125]. Physically, this limit corresponds to a particle able to escape from the wall immediately after contact. Such a behavior realizes a best compromise because motion within the slit is not slowed down by tumbles whereas no time is wasted at the wall by waiting for reorientation.

## V. CONCLUSION

To summarize, we presented a coarse but generic model to capture the long-time diffusive spreading of a run-and-tumble particle in the simplest confined geometry. For the four-direction model, we derived an exact diffusion coefficient. This prediction turns out to be relevant for motions in continuous space when used with effective parameters and provides in a large range of conditions an excellent approximation. We identified the optimal conditions leading to maximal transport. When surface motion is negligible, the optimal mean run time is often on the order of the confinement size, suggesting that the motion patterns of bacteria and cells might be quite efficient in some natural porous environments.

Our optimality criterion was obtained within a number of simplifying assumptions. However, the model is more widely applicable and might lead to different criteria if other conditions are considered. For instance, parameters such as wall velocity [126] could depend on channel width. Besides, we assume throughout most of the discussion that wall escape occurs through tumbling, a rather natural assumption for idealized bacterial motion. Yet, in specific instances of bacteria and in other classes of micro-organisms and cells, distinct escape mechanisms might be at work. Because our description is quite generic, the consequences may still be explored within the present approach with an appropriate choice of the escape rate.

There are several features of confined run-and-tumble that are discarded in our description but would deserve investigation. First, both tumble and escape events were taken as Poissonian processes. As exemplified by the power-law distributions in run time and trapping time [112,127], non-Poissonian processes are also relevant but generally makes a theoretical treatment much more difficult [128]. Second, specific surface behaviors, such as hydrodynamics-induced circling trajectories, might also need to be considered. The resulting model will be more realistic but appropriate only for a restricted class of systems. Finally, in contrast to the simple geometry considered here, many natural porous media are disordered. The extent to which disorder influences the optimality criterion needs to be fully characterized.

In a wider perspective, run-and-tumble in confined media pertains to the class of coupled bulk-surface transports. Even with purely diffusive motions [129], such phenomenon can exhibit unexpected properties [130] and offers much opportunity for optimization, such as minimum reaction time [131]. In contrast to Brownian motion which is characterized by a single quantity—the diffusion coefficient—motility strategies of micro-organisms involve many parameters and a large spectrum of possible behaviors. It remains to understand in full generality to which extent such flexibility can be harnessed to ensure optimal transport in various environments.
between −1 and 1/2. The $l_m/W$ ratio then spans a range 0.3–1.7 that is quite limited, and remains in order of magnitude not far from unity, as predicted by Eq. (30). Depending on the specific case, the corresponding slit size is $W = 3–120$ µm. Interestingly, such cavity sizes may be relevant for several bacterial habitats. Mature biofilms [115], gels such as fibronectin and collagen for instance [112,116], as well as sandstone, sand and soil aggregates [117–119] contain micro-pores with size in the 1–100 µm range.

*Cells.* Though less commonly employed, the run-and-tumble model provides a general framework to describe cell movement. Indeed, it can account for changes of direction that are either continuous, through rotational diffusion, or discontinuous, through tumbles. In particular, a widespread motility strategy among eukaryotic cells is amoeboid crawling, where the cells proceeds by extending in turn pseudopodia, whose appearance may be treated as an effective tumble event [32,120,121]. Though harder to characterize than for bacteria, the ratio $\tau_m/\tau_r$ for cells appears to be somewhat higher and is fixed here to unity. Taking again $\eta = 2–4$ for comparison purpose, $\alpha = 0$ for simplicity, velocity $v_o = 1–5$ µm mn$^{-1}$ and $\tau_m = 5–20$ mn [122,123], the $l_m/W$ ratio is now below unity, falling in the interval 0.3–0.6. The confinement size where motion is optimal is in the range 8–300 µm, which may also be relevant in bodily environments such as interstitial spaces and ducts.

Before concluding, we discuss our criterion for optimal transport with respect to earlier findings in different but related contexts. For active polymers moving in a model porous media made of randomly placed overlapping spheres, Kurzthaler and coworkers [63] found that the diffusion coefficient is highest when the mean run length obeys $l_m = O(1)L_{c,max}$, where $L_{c,max}$ is a maximal chord length, typically six times the average pore size [124]. The rotational diffusion coefficient does not appear here because it is fixed at a value specific to the system considered. In contrast to what is predicted by Eq. (30), the optimal mean run length is several times higher than the characteristic pore size. A different criterion is not unexpected in view of the two situations considered. Instead of punctual particles in a simple geometry, Ref. [63] investigated active polymers with size comparable to pores and moving in a highly disordered medium. Still, the difference in criterion reveals that each has a limited range of applicability. In which conditions one should switch from one criterion to the other remains to be clarified.

Finally, we leave the bacteria-inspired motility pattern and consider the recently introduced reverse-when-stuck strategy [67]. In this case, a reversal event is triggered when displacement is hampered by an obstacle, which requires a sensing ability for the velocity. Numerical simulations indicate that the reverse-when-stuck strategy outperforms other types of bacterial swimming pattern. Is reverse-when-stuck also efficient in a slit? The answer is positive, as we can show here on analytical grounds. We assumed up to now an escape rate $\mu$ governed by tumbling rate but within our framework, it can be taken as a free parameter. Focusing again on the case without motion at the wall for simplicity, Eq. (1) indicates that the diffusion coefficient is an increasing function of $\mu$ and is highest for $\mu \to \infty$, a conclusion that holds also in

the continuous model [125]. Physically, this limit corresponds to a particle able to escape from the wall immediately after contact. Such a behavior realizes a best compromise because motion within the slit is not slowed down by tumbles whereas no time is wasted at the wall by waiting for reorientation.

## V. CONCLUSION

To summarize, we presented a coarse but generic model to capture the long-time diffusive spreading of a run-and-tumble particle in the simplest confined geometry. For the four-direction model, we derived an exact diffusion coefficient. This prediction turns out to be relevant for motions in continuous space when used with effective parameters and provides in a large range of conditions an excellent approximation. We identified the optimal conditions leading to maximal transport. When surface motion is negligible, the optimal mean run time is often on the order of the confinement size, suggesting that the motion patterns of bacteria and cells might be quite efficient in some natural porous environments.

Our optimality criterion was obtained within a number of simplifying assumptions. However, the model is more widely applicable and might lead to different criteria if other conditions are considered. For instance, parameters such as wall velocity [126] could depend on channel width. Besides, we assume throughout most of the discussion that wall escape occurs through tumbling, a rather natural assumption for idealized bacterial motion. Yet, in specific instances of bacteria and in other classes of micro-organisms and cells, distinct escape mechanisms might be at work. Because our description is quite generic, the consequences may still be explored within the present approach with an appropriate choice of the escape rate.

There are several features of confined run-and-tumble that are discarded in our description but would deserve investigation. First, both tumble and escape events were taken as Poissonian processes. As exemplified by the power-law distributions in run time and trapping time [112,127], non-Poissonian processes are also relevant but generally makes a theoretical treatment much more difficult [128]. Second, specific surface behaviors, such as hydrodynamics-induced circling trajectories, might also need to be considered. The resulting model will be more realistic but appropriate only for a restricted class of systems. Finally, in contrast to the simple geometry considered here, many natural porous media are disordered. The extent to which disorder influences the optimality criterion needs to be fully characterized.

In a wider perspective, run-and-tumble in confined media pertains to the class of coupled bulk-surface transports. Even with purely diffusive motions [129], such phenomenon can exhibit unexpected properties [130] and offers much opportunity for optimization, such as minimum reaction time [131]. In contrast to Brownian motion which is characterized by a single quantity—the diffusion coefficient—motility strategies of micro-organisms involve many parameters and a large spectrum of possible behaviors. It remains to understand in full generality to which extent such flexibility can be harnessed to ensure optimal transport in various environments.
<figure><img src="image_11.png" /><figcaption>FIG. 9. Numerical check of the analytical prediction for the four-direction model. The diffusion coefficient obtained from numerical simulations (points) is compared to the theoretical expression (lines) given by Eq. (27).</figcaption></figure>

ACKNOWLEDGMENTS

We acknowledge financial support from ANR-20-CE30-0034 BACMAG and ETN-PHYMOT within the European Union's Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie Grant Agreement No. 955910.

APPENDIX A: SIMULATION OF THE FOUR-DIRECTION MODEL

The numerical method used in Sec. III can be adapted to simulate run-and-tumble motion within a slit for the four-direction model. Shown in Fig. 9 is the diffusion coefficient obtained for a variety of parameter combinations. The relative error between numerical and analytical results does not exceed 1% and is 0.4% on average. A similar agreement holds for other parameter combinations tested.

APPENDIX B: EFFECTIVE ESCAPE RATE

The correction factor in the effective escape rate of Eq. (23a) might be interpreted from a purely geometric argument. We consider the flux of particle leaving the wall and ask that it remains unchanged when matching the continuous and discrete models. For a unit length of wall occupied with a particle density $\rho$, the flux of particle crossing a line infinitely close to the wall is $\rho\hat{\mu}\langle v_{\perp} \rangle$, where the average velocity perpendicular to the wall is given by

$$ \frac{\langle v_{\perp} \rangle}{v_o} = \frac{1}{\pi} \int_{-\pi/2}^{\pi/2} \cos \theta \, d\theta = \frac{2}{\pi}, \qquad (B1) $$

because in the continuous model, the direction of escape is uniformly distributed. To establish a correspondence from the continuous model to the four-direction model, a natural matching procedure is to define angular sectors as in Fig. 10 and require that only particles with $|\theta| < \pi/4$ are ascribed the up-direction and actually leaving the surface. With those assumptions, we have now

$$ \frac{\langle v_{\perp} \rangle}{v_o} = \frac{2}{\pi} \int_{-\pi/4}^{\pi/4} \cos \theta \, d\theta = \frac{2\sqrt{2}}{\pi}. \qquad (B2) $$

Compared to Eq. (B1), the average velocity perpendicular to the wall is increased by a factor of $\sqrt{2}$. Because physically, we ask for a similar flux in the continuous and four-direction models, one needs to lower the rate in the latter, suggesting

$$ \mu = \frac{\hat{\mu}}{\sqrt{2}}. \qquad (B3) $$

Such a correction is perfectly consistent with the data.

APPENDIX C: APPROXIMATIONS FOR OPTIMAL MEAN RUN TIME

When the particle remains mobile at the wall, some approximations are required to write the optimal mean run time in explicit form. A first case to consider is when the surface velocity is small. With $\epsilon$ denoting a small parameter, one finds a quadratic departure

$$ \bar{v} = \epsilon, \quad \tau_m = \tau_{m,0} + A\epsilon^2, \qquad (C1a) $$

$$ A \equiv \frac{\tau_{m,0}(\tau_{m,0} + \alpha'\tau_r)^2[\alpha'(\eta\tau_r + 2) + 2\eta\tau_{m,0}]}{2\alpha'(\tau_{m,0} + \tau_r)^2}, \qquad (C1b) $$

where $\tau_{m,0} \equiv \sqrt{2\alpha'\tau_r/\eta}$ and units of Sec. IV A are used. A second case amenable to exact results is when $2\alpha' - \alpha\eta\tau_r > 0$, a condition that is satisfied in particular for all motion

<figure><img src="image_12.png" /><figcaption>FIG. 10. Matching the escape rate between the continuous and four-direction model. In the former, a particle leaves the wall with a random angle $\theta$ which is uniformly distributed. In the latter, a particle escapes perpendicular to the wall.</figcaption></figure>
<figure><img src="image_11.png" /><figcaption>FIG. 9. Numerical check of the analytical prediction for the four-direction model. The diffusion coefficient obtained from numerical simulations (points) is compared to the theoretical expression (lines) given by Eq. (27).</figcaption></figure>

ACKNOWLEDGMENTS

We acknowledge financial support from ANR-20-CE30-0034 BACMAG and ETN-PHYMOT within the European Union's Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie Grant Agreement No. 955910.

APPENDIX A: SIMULATION OF THE FOUR-DIRECTION MODEL

The numerical method used in Sec. III can be adapted to simulate run-and-tumble motion within a slit for the four-direction model. Shown in Fig. 9 is the diffusion coefficient obtained for a variety of parameter combinations. The relative error between numerical and analytical results does not exceed 1% and is 0.4% on average. A similar agreement holds for other parameter combinations tested.

APPENDIX B: EFFECTIVE ESCAPE RATE

The correction factor in the effective escape rate of Eq. (23a) might be interpreted from a purely geometric argument. We consider the flux of particle leaving the wall and ask that it remains unchanged when matching the continuous and discrete models. For a unit length of wall occupied with a particle density $\rho$, the flux of particle crossing a line infinitely close to the wall is $\rho\hat{\mu}\langle v_{\perp} \rangle$, where the average velocity perpendicular to the wall is given by

$$ \frac{\langle v_{\perp} \rangle}{v_o} = \frac{1}{\pi} \int_{-\pi/2}^{\pi/2} \cos \theta \, d\theta = \frac{2}{\pi}, \qquad (B1) $$

because in the continuous model, the direction of escape is uniformly distributed. To establish a correspondence from the continuous model to the four-direction model, a natural matching procedure is to define angular sectors as in Fig. 10 and require that only particles with $|\theta| < \pi/4$ are ascribed the up-direction and actually leaving the surface. With those assumptions, we have now

$$ \frac{\langle v_{\perp} \rangle}{v_o} = \frac{2}{\pi} \int_{-\pi/4}^{\pi/4} \cos \theta \, d\theta = \frac{2\sqrt{2}}{\pi}. \qquad (B2) $$

Compared to Eq. (B1), the average velocity perpendicular to the wall is increased by a factor of $\sqrt{2}$. Because physically, we ask for a similar flux in the continuous and four-direction models, one needs to lower the rate in the latter, suggesting

$$ \mu = \frac{\hat{\mu}}{\sqrt{2}}. \qquad (B3) $$

Such a correction is perfectly consistent with the data.

APPENDIX C: APPROXIMATIONS FOR OPTIMAL MEAN RUN TIME

When the particle remains mobile at the wall, some approximations are required to write the optimal mean run time in explicit form. A first case to consider is when the surface velocity is small. With $\epsilon$ denoting a small parameter, one finds a quadratic departure

$$ \bar{v} = \epsilon, \quad \tau_m = \tau_{m,0} + A\epsilon^2, \qquad (C1a) $$

$$ A \equiv \frac{\tau_{m,0}(\tau_{m,0} + \alpha'\tau_r)^2[\alpha'(\eta\tau_r + 2) + 2\eta\tau_{m,0}]}{2\alpha'(\tau_{m,0} + \tau_r)^2}, \qquad (C1b) $$

where $\tau_{m,0} \equiv \sqrt{2\alpha'\tau_r/\eta}$ and units of Sec. IV A are used. A second case amenable to exact results is when $2\alpha' - \alpha\eta\tau_r > 0$, a condition that is satisfied in particular for all motion

<figure><img src="image_12.png" /><figcaption>FIG. 10. Matching the escape rate between the continuous and four-direction model. In the former, a particle leaves the wall with a random angle $\theta$ which is uniformly distributed. In the latter, a particle escapes perpendicular to the wall.</figcaption></figure>
<figure><img src="image_13.png" /><figcaption>FIG. 11. Exact optimal mean run time $\tau_m$ computed numerically (continuous line) and approximations (dashed lines) from Eqs. (C1a) and (C3). Parameters are $\eta = 2$, $\tau_f = 1$, and $\alpha = 0$, as in Fig. 6.</figcaption></figure>

patterns with $\alpha \le 0$ or for strong rotational diffusion. Then, the first scenario applies and $\tau_m$ diverges continuously, which allows to obtain the critical velocity

$$ \bar{v}_c = \frac{1}{\sqrt{2 + \eta \tau_f}}. \qquad (C2) $$

Close to the critical value $\bar{v}_c$, the divergence of the optimal run time can be characterized as

$$ \bar{v} = \bar{v}_c - \epsilon, \quad \tau_m = \frac{B}{\epsilon}, \quad B \equiv \tau_r \bar{v}_c^3 (2\alpha' - \alpha \eta \tau_f). \qquad (C3) $$

As illustrated in Fig. 11, the approximations of $\tau_m$ at low and high surface velocity may give a reasonable estimate in most of the velocity range.

[1] J. Elgeti, R. G. Winkler, and G. Gompper, Physics of microswimmers—Single particle motion and collective behavior: A review, Rep. Prog. Phys. 78, 056601 (2015).

[2] C. Bechinger, R. Di Leonardo, H. Löwen, C. Reichhardt, G. Volpe, and G. Volpe, Active Brownian particles in complex and crowded environments, Rev. Mod. Phys. 88, 045006 (2016).

[3] K. J. Bishop, S. L. Biswal, and B. Bharti, Active colloids as models, materials, and machines, Annu. Rev. Chem. Biomol. Eng. 14, 1 (2023).

[4] M. Semeraro, A. Suma, I. Petrelli, F. Cagnetta, and G. Gonnella, Work fluctuations in the active Ornstein–Uhlenbeck particle model, J. Stat. Mech. (2021) 123202.

[5] D. Gupta, S. H. Klapp, and D. A. Sivak, Efficient control protocols for an active Ornstein-Uhlenbeck particle, Phys. Rev. E 108, 024117 (2023).

[6] M. Semeraro, G. Gonnella, A. Suma, and M. Zamparo, Work fluctuations for a harmonically confined active Ornstein-Uhlenbeck particle, Phys. Rev. Lett. 131, 158302 (2023).

[7] H. C. Berg, Random Walks in Biology (Princeton University Press, Princeton, NJ, 1983).

[8] M. Grognot and K. M. Taute, More than propellers: How flagella shape bacterial motility behaviors, Curr. Opin. Microbiol. 61, 73 (2021).

[9] K. Malakar, V. Jemseena, A. Kundu, K. V. Kumar, S. Sabhapandit, S. N. Majumdar, S. Redner, and A. Dhar, Steady state, relaxation and first-passage properties of a run-and-tumble particle in one-dimension, J. Stat. Mech. (2018) 043215.

[10] F. Mori, P. Le Doussal, S. N. Majumdar, and G. Schehr, Universal survival probability for a d-dimensional run-and-tumble particle, Phys. Rev. Lett. 124, 090603 (2020).

[11] B. D. De Bruyne, S. N. Majumdar, and G. Schehr, Survival probability of a run-and-tumble particle in the presence of a drift, J. Stat. Mech. (2021) 043211.

[12] L. Angelani, R. Di Leonardo, and M. Paoluzzi, First-passage time of run-and-tumble particles, Eur. Phys. J. E 37, 59 (2014).

[13] P. Singh and A. Kundu, Local time for run and tumble particle, Phys. Rev. E 103, 042119 (2021).

[14] J. Masoliver and G. H. Weiss, On the maximum displacement of a one-dimensional diffusion process described by the telegrapher's equation, Physica A 195, 93 (1993).

[15] D. Frydel, Intuitive view of entropy production of ideal run-and-tumble particles, Phys. Rev. E 105, 034113 (2022).

[16] P. Padmanabha, D. M. Busiello, A. Maritan, and D. Gupta, Fluctuations of entropy production of a run-and-tumble particle, Phys. Rev. E 107, 014129 (2023).

[17] A. Dhar, A. Kundu, S. N. Majumdar, S. Sabhapandit, and G. Schehr, Run-and-tumble particle in one-dimensional confining potentials: Steady-state, relaxation, and first-passage properties, Phys. Rev. E 99, 032132 (2019).

[18] U. Basu, S. N. Majumdar, A. Rosso, S. Sabhapandit, and G. Schehr, Exact stationary state of a run-and-tumble particle with three internal states in a harmonic trap, J. Phys. A: Math. Theor. 53, 09LT01 (2020).

[19] P. Le Doussal, S. N. Majumdar, and G. Schehr, Velocity and diffusion constant of an active particle in a one-dimensional force field, Europhys. Lett. 130, 40002 (2020).

[20] T. Arnoulx de Pirey and F. van Wijland, A run-and-tumble particle around a spherical obstacle: The steady-state distribution far-from-equilibrium, J. Stat. Mech. (2023) 093202.

[21] J. Masoliver, J. M. Porrà, and G. H. Weiss, Solutions of the telegrapher's equation in the presence of traps, Phys. Rev. A 45, 2222 (1992).

[22] L. Angelani, Run-and-tumble particles, telegrapher's equation and absorption problems with partially reflecting boundaries, J. Phys. A: Math. Theor. 48, 495003 (2015).

[23] P. C. Bressloff, Encounter-based model of a run-and-tumble particle II: Absorption at sticky boundaries, J. Stat. Mech. (2023) 043208.

[24] E. Woillez, Y. Zhao, Y. Kafri, V. Lecomte, and J. Tailleur, Activated escape of a self-propelled particle from a metastable state, Phys. Rev. Lett. 122, 258001 (2019).
<figure><img src="image_13.png" /><figcaption>FIG. 11. Exact optimal mean run time $\tau_m$ computed numerically (continuous line) and approximations (dashed lines) from Eqs. (C1a) and (C3). Parameters are $\eta = 2$, $\tau_f = 1$, and $\alpha = 0$, as in Fig. 6.</figcaption></figure>

patterns with $\alpha \le 0$ or for strong rotational diffusion. Then, the first scenario applies and $\tau_m$ diverges continuously, which allows to obtain the critical velocity

$$ \bar{v}_c = \frac{1}{\sqrt{2 + \eta \tau_f}}. \qquad (C2) $$

Close to the critical value $\bar{v}_c$, the divergence of the optimal run time can be characterized as

$$ \bar{v} = \bar{v}_c - \epsilon, \quad \tau_m = \frac{B}{\epsilon}, \quad B \equiv \tau_r \bar{v}_c^3 (2\alpha' - \alpha \eta \tau_f). \qquad (C3) $$

As illustrated in Fig. 11, the approximations of $\tau_m$ at low and high surface velocity may give a reasonable estimate in most of the velocity range.

[1] J. Elgeti, R. G. Winkler, and G. Gompper, Physics of microswimmers—Single particle motion and collective behavior: A review, Rep. Prog. Phys. 78, 056601 (2015).

[2] C. Bechinger, R. Di Leonardo, H. Löwen, C. Reichhardt, G. Volpe, and G. Volpe, Active Brownian particles in complex and crowded environments, Rev. Mod. Phys. 88, 045006 (2016).

[3] K. J. Bishop, S. L. Biswal, and B. Bharti, Active colloids as models, materials, and machines, Annu. Rev. Chem. Biomol. Eng. 14, 1 (2023).

[4] M. Semeraro, A. Suma, I. Petrelli, F. Cagnetta, and G. Gonnella, Work fluctuations in the active Ornstein–Uhlenbeck particle model, J. Stat. Mech. (2021) 123202.

[5] D. Gupta, S. H. Klapp, and D. A. Sivak, Efficient control protocols for an active Ornstein-Uhlenbeck particle, Phys. Rev. E 108, 024117 (2023).

[6] M. Semeraro, G. Gonnella, A. Suma, and M. Zamparo, Work fluctuations for a harmonically confined active Ornstein-Uhlenbeck particle, Phys. Rev. Lett. 131, 158302 (2023).

[7] H. C. Berg, Random Walks in Biology (Princeton University Press, Princeton, NJ, 1983).

[8] M. Grognot and K. M. Taute, More than propellers: How flagella shape bacterial motility behaviors, Curr. Opin. Microbiol. 61, 73 (2021).

[9] K. Malakar, V. Jemseena, A. Kundu, K. V. Kumar, S. Sabhapandit, S. N. Majumdar, S. Redner, and A. Dhar, Steady state, relaxation and first-passage properties of a run-and-tumble particle in one-dimension, J. Stat. Mech. (2018) 043215.

[10] F. Mori, P. Le Doussal, S. N. Majumdar, and G. Schehr, Universal survival probability for a d-dimensional run-and-tumble particle, Phys. Rev. Lett. 124, 090603 (2020).

[11] B. D. De Bruyne, S. N. Majumdar, and G. Schehr, Survival probability of a run-and-tumble particle in the presence of a drift, J. Stat. Mech. (2021) 043211.

[12] L. Angelani, R. Di Leonardo, and M. Paoluzzi, First-passage time of run-and-tumble particles, Eur. Phys. J. E 37, 59 (2014).

[13] P. Singh and A. Kundu, Local time for run and tumble particle, Phys. Rev. E 103, 042119 (2021).

[14] J. Masoliver and G. H. Weiss, On the maximum displacement of a one-dimensional diffusion process described by the telegrapher's equation, Physica A 195, 93 (1993).

[15] D. Frydel, Intuitive view of entropy production of ideal run-and-tumble particles, Phys. Rev. E 105, 034113 (2022).

[16] P. Padmanabha, D. M. Busiello, A. Maritan, and D. Gupta, Fluctuations of entropy production of a run-and-tumble particle, Phys. Rev. E 107, 014129 (2023).

[17] A. Dhar, A. Kundu, S. N. Majumdar, S. Sabhapandit, and G. Schehr, Run-and-tumble particle in one-dimensional confining potentials: Steady-state, relaxation, and first-passage properties, Phys. Rev. E 99, 032132 (2019).

[18] U. Basu, S. N. Majumdar, A. Rosso, S. Sabhapandit, and G. Schehr, Exact stationary state of a run-and-tumble particle with three internal states in a harmonic trap, J. Phys. A: Math. Theor. 53, 09LT01 (2020).

[19] P. Le Doussal, S. N. Majumdar, and G. Schehr, Velocity and diffusion constant of an active particle in a one-dimensional force field, Europhys. Lett. 130, 40002 (2020).

[20] T. Arnoulx de Pirey and F. van Wijland, A run-and-tumble particle around a spherical obstacle: The steady-state distribution far-from-equilibrium, J. Stat. Mech. (2023) 093202.

[21] J. Masoliver, J. M. Porrà, and G. H. Weiss, Solutions of the telegrapher's equation in the presence of traps, Phys. Rev. A 45, 2222 (1992).

[22] L. Angelani, Run-and-tumble particles, telegrapher's equation and absorption problems with partially reflecting boundaries, J. Phys. A: Math. Theor. 48, 495003 (2015).

[23] P. C. Bressloff, Encounter-based model of a run-and-tumble particle II: Absorption at sticky boundaries, J. Stat. Mech. (2023) 043208.

[24] E. Woillez, Y. Zhao, Y. Kafri, V. Lecomte, and J. Tailleur, Activated escape of a self-propelled particle from a metastable state, Phys. Rev. Lett. 122, 258001 (2019).
[25] F. Detcheverry, Non-Poissonian run-and-turn motions, Europhys. Lett. **111**, 60002 (2015).

[26] D. S. Dean, S. N. Majumdar, and H. Schawe, Position distribution in a generalized run-and-tumble process, Phys. Rev. E **103**, 012130 (2021).

[27] E. Lauga and T. R. Powers, The hydrodynamics of swimming microorganisms, Rep. Prog. Phys. **72**, 096601 (2009).

[28] M. Polin, I. Tuval, K. Drescher, J. P. Gollub, and R. E. Goldstein, Chlamydomonas swims with two “gears” in a eukaryotic version of run-and-tumble locomotion, Science **325**, 487 (2009).

[29] M. R. Shaebani, Z. Sadjadi, I. M. Sokolov, H. Rieger, and L. Santen, Anomalous diffusion of self-propelled particles in directed random environments, Phys. Rev. E **90**, 030701(R) (2014).

[30] A. E. Hafner, L. Santen, H. Rieger, and M. R. Shaebani, Run-and-tumble dynamics of cytoskeletal motor proteins, Sci. Rep. **6**, 37162 (2016).

[31] K. F. Jarrell and M. J. McBride, The surprisingly diverse ways that prokaryotes move, Nat. Rev. Microbiol. **6**, 466 (2008).

[32] D. Selmeczi, L. Li, L. I. Pedersen, S. F. Nrrelykke, P. H. Hagedorn, S. Mosler, N. B. Larsen, E. C. Cox, and H. Flyvbjerg, Cell motility as random motion: A review, Eur. Phys. J.: Spec. Top. **157**, 1 (2008).

[33] D. Campos, V. Méndez, and I. Llopis, Persistent random motion: Uncovering cell migration dynamics, J. Theor. Biol. **267**, 526 (2010).

[34] V. Méndez, D. Campos, and F. Bartumeus, *Stochastic Foundations in Movement Ecology* (Springer-Verlag, Berlin, 2013).

[35] T. Bhattacharjee and S. S. Datta, Bacterial hopping and trapping in porous media, Nat. Commun. **10**, 2075 (2019).

[36] W. B. Whitman, D. C. Coleman, and W. J. Wiebe, Prokaryotes: The unseen majority, Proc. Natl. Acad. Sci. USA **95**, 6578 (1998).

[37] L. Ranjard and A. Richaume, Quantitative and qualitative microscale distribution of bacteria in soil, Res. Microbiol. **152**, 707 (2001).

[38] J. Kallmeyer, R. Pockalny, R. R. Adhikari, D. C. Smith, and S. D'Hondt, Global distribution of microbial abundance and biomass in subseafloor sediment, Proc. Natl. Acad. Sci. USA **109**, 16213 (2012).

[39] C. Jin and A. Sengupta, Microbes in porous environments: From active interactions to emergent feedback, arXiv:2311.11440.

[40] Q. Roveillo, J. Dervaux, Y. Wang, F. Rouyer, D. Zanchi, L. Seuront, and F. Elias, Trapping of swimming microalgae in foam, J. R. Soc. Interface **17**, 20200077 (2020).

[41] G. Li and J. X. Tang, Accumulation of microswimmers near a surface mediated by collision and rotational Brownian motion, Phys. Rev. Lett. **103**, 078101 (2009).

[42] J. Elgeti and G. Gompper, Microswimmers near surfaces, Eur. Phys. J.: Spec. Top. **225**, 2333 (2016).

[43] A. P. Berke, L. Turner, H. C. Berg, and E. Lauga, Hydrodynamic attraction of swimming microorganisms by surfaces, Phys. Rev. Lett. **101**, 038102 (2008).

[44] M. Theves, J. Taktikos, V. Zaburdaev, H. Stark, and C. Beta, Random walk patterns of a soil bacterium in open and confined environments, Europhys. Lett. **109**, 28007 (2015).

[45] P. Sartori, E. Chiarello, G. Jayaswal, M. Pierno, G. Mistura, P. Brun, A. Tiribocchi, and E. Orlandini, Wall accumulation of bacteria with different motility patterns, Phys. Rev. E **97**, 022610 (2018).

[46] C. F. Lee, Active particles under confinement: Aggregation at the wall and gradient formation inside a channel, New J. Phys. **15**, 055007 (2013).

[47] J. Elgeti and G. Gompper, Wall accumulation of self-propelled spheres, Europhys. Lett. **101**, 48003 (2013).

[48] B. Ezhilan, R. Alonso-Matilla, and D. Saintillan, On the distribution and swim pressure of run-and-tumble particles in confinement, J. Fluid Mech. **781**, R4 (2015).

[49] C. G. Wagner, M. F. Hagan, and A. Baskaran, Steady-state distributions of ideal active Brownian particles under confinement and forcing, J. Stat. Mech. (2017) 043203.

[50] A. Duzgun and J. V. Selinger, Active Brownian particles near straight or curved walls: Pressure and boundary layers, Phys. Rev. E **97**, 032606 (2018).

[51] C. G. Wagner, M. F. Hagan, and A. Baskaran, Steady states of active Brownian particles interacting with boundaries, J. Stat. Mech. (2022) 013208.

[52] V. A. Shaik, Z. Peng, J. F. Brady, and G. J. Elfring, Confined active matter in external fields, Soft Matter **19**, 1384 (2023).

[53] E. Q. Z. Moen, K. S. Olsen, J. Rønning, and L. Angheluta, Trapping of active Brownian and run-and-tumble particles: A first-passage time approach, Phys. Rev. Res. **4**, 043012 (2022).

[54] L. Angelani, Confined run-and-tumble swimmers in one dimension, J. Phys. A: Math. Theor. **50**, 325601 (2017).

[55] D. Frydel, The run-and-tumble particle model with four-states: Exact solution at zero temperature, Phys. Fluids **34**, 027111 (2022).

[56] C. Roberts and G. Pruessner, Exact solution of a boundary tumbling particle system in one dimension, Phys. Rev. Res. **4**, 033234 (2022).

[57] J. Elgeti and G. Gompper, Run-and-tumble dynamics of self-propelled particles in confinement, Europhys. Lett. **109**, 58003 (2015).

[58] T. Zhou, Z. Peng, M. Gulian, and J. F. Brady, Distribution and pressure of active Lévy swimmers under confinement, J. Phys. A: Math. Theor. **54**, 275002 (2021).

[59] C. Reichhardt and C. J. Olson Reichhardt, Active matter transport and jamming on disordered landscapes, Phys. Rev. E **90**, 012701 (2014).

[60] K. J. Duffy, P. T. Cummings, and R. M. Ford, Random walk calculations for bacterial migration in porous media, Biophys. J. **68**, 800 (1995).

[61] N. A. Licata, B. Mohari, C. Fuqua, and S. Setayeshgar, Diffusion of bacterial cells in porous media, Biophys. J. **110**, 247 (2016).

[62] L. J. Perez, T. Bhattacharjee, S. S. Datta, R. Parashar, and N. L. Sund, Impact of confined geometries on hopping and trapping of motile bacteria in porous media, Phys. Rev. E **103**, 012611 (2021).

[63] C. Kurzthaler, S. Mandal, T. Bhattacharjee, H. Löwen, S. S. Datta, and H. A. Stone, A geometric criterion for the optimal spreading of active polymers in porous media, Nat. Commun. **12**, 7088 (2021).

[64] E. Irani, Z. Mokhtari, and A. Zippelius, Dynamics of bacteria scanning a porous environment, Phys. Rev. Lett. **128**, 144501 (2022).

[65] H. H. Mattingly, Bacterial diffusion in disordered media, by forgetting the media, arXiv:2311.10612.
[25] F. Detcheverry, Non-Poissonian run-and-turn motions, Europhys. Lett. **111**, 60002 (2015).

[26] D. S. Dean, S. N. Majumdar, and H. Schawe, Position distribution in a generalized run-and-tumble process, Phys. Rev. E **103**, 012130 (2021).

[27] E. Lauga and T. R. Powers, The hydrodynamics of swimming microorganisms, Rep. Prog. Phys. **72**, 096601 (2009).

[28] M. Polin, I. Tuval, K. Drescher, J. P. Gollub, and R. E. Goldstein, Chlamydomonas swims with two "gears" in a eukaryotic version of run-and-tumble locomotion, Science **325**, 487 (2009).

[29] M. R. Shaebani, Z. Sadjadi, I. M. Sokolov, H. Rieger, and L. Santen, Anomalous diffusion of self-propelled particles in directed random environments, Phys. Rev. E **90**, 030701(R) (2014).

[30] A. E. Hafner, L. Santen, H. Rieger, and M. R. Shaebani, Run-and-tumble dynamics of cytoskeletal motor proteins, Sci. Rep. **6**, 37162 (2016).

[31] K. F. Jarrell and M. J. McBride, The surprisingly diverse ways that prokaryotes move, Nat. Rev. Microbiol. **6**, 466 (2008).

[32] D. Selmeczi, L. Li, L. I. Pedersen, S. F. Nrrelykke, P. H. Hagedorn, S. Mosler, N. B. Larsen, E. C. Cox, and H. Flyvbjerg, Cell motility as random motion: A review, Eur. Phys. J.: Spec. Top. **157**, 1 (2008).

[33] D. Campos, V. Méndez, and I. Llopis, Persistent random motion: Uncovering cell migration dynamics, J. Theor. Biol. **267**, 526 (2010).

[34] V. Méndez, D. Campos, and F. Bartumeus, *Stochastic Foundations in Movement Ecology* (Springer-Verlag, Berlin, 2013).

[35] T. Bhattacharjee and S. S. Datta, Bacterial hopping and trapping in porous media, Nat. Commun. **10**, 2075 (2019).

[36] W. B. Whitman, D. C. Coleman, and W. J. Wiebe, Prokaryotes: The unseen majority, Proc. Natl. Acad. Sci. USA **95**, 6578 (1998).

[37] L. Ranjard and A. Richaume, Quantitative and qualitative microscale distribution of bacteria in soil, Res. Microbiol. **152**, 707 (2001).

[38] J. Kallmeyer, R. Pockalny, R. R. Adhikari, D. C. Smith, and S. D'Hondt, Global distribution of microbial abundance and biomass in subseafloor sediment, Proc. Natl. Acad. Sci. USA **109**, 16213 (2012).

[39] C. Jin and A. Sengupta, Microbes in porous environments: From active interactions to emergent feedback, arXiv:2311.11440.

[40] Q. Roveillo, J. Dervaux, Y. Wang, F. Rouyer, D. Zanchi, L. Seuront, and F. Elias, Trapping of swimming microalgae in foam, J. R. Soc. Interface **17**, 20200077 (2020).

[41] G. Li and J. X. Tang, Accumulation of microswimmers near a surface mediated by collision and rotational Brownian motion, Phys. Rev. Lett. **103**, 078101 (2009).

[42] J. Elgeti and G. Gompper, Microswimmers near surfaces, Eur. Phys. J.: Spec. Top. **225**, 2333 (2016).

[43] A. P. Berke, L. Turner, H. C. Berg, and E. Lauga, Hydrodynamic attraction of swimming microorganisms by surfaces, Phys. Rev. Lett. **101**, 038102 (2008).

[44] M. Theves, J. Taktikos, V. Zaburdaev, H. Stark, and C. Beta, Random walk patterns of a soil bacterium in open and confined environments, Europhys. Lett. **109**, 28007 (2015).

[45] P. Sartori, E. Chiarello, G. Jayaswal, M. Pierno, G. Mistura, P. Brun, A. Tiribocchi, and E. Orlandini, Wall accumulation of bacteria with different motility patterns, Phys. Rev. E **97**, 022610 (2018).

[46] C. F. Lee, Active particles under confinement: Aggregation at the wall and gradient formation inside a channel, New J. Phys. **15**, 055007 (2013).

[47] J. Elgeti and G. Gompper, Wall accumulation of self-propelled spheres, Europhys. Lett. **101**, 48003 (2013).

[48] B. Ezhilan, R. Alonso-Matilla, and D. Saintillan, On the distribution and swim pressure of run-and-tumble particles in confinement, J. Fluid Mech. **781**, R4 (2015).

[49] C. G. Wagner, M. F. Hagan, and A. Baskaran, Steady-state distributions of ideal active Brownian particles under confinement and forcing, J. Stat. Mech. (2017) 043203.

[50] A. Duzgun and J. V. Selinger, Active Brownian particles near straight or curved walls: Pressure and boundary layers, Phys. Rev. E **97**, 032606 (2018).

[51] C. G. Wagner, M. F. Hagan, and A. Baskaran, Steady states of active Brownian particles interacting with boundaries, J. Stat. Mech. (2022) 013208.

[52] V. A. Shaik, Z. Peng, J. F. Brady, and G. J. Elfring, Confined active matter in external fields, Soft Matter **19**, 1384 (2023).

[53] E. Q. Z. Moen, K. S. Olsen, J. Rønning, and L. Angheluta, Trapping of active Brownian and run-and-tumble particles: A first-passage time approach, Phys. Rev. Res. **4**, 043012 (2022).

[54] L. Angelani, Confined run-and-tumble swimmers in one dimension, J. Phys. A: Math. Theor. **50**, 325601 (2017).

[55] D. Frydel, The run-and-tumble particle model with four-states: Exact solution at zero temperature, Phys. Fluids **34**, 027111 (2022).

[56] C. Roberts and G. Pruessner, Exact solution of a boundary tumbling particle system in one dimension, Phys. Rev. Res. **4**, 033234 (2022).

[57] J. Elgeti and G. Gompper, Run-and-tumble dynamics of self-propelled particles in confinement, Europhys. Lett. **109**, 58003 (2015).

[58] T. Zhou, Z. Peng, M. Gulian, and J. F. Brady, Distribution and pressure of active Lévy swimmers under confinement, J. Phys. A: Math. Theor. **54**, 275002 (2021).

[59] C. Reichhardt and C. J. Olson Reichhardt, Active matter transport and jamming on disordered landscapes, Phys. Rev. E **90**, 012701 (2014).

[60] K. J. Duffy, P. T. Cummings, and R. M. Ford, Random walk calculations for bacterial migration in porous media, Biophys. J. **68**, 800 (1995).

[61] N. A. Licata, B. Mohari, C. Fuqua, and S. Setayeshgar, Diffusion of bacterial cells in porous media, Biophys. J. **110**, 247 (2016).

[62] L. J. Perez, T. Bhattacharjee, S. S. Datta, R. Parashar, and N. L. Sund, Impact of confined geometries on hopping and trapping of motile bacteria in porous media, Phys. Rev. E **103**, 012611 (2021).

[63] C. Kurzthaler, S. Mandal, T. Bhattacharjee, H. Löwen, S. S. Datta, and H. A. Stone, A geometric criterion for the optimal spreading of active polymers in porous media, Nat. Commun. **12**, 7088 (2021).

[64] E. Irani, Z. Mokhtari, and A. Zippelius, Dynamics of bacteria scanning a porous environment, Phys. Rev. Lett. **128**, 144501 (2022).

[65] H. H. Mattingly, Bacterial diffusion in disordered media, by forgetting the media, arXiv:2311.10612.
[66] H. Chen and J. L. Thiffeault, Shape matters: A Brownian microswimmer in a channel, *J. Fluid Mech.* **916**, A15 (2021).

[67] C. Lohrmann and C. Holm, Optimal motility strategies for self-propelled agents to explore porous media, *Phys. Rev. E* **108**, 054401 (2023).

[68] I. Santra, U. Basu, and S. Sabhapandit, Run-and-tumble particles in two dimensions: Marginal position distributions, *Phys. Rev. E* **101**, 062120 (2020).

[69] L. Angelani, Orthogonal run-and-tumble walks, *J. Stat. Mech.* (2022) 123207.

[70] F. Cinque and E. Orsingher, Stochastic dynamics of generalized planar random motions with orthogonal directions, *J. Theor. Prob.* **36**, 2229 (2023).

[71] R. Mallikarjun and A. Pal, Chiral run-and-tumble walker: Transport and optimizing search, *Physica A* **622**, 128821 (2023).

[72] This kind of motion is also known as a Telegraph process [74–78].

[73] $\theta_{\text{turn}}$ is the angle between the direction of motion before the tumble and the direction after the tumble.

[74] S. Goldstein, On diffusion by discontinuous movements, and on the telegraph equation, *Q. J. Mech. Appl. Math.* **4**, 129 (1951).

[75] M. Kac, A stochastic model related to the telegrapher's equation, *Rocky Mountain J. Math.* **4**, 497 (1974).

[76] G. Weiss, Some applications of persistent random walks and the telegrapher's equation, *Physica A* **311**, 381 (2002).

[77] D. Joseph, Heat waves, *Rev. Mod. Phys.* **61**, 41 (1989).

[78] J. Masoliver and G. Weiss, Finite-velocity diffusion, *Eur. J. Phys.* **17**, 190 (1996).

[79] Since the unit time is $w/v_0$, rates such as $\mu$ are made dimensionless with $v_0/w$.

[80] This choice of initial condition is for simplicity and has no influence on the long-time diffusion coefficient.

[81] K. Gustafson and T. Abe, The third boundary condition—Was it Robin's? *Math. Intell.* **20**, 63 (1998).

[82] First, a symbolic computation software is used to solve the matricial system with the chosen initial conditions $[R_{\text{in}}(q, k) = 1/4$ and a similar result for $L_{\text{in}}, U_{\text{in}}$ and $D_{\text{in}}]$. Second, the equation of $f(k)$ is converted to a differential equation for $f(z)$ using the properties of the Fourier transform.

[83] M. Molaei, M. Barry, R. Stocker, and J. Sheng, Failed escape: Solid surfaces prevent tumbling of *Escherichia coli*, *Phys. Rev. Lett.* **113**, 068103 (2014).

[84] G. Junot, T. Darnige, A. Lindner, V. A. Martinez, J. Arlt, A. Dawson, W. C. K. Poon, H. Auradou, and E. Clément, Run-to-Tumble variability controls the surface residence times of *E. coli* bacteria, *Phys. Rev. Lett.* **128**, 248101 (2022).

[85] Y. Kinosita, Y. Kikuchi, N. Mikami, D. Nakane, and T. Nishizaka, Unforeseen swimming and gliding mode of an insect gut symbiont, *Burkholderia* sp. RPE64, with wrapping of the flagella around its cell body, *ISME J.* **12**, 838 (2018).

[86] M. J. Kühn, F. K. Schmidt, B. Eckhardt, and K. M. Thormann, Bacteria exploit a polymorphic instability of the flagellar filament to escape from traps, *Proc. Natl. Acad. Sci. USA* **114**, 6340 (2017).

[87] E. Lauga, W. R. DiLuzio, G. M. Whitesides, and H. A. Stone, Swimming in circles: Motion of bacteria near solid boundaries, *Biophys. J.* **90**, 400 (2006).

[88] S. Bianchi, F. Saglimbeni, and R. Di Leonardo, Holographic imaging reveals the mechanism of wall entrapment in swimming bacteria, *Phys. Rev. X* **7**, 011010 (2017).

[89] S. M. Mousavi, G. Gompper, and R. G. Winkler, Wall entrapment of peritrichous bacteria: A mesoscale hydrodynamics simulation study, *Soft Matter* **16**, 4866 (2020).

[90] E. P. Ipiña, S. Otte, R. Pontier-Bres, D. Czerucka, and F. Peruani, Bacteria display optimal transport near surfaces, *Nat. Phys.* **15**, 610 (2019).

[91] K. Ishimoto, Bacterial spinning top, *J. Fluid Mech.* **880**, 620 (2019).

[92] D. Das and E. Lauga, Transition to bound states for bacteria swimming near surfaces, *Phys. Rev. E* **100**, 043117 (2019).

[93] M. Contino, E. Lushi, I. Tuval, V. Kantsler, and M. Polin, Microalgae scatter off solid surfaces by hydrodynamic and contact forces, *Phys. Rev. Lett.* **115**, 258102 (2015).

[94] T. Jakuszeit and O. A. Croze, The role of tumbling in bacterial scattering at convex obstacles, *arXiv:2309.04326*.

[95] M. Qi, X. Gong, B. Wu, and G. Zhang, Landing dynamics of swimming bacteria on a polymeric surface: Effect of surface properties, *Langmuir* **33**, 3525 (2017).

[96] M. Souzy, A. Allard, J. F. Louf, M. Contino, I. Tuval, and M. Polin, Microbial narrow-escape is facilitated by wall interactions, *Phys. Rev. Res.* **4**, L022029 (2022).

[97] C. Feng, J. J. Molina, M. S. Turner, and R. Yamamoto, Dynamics of microswimmers near a soft penetrable interface, *Phys. Rev. Res.* **4**, 043202 (2022).

[98] Equivalently, on can match the resulting contribution to the translation diffusion coefficient $D_{\text{rot}} = v_0^2 \tau_r / 2$.

[99] In particular, we use $\alpha_{\text{mod}} = (\lambda_{\text{f,mod}} - \lambda_{\text{r,mod}})/\lambda_{\text{mod}}$, with $\lambda_{\text{f,mod}} = \lambda_{\text{f}} + \tau_r^{-1/4}$ and $\lambda_{\text{r,mod}} = \lambda_{\text{r}} + \tau_r^{-1/4}$.

[100] F. Detcheverry, Unimodal and bimodal random motions of independent exponential steps, *Eur. Phys. J. E* **37**, 114 (2014).

[101] Diffusive motion is reached in taking the limit $\bar{\lambda} \to \infty$ while keeping $\bar{v}^2/\bar{\lambda}$ finite.

[102] In the limit $W \to 0$, the particle encounters the opposite wall immediately after the escape and since the direction of motion is randomized on hitting the wall, the resulting effect is exactly that of a surface tumble.

[103] In particular, when a particle hits the wall, the subsequent direction of motion along the wall is still chosen at random. While such a behavior is not expected for bacteria landing on a flat smooth surface, it remains the simplest behavior to consider in a generic model.

[104] No other unit is required since our description is purely kinematic.

[105] Assuming a mean-square displacement $M(t) \sim t^\nu$, the exponent $\nu$ was found to be $1 \pm 0.02$.

[106] J. Saragosti, P. Silberzan, and A. Buguin, Modeling *E. coli* tumbles by rotational diffusion. Implications for chemotaxis, *PLoS ONE* **7**, 35412 (2012).

[107] Specifically, for fixed values of $\alpha$ and $\mu$, the numerical data for $D(\lambda)$ is fitted with $D_r$ as free parameter.

[108] Here we consider the 960 parameter combinations where the particle is motionless at the wall. Indeed, the case with motion at the wall can not be considered in a similar manner, because of the random sampling of the parameter space. However, the correction still applies because it is independent from motion at the wall.
[66] H. Chen and J. L. Thiffeault, Shape matters: A Brownian microswimmer in a channel, *J. Fluid Mech.* **916**, A15 (2021).

[67] C. Lohrmann and C. Holm, Optimal motility strategies for self-propelled agents to explore porous media, *Phys. Rev. E* **108**, 054401 (2023).

[68] I. Santra, U. Basu, and S. Sabhapandit, Run-and-tumble particles in two dimensions: Marginal position distributions, *Phys. Rev. E* **101**, 062120 (2020).

[69] L. Angelani, Orthogonal run-and-tumble walks, *J. Stat. Mech.* (2022) 123207.

[70] F. Cinque and E. Orsingher, Stochastic dynamics of generalized planar random motions with orthogonal directions, *J. Theor. Prob.* **36**, 2229 (2023).

[71] R. Mallikarjun and A. Pal, Chiral run-and-tumble walker: Transport and optimizing search, *Physica A* **622**, 128821 (2023).

[72] This kind of motion is also known as a Telegraph process [74–78].

[73] $\theta_{\text{turn}}$ is the angle between the direction of motion before the tumble and the direction after the tumble.

[74] S. Goldstein, On diffusion by discontinuous movements, and on the telegraph equation, *Q. J. Mech. Appl. Math.* **4**, 129 (1951).

[75] M. Kac, A stochastic model related to the telegrapher's equation, *Rocky Mountain J. Math.* **4**, 497 (1974).

[76] G. Weiss, Some applications of persistent random walks and the telegrapher's equation, *Physica A* **311**, 381 (2002).

[77] D. Joseph, Heat waves, *Rev. Mod. Phys.* **61**, 41 (1989).

[78] J. Masoliver and G. Weiss, Finite-velocity diffusion, *Eur. J. Phys.* **17**, 190 (1996).

[79] Since the unit time is $w/v_0$, rates such as $\mu$ are made dimensionless with $v_0/w$.

[80] This choice of initial condition is for simplicity and has no influence on the long-time diffusion coefficient.

[81] K. Gustafson and T. Abe, The third boundary condition—Was it Robin's? *Math. Intell.* **20**, 63 (1998).

[82] First, a symbolic computation software is used to solve the matricial system with the chosen initial conditions $[R_{\text{in}}(q, k) = 1/4$ and a similar result for $L_{\text{in}}, U_{\text{in}}$ and $D_{\text{in}}]$. Second, the equation of $f(k)$ is converted to a differential equation for $f(z)$ using the properties of the Fourier transform.

[83] M. Molaei, M. Barry, R. Stocker, and J. Sheng, Failed escape: Solid surfaces prevent tumbling of *Escherichia coli*, *Phys. Rev. Lett.* **113**, 068103 (2014).

[84] G. Junot, T. Darnige, A. Lindner, V. A. Martinez, J. Arlt, A. Dawson, W. C. K. Poon, H. Auradou, and E. Clément, Run-to-Tumble variability controls the surface residence times of *E. coli* bacteria, *Phys. Rev. Lett.* **128**, 248101 (2022).

[85] Y. Kinosita, Y. Kikuchi, N. Mikami, D. Nakane, and T. Nishizaka, Unforeseen swimming and gliding mode of an insect gut symbiont, *Burkholderia* sp. RPE64, with wrapping of the flagella around its cell body, *ISME J.* **12**, 838 (2018).

[86] M. J. Kühn, F. K. Schmidt, B. Eckhardt, and K. M. Thormann, Bacteria exploit a polymorphic instability of the flagellar filament to escape from traps, *Proc. Natl. Acad. Sci. USA* **114**, 6340 (2017).

[87] E. Lauga, W. R. DiLuzio, G. M. Whitesides, and H. A. Stone, Swimming in circles: Motion of bacteria near solid boundaries, *Biophys. J.* **90**, 400 (2006).

[88] S. Bianchi, F. Saglimbeni, and R. Di Leonardo, Holographic imaging reveals the mechanism of wall entrapment in swimming bacteria, *Phys. Rev. X* **7**, 011010 (2017).

[89] S. M. Mousavi, G. Gompper, and R. G. Winkler, Wall entrapment of peritrichous bacteria: A mesoscale hydrodynamics simulation study, *Soft Matter* **16**, 4866 (2020).

[90] E. P. Ipiña, S. Otte, R. Pontier-Bres, D. Czerucka, and F. Peruani, Bacteria display optimal transport near surfaces, *Nat. Phys.* **15**, 610 (2019).

[91] K. Ishimoto, Bacterial spinning top, *J. Fluid Mech.* **880**, 620 (2019).

[92] D. Das and E. Lauga, Transition to bound states for bacteria swimming near surfaces, *Phys. Rev. E* **100**, 043117 (2019).

[93] M. Contino, E. Lushi, I. Tuval, V. Kantsler, and M. Polin, Microalgae scatter off solid surfaces by hydrodynamic and contact forces, *Phys. Rev. Lett.* **115**, 258102 (2015).

[94] T. Jakuszeit and O. A. Croze, The role of tumbling in bacterial scattering at convex obstacles, *arXiv:2309.04326*.

[95] M. Qi, X. Gong, B. Wu, and G. Zhang, Landing dynamics of swimming bacteria on a polymeric surface: Effect of surface properties, *Langmuir* **33**, 3525 (2017).

[96] M. Souzy, A. Allard, J. F. Louf, M. Contino, I. Tuval, and M. Polin, Microbial narrow-escape is facilitated by wall interactions, *Phys. Rev. Res.* **4**, L022029 (2022).

[97] C. Feng, J. J. Molina, M. S. Turner, and R. Yamamoto, Dynamics of microswimmers near a soft penetrable interface, *Phys. Rev. Res.* **4**, 043202 (2022).

[98] Equivalently, on can match the resulting contribution to the translation diffusion coefficient $D_{\text{rot}} = v_0^2 \tau_r / 2$.

[99] In particular, we use $\alpha_{\text{mod}} = (\lambda_{\text{f,mod}} - \lambda_{\text{r,mod}})/\lambda_{\text{mod}}$, with $\lambda_{\text{f,mod}} = \lambda_{\text{f}} + \tau_r^{-1/4}$ and $\lambda_{\text{r,mod}} = \lambda_{\text{r}} + \tau_r^{-1/4}$.

[100] F. Detcheverry, Unimodal and bimodal random motions of independent exponential steps, *Eur. Phys. J. E* **37**, 114 (2014).

[101] Diffusive motion is reached in taking the limit $\bar{\lambda} \to \infty$ while keeping $\bar{v}^2/\bar{\lambda}$ finite.

[102] In the limit $W \to 0$, the particle encounters the opposite wall immediately after the escape and since the direction of motion is randomized on hitting the wall, the resulting effect is exactly that of a surface tumble.

[103] In particular, when a particle hits the wall, the subsequent direction of motion along the wall is still chosen at random. While such a behavior is not expected for bacteria landing on a flat smooth surface, it remains the simplest behavior to consider in a generic model.

[104] No other unit is required since our description is purely kinematic.

[105] Assuming a mean-square displacement $M(t) \sim t^\nu$, the exponent $\nu$ was found to be $1 \pm 0.02$.

[106] J. Saragosti, P. Silberzan, and A. Buguin, Modeling *E. coli* tumbles by rotational diffusion. Implications for chemotaxis, *PLoS ONE* **7**, 35412 (2012).

[107] Specifically, for fixed values of $\alpha$ and $\mu$, the numerical data for $D(\lambda)$ is fitted with $D_r$ as free parameter.

[108] Here we consider the 960 parameter combinations where the particle is motionless at the wall. Indeed, the case with motion at the wall can not be considered in a similar manner, because of the random sampling of the parameter space. However, the correction still applies because it is independent from motion at the wall.
[109] Factor $2/\pi$ appears recurrently in the problem, see Appendix B for instance. Besides, consider a particle arriving with angle $\theta$ and leaving with angle $\theta'$, where notations are those of Fig. 10. Assuming both angles are isotropically distributed, the orientation correlation is the average of $\cos(\theta' - \theta)$, giving $4/\pi^2$.

[110] C. Kurzthaler, Y. Zhao, N. Zhou, J. Schwarz-Linek, C. Devailly, J. Arlt, J.-D. Huang, W. C. K. Poon, T. Franosch, J. Tailleur, and V. A. Martinez, Characterization and control of the run-and-tumble dynamics of *Escherichia coli*, Phys. Rev. Lett. 132, 038302 (2024).

[111] In the limit $\tau_m = \infty$, the diffusion coefficient is $D = \tau_t \bar{v}^2$, a value controlled by the rotational diffusion and surface velocity.

[112] T. Bhattacharjee and S. S. Datta, Confinement and activity regulate bacterial motion in porous media, Soft Matter 15, 9920 (2019).

[113] Here, we took $\tau_r = 1/2D_r$ for tridimensional systems and $D_r = 0.2 \text{ s}^{-1}$ [114].

[114] J. Taktikos, H. Stark, and V. Zaburdaev, How the motility pattern of bacteria affects their dispersal and chemotaxis, PLoS ONE 8, 81936 (2013).

[115] A. F. Rosenthal, J. S. Griffin, M. Wagner, A. I. Packman, O. Balogun, and G. F. Wells, Morphological analysis of pore size and connectivity in a thick mixed-culture biofilm, Biotechnol. Bioeng. 115, 2268 (2018).

[116] N. R. Lang, S. Münster, C. Metzner, P. Krauss, S. Schürmann, J. Lange, K. E. Aifantis, O. Friedrich, and B. Fabry, Estimating the 3D pore size distribution of biopolymer networks from directionally biased data, Biophys. J. 105, 1967 (2013).

[117] W. B. Lindquist, A. Venkatarangan, J. R. Dunsmuir, and T.-F. Wong, Pore and throat size distributions measured from synchrotron x-ray tomographic images of Fontainebleau sandstones, J. Geophys. Res. 105, 21509 (2000).

[118] H. Minagawa, Y. Nishikawa, I. Ikeda, K. Miyazaki, N. Takahara, Y. Sakamoto, T. Komai, and H. Nairta, Characterization of sand sediment by pore size distribution and permeability using proton nuclear magnetic resonance measurement, J. Geophys. Res. 113, B07210 (2008).

[119] J. H. Görres, M. C. Savin, and J. A. Amador, Soil micropore structure and carbon mineralization in burrows and casts of an anecic earthworm (*Lumbricus terrestris*), Soil Biol. Biochem. 33, 1881 (2001).

[120] L. Bosgraaf and P. J. M. Van Haastert, The ordered extension of pseudopodia by amoeboid cells in the absence of external cues, PLoS ONE 4, e5253 (2009).

[121] Z. Eidi, Discrete modeling of amoeboid locomotion and chemotaxis in *Dictyostelium discoideum* by tracking pseudopodium growth direction, Sci. Rep. 7, 12675 (2017).

[122] A. A. Potdar, J. Jeon, A. M. Weaver, V. Quaranta, and P. T. Cummings, Human mammary epithelial cells exhibit a bimodal correlated random walk pattern, PLoS ONE 5, e9636 (2010).

[123] J. D'Alessandro, A. P. Solon, Y. Hayakawa, C. Anjard, F. Detcheverry, J.-P. Rieu, and C. Rivière, Contact enhancement of locomotion in spreading cell colonies, Nat. Phys. 13, 999 (2017).

[124] As estimated from the mean chord length.

[125] Note that in our model, the escape direction is isotropically distributed, which does not correspond exactly to the reverse event considered in Ref. [67].

[126] G. Vizsnyiczai, G. Frangipane, S. Bianchi, F. Saglimbeni, D. Dell'Arciprete, and R. Di Leonardo, A transition to stable one-dimensional swimming enhances *E. coli* motility through narrow channels, Nat. Commun. 11, 2340 (2020).

[127] E. Korobkova, T. Emonet, J. Vilar, T. Shimizu, and P. Cluzel, From molecular noise to behavioural variability in a single bacterium, Nature (London) 428, 574 (2004).

[128] F. Detcheverry, Generalized run-and-turn motions: From bacteria to Lévy walks, Phys. Rev. E 96, 012415 (2017).

[129] A. V. Chechkin, I. M. Zaid, M. A. Lomholt, I. M. Sokolov, and R. Metzler, Bulk-mediated diffusion on a planar surface: Full solution, Phys. Rev. E 86, 041101 (2012).

[130] A. Alexandre, M. Mangeat, T. Guérin, and D. S. Dean, How stickiness can speed up diffusion in confined systems, Phys. Rev. Lett. 128, 210601 (2022).

[131] O. Bénichou, D. Grebenkov, P. Levitz, C. Loverdo, and R. Voituriez, Optimal reaction time for surface-mediated diffusion, Phys. Rev. Lett. 105, 150606 (2010).
[109] Factor $2/\pi$ appears recurrently in the problem, see Appendix B for instance. Besides, consider a particle arriving with angle $\theta$ and leaving with angle $\theta'$, where notations are those of Fig. 10. Assuming both angles are isotropically distributed, the orientation correlation is the average of $\cos(\theta' - \theta)$, giving $4/\pi^2$.

[110] C. Kurzthaler, Y. Zhao, N. Zhou, J. Schwarz-Linek, C. Devailly, J. Arlt, J.-D. Huang, W. C. K. Poon, T. Franosch, J. Tailleur, and V. A. Martinez, Characterization and control of the run-and-tumble dynamics of *Escherichia coli*, Phys. Rev. Lett. 132, 038302 (2024).

[111] In the limit $\tau_m = \infty$, the diffusion coefficient is $D = \tau_t \bar{v}^2$, a value controlled by the rotational diffusion and surface velocity.

[112] T. Bhattacharjee and S. S. Datta, Confinement and activity regulate bacterial motion in porous media, Soft Matter 15, 9920 (2019).

[113] Here, we took $\tau_r = 1/2D_r$ for tridimensional systems and $D_r = 0.2 \text{ s}^{-1}$ [114].

[114] J. Taktikos, H. Stark, and V. Zaburdaev, How the motility pattern of bacteria affects their dispersal and chemotaxis, PLoS ONE 8, 81936 (2013).

[115] A. F. Rosenthal, J. S. Griffin, M. Wagner, A. I. Packman, O. Balogun, and G. F. Wells, Morphological analysis of pore size and connectivity in a thick mixed-culture biofilm, Biotechnol. Bioeng. 115, 2268 (2018).

[116] N. R. Lang, S. Münster, C. Metzner, P. Krauss, S. Schürmann, J. Lange, K. E. Aifantis, O. Friedrich, and B. Fabry, Estimating the 3D pore size distribution of biopolymer networks from directionally biased data, Biophys. J. 105, 1967 (2013).

[117] W. B. Lindquist, A. Venkatarangan, J. R. Dunsmuir, and T.-F. Wong, Pore and throat size distributions measured from synchrotron x-ray tomographic images of Fontainebleau sandstones, J. Geophys. Res. 105, 21509 (2000).

[118] H. Minagawa, Y. Nishikawa, I. Ikeda, K. Miyazaki, N. Takahara, Y. Sakamoto, T. Komai, and H. Nairta, Characterization of sand sediment by pore size distribution and permeability using proton nuclear magnetic resonance measurement, J. Geophys. Res. 113, B07210 (2008).

[119] J. H. Görres, M. C. Savin, and J. A. Amador, Soil micropore structure and carbon mineralization in burrows and casts of an anecic earthworm (*Lumbricus terrestris*), Soil Biol. Biochem. 33, 1881 (2001).

[120] L. Bosgraaf and P. J. M. Van Haastert, The ordered extension of pseudopodia by amoeboid cells in the absence of external cues, PLoS ONE 4, e5253 (2009).

[121] Z. Eidi, Discrete modeling of amoeboid locomotion and chemotaxis in *Dictyostelium discoideum* by tracking pseudopodium growth direction, Sci. Rep. 7, 12675 (2017).

[122] A. A. Potdar, J. Jeon, A. M. Weaver, V. Quaranta, and P. T. Cummings, Human mammary epithelial cells exhibit a bimodal correlated random walk pattern, PLoS ONE 5, e9636 (2010).

[123] J. D'Alessandro, A. P. Solon, Y. Hayakawa, C. Anjard, F. Detcheverry, J.-P. Rieu, and C. Rivière, Contact enhancement of locomotion in spreading cell colonies, Nat. Phys. 13, 999 (2017).

[124] As estimated from the mean chord length.

[125] Note that in our model, the escape direction is isotropically distributed, which does not correspond exactly to the reverse event considered in Ref. [67].

[126] G. Vizsnyiczai, G. Frangipane, S. Bianchi, F. Saglimbeni, D. Dell'Arciprete, and R. Di Leonardo, A transition to stable one-dimensional swimming enhances *E. coli* motility through narrow channels, Nat. Commun. 11, 2340 (2020).

[127] E. Korobkova, T. Emonet, J. Vilar, T. Shimizu, and P. Cluzel, From molecular noise to behavioural variability in a single bacterium, Nature (London) 428, 574 (2004).

[128] F. Detcheverry, Generalized run-and-turn motions: From bacteria to Lévy walks, Phys. Rev. E 96, 012415 (2017).

[129] A. V. Chechkin, I. M. Zaid, M. A. Lomholt, I. M. Sokolov, and R. Metzler, Bulk-mediated diffusion on a planar surface: Full solution, Phys. Rev. E 86, 041101 (2012).

[130] A. Alexandre, M. Mangeat, T. Guérin, and D. S. Dean, How stickiness can speed up diffusion in confined systems, Phys. Rev. Lett. 128, 210601 (2022).

[131] O. Bénichou, D. Grebenkov, P. Levitz, C. Loverdo, and R. Voituriez, Optimal reaction time for surface-mediated diffusion, Phys. Rev. Lett. 105, 150606 (2010).