Optimal resetting strategies for search processes in heterogeneous environments

In many physical situations, there appears the problem of reaching a single target that is spatially distributed. Here we analyse how stochastic resetting, also spatially distributed, can be used to improve the search process when the target location is quenched, i.e. it does not evolve in time. More specifically, we consider a model with minimal but sufficient ingredients that allows us to derive analytical results for the relevant physical quantities, such as the first passage time distribution. We focus on the minimisation of the mean first passage time (MFPT) and its fluctuations (standard deviation), which proves to be non-trivial. Our analysis shows that the no-disorder case is singular: for small disorder, the resetting rate distribution that minimises the MFPT leads to diverging fluctuations—which impinge on the practicality of this minimisation. Interestingly, this issue is healed by minimising the fluctuations: the associated resetting rate distribution gives first passage times that are very close to the optimal ones.


Introduction
Stochastic resetting is an intriguing framework in stochastic dynamics because of its game-changing strategy in Brownian search processes, with applications in a wide range of contexts beyond physics, such as animal foraging, site-binding search of biomolecules or chemical reactions [1].In search processes, a usual goal is the minimisation of the mean first passage time (MFPT), which is the average time-over the different realisations of the dynamics-for finding the target.The simplest situation arises when one considers a particle undergoing Brownian motion in one dimension, with an immobile target at a certain position x T and a Poissonian reset process with rate r to a certain point x r .Resetting makes the MFPT finite and, in addition, there appears an optimal resetting rate r-the MFPT diverges in both the limits of no resetting (r = 0) and of infinitely frequent resetting (r → ∞).
General intermittent strategies, which combine searching reactive phases with faster relocating non-reactive phases, have been shown to be significantly useful in the context of search problems [2][3][4][5][6][7][8].These strategies have been applied in both microscopic and macroscopic contexts, both for single-and multiple-target problems, as discussed in the review paper [9].In particular, stochastic resetting can be thought of as a particular instance of these intermittent strategies, in which-in its simplest formulation-the non-reactive phase is instantaneous.
Typically, the target is considered to be fixed in space, i.e. a single target remains at the same position for all realisations of the search process.Still, the position of the target may vary between realisations, i.e. there may be some degree of randomness in the search process that renders every instance thereof unique.We refer to this situation, in which the location of our goal is uncertain, as a search process with disorder-employing a terminology that is usual in physics.More specifically, we focus on problems for which the location of the target is fixed for each realisation of the stochastic process, which thus gives rise to a quenched disorder.This quenched disordered scenario naturally emerges in many contexts, such as environmental phenomena associated with foraging [10][11][12][13][14][15][16].Therein, animals look for nutrient or resources throughout an environment that is heterogeneous; the targets are static (quenched) but spatially distributed.Another classical disordered scenario is that found for the location of minima of a complex energy landscape, which possibly represents the main challenge in disordered systems such as glasses [17][18][19][20][21]; a problem that becomes highly non-trivial especially in high-dimensional contexts.
In contrast with quenched disorder, annealed disorder-also called dynamical disorder [22]-can also be considered.In the foraging context, annealed disorder involves a dynamic target, which changes its position over the same time scale of the searcher.Interestingly, stochastic resetting has been very recently introduced for intermittent targets, i.e. targets that fluctuate between a reactive and a non-reactive state [23,24].This kind of intermittent targets are often found in cell biology, from the accessibility of DNA-binding sites to the opening and closing of ion channels, and they can be regarded as a particular case of annealed disorder.In this work, we mainly address search processes with quenched (or static) disorder, i.e. we consider that the position of the target follows a certain static, time-independent, spatial distribution p T (x T ).In the same context of foraging, this can be understood from the dynamics of searcher being much faster than that of the target, which is thus assumed to be immobile after the animal starts the search.
The assumption of disorder for the target location raises two questions in the field of stochastic resetting: what is the effect of stochastic resetting on such a disordered search problem?Is it possible to choose a clever, space-dependent reset rate r(x) to optimise the search process, given the distribution of the target position p T (x T )?Note that a homogeneous resetting rate cannot be the optimal choice in general.For a fixed, delta-distributed target, with resetting position x r = 0, the optimal resetting rate is heterogeneous: r(x < 0) → ∞ and r(x > 0) = 0, since this choice always prevents particles from moving away from the target.
The above discussion entails that, physically, it is expected that any quenched heterogeneous distribution of targets p T (x T ), stemming from the heterogeneity of the searcher's environment, has an optimal heterogeneous resetting rate r(x) associated.Despite the intuitive character of this statement, few works have been devoted to the analysis of stochastic resetting in heterogeneous environments.A first attempt involved the optimisation of the distribution of the resetting position in presence of a nonresetting window around the resetting point for exponentially distributed targets [25].Therein, a transition in the optimal distribution was found out.While a general framework to obtain the stationary distribution in presence of heterogeneous resetting has been developed [26], the MFPT has been considered in works where the resetting takes place only when the particle's position exceeds some threshold value [27,28], a problem that naturally appears when modelling catastrophic events like power blackouts.In the context of systems with discrete states, a random walker on complex networks with node-dependent resetting rate has been considered as well [29].Heterogeneity has also been investigated introducing spatially-dependent diffusion coefficients [30][31][32], in a somewhat alternative direction with respect to the present paper.Rigorous results have been derived for the MFPT of a spatially-dependent resetting problem with a given distribution of the target position, assuming that explicit solutions for the MFPT equation are known [33].Heterogeneity thus emerges as a promising research ground in stochastic resetting and search processes.
The objective of this work is to investigate the effect of quenched disorder on the first passage time problem.Analytical results are typically hindered by the challenging mathematical structure of the optimisation problem.Therefore, we assume here a simple dichotomous time-independent distribution of the target position p T (x T ): the distance to the target is fixed and the probability of the target of being to the right (left) of the resetting point is p (1 − p).Consequently, we also assume a constant dichotomous resetting rate, piecewise homogeneous in the two real half-lines.These choices will allow us to answer analytically the following questions: what are the optimal resetting rates?how is the MFPT reduced by this assumption?what are the fluctuations of the first passage time, especially when the disorder is small, i.e. in the p ≪ 1 (or 1 − p ≪ 1) limit?what is the asymptotic behaviour of the optimal solution in the same limit and the long time tail of the first passage time distribution?The answer to these questions represents a first step towards the generalisation to more realistic target distributions and to heterogeneous resetting processes.

