  To successfully navigate chemical gradients, microorganisms need to predict
how the ligand concentration changes in space. Due to their limited size, they
do not take a spatial derivative over their body length but rather a temporal
derivative, comparing the current signal with that in the recent past, over the
so-called adaptation time. This strategy is pervasive in biology, but it
remains unclear what determines the accuracy of such measurements. Using a
generalized version of the previously established sampling framework, we
investigate how resource limitations and the statistics of the input signal set
the optimal design of a well-characterized network that measures temporal
concentration changes: the Escherichia coli chemotaxis network. Our results
show how an optimal adaptation time arises from the trade-off between the
sampling error, caused by the stochastic nature of the network, and the
dynamical error, caused by uninformative fluctuations in the input. A larger
resource availability reduces the sampling error, which allows for a smaller
adaptation time, thereby simultaneously decreasing the dynamical error.
Similarly, we find that the optimal adaptation time scales inversely with the
gradient steepness, because steeper gradients lift the signal above the noise
and reduce the sampling error. These findings shed light on the principles that
govern the optimal design of the E. coli chemotaxis network specifically, and
any system measuring temporal changes more broadly.
