  Living cells often need to measure chemical concentrations that vary in time.
To this end, they deploy many resources, e.g. receptors, downstream signaling
molecules, time and energy. Here, we present a theory for the optimal design of
a large class of sensing systems that need to detect time-varying signals, a
receptor driving a push-pull network. The theory is based on the concept of the
dynamic input-output relation, which describes the mapping between the current
ligand concentration and the average receptor occupancy over the past
integration time. This concept is used to develop the idea that the cell
employs its push-pull network to estimate the receptor occupancy and then uses
this estimate to infer the current ligand concentration by inverting the
dynamic input-output relation. The theory reveals that the sensing error can be
decomposed into two terms: the sampling error in the estimate of the receptor
occupancy and the dynamical error that arises because the average ligand
concentration over the past integration time may not reflect the current ligand
concentration. The theory generalizes the design principle of optimal resource
allocation previously identified for static signals, which states that in an
optimally designed sensing system the three fundamental resource classes of
receptors and their integration time, readout molecules, and energy are equally
limiting so that no resource is wasted. However, in contrast to static signals,
receptors and power cannot be traded freely against time to reach a desired
sensing precision: there exists an optimal integration time that maximizes the
sensing precision, which depends on the number of receptors, the receptor
correlation time, and the correlation time and variance of the input signal.
Applying our theory to the chemotaxis system of Escherichia coli indicates that
this bacterium has evolved to optimally sense shallow gradients.