Model
We consider a one-dimensional freely diffusing overdamped Brownian particle submitted to stochastic resetting to a given point x r , with heterogeneous resetting rate r(x).Thus, the probability to observe the particle at position x at time t given that the initial (t 0 = 0) position was x 0 , i.e. the propagator P (x, t|x 0 ), follows the (forward) dynamic law where D is the diffusion constant.On the right hand side (rhs) of the evolution equation, each term has a neat physical meaning.Namely, the first term stands for free diffusion, the second one is a loss term due to resetting, and the last one is a gain term due to the particles that have reset from any point to x = x r .To the purpose of the work, a piecewise constant resetting rate is assumed where Θ stands for the Heaviside function.Our assumption of a fixed resetting location at x = x r is especially appealing-in addition to being the simplest-in the context of foraging problems, where the searching animal has a single home to come back.Furthermore, the physically relevant information for our purposes is the distribution of the target location with respect to the resetting location; one can therefore safely fix the resetting location at the origin without any loss of generality.Equation (1) has to be complemented with initial and boundary conditions.The initial condition for the propagator is, of course, P (x, 0|x 0 ) = δ(x − x 0 ).Boundary conditions depend on the physical constraints.On the one hand, in the absence of any constraint, the probability current vanishes at x → ±∞, i.e.
In the long-time limit, the corresponding solution P (x, t|x 0 ) tends to the non-equilibrium stationary state where the competition between diffusion and resetting defines the length scales α −1 ± = D/r ± .Note that (4) can be explicitly obtained due to the simple choice for r(x) in (2).An explicit solution of equation ( 1) is not available for arbitrary r(x), which would define an associated space-dependent length scale α(x) −1 = D/r(x).
On the other hand, if there is just one absorbing boundary at x = x T , the boundary conditions to impose are standing sgn(x) for the sign function.In our study, it suffices to impose the second condition in equation ( 5) and not necessarily lim x→±∞ ∂ x P (x, t|x 0 ) = 0 because we will only consider situations where x 0 and x r are on the same side with respect to x T .In a more general case, both limit conditions should be enforced.The case with just one absorbing boundary is the one addressed in this article, since we will look into the first passage problem to a target position with no further obstacles.Now we introduce the disorder, which is a fundamental and novel ingredient in our modelling.We assume that x T is static but not fixed; instead, it is distributed according to a certain distribution p T (x T )-i.e. the disorder is quenched.Note that equation (1), complemented with equation ( 5), is still valid, but governing the evolution of the propagator P (x, t|x 0 ; x T ), where it is important to make the dependence on x T explicit.The propagator for the ensemble is achieved by integrating over x T , As already commented in the introduction, we use the terminology quenched disorder throughout our work, which is quite usual in the context of statistical physics, in opposition to annealed disorder.The disorder is quenched in our model, since x T is "frozen" for each realisation of the dynamics.Instead, annealed disorder would involve a target x T evolving with a certain dynamics, even within a single realisation.In our context, a simple example of annealed disorder would be obtained if the target were relocated to a new random position extracted from p T (x T ) after each resetting event.Despite its apparent similarity, this problem with annealed disorder is not equivalent to the quenched disorder situation considered here.For the sake of simplicity, we use the simplest non-trivial quenched disorder with 0 < p < 1 and X > 0. The distance from the resetting position to the target is fixed and equal to X, whereas there is a certain probability p (1 − p) for the target to be to the right (left) of x r .The heterogeneity of p T motivates the asymmetric choice with respect to spatial inversion of x − x r for the resetting rate in (2).
It is handy to use dimensionless variables in order to identify the natural units of our problem.Specifically, we take x = (x − x r )/X and t = t/(X 2 /D).Consequently, P (x, t|x 0 ; ±1) = XP (x, t|x 0 ; ±X) and ᾱ(x) = Xα(x).Then, equation (1) becomes in dimensionless form, where all bars have been removed in order to avoid cluttering our formulas.The boundary conditions in equation ( 5) become where x T = ±1 and Averaging over the disorder (7), where we have conveniently introduced the notation As described in the introduction, our focus is not the forward evolution but the first passage problem, which is formulated from the backward evolution in the next section.Nevertheless, the separation introduced in equation ( 11), where the observable of interest is achieved from the average of the quenched contributions, each of them verifying its own equation, e.g.equation ( 8) with boundary conditions (9) will be exploited along the rest of this work.

