{'fraction_non_alphanumeric': 0.03363049317103835, 'fraction_numerical': 0.006514657980456026, 'mean_word_length': 4.624136268680701, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
The Bacterial Chemotactic Response Reflects a Compromise Between Transient and Steady State Behavior

Swimming bacteria detect chemical gradients by performing temporal comparisons of recent measurements of chemical concentration. These comparisons are described quantitatively by the chemotactic response function, which we expect to optimize chemotactic behavioral performance. We identify two independent chemotactic performance criteria: in the short run, a favorable response function should move bacteria up chemoattractant gradients, while in the long run, bacteria should aggregate at peaks of chemoattractant concentration. Surprisingly, these two criteria conflict, so that when one performance criterion is most favorable, the other is unfavorable. Since both types of behavior are biologically relevant, we include both behaviors in a composite optimization that yields a response function that closely resembles experimental measurements. Our work suggests that the bacterial chemotactic response function can be derived from simple behavioral considerations, and sheds light on how the response function contributes to chemotactic performance.


Introduction
The bacterium E. coli moves up gradients to regions of high chemoattractant concentration by performing a biased random walk. The random walk consists of alternating runs (periods of forward movement) and tumbles (sudden reorientations) that arise from changes in flagellar rotation [1,2]. When the flagella rotate counter clockwise, they form a bundle and the bacterium swims more or less in a straight line at a roughly uniform speed. When one or more flagella rotate clockwise, they leave the bundle and the bacterium tumbles, randomly re-orienting itself [3,4]. Bacteria bias the random walk by modulating the run duration in response to measurements of chemoattractant concentration that are made at the cell surface [5,6]. They do not perform spatial comparisons between points along the cell body because of the fast diffusion across such short distances [7].
The chemotactic response function describes how bacteria process concentration measurements to produce their behavioral run-biasing decisions. It has been measured experimentally by monitoring the rotation of single flagella on bacteria stimulated by instantaneous chemoattractant pulses [8]. The empirical response function is biphasic: the pulse provokes an immediate brief elevation of the counter clockwise probability immediately followed by a longer depression. We expect that the shape of the chemotactic response function should deliver optimal behavioral performance.
We consider the chemotactic behavior of a bacterium at some specific position on a gradient of attractant. As it wanders up and down the gradient, the distribution of its positions approaches a steady state. We choose performance criteria that quantitatively characterize the performance of the bacterium at early times in the non-steady state regime and at late times in steady state. Both of these regimes are biologically relevant. If the system navigated by the bacterium is small compared to the distance the bacterium could explore in the time between cell divisions (an example is bacterial aggregation into clusters [9]), then it is the steady state behavior that matters most to the bacterium. If, however, the system is large -more than a few millimeters in size -or varies in time, the bacterium will not come to a steady state before dividing, and a single cell might never reach a steady state. Bacteria have no a priori knowledge of the size of their system, so their chemotactic strategy should benefit them in either the steady state or non-steady state regime. Following foraging theory [10,11], we will assume that the chemotactic strategy maximizes the attractant seen by the bacterium on the timescale of bacterial divisions.
Our first performance criterion reflects the expected velocity of bacteria at early times, before they have reached the boundaries of the system. It is quantified by T , a measure of the early time transient velocity of bacteria with a given response function. This was previously calculated by de Gennes [12]. Optimizing T leads to a single-lobed response function, which causes a population of bacteria to have a transient average velocity up gradients at early times. Contrary to intuition, this optimization leads to an unfavorable steady state distribution with bacteria accumulated in regions of low attractant.
The second performance criterion, S, quantifies how strongly the bacteria aggregate about chemoattractant maxima when in steady state. Optimizing S leads to a bacterium that has a mean velocity down gradients at early times, but whose position distribution peaks at high concentrations at long times. The two performance criteria conflict: when one is maximal, the other is unfavorable. If both performance criteria are used to calculate the response function, the theoretical function closely matches the empirical biphasic bias curve measured by Segall, Block, and Berg [8]. The optimization procedure explains the curve's structure.
Our work contributes to a body of theoretical investigations of bacterial chemotaxis. Schnitzer et al. [13] used Monte Carlo simulations to confirm the favorable performance of a biphasic response function compared to a monophasic one. Our approach supports their end result, though we show that aggregation can occur without a positive lobe on the response function. Schnitzer [14] also adopted a kinetic approach and derived results about steady state behavior in a variety of cases. He distinguished between 'nonadaptive pseudochemotaxis' and 'true adaptive chemotaxis'. In contrast, our approach emphasizes both transient and steady state behavior in evaluating chemotaxis. In a different approach, Strong et al. [15] adopted a deterministic model for tumbling and examined optimality in the presence of signal noise. Work by de Gennes [12] focused on the mean bacterial velocity due to a given response function. We show that this mean velocity only applies at early times, and we extend the framework used by de Gennes to examine steady state performance and performance optimization.

Model Details
We adopt the stochastic framework used by de Gennes [12]. In this model, bacteria continuously modulate their instantaneous probability of tumbling as a function of a differential weighting of past measurements of chemoattractant concentration. The differential weighting constitutes the chemotactic response function, R(t).
We assume that the chemical landscape is static and that chemoattractant concentration is defined at every point by a function c(x). Bacteria swim along individual paths x(t) at a uniform speed v. The probability, P , that a bacterium tumbles in an interval between t and t + dt is dictated by its entire previous path, the chemical landscape, and the chemotactic response function: where τ is the mean run duration in the absence of a perturbation. In a uniform concentration, this model describes tumbling as an unbiased Poisson process with a constant rate of tumbling 1/τ given by (1 − c R(t)dt)/τ . In a concentration gradient, P depends on the bacterium's history. By choosing particular forms of the response function, bacteria can bias their random walk so that they climb gradients and remain in regions of high c. We will consider first order perturbations of the Poisson process by defining The constant α has units of inverse concentration. We expand equations as power series of such integrals and discard higher order terms involving products of such integrals. Equation (2.1) can itself be regarded as the first order expansion of some monotonic function of t −∞ dt ′′ R(t − t ′′ )c(x(t ′′ )) that remains positive for all concentrations.
In our analysis, we neglect the effects of noise due to fluctuations of c(x). Noise averages to zero in all our first order expansions. The first noise contribution that does not average to zero is proportional to the variance of the concentration, and is of order α 2 c/V , where V is the cell volume. To neglect this term with respect to the first order term, we require that α ≪ V . The experimental conditions described by Segall [8] correspond to the regime in which bacterial responses are linear and the bacteria can detect c without being overwhelmed by noise.
Berg and Purcell [7] argued that measurement integration times of about 1 second account for observed sensitivity to concentrations and gradients in the presence of noise. The response functions resulting from our analysis vary on the timescale τ , about 1 second, so they will display biological sensitivity without explicitly requiring long integration times.
We assume that the length scale of variations in the concentration gradient is longer than the average run length, so that over one run the gradient appears linear. We consider bacteria in one dimension and assume that tumbles are instantaneous and randomize orientation. Of course, real bacteria navigate in three dimensions and their run directions are not completely decorrelated by tumbles [1,4]. Further, in real bacteria, runs directed up attractant gradients lengthen, while those directed downwards are the same length as runs in constant concentrations [1]. Nonetheless, this simplified model gives insight into real bacterial behavior.

Transient Chemotaxis
The strategic goal of a bacterium navigating a chemoattractant landscape is arguably as simple as producing an average velocity up the attractant gradient. De Gennes showed that a mean velocity can be produced when, after a tumble, a run up the gradient lasts longer than a run down the gradient [12]. For a population of bacteria starting at the same position, the expected velocity at early times will be: where ∆t is the difference in run times moving up and down the gradient and the bars are averages over possible trajectories. The model presented in Equation (2.1) dictates that the probability of next tumbling at time t f after having previously tumbled at time t 0 is where P [x(t ′′ ); t f ] is the probability of tumbling at time t f , given a path x(t ′′ ). Following De Gennes [12], we consider the expected time until the next tumble: where the average is taken over possible future trajectories and the bacterium is at x 0 at time t 0 . We define t ± (x 0 ) as the mean time until the next tumble for bacteria moving up (+) and down (−) the gradient. We expand c(x(t)) into c(x 0 ) ± v(∇c)(t − t 0 ), where v is the constant speed of a run. After expanding in α, and then using the identity is a Dirac delta function, we find de Gennes's result that:   .4)). In this case, two bacteria meet that last tumbled at points x(t 0 ). One finds the expectation of their respective tumbling probabilities, P ± , by averaging over possible histories.
mean velocity up the gradient dies away as the bacteria move toward their steady state distribution. Figure 3b shows the results of a simulation that demonstrates this transient behavior.
We divide out the constants in (3.4) and introduce the dimensionless performance measure to quantify the transient chemotactic behavior at early times. This quantity is an overlap integral of R(t) against a performance kernel K T (t) = 1 α e −t/τ . The performance kernel shows the effect of the response function on the mean velocity at early times. The form of this kernel can be understood qualitatively. The mean velocity is proportional to the difference in run times between two bacteria with the same starting point, moving in different directions (see Figure 1). As up-and down-moving bacteria move away from each other, the difference in the concentrations they measure grows until the bacteria tumble. Therefore a response that weights c(t) heavily in the immediate past will contribute more to increasing T than a weighting further in the past where concentration differences were smaller. This is why the performance kernel prefers recent weighting. The shape of the performance kernel matches simulations of the model system ( Figure 3c). The exponential decrease in influence of R(t) on T is due to the exponential run length of the unperturbed Poisson process. Note that this heuristic argument is not strongly dependent on the form of P chosen in Equation (2.1). Any positive decreasing function of would yield a kernel that weights the most recent measurements most heavily.
We can maximize T over a constrained set of response functions. We assume the response function to be finite and to decay to 0 at large t. The simplest way to include both restrictions is to hold the integral  over a set of response functions that have the same root-mean-squared deviation from 0. We impose the constraint and maximize T subject to this constraint by using a Lagrange multiplier and taking a functional derivative: Solving this condition, we calculate the optimized response function where N T is a normalization constant. This response function is proportional to the performance kernel K T (t) used to determine T ; it is positive everywhere but weighted towards most recent times (shown in Figure 4a). Using this response function, bacteria moving up and down the gradient are progressively less and more likely to tumble, respectively. Given a particular tumbling position x, this results in maximally longer runs up the gradient than down it. A similar effect has been termed 'pseudochemotaxis' [16]. We call it 'transient chemotaxis' because unlike in pseudochemotaxis, P [x(t ′ ); t] in transient chemotaxis has a history dependence, and moreover we argue that short-term performance is relevant for bacteria in large chemical gradients. Surprisingly, although R T (t) maximizes the expected velocity up the gradient, it leads to an unfavorable steady state distribution in which the bacteria spend more time in low chemoattractant concentration regions. The simulation in Figure 3b shows the initial favorable transient velocity and the unfavorable steady state for an all-positive response function. This counter-intuitive result can be explained as follows. Imagine two bacteria passing each other on a linear concentration gradient (see Figure 1). The one heading down the gradient has high c in its past, so its value of R T (t − t ′ )c(x(t ′ ))dt ′ is larger on average than that of an upward-moving one at the same position. Equation (2.1) then shows that the probability of tumbling is lower for the bacterium moving down the gradient. Since this is true at all points on the gradient, more bacteria will accumulate in the low concentration areas. The unfavorable steady state of a positive response function was previously shown in numerical simulations [13] and noted in Schnitzer's analysis [14].
Initial velocity need not indicate the eventual steady state distribution, as the following thought experiment shows (discussed by Lapidus [16], Schnitzer et al. [13], and Schnitzer [14]). Consider a closed tube containing a gradient in density of steel wool. At one end of the tube, mean free paths of a molecule are short, while at the other end they are long. After each collision, because of the gradient in the wool, a molecule has an expected net displacement towards the sparse end of the tube. In steady state, however, gas molecules are distributed evenly throughout the free volume of the tube. Therefore, although the expected net displacement after each collision creates an initial mean velocity towards the sparse end, it does not determine the steady state distribution. For gas molecules, the collision probability is determined by a particle's instantaneous position. For bacteria using an all-positive response function, both t + and t − are longer in higher c regions because

Steady State Bacterial Distribution
Here we show how the steady state distribution of bacteria depends on expected tumbling rates. The expected tumbling rate for a bacterium at position x depends on whether it is moving up or down the gradient, and is given by P + (x) or P − (x), respectively, where bars are averages over possible histories ending at x. In steady state these averages will not be functions of t.
In steady state, bacterial flux is zero and the bacterial steady state concentration, b(x), can be written in terms of the probabilities P ± (x) (see the Supplementary Information): This reproduces a more general result derived in [14]. With net flux zero, the number of upward-moving bacteria must equal the number of downward-moving bacteria at any point x. If P + (x) = P − (x), then the fraction of bacteria passing through a point from the left will not equal that passing through from the right.
In order to keep the number fluxes equal, the number of bacteria on each side of that point must be different. Maintaining this balance generates the form of the distribution in Equation (4.1). When the tumbling rate is higher for down-moving bacteria arriving at point x, bacteria aggregate at the top of the gradient in steady state. We now express the tumbling probabilities in terms of R(t). In order to calculate P ± (x) we must consider all possible histories of bacteria reaching point x. Histories and instantaneous tumbling probabilities both depend on R(t), so the difference P − (x)−P + (x) that governs steady state aggregation can be expressed in terms of the response function. By integrating over paths for bacteria arriving at x (details of the derivation are in the Supplementary Information), we find that This integral should be positive to obtain an advantageous steady state distribution with more bacteria at high concentrations. The x dependence in Equation (4.2) comes through the ∇c factor, which integrates immediately to c(x), giving the steady state distribution: The quantity in round brackets does not depend on x. We introduce the dimensionless version of this quantity, as a performance measure of the steady state distribution. This is an overlap integral, with a performance kernel K S (t) = − 1 α (t/τ + t 2 /2τ 2 )e −t/τ . A response with large S yields a steady state distribution with the bacteria aggregated favorably in high c regions.
When S is maximized by the same procedure used in Equation (3.7), one finds a response function R S (t) = − α τ N S (t/τ + t 2 /2τ 2 ) exp{−t/τ } (4.5) which is negative everywhere, zero at t = 0 and at long times, and peaked at t = τ √ 2 (see Figure 4a). The negative values of this response function mean that bacteria moving down the gradient at point x, with high concentrations in their past, have higher tumbling probabilities than bacteria moving up the gradient at x, with lower concentrations in their past.
Because R S (t) is negative, it results in t − (x) > t + (x), creating a transient velocity down the gradient at early times. Although this response function gives a beneficial steady state distribution, it yields detrimental behavior at early times. One can understand the steady state performance kernel qualitatively. The performance measure S considers the difference in tumbling probability between two bacteria at the same point in space but coming from opposite directions (see Figure 1). In this case, measurements of c are most different in the past, while the most recent concentration measurement, c(x), is the same for both bacteria. This weighting is reflected in the performance kernel K S and in the optimal response R S (t), in which concentrations in the past are more heavily weighted. Concentration measurements in the more distant past could have been made where ∇c was different from the current ∇c and cannot be reliably related to the current gradient. Therefore, such distant information is not useful for making run-biasing decisions and is not weighted heavily by the kernel [17]. Figure 3d shows the derived performance kernel and results of simulations of the model in a small system. Figure 4: a Response functions that optimize the performance measures T , S, and T + AS, where A = 1/2. Note that all three functions are normalized such that R(t) 2 dt = α 2 /τ . b The points are data from Figure 1 in [8] showing the counter clockwise bias in flagellar motor rotation after a very short impulse of chemoattractant at time t = 0. The bias response is linear in this experiment's regime. The solid line is a best fit of R S,T (t) to the data, using a 10 Hz low-pass Gaussian filter to realistically smooth discontinuities. The fitting parameters were A, τ , and an overall amplitude, and the least squares fit was A = 0.56 and τ = 0.9 seconds. The bias of a single flagellum is related to the tumbling probability P [x(t ′ ); t], but is not identical because multiple flagella are involved in running and tumbling [4] and cooperative effects could be involved.

Optimizing the Response Function
The response functions resulting from optimizing the two performance criteria have opposite signs, so that optimizing T leads to an unfavorable S and vice versa. Both aspects of performance are biologically relevant -bacteria should move up gradients when not in steady state and remain at high concentrations as they approach steady state. We expect bacteria to optimize a composite criterion that preserves both aspects of performance. One can imagine a variety of ways to maximize a combination of the two quantities, but maximizing any positive increasing function of both T and S will produce a solution that is a linear combination of R S and R T . We therefore adopt the most straight forward way and maximize the quantity where A is some unknown weighting factor of the two performance measures. As before, we constrain R(t) and take the functional derivative of this equation to find a response function that compromises between maximizing the expected run length up gradients and the steady state bacterial distribution. That response function is which is proportional to R T + AR S . It is reasonable to set R = 0 because there are physical bounds placed on the run length of real bacteria. Purcell [18] pointed out that run duration should be chosen at least large enough so that, for a given v, a bacterium outruns the diffusion of the chemoattractant c during its run. This lower bound on run duration is roughly 1 second. Further, in real situations runs longer than roughly 10s are turned 90 degrees off-course by rotational diffusion [1,19], setting a maximum useful run duration. Neither of these limits depends on c. Bacteria should be sensitive to gradients by maintaining a large α but must not allow their run durations to wander outside these bounds in widely varying concentrations. Run duration is dependent on a ∇c term as derived in the text and on c R(t)dt. The integral of R should be zero to allow for sensitivity to ∇c while keepingτ within the limits above, thus creating a large dynamic range for the response [19]. This argument leads us to set A = 1/2 so that R = 0. Experimentally, Alon et al. [20] have shown that this robustness of run duration to changes in absolute concentration is a property of the E. coli chemotactic network when cells respond to aspartate (though see [1]).
The optimized response function is shown in Figure 4a, where we have required R = 0. It predicts a sharp positive immediate response with a drawn out negative response peaking around 2.5τ . It was obtained here by developing a response function that (1) maximizes the transient velocity of bacteria up gradients when they are not in steady state and that (2) creates a steady state where bacteria aggregate in high concentration regions. The initial, short, positive lobe in R T ,S (t) makes T > 0 and serves to move the bacteria up gradients when not in steady state, while the second, longer, negative lobe makes S > 0 and serves to produce the advantageous steady state distribution.
The functional form of Equation (5.2) fits the actual response function exhibited by individual flagellar motors in Segall et al. [8] (see Figure 4b). Our theory concerns the whole cell, not single flagellar motors; correlations between the activity of single flagella and the behavior of the whole bacterium are not well understood [21,4]. Nevertheless, we find a surprisingly good fit. We have left A and τ as fitting parameters, and the best fit yields A = 0.56, which matches our expectation that A ≃ 0.5.
Values of T and S for any response function can be easily found by calculating their overlap with the kernels in Equations (3.5) and (4.4); a summary of such calculations for our three optimizations is shown in Table 1. The top half of the table provides the qualitative picture independent of model details, while the lower half provides the values of T and S given by our model. Table 1: Transient velocity values (T ) and steady state strength of aggregation (S) for the various response functions R(t). The first set is heuristic, derived from qualitative arguments, while the second set is derived from our particular model. The first item in each section is the response function maximizing T , while the second maximizes S. The third maximizes both T and S, as described in the text. More positive values of T and S indicate more favorable behavioral performance; in the heuristic section, favorable values are represented by (+) and unfavorable by (−).

Response Function Equation
T S R T (t) Positive lobe, weighted towards t = 0 + − R S (t) Negative lobe, weighted towards t ≃ τ − + R T ,S (t) Initial brief positive lobe; negative lobe peaked beyond τ

Discussion
The biphasic shape of the chemotactic response function has long been interpreted as a temporal comparator that automatically adapts to offsets in chemical concentration [8].
Here we have examined two aspects of bacterial chemotactic performance and found that neither aspect optimized alone produces a biphasic response. A composite response function, simultaneously optimizing both measures of performance, closely fits the shape of the experimental data. This leads to an additional interpretation of R(t) as optimized with respect to these two behaviors, connecting each lobe to distinct behavioral performance. Our theory makes novel predictions about the behavior of wild-type and mutant bacteria. The functional fit of R T ,S to the wild-type data is quite good, so that we predict that experimental measures of wild-type T and S in the linear regime should roughly match those in Table 1. If L is the decay length of b(x) when bacteria are on a linear gradient, it is related to the expected transient velocity up the gradient, v d , by the relation L = (v 2 τ /v d ) * (T /S). The first factor could be found on dimensional grounds, but we predict T /S ≃ 14 for wild-type E. coli. For a gradient that elicits v d = 1µ/s, this predicts L ≃ 5 millimeters. Response functions of mutant bacteria can be calculated (see [22] or [23]) or measured experimentally, as Segall et al. [8] have done for strains with mutant cheZ and for strains with mutant cheRcheB. Both these mutant response functions are entirely positive with durations of roughly 5 and 1 seconds, respectively. We predict that both mutants will have transient velocities up gradients, but that both will reach an unfavorable steady state distribution. Available data for both mutants does not rule out these predictions [24,25,26]. Microscopic observations of t + − t − or measurements of b(x) in static spatial gradients could evaluate the validity and limits of this theory.

Acknowledgements
We benefitted from fruitful conversations with and guidance from Howard Berg, Yariv Kafri, Aravinthan Samuel, Tom Shimizu, and Rava da Silveira. D.A.C. is funded by the NSF and L.C.G. is funded by the DOE.

A. Steady State and Tumbling Probabilities
Here we derive Equation (4.1), the steady state distribution of bacteria in terms of the expected tumbling probabilities of bacteria coming from the right and left.
In the steady state, the net flux of bacteria through a point between x and dx must be zero. Bacterial concentration at point x is represented by b ± (x), where the (±) indicates the direction of movement. Setting the net flux to zero yields The left hand side counts bacteria moving up the gradient past x, while the right hand side counts bacteria moving down the gradient past x. The probability of actually reversing directions is half the probability of tumbling. The first term on each side represents bacteria continuing on their present course; the second represents bacteria passing through the point after an instantaneous reorientation. Retaining only zeroth order terms gives b + (x) = b − (x), so one can replace each by b(x)/2. Expanding b(x) about x and retaining only terms up to first order in dx yields a differential equation governing the steady state distribution of bacteria: This is integrated to find Equation (4.1). The zero flux condition holds at all points in the system. The equation is modified at system boundaries, depending on conditions there, but the first order differential Equation (A.2) describes the bacterial distribution far from the boundaries.

B. Optimizing the Steady State Distribution
Here we calculate P − (x) − P + (x) in the steady state and find a response function that optimizes the bacterial distribution, b(x). We are interested in: where superscripts indicate that the averages are taken over all paths ending at the position x moving either up (+) or down (−) the gradient at x. We take the gradient to be positive, so that up-moving bacteria are right-moving bacteria.
To calculate this quantity, we must insert averages over possible paths. Assuming that the most recent tumble occurred at time t 0 , the one before that at time t 1 , and so on, we will average over the values of t 0 , t 1 , . . . and over the directions of the runs during each of the intervals. Essentially, because c ± is multiplied by R(t) in the integral, this calculation can neglect first order effects of R(t) on c ± : runs become simply exponential in length and there is an equal probability that a bacterium came from left or right before its last tumble.
We first average over the directions of the runs. In the steady state, for a tumble at t i , the probability Q + (t i ) that the bacterium was moving up the gradient before the tumble will be proportional to the population of bacteria found to the left of x(t i ). That is Now assume that b(x) varies slowly over one run and expand b(x) to first order in t i − t i+1 . Then Inserting just the averages over the directions of motion in the various intervals and leaving the t i fixed for the moment, we can expand Equation (B.1) as: Here c ++− (t), for instance, denotes the concentration seen by a bacterium that has moved in the + direction after t 0 , moved in the + direction in the interval [t 1 , t 0 ], and in the − direction in the interval [t 2 , is a sum of terms proportional to integrals of the form R(t − t ′ )c(t ′ )dt ′ , so we may set Q ± (t i ) = 1/2 to keep only terms to first order in R(t − t ′ )c(t ′ )dt ′ . Now we look at the averages in square brackets in Equation (B.4). In the first such average, we expand c(t) about t 0 to find that The second square bracket in (B.4)reduces to (c (±+) (t 1 ) + c (±−) (t 1 ))/2 and the rest of the square brackets will reduce similarly. strategy to make minimal assumptions about the extent of the gradient, and therefore we will cut off the series after only a few terms. We drop all terms that refer to times earlier than t 1 . The resulting expression for P − (x) − P + (x) has two terms proportional to ∇c.
The terms proportional to ∇c are precisely the ones that allow us to optimize the steady state distribution in a concentration independent way. We find that Letting R(t) = ∞ 0 dsR(s)δ(t − s), we find the simple result that P − (x) − P + (x) can be written as the overlap in Equation (4.2). Keeping more terms in Equation (B.8) corresponds to assuming that the bacteria propagate on gradients with variations of longer length scale. Such an assumption produces a kernel of e −t/τ multiplied by an expansion of (1−e t/τ ) in t/τ . Retaining an infinite number of terms leads to a kernel proportional to e −t/τ − 1. As long as a finite number of terms are retained, the qualitative features of the performance kernel don't change: it starts at zero, peaks negatively, and returns to zero for large t. If the number of retained terms remains small (less than 5, for example), the quantitative features are not much affected either. Figure 5 illustrates this discussion. It shows the results of simulations of the model that demonstrate the contribution to S from each portion of the response function. The response functions are chosen as in Figure 3 to weight only c(t − θ) in determining the turning probability. Bacteria navigating concentration gradients of various length scales are considered. On the timescales shown, the white points in the figure represent bacteria in an effectively infinite linear gradient. Bacteria heading down such a gradient at x on average have a higher c history for all previous times than ones heading up the gradient at x. Therefore, measurements made any time in the past, including long ago, affect S by the same amount. On the other hand, when the gradient is not infinite, as in any real case, ∇c will change on some length scale. Measurements of c(t) made with a delay large compared to the time to traverse this length scale will average out in the sum over histories. Such measurements therefore cease to affect S. As the grey points in the figure show, on a relatively short length scale, measurements of concentration made 20τ in the past no longer contribute to S. In the time of 20τ , the bacterium is likely to have bounced against a wall (or moved over a peak, if one views the reflecting box as an infinite triangle wave), so such measurements no longer reflect the bacterium's current gradient. With still shorter gradients, such effects become more pronounced. The black points in the figure are on a length scale that roughly matches our theory, in which we restricted bacteria to looking at only the previous two runs. The simulation conditions mean that bacteria cannot use measurements made long ago, while our theory posits that bacteria should make minimal assumptions about gradient length. Both lead to similar kernels showing the influence of R(θ) on S.  Figure 3d, we here show the results on different length scale gradients. Such gradients with reflective boundary conditions can also be thought of as infinite triangle waves, a more natural picture than a box. Black points are simulations of bacteria in a box of total length 4vτ , grey points are in a box of length 8vτ , and white points are in a box of length 80vτ . The dotted curve shows the performance kernel for S in the case where the bacterium assumes a linear gradient throughout its entire history (an infinite gradient). The solid curve is the performance kernel that makes minimal assumptions about the extent of the linear gradient.