First passage problem
From now on, we aim at solving the first passage problem to the disordered target.To accomplish this task, we start from the backward evolution equation for P ± (x, t|x 0 ).Using an analogous notation to that for P ± (x, t|x 0 ) in ( 12), we define the survival probabilities i.e. S + (t|x 0 ) is the probability for having avoided at time t the absorption at x T = +1 starting from x 0 -similarly for S − (t|x 0 ) with x T = −1.The corresponding distributions of first passage times to x T starting from x 0 are All these functions, P ± (x, t|x 0 ), S ± (t|x 0 ), and f ± (t|x 0 ), fulfill the same backward equation below.For the sake of concreteness, we write the backward equation just for the first passage time distribution f ± (t|x 0 ), which plays a central role in this research, A brief derivation of the backward equation is presented in Appendix A. The first passage time distribution has to be complemented with the boundary conditions and the initial condition f ± (0|x 0 ) = 0, which is a consequence of S ± (0|x 0 ) = 1 for any x 0 .Moreover, since the particle unavoidably reaches the target at long times, we have the normalisation condition It is important to keep in mind that the first passage time distribution of the ensemble f (t|x 0 ) is obtained averaging over the disorder, This is a property that is directly transferred to all moments of the distribution, as well as any linear combination thereof.In what follows, we just focus on f + (t|x 0 ) due to the left-right symmetry of our system: f − (t| − x 0 ) is obtained by exchanging α + ←→ α − in f + (t|x 0 ).This invariance stems from a mirror symmetry in our system: when simultaneously exchanging x T ←→ −x T and r + ←→ r − , the obtained system is just the mirror image of the original one with respect to the resetting point x r = 0.For solving the quenched first passage time distribution, we define the moment generating function (Laplace transform) from which all the moments of the distribution, τ (n) , are derived: Making use of the initial condition f ± (0|x 0 ) = 0, equation ( 15) yields which, together with equation ( 20), gives the recursive equation for the moments −nτ (0) ± (x 0 ) = 1.Instead of solving equation (22) for the moments iteratively, we address the first passage time problem in a more compact way by solving equation (21) for ϕ + (s|x 0 ) at both sides of the resetting point.Specifically, the boundary conditions along with continuity for the function and its derivative at x 0 = 0 must be imposed, as well as the consistency condition stemming from the local contribution at the resetting point-see Appendix B for the detailed solution.Herein, for the sake of concreteness, we focus on the first passage problem starting from the resetting position, i.e. x 0 = 0.The result for the quenched moment generating function is The behaviour of the tails of the first passage time distribution is derived by carrying out an asymptotic analysis of the moment generating function.Specifically, one gets where and s * + is the pole with the highest real part of the moment generating function (23), which is always real and negative.See Appendix C for the detailed technical derivation.
As already stated before, ϕ − (s|0) is obtained from ϕ + (s|0) by exchanging α + ↔ α − .Therefore, we have that with s * − being the zero of the function ζ(s, α − , α + ) with the highest real part.Hence, equations ( 18), ( 24) and ( 26) entail that the first passage time distribution is a weighted sum of two exponential functions for long times.Such a prediction has been validated by simulating the stochastic process for different values of the system parameters, as shown below.
Figure 1 compares our theoretical predictions for the first passage time distribution with numerical results.In each panel, a different value of the disorder p is displayed; the rest of parameters, i.e. (α + , α − ), are those minimising the MFPT for that value of pderived later in section 4. Simulation data (circles) correspond to 10 7 trajectories for the parameters considered in each panel, integrated with a time step ∆t = 10 −5 up to the first passage time; they show an excellent agreement with our theoretical predictions, both asymptotic (solid green) and numerical Laplace inversion (dashed red).Although the asymptotic prediction is expected to work only in the limit of long times, it fails just at very short times.Therein, numerical inversion of the exact result still perfectly matches the simulations-as particularly shown in the inset of the second panel.
An especially interesting feature of figure 1 is the apparent crossover between the two exponential decays corresponding to the long time behaviours of f ± (t|0) in equations ( 24) and (26), provided that p ̸ = {0, 1}.For p = 0 (first panel), i.e. no disorder, only f − contributes and therefore the long time behaviour is exponential with s * − .For 0 < p < 0.5 (rest of panels), the largest pole (smallest in absolute value) is s * + for our choice of (α + , α − ); note that s * + vanishes in the limit p → 0. This entails the crossover: even for p = 0 + , the long time behaviour is first dominated by s * − (since the contribution from the + mode is weighted with p ≪ 1) but turns later to be dominated by s * + .The crossover is not present for p = 1/2, because s * + = s * − for our choice of parameters.Note that each panel follows the same scale, this decision has been made to stress the emergence of a longer time exponential tail for non-zero disorder-on the first panel, it is clearly observed that the first passage distribution decays much faster than on the other panels.
The mean and the second moment of the quenched contribution are obtained by using equations ( 20) and ( 23)-or, equivalently, solving equation (22) for n = 1, 2, τ Again, τ − follows from τ + by exchanging α + ←→ α − .Note that, in order to simplify the notation, we have omitted the argument of τ (n) ± , τ (n) ; in this work, we only consider the case x 0 = x r = 0. Averaging over the disorder, In the following, we mainly focus on the MFPT and the standard deviation, τ (1) and σ τ , respectively.The latter cannot be computed as an average between two contributions σ τ ± since it is not a linear combination of moments, we must use We have obtained exact results for τ (1) and σ τ as functions of (p, α + , α − ), but their explicit formulas have been deliberately obviated since they are not illuminating.For α + = α − = α h (homogeneous resetting case), the expressions for the MFPT and the standard deviation are which is a a robust result, valid regardless the value of p, due to the left-right symmetry.This result reasonably coincides with that obtained for homogeneous resetting in the absence of disorder [25,34].
In figure 2, we compare our theoretical predictions for τ (1) and σ τ with numerical simulations, again an excellent agreement is found.For the numerical results, a time step ∆t = 10 −5 and 10 6 trajectories have been used.Specifically, α − has been fixed and the plots show the dependence of the observable of interest as a function of α + , for several values of p.All curves exhibit a minimum value as a function of α + , except those corresponding to p = 0. Optimality of the observables is discussed in section 4.
Figure 3 provides a more complete picture of the behaviour of the MFPT and the standard deviation as functions of (α + , α − ), for different values of p.It is worth highlighting some interesting properties.As expected, the panels for p = 0.5 show reflection symmetry with respect to the line α + = α − .As a consequence of the properties of F 1,2 (α + , α − ), for p < 1, both the MFPT and the standard deviation diverge in the limits α + → 0 and/or α − → 0, except for the case p = 0 where they remain finite for α − → 0 ‡.Hence, excluding p = 0, both objects develop non-trivial dependence on (α + , α − ).

Optimisation of the physical quantities
In this section, the MFPT and its standard deviation are minimised.Moreover, the dependence of both the optimal values and their corresponding optimal resetting rates are looked into as a function of the disorder p. ‡ For p = 0, the target is certainly to the left of x 0 = x r , and therefore it suffices to reset the trajectories straying to the right of x 0 to have a finite MFPT.

Optimal mean first passage time
First, we focus on the MFPT.Mathematically, the problem reduces to finding the minimum of the function with F 1 (α + , α − ) defined in Eq. ( 27).Then, it is needed to solve ∂τ (1)  ∂α for ( α + , α − ).From now on, tilde notation refers to the solution of the minimisation problem of τ (1) .In the following, we study both ( α + , α − ) and its associated MFPT τ (1)  as functions of p.
It is convenient to start with a physical intuition of the optimal problem.For p = 1 (p = 0), there is absolute certainty about the target position.Then, we expect the optimal resetting to forbid the exploration of the region on the opposite side of the target with α − → ∞ (α + → ∞), whereas the exploration of the correct direction is facilitated with α + = 0 (α − = 0).This physical intuition is mathematically confirmed by taking into account that (i) F 1 is a monotonically increasing (decreasing) function with respect to its first (second) argument, and (ii) just one F 1 survives in equation (32) in the extreme cases for p.This is clearly observed in the panel corresponding to p = 0 in figure 3, where the MFPT monotonically decreases (increases) with α + (α − ).
For any p ∈ [0, 1], there is just one non-negative solution ( α + , α − ) of equation (33).This solution has been numerically found for any p, and also approximately through analytical expansions in the vicinity of p = 1/2, p = 1, and p = 0.For the sake of clearness, the mathematical derivations as well as the specific expressions for the theoretical approximations are given in Appendix E. The optimal values of the resetting rates ( α + , α − ) and the resulting minimum MFPT τ (1) , along with their theoretical approximations, are shown in figure 4 as functions of p.The accuracy of the analytical approximations are quite good, even for values of p not so close to the ones used for the expansions.It is just in the limit as p → 0 that the approximation for α − → 0 seems to fail, due to the quite rapid variation of α − in a narrow interval of p-this abrupt variation arises from the emergence of the disorder when changing from p = 0 (no disorder) to p → 0 + (weak disorder).Approximate analytical expressions are obtained for optimal resetting in Appendix E. The agreement between the approximation and the numerical results is reconciled when looking at the semi-logarithmic plot shown in the inset.The plots are restricted to the interval p ∈ [0, 1/2] because of left-right symmetry: for p > 1/2, the optimal rates are obtained by the exchange α − ↔ α + in those for 1 − p, and the optimal MFPT τ (1) is thus symmetric with respect to p = 1/2.27), whereas the lines correspond to asymptotic expansions in the limits p → 0 (solid line) and p → 1/2 (dashed line).The top panel shows the optimal resetting rates ( α + , α − ) as a function of p ( α + : blue, α − : orange).The inset is a zoom of the region close to p = 0-note the logarithmic scale on the horizontal axis.The bottom panel shows the associated MFPT τ (1) , again as a function of p.The asymptotic expansions reproduce quite well the numerical solutions, the mathematical details thereof are provided in Appendix E.

Optimal standard deviation of the first passage time
Now we look into the minimisation of the standard deviation, i.e. look for the solution of the system of equations We use hat notation to refer to the optimisation of the standard deviation, in contrast to the tilde used for the minimisation of the MFPT.Since the analytical expression of σ τ is quite cumbersome, analytical progress does not seem illuminating and we have addressed this minimisation problem numerically.
In figure 5, the optimal values of the resetting rates ( α + , α − ) and the resulting minimum standard deviation σ τ are shown as functions of p.As expected from direct inspection of the case p = 0 in figure 3, the asymptotic value for α ± obtained in the no-disorder limit p = 0 is the same than that found in the minimisation of the MFPT.However, the tendency towards the limit value are much slower here, as discussed in the following section.Comparison between the optimal solutions for the mean first passage time and the standard deviation, all of them obtained from solving numerically each quantity.On the left panel, we show the optimal resetting rates (α + , α − ) (blue circles and orange diamonds, respectively) when either MFTP or the standard deviation are minimised.On the other hand, on the right panel, we compare all the possible cases about the MFTP and standard deviation (purple triangles and red rectangles, respectively) when one of them is optimal.When the marker is filled indicates that the standard deviation is being minimised, whereas it is empty the MFTP is optimal.

Comparisons between the different optimisations
Now we compare the two optimisations we have just analysed, that of the MFPT and that of the standard deviation.In the left panel of figure 6, we present together the optimal resetting rates ( α + , α − ) and ( α + , α − ) that minimise τ (1) and σ τ , respectively.From a qualitative point of view, their behaviour seems to be quite similar, but the optimal resetting rates at minimum standard deviation ( α + , α − ) have a slower dependence on p than that of the optimal resetting rates at minimum MFPT ( α + , α − ).In the right panel of figure 6, we compare the minimum MFPT τ (1) with the MFPT τ (1)  calculated at the rates that minimise the standard deviation; and also the minimum standard deviation σ τ with the standard deviation σ τ calculated at the rates that minimise the MFPT.The standard deviation at minimum MFPT σ τ explodes in the vicinity of p = 0, lim p→0 + σ τ = ∞ despite σ τ is finite for p = 0.This divergence stems from the contribution to the second moment of the less probable target-when evaluated at the extreme values of the resetting rates.The different behaviour of α ± (p) regularises the standard deviation σ τ ; although the contribution of the second moment stemming from the less probable target still diverges, it remains finite when multiplied by p.The divergence of the standard deviation at finite MFPT stems from the interplay between the low value of p, which entails that trajectories with x T = 1 are very rare, and the divergent waiting times over such rare trajectories-as clarified in Appendix E.
It is interesting to note that the MFPT at minimum standard deviation τ (1) in the right panel of figure 6 is not far from the minimum MFPT τ (1) .This is remarkable: if one is interested in avoiding large fluctuations, one should employ the hat parameters minimising the standard deviation; in this way the MFPT is still very close to the optimal one.§ .

Conclusions
In this work, we have investigated the impact of a distributed target position in a minimal model of a stochastically resetting system.This has allowed us to model the uncertainty about the location of the goal of a searcher-in other words, the heterogeneity of its environment, and shed light on looking for realistic optimal search strategies.
In our dichotomous one-dimensional model, the target has probability p (1 − p) of being to the right (left) of the resetting, which is also the initial, position of the searcher x r .Likewise, the resetting rate is different to the right and to the left of x r .The target position represents then a minimal realisation of a quenched disorder, i.e. a fluctuating variable distributed among the realisations but static during a single trajectory.Both exact analytical results and approximate asymptotic expressions in some limits have been obtained for this novel scenario, our theoretical approach has been validated by numerical results.The "deterministic" case p = {0, 1} has been proven to be singular when compared with the small randomness limit, i.e. p → {0 + , 1 − }.
With respect to the first passage time distribution, there appears a crossover between two different exponential behaviours, as a consequence of disorder.In the explored range of parameters, chosen by minimising the MFPT, this is especially significant for small non-vanishing disorder.Therein, a quite long exponential tail, stemming from the contribution of the less probable target, emerges.
The minimisation of the MFPT and the standard deviation have revealed interesting features of optimal search strategies.Of course, the optimal resetting rates with no disorder are those physically expected: the optimal resetting is maximal on the side opposite to the target, whereas there should be no resetting on the target side.Nonetheless, the behaviour at small p is very different from the deterministic case: the standard deviation associated to minimum MFPT diverges.Thus, in a given trajectory, one may experiment very long first passage times at the resetting rates that minimise the MFPT, due to the large fluctuations, which impinges on the usefulness of this minimisation.Interestingly, the minimisation of the fluctuations, i.e. of the standard deviation, gives first passage times very close to the minimum ones for all values of p.This demonstrates the importance of taking an adequate figure of merit, from a practical point of view it is better to minimise the standard deviation because very long first passage times become more rare.Checking if this fact still holds for more complex target distributions is an interesting prospect for further research.
Not only has this study provided new insights on optimal search strategies within resetting systems but also opened promising perspectives for the future of the field.We have focused on providing a minimal model, for which the novel first passage § Also, the minimisation of a combined figure of merit, like the sum of the MFPT plus the standard deviation, would be possible [35].
properties stemming from the disorder could be obtained in an exact way.However, there are many aspects still to be explored, as a consequence of the distributed target position: (i) the latter can be interpreted as a quenched disorder, and a search process in a quenched vs annealed case can be investigated in the framework of disordered systems [18,36,37]; (ii) the problem of finding an optimal resetting rate α(x) for a given target distribution p T (x T ) in 1d processes is still open [1,33], and our work represents a first step in this direction; (iii) our results may be generalised to higherdimensional systems, where we conjecture that the MFPT performance may increase significantly [38]; (iv) prior information about the target distribution leads to more efficient search strategies; in the context of stochastic thermodynamics [39][40][41], it would be interesting to address the role of fluctuation relations and the entropy of information in resetting systems [42][43][44]-in analogy with the situation found in feedback controlled systems [45][46][47]; (v) it is tempting to associate this information to an active particle exploring the environment with a persistent self-propulsion [48,49], following recent approaches in resetting dynamics [50,51].
On each side, an inhomogeneous second order differential equation with constant coefficients holds.The general solution is where we have defined λ ± ≡ s + α 2 ± and brought to bear equation (B.2).In the following, {A, B, C, ϕ + (s|0)}, which are functions of s, are determined by imposing (four) appropriate conditions.These are: (i) the boundary equation in equation (B.1), which now reads and (iv) the continuity of the first derivative, ∂ x 0 ϕ + (s|x 0 ), at x 0 = 0, (s|x 0 ) yields Equation ( 23) of the main text provides a convenient simplification of ϕ + (s|0), obtained from equation (B.11) after substituting λ ± = s + α 2 ± .

Appendix C. The unique real pole for the first passage time distribution
The long-time behaviour of a function m(t) can be derived from its Laplace transform µ(s).Assuming that the singularity of µ with the highest real part s * is a simple pole, as a consequence of Cauchy's residue theorem.Herein, we derive the asymptotic expression for the moment generating function provided in the main text, and show that it depends on the largest real pole s * + of ϕ + (s|0).The poles of the moment generating function in equation ( 23) can be computed analysing when ϕ −1 + (s|0) vanishes.First, we focus on the real axis, where we can prove that there is always a unique negative real pole.For any (α + , α − ), we have that as shown in figure C1 for (α + = 1, α − = √ 2).Furthermore, since its first derivative is always positive, ∂ s ϕ −1 + (s|0) > 0, just one simple pole s * + exists in the interval (−α 2 − , 0).Note that, despite s = −α 2 − is a branching point, the real pole is always larger than it.We have shown the existence of a real pole higher than the branching point of the moment generating function.Nevertheless, it is necessary to check that this is indeed the pole with the highest real part in the whole complex plane.We do not have an analytical proof for this, but the numerical evaluation of the function gives no other pole with higher real part.Once we have shown that s * + corresponds to a simple pole, it is fully justified to use equation (C.1), which leads to equation (24) in the main text.Due to the symmetry of the problem, which we have repeatedly made use along this work, a similar result applies to ϕ − (s|0), with its largest real pole s * − .
are symmetric and antisymmetric under the exchange α + ↔ α − .From homogeneous resetting, it is known that F s is optimal for α + = α − = α h , where the symmetric optimal rate α h is given by the equation where W 0 is the principal branch of the Lambert W function [25,34]. .(E.11) We have cut the expansion for ( α + , α − ) above at linear terms, which provides good estimates in the vicinity of p = 1/2.Nonetheless, higher-order corrections can be incorporated to the expansion in a systematic manner, without any technical difficulty.

Minimum uncertainty about the target location
In the opposite regime, p = δp ≪ 1 (recall that we have restricted ourselves to 0 ≤ p ≤ 1/2 because of the symmetry of the problem), it is almost sure that the target lies on the half-line to the left of the resetting point.As physically expected, for p = 0, the optimal rates are α − = 0 and α + → ∞, i.e. a reflecting boundary at the origin and free diffusion for any x < 0. Therefore, one expects to have α − ≪ 1 and α + ≫ 1 in the limit as p → 0 + .Our starting point is equation (32) fot the MFPT, which now reads (E.12) In the limit α − ≪ 1 and α + ≫ 1, the leading terms in F For obtaining the optimal values ( α + , α − ), we enforce ∂τ (1) /∂α ± to be zero, which gives us the leading terms of the optimal resetting rates for δp ≪ 1, It is interesting to estimate the value of the pole s * + in this limit, for the optimal rates just derived above.It is the vanishing of s * + in the limit as p → 0 + that explains the divergence of the second moment-and thus of the standard deviation-therein.When looking for the poles of the moment generating function ( 23

Figure 1 .
Figure 1.First passage time distribution for the disordered resetting system.Specifically, we plot the results from the numerical simulation (circles), the numerical Laplace inversion of equation (23) (dashed red line), the asymptotic contribution from f + given by equation (24) (dotted blue line), the asymptotic contribution from f − given by equation (26) (dotdashed orange line), and the sum of the two latter asymptotic contributions (solid green line).On the inset plot of the right top panel, we can check how the numerical Laplace inversion and simulations agree at short times and both lines overlap with the asymptotic estimation from t = 2 • 10 −1 on.

Figure 2 .
Figure 2. Mean first passage time (left panel) and its standard deviation (right panel) as functions of α + , at fixed α − = 2. Simulation data (symbols) is compared with the exact analytical results (solid lines), showing a perfect agreement.Different values of disorder p have been used to produce the different curves, as detailed in the legend.

Figure 3 .
Figure 3. Density plots of the mean first passage time (left panels) and its standard deviation (right panels) on the (α + , α − ) plane.They are obtained by the evaluation of our exact results in equations (27)-(30).Different rows stand for different values of the disorder p, namely p = {0, 0.05, 0.5} from top to bottom.In each panel, white is used to indicate values larger than the maximum one in the corresponding colour legend, whereas the filled black star indicates the minimum-for p = 0 it is reached at α + → ∞ and α − = 0.

Figure 4 .
Figure 4. Minimum mean first passage time as a function of the disorder.Empty symbols stand for the numerical values obtained from minimising the MFPT, equation (27), whereas the lines correspond to asymptotic expansions in the limits p → 0 (solid line) and p → 1/2 (dashed line).The top panel shows the optimal resetting rates ( α + , α − ) as a function of p ( α + : blue, α − : orange).The inset is a zoom of the region close to p = 0-note the logarithmic scale on the horizontal axis.The bottom panel shows the associated MFPT τ(1) , again as a function of p.The asymptotic expansions reproduce quite well the numerical solutions, the mathematical details thereof are provided in Appendix E.

Figure 5 .
Figure 5. Minimum standard deviation of the first passage time for the disordered resetting system.Filled symbols stand for the numerical values obtained from minimising the standard deviation, as a function of the disorder p.The top panel shows the optimal resetting rates ( α + , α − ) (filled blue circles and filled orange diamonds, respectively).The bottom panel displays its associated minimum value σ τ (red rectangles), also as a function of p.

Figure 6 .
Figure 6.Comparison between the optimal solutions for the mean first passage time and the standard deviation, all of them obtained from solving numerically each quantity.On the left panel, we show the optimal resetting rates (α + , α − ) (blue circles and orange diamonds, respectively) when either MFTP or the standard deviation are minimised.On the other hand, on the right panel, we compare all the possible cases about the MFTP and standard deviation (purple triangles and red rectangles, respectively) when one of them is optimal.When the marker is filled indicates that the standard deviation is being minimised, whereas it is empty the MFTP is optimal.

Figure C1 .
Figure C1.Inverse of the Laplace transform of the moment generating function over the real axis.The dashed line corresponds to the vertical asymptote at s = −α 2 − , whereas the red star marks the position of the simple pole s * + .

Figure E1 .
Figure E1.Divergence of the variance at minimum MFPT in the limit as p → 0 + .The numerical solutions (symbols) are compared with the leading order of the asymptotic prediction p −1 (solid line).