Efficient network exploration by means of resetting self-avoiding random walkers

The self-avoiding random walk (SARW) is a stochastic process whose state variable avoids returning to previously visited states. This non-Markovian feature has turned SARWs a powerful tool for modelling a plethora of relevant aspects in network science, such as network navigability, robustness and resilience. We analytically characterize self-avoiding random walkers that evolve on complex networks and whose memory suffers stochastic resetting, that is, at each step, with a certain probability, they forget their previous trajectory and start free diffusion anew. Several out-of-equilibrium properties are addressed, such as the time-dependent position of the walker, the time-dependent degree distribution of the non-visited network and the first-passage time distribution, and its moments, to target nodes. We examine these metrics for different resetting parameters and network topologies, both synthetic and empirical, and find a good agreement with simulations in all cases. We also explore the role of resetting on network exploration and report a non-monotonic behavior of the cover time: frequent memory resets induce a global minimum in the cover time, significantly outperforming the well-known case of the pure random walk, while reset events that are too spaced apart become detrimental for the network discovery. Our results provide new insights into the profound interplay between topology and dynamics in complex networks, and shed light on the fundamental properties of SARWs in nontrivial environments.


I. INTRODUCTION
Random walks (RW), and modifications thereof, are a central model in the theory of stochastic processes and play a prominent role in the description of phenomena in a wide range of spatiotemporal scales.Some classical examples are the modelling of diffusion and transport dynamics in disordered media in physics [1,2], animal movement and foraging in ecology [3], spread of rumors or consensus dynamics in the social sciences [4], stock price modelling in finance [5] and search algorithms in computer science [6], to name but a few.
A key characteristic of random walks is their Markovian nature [7].However, in many relevant scenarios, the future state of a system is strongly influenced by its prior states, such as in protein folding and polymer growth.The self-avoiding random walk (SARW) stands out as a model to address some of these non-Markovian, non-intersecting problems [8][9][10].From a physical point of view, the SARW is a stochastic process whose random variable evolves under the condition of not visiting previously visited states.Tackling the infinite memory of the SARW represents a profound mathematical challenge and, thus, in comparison with the standard random walk, few rigorous results have been established.It has been extensively studied as non-intersecting paths on regular lattices [11][12][13][14].In this context, simply enumerating the number c n of self-avoiding paths of given length n remains as an open problem.In fact, the limit µ ≡ lim n→∞ c 1/n n , the so-called connectivity constant, which provides a lower bound c n ≥ µ n , is unknown for Z d and it has been rigorously found to be 2 + √ 2 only recently for the hexagonal lattice [15].Furthermore, plausible non-rigorous arguments based on spin systems abound regarding SARW's critical behavior and scaling limit, yet their mathematical proof is still lacking in many cases [16].
The emergence of network science more than two decades ago has been particularly fruitful for the development of the theory of stochastic processes and statistical physics [17][18][19].On the one hand, since most networks are embedded in infinite-dimensional spaces, they provide the backbone on which mean-field predictions can be actually tested [20].On the other hand, networks have offered an unprecedented amount of novel domain-specific scenarios on which classical dynamical models can be deployed.This has led to the development of interesting analytical techniques, and has significantly broadened the range of impactful applications of network science, such as those in, for instance, disease containment [21], drug repurposing [22], influence maximization [23], and shock and cascade spreading [24][25][26].
On networked topologies, the behavior of random walks is fairly well established [27][28][29].On the contrary, the SARW's non-Markovian nature has hindered progress toward a comprehensive characterization of its behavior on networks.Yet, during the last years, some theoretical foothold has been gained, by addressing, for example, questions such as the connectivity constant µ and the mean length of the walks computed in several types of networks [30][31][32][33][34][35], as well as the degree distribution of the network not visited by the walker [36][37][38].From an application viewpoint, SARWs have been used, for instance, to detect communities [39], to model purchase activity on signed network products [40] or to model overflow cascade spreading [38].
Searching and navigating discrete, non-regular spaces is a salient problem in many areas of science, finding applications, for instance, in neural networks [41], transportation planning [42,43], website ranking [6] and online social networks [44].It is natural to think of the SARW as an efficient strategy to explore and gather information in uncertain scenarios [45].On networks, it has been numerically shown that self-avoidance can significantly facilitate network exploration, navigability, and discovery [30,46].Analytical results show that if a walker is not allowed to backtrack, i.e., it has just a one-step self-avoiding behavior, then the cover time can be decreased with respect to the backtracking-free case [47].These results prompt us to ask whether longer non-backtracking conditions could lead to a further decrease in the cover time, and whether we can mathematically characterize the behavior of such self-avoiding walkers of finite memory.This article answers these questions in the affirmative.

II. SELF-AVOIDING RANDOM WALKS
Let us consider a network N 0 of size N that is connected, undirected and unweighted, and that lacks degree correlations [48].The fraction of nodes with degree k is given by the degree distribution p 0 (k).A self-avoiding random walk on N 0 can be mapped to a sequence of networks {N t } t≥0 of size N t = N − t, where we identify the time t < N as the number of steps performed by the walker, and where the visited nodes have been sequentially removed together with their links [38].In this way, the initial network changes at each time step until the walker reaches a degree-0 node and it is forced to stop because it has no available neighbors to jump to, i.e., the degree-0 nodes are absorbing states of the dynamics.The number of degree-0 nodes grows in time, so it does the probability to get blocked in one of these states.
To generalize to the case of self-avoiding random walks with finite memory, we assume that at each step the walker resets its memory with a fixed probability r.This has several physical motivations, such as the limitations of the cognitive capacity of a living explorer or a searching strategy programmed under low complexity constraints.This scenario could even represent run-and-tumble motion [49,50] on networks, where self-avoiding moves are related to run events while memory resets correspond to tumbles.Anyway, we assume the reset event restores the accessible topology to its initial configuration N 0 , while the walker keeps its position.Thus, memory resetting becomes a simple yet very suitable strategy to explore a network, since it gets rid, naturally, of the undesirable effect of topological traps.Yet, once the walker is blocked in a certain node, it will need to wait there until the next resetting event occurs.Ideally, we would like to minimize the time spent in trapped configurations, and this motivates a quest for an optimal value of r to efficiently navigate the network or, at least, for a range of values for the resetting parameter, which provide a clear advantage with respect to other searching strategies.This approach is further supported by the observation that our memory-resetting model interpolates between the pure self-avoiding walk (r = 0) and the standard random walk (r = 1).
Stochastic resetting lends itself to be studied with renewal equations [51].Hence, we need first to characterize the reset-free process, that is, the pure self-avoiding random walk, in order to obtain the quantities of interest of the SARW with resetting.Let us start with the time-dependent degree distribution p t (k) of the networks {N t } t≥0 .We denote by ⟨k⟩ t the mean degree of N t , and by its excess degree distribution [52].In general, the excess degree distribution is the probability of finding a node with given (excess) degree following an edge.Here, we can interpret q t (k) as the probability that the walker reaches a node of degree k at time t + 1.The number of nodes of degree k at time t is indicated by N t (k), and we will evaluate the difference of nodes of degree k in a single time step, D t (k) ≡ N t (k) − N t−1 (k).To do this, we have to distinguish whether the walker has reached a degree-0 or not.If it has reached such a node at time t − 1, it stops and N t (k) does not change anymore.For this case we will use the notation D t (•|0) and we have D t (k|0) = 0 for all k.If the walker has not reached a degree-0 node at time t − 1, the walk proceeds and the network does change.In this latter case, we use the notation D t (•|0 c ).Since we work with initially connected networks, the number of nodes of degree k = 0 can only increase as the walk evolves.In particular, their variation is computed as D t (0|0 c ) ≈ ⟨r⟩ t−2 q t−1 (0), where ⟨r⟩ t is the mean value of q t (k).The population of nodes of degree k > 0, instead, may increase-when nodes of degree k + 1 lose an edge incident to a visited node-or decrease during the process, since some of them lose an edge or the removed node was of degree k.These scenarios correspond, respectively, to the three terms in the following equation In the end, applying the law of total probability, for t ∈ {1, . . ., N − 1} we obtain See the Supplemental Material (SM) for more details on the derivation of Eq. (3).The excess distribution q −1 (k) can be chosen accordingly to the initial condition of the walker.For example, if the starting position is randomly selected, then q −1 (k) = p 0 (k).In Fig. SM1 and SM2 we verify that the analytical approximation Eq. (3) compares well with the results obtained from simulations on Erdős-Rényi (ER) and scale-free (SF) random networks.Interestingly, simulated SARWs on SF networks stop, on average, before their counterparts on ER networks.This is investigated in the following.Firstly, notice that p t (k) is the conditional probability of randomly selecting a degree-k node at time t, given that the walk proceeds up to time t.Eventually, at the last time step p t=N (k) = δ k0 , since the chances that a walker has not yet been blocked decrease as time grows.With these observations, and using the relation (1) between p t (k) and q t (k), we are able to compute the average length of a pure SARW on a network.The length of the SARW corresponds to the first time at which the walker reaches a degree-0 node.We call this a stopping event, and its corresponding random variable, the stopping time.The latter is distributed according to the distribution The average length is, simply, the expected value of the stopping time ⟨L⟩ = N −1 t=0 ts(t).Higher-moments of the length of the walk trivially follow the same reasoning.As expected, ⟨L⟩ SF < ⟨L⟩ ER , with walks on ER networks displaying a higher variation in their stopping times, as can be seen in Fig. SM3.
The mean length of the SARW can be seen as a first-passage process to a node of degree 0. We can generalize this to nodes of arbitrary degree k ̸ = 0. To estimate the first-passage probabilities, it is necessary to consider the target degree nodes as absorbing states [7,53], stopping the process when the walker reaches one of them.Hence, we modify Eq. (3), yielding ]. Now the process presents two absorbing states, the degree-0 nodes, which are intrinsic to the SARW dynamics, and the degree-k nodes.The stopping probabilities to these states, respectively s 0 (t) and s k(t), are the probabilities to reach a degree-0 node without reaching a degree-k node before, and vice versa.Thus, They are not probability distributions, yet they verify t s 0 (t) + s k(t) = 1.Indicating the splitting probability by , the mean first-passage time (MFPT) to a node of degree k is If there were not the self-avoiding behavior, we would expect ⟨T k⟩ to be inversely proportional to p( k).However, while the walk evolves, surviving nodes lose neighbors and, hence, the population of low-degree nodes increases at Self-avoiding random walks on random graphs -mean first-passage time to a node of degree k.On two different topologies-(left) SF with N = 1000, α = 2.5 and initial minimum degree 3 and (right) ER with N = 1000 and ⟨k⟩0 = 7we compare our theoretical predictions (solid lines), Eq. ( 8), with the simulations results (markers).Simulations results are averaged over 5000 walker trajectories, computed on 1000 independent SF/ER graphs.For each network, we run the SARW dynamics 5 times, randomly choosing the initial node among those of degree 12 (SF) or 7 (ER).This explains the values ⟨T k ⟩ = 0 for such degrees, respectively.However, the qualitative behavior of ⟨T k ⟩ is independent of the initial condition; see the results for arbitrary initial conditions in Figs.SM5-SM6.
the expense of the high-degree ones.For this reason, the MFPT is non-monotonic as a function of k, displaying a non-trivial local maximum in the intermediate-to-large degree region.Above that maximum, the MFPT decreases because it is difficult to step on a high-degree node, unless the walker finds it in the early exploration phase.Below the local maximum, the MFPT is lower for the opposite reason: those degrees accumulate in the network through the link-removal events.If the target degree keeps decreasing, though, ⟨T k⟩ grows again due to the absence of nodes with very low degree in the initial walking phase.This pattern is clearly visible in Fig. 1, which shows both the theory and simulations of the mean first-passage time on scale-free and Erdős-Rényi networks.Observe that this pattern does not depend on the type of network, although simulations on ER have larger fluctuations for the high values of k.These depend on the particular degree distribution of the model, where the frequency of nodes with high degree is small, hence only for few realizations of the process, the walker effectively reaches those degrees before the walk stops.Finally, note that Eq. ( 7) allows us to characterize the trajectories that arrive at nodes of degree k without visiting degree-0 nodes, i.e., that have not been trapped.This formalism can be easily generalized to devise tailored trajectories that neither visit nodes of degree 0 nor of arbitrary degrees k′ , k′′ , . .., and study their out-of-equilibrium properties.
Recall that the time-dependent degree distribution p t (k), Eq. ( 3), is computed under the assumption that the walker has not been blocked.So, averages are computed only over the non-trapped walks, too.To close the analysis of the pure SARW, we focus on p(t, k), the degree distribution of the network not visited by the walker, considering all walks, including those that have been trapped.To this end, we need to combine the conditioned degree distribution p t (k) with the stopping distribution, such that with the initial conditions p(0, k) = p 0 (k) and p(1, k) = p 1 (k).The first term on the right-hand side is the conditioned degree distribution times the probability that the walker did not stop up to time t, while the summation in the second term considers all the possibilities that the walker stops exactly at any intermediate time 1 ≤ t ′ < t.In Fig. SM7 we verify that the prediction (9) reproduces well the results from simulations.The fact that p(t, k) takes into account all trajectories is evinced in its non-null stationary values, as it can be checked in Fig. SM7.

III. SELF-AVOIDING RANDOM WALKS WITH RESETTING
Now that the reset-free self-avoiding random walk has been characterized, we are in the position to study its finitememory version.Since the network is restored in the resetting events, the time t is no longer constrained to be smaller than the system size.A renewal equation for p r (t, k), standing for the probability of finding a node with degree k at time t for the self-avoiding random walk with resetting (SARWR), can be written as for all t ≥ 2, with initial conditions p r (0, k) = p(0, k) and p r (1, k) = p(1, k).We set p(t, k) = p(N − 1, k) for all t ≥ N .The first term on the right-hand side is the probability that no resetting events happen up to time t, while the second represents the probability that the first resetting occurred at any intermediate time 1 ≤ t ′ < t.
Following similar steps, we evaluate first-passage quantities to a node of degree k, having in mind that in this setup reaching a degree-0 node does not stop the walk permanently, but only until the next reset.To derive the stopping distribution, we use again a renewal equation for the survival distribution.In the reset-free process, this is simply the complementary of the cumulative stopping distribution with initial condition S k(0) = 1.Then, adding the resetting, we obtain with , and S k(t) = S k(N − 1) whenever t ≥ N .The first term on the right-hand side gives the probability that, until time t neither a reset nor any hitting to a degree-k have occurred.The second term represents the probability that the first resetting occurred at some t ′ , without hitting a target neither in (0, t ′ ), nor in (t ′ , t).Thus, the stopping distribution and mean first-passage time for the SARWR are given by The validity of Eq. ( 13) has been proved performing several SARWRs on ER and SF random networks, and on two different real networks-a transportation and a communication network.The comparison between theory and simulations of the mean first-passage time of self-avoiding walkers with memory resetting on the two real networks is displayed in Figure 2. The results for synthetic ER and SF graphs are shown in Figs.SM11 and SM12.
The real networks that we employ present homogeneous and heterogeneous connection patterns: in the transportation network the degrees are approximately exponentially distributed with scale parameter λ −1 = 9.2, while the fitted distribution for the degrees in the communication network is a power-law with exponent α = 1.9.We study the SARWR on their largest connected component, which contain O(10 3 ) nodes.Note the good agreement of theoretical and simulated results, even if degree correlations are present, in general, in real systems.See the SM for additional figures and details.The addition of resetting drastically changes the behavior of the MFPT.On the one hand, the local maximum of the pure SARW disappears, since high-degree nodes are now newly accessible after each resetting.On the other hand, the resetting parameter determines two regimes: for r → 1 high-degree nodes need longer time to be visited, while for r → 0 low-degree nodes have larger MFPTs.
As the last descriptor of the resetting process, we compute d r (t, k), the probability to find the walker on a degree-k node at time t.To use the renewal approach, we need the reset-free probability d(t, k) of finding the walker on a degree-k node.If the walker has not stopped yet, the position is given by q t (k), otherwise it certainly has to be on a degree-0 node.Thus, we obtain and d(t, 0) = 1 − k̸ =0 d(t, k).Including memory resetting, we get Self-avoiding random walk with resetting on the two real networks -mean first passage time to a node of degree k.We compare our theoretical predictions (solid lines), Eq. ( 13), with the simulations results (markers), for a SARWR on (right) the Federal Aviation Administration (FAA) network [54,55] and (left) on the network collecting email exchanges among members of the Rovira i Virgili University in Spain, in 2003 [56].We have used as resetting parameter the values for which the mean waiting time between resets is approximately equal to the SARW mean length on each network, namely, r ≈ 1/35 and r ≈ 1/58, respectively.The light-blue color illustrates the standard deviation.Simulations are run for 5000 different initial conditions, with nodes chosen uniformly at random.
Remarkably, d r (t, k) captures well the semi-absorbing behavior of degree-0 nodes up to the resetting event.The accuracy of this equation is verified in Fig. SM13, SM14 and SM15.
A final question that we address is the mean cover time, which is, on average, the time required to explore the entire network and, hence, quantifies the efficiency of the random search.The cover time for a classical random walk on a random graph, is, almost surely, less than N 3 [57].This strict bound is, nevertheless, much larger than the actual cover time in most networks, yet the precise mean value depends on the degree distribution [58,59].For instance, in random regular graphs it drops to N log N [60,61].We will see next that, by combining the self-avoiding constraint with resetting, we can speed up the exploration of the network with respect to the standard RW, the pure SARW and the non-backtracking random walk.
Broadly construed, the self-avoiding behavior helps the walker to escape the departing node faster than a standard random walk.In turn, self-avoidance blocks the walker at degree-0 nodes.These two effects compete in the process of network discovery.Intuitively, then, we can expect a nontrivial value of the resetting probability r that favors long self-avoiding explorations while minimizing the time the walker is trapped in the pseudo-absorbing states.We numerically compute the cover time for the SARWR in synthetic graphs (Fig. 3, top row) and in the two empirical systems introduced above (Fig. 3, bottom row).We show the dependence of the mean cover time, CT , as a function of the mean time between resetting events τ ≡ 1/r, normalized by the length of the SARW.In all the cases studied, we find the existence of an optimal value of the resetting parameter, r opt , for which CT is a global minimum.
From our analysis it emerges that the minimum cover time CT (r opt ) always occurs for r opt ̸ = 1.Since r = 1implying also τ = 1, i.e., minimum mean waiting time between resets-corresponds to the RW case, r opt ̸ = 1 suggests that the resetting mechanism significantly boosts the exploration speed of classical random walkers.Not any amount of resetting, however, is beneficial to expedite the search: if the resetting rate is small enough, τ increases too much and the CT becomes larger than its value for the random walker case, impairing the efficiency of the search.In this setting, indeed, the walker waits too long in blocked configurations, before a resetting event allows free diffusion anew.
The optimal value the value r opt , and the range of resetting parameters in which the memory resetting outperforms the RW search, obviously depend on the topological properties of the network.In fact, we observe that the role of the topological parameter of each network family (mean degree ⟨k⟩ for ER networks and exponent α in SF networks) impacts very differently how this cover time reduction is achieved.For SF networks, r opt (α) is roughly the same, and the cover time curves have the same functional form, with only a slight reduction as α increases.Hence, the range of resetting rates for which there is a reduction is independent of α.On the other hand, for ER, r opt (⟨k⟩) increases with the mean degree, and so does the parameter region where the exploration improvement is achieved.
It is instructive to compare also the efficiency of the resetting mechanism against the case of reset-free self-avoiding walkers.One could naively think that the optimal strategy that minimizes the cover time could be to perform walks that reset their memory once they get trapped.Statistically, this would mean to set r ≈ ⟨L⟩, where the mean length FIG. 3. Mean cover time CT of self-avoiding random walks with resetting for ER and SF random graphs (top row) and real networks (bottom row).The curves correspond to different values of the topological parameter of the initial degree distribution.On the x-axis there are the mean waiting time (τ = 1/r) values scaled by the mean length of the SARW in the corresponding network.For the ER cases (top left), we have ⟨L⟩ ≈ {170, 360, 365, 400} for the increasing values of ⟨k⟩0 shown in the legend.For the SF cases (top right), ⟨L⟩ ≈ 120 in all four scenarios.For the air transportation network (bottom left) ⟨L⟩ ≈ 35, and for the email exchange network (bottom right) ⟨L⟩ ≈ 58.The limit τ → 1 yields the classical RW case.The network size for the synthetic networks is 500 for all cases, and averages are computed over 8000 independent realizations.⟨L⟩, of course, depends on the network, as we have shown above.The information contained in Fig. 3 reveals that this is generally not true, and that the anticipation of the resetting event well before getting trapped is beneficial to navigate the network.In particular, for the cases studied, we observe that the cover time is minimized when we reset the memory when the walker is between the 8% and the 50% of its mean length.

IV. CONCLUSIONS
All in all, we have shown that the presence of finite memory in the trajectories of self-avoiding random walkers yields an optimal value for the cover time, outperforming previously reported efficient strategies for network exploration, such as non-backtracking and pure self-avoiding walkers.We model this as a stochastic resetting problem, where a self-avoiding random walker repeatedly forgets its trajectory with a certain probability.We have analytically characterized the process via the reduction of the infinite memory of the pure self-avoiding random walk to a quasi-Markovian process of shrinking networks, where the main quantities at time t depend only on those at time t − 1 and t − 2.Moreover, the method presented here is particularly convenient to give insights on large networks, since the analytical estimates based on degree distributions, which typically contain, at most, k max ∼ O( √ N ) values [62], have a much lower algorithmic complexity than those of classical random walks, based on the graph's N × N adjacency matrix and its powers [29].By way of example, we can easily obtain analytical estimates for the position of the walker and for first-passage time and survival distributions in huge networks for which it would be unfeasible to use a matricial approach.Yet, the information provided by our framework comes aggregated by node degree, at odds with more traditional approaches, that comes at a single node level.Using one framework or another narrows down to balancing the granularity of the information we want to retrieve and the computational capabilities to calculate the quantities of interest.
By means of master and renewal equations, we have provided a characterization of the stochastic properties of our model at several scales.At the smallest scale, we have obtained the time-dependent probability to find the walker at a node of arbitrary degree.At the network level, we offer excellent estimates for the degree distribution of the non-visited network.These two metrics are the building blocks to address other quantities useful in the context of network search and navigability.Here, at the smallest scale we have the first passage to nodes of arbitrary degree, for which we observe a non-monotonic behavior with a global minimum, located in the area where the degree distribution attains its maximum, as one would expect.Remarkably, in the area of intermediate-to-large degrees, we report the emergence of a non-trivial local maximum, which our theory captures, consequence of the non-ergodic shrinking of the network during the navigation of the self-avoiding walker.At a larger scale, we discover an optimal value of the resetting parameter that minimizes the time to cover the network.In practical terms, we unravel the efficiency behind using finite memory in exploration scenarios.These results are expected to be robust, as far as the topological correlations in the explored network are not strong.
An important feature of our model is that it uses only local information.That is, the full topology of the network need not to be known, since the walker moves only to non-visited neighboring nodes.This locality, along with the addition of finite memory, offers some similarities and differences with well-known models in non-equilibrium statistical physics.Our model could be mapped to a version of run-and-tumble motion on networks, where the "tumble" events would correspond to memory erasures and the "run" events would correspond to the self-avoiding trajectories of the walker.Additionally, one could constrain the "runs" to moves that only step the walker further away from the departure node, yet this would significantly change the blocking conditions and would require an alternative mathematical treatment.Our model could be easily adapted to model some Lévy processes, that are known to be efficient exploration strategies under the right circumstances [63,64].In this context, when it comes to exploring networked systems, most works deal with the case of Lévy flights, i.e., walkers whose length jump is distributed according to a power law and whose transitions to any site occurs in single time step, no matter how far that site is [65][66][67][68][69].These instantaneous propagation and discontinuity (i.e., nonlocality) in the trajectories might be unphysical in certain scenarios, specially when the walker is a physical entity or when the complete topology is not known.Our model better aligns with Lévy walks, where the walkers possess a finite velocity and long transitions take proportionally longer times; see, for instance, [70] for a thorough discussion on the similarities and differences of Lévy flights and Lévy walks.Indeed, in our model the trajectories are always continuous (i.e., local) and the memory resetting trials at each time step with probability r are equivalent to set a self-avoiding trajectory of length ℓ, where ℓ is a random variable distributed according to a geometric distribution of parameter r, assuming the appropriate boundary conditions [70].Similarly, one could investigate trajectories whose length is distributed with an arbitrary probability density function, such as p(ℓ) ∼ ℓ −γ , with γ ∈ (1, 3], typical of Levy processes.The renewal equations lend themselves to be generalized to arbitrary length distribution, that is, to arbitrary resetting statistics.
On these bases, we envision promising extensions of the mathematical framework presented here due to its flexibility, such as including more complex resetting statistics [51], modifying the dynamical rules underlying the walker moves, and considering more realistic network topologies, such as multilayer [71] and higher-order networks [72].We hope that our results become a stepping stone on the path toward improving network exploration, navigability and discovery, in particular, and toward disentangling the intricate interplay between memory and topology in complex systems, in general.
V. ACKNOWLEDGMENTS and, finally, using Eq. ( 3) we can evaluate an approximated p t (k).Given this approximation, p t may not be a proper distribution.Let us suppose p t−1 , q t−1 and q t−2 are normalized and let us compute the normalization constant for p t Observe that the support of p t depends on t since, as time passes the probability of some degrees becomes null.Nevertheless, we can always add zeros to our summation and simply write The normalization constant differs from 1 by a quantity that depends on N t and q t−2 (0).For small t (or, equivalently, large N t ) we have Instead, for large t, the probability to reach a degree-0 node goes to 1, and the last term is still very close to zero, because the numerator goes to zero.In conclusion, we take Eq.(3) as a good approximation of a distribution.

Network details
All the theoretically derived equations presented in the main article have been extensively tested via numerical simulation.We considered Erdős-Rényi (ER) random graphs with initial degree distribution where ⟨k⟩ 0 = 7, 11, 15, 19 and N = 1000, 2200, 4600 and 10000.For the same values of N , we considered also scale-free (SF) random network with initial degree distribution where α = 2.5, 2.8, 3.1 and 3.5.Here, we present the results only for ER with N = 1000 and ⟨k⟩ 0 = 7, and SF with N = 1000 and α = 2.5.Self-avoiding random walks with resetting are studied in the synthetic networks mentioned above, as well as in two empirical networks.The first one represents the exchange of emails among members of the Rovira i Virgili University in Catalonia, in 2003 [56].Nodes represent email addresses, and two nodes are linked if they exchanged at least an email, with reply (unidirectional links were disregarded).Emails sent to more than 50 recipients were not considered.We consider only the largest connected component, which consists of 1133 nodes.The degree distribution is fitted well by an exponential p 0 (k) ∝ exp(−k/k * ), for k ≥ 2 and k * = 9.2.The empirical degrees range from 1 to 34, with an average of, approximately, 9.6.The second real network has been constructed by the USA's FAA (Federal Aviation Administration) [54,55] and is henceforth referred to as the FAA network.It has 1226 nodes, representing the airports or service centers.Links are created from strings of preferred routes recommended by the NFDC (National Flight Data Center).A power-law p 0 (k) ∝ x −α , with α = 1.9 fits well its degree distribution.Here, the (empirical) average degree is 3.9, while the maximum is 71.Since 95.5% of the nodes have degree at most 30, we restrict our computations, e.g., for the mean first-passage time, to k = 30 for both real networks.FIG.SM4.SARW stopping distribution -different topological parameter.We compare the theoretical predictions of the stopping distribution s(t) for different topological parameters.(Left) s(t) is computed for ER random networks with N = 1000 and different initial mean degree ⟨k⟩0, reported in the legend.The shape of s(t) varies visibly for varying ⟨k⟩0.This implies that also its moments, in particular the length of the SARW, change as functions of the initial average degree.(Right)s(t) is computed for SF random networks with N = 1000 and different exponent α, reported in the legend.Here, varying the parameter α does not have an impact on the stopping distribution and, so, on the SARW's mean length.This dependency on the topological parameters agrees with what is reported in Fig. 3. FIG.SM5.SARW on SF random graphs with N = 1000 and α = 2.5 -mean first passage time.We compare our theoretical predictions (solid lines) with the simulations results (markers).Simulations are run on a sample of 1000 random networks from the SF model with fixed initial degree distribution, for 5 different initial conditions.(Left) The walks start on a node chosen uniformly at random.(Right) The walks start on a node chosen uniformly at random among those nodes of degree 12.
FIG. SM6.SARW on ER random graphs with N = 1000 and ⟨k⟩0 = 7 -mean first passage time.We compare our theoretical predictions (solid lines) with the simulations results (markers).Simulations are run on a sample of 1000 random networks from the ER model with fixed initial degree distribution, for 5 different initial conditions.(Left) The walks start on a node chosen uniformly at random.(Right) The start on a node chosen uniformly at random among those nodes having degree 7. The fluctuations for the high values of k are due to the fact that only for few realizations of the process, the walker reaches those degrees before reaching a node of degree 0. Recall that the degree distribution of ER random graphs is approximately Poisson, so that ⟨k⟩0 = 7 represents both the mean and variance of the initial degree distribution.At k = 20, we are about five standard deviations away from the average degree.FIG.SM7.SARW temporal degree distribution.We compare our theoretical predictions (solid lines) with the simulation results, markers.The distribution p(t, k) is represented as a function of time for some fixed values of k. (Left) Distribution for ER random graphs with N = 1000 and ⟨k⟩0 = 7; simulations are run on a sample of 1000 random networks with fixed initial degree distribution, for 5 different initial conditions (randomly chosen initial nodes).(Right) Distribution for SF random graphs with N = 1000 and α = 2.5; simulations are run on a sample of 2000 random networks with fixed initial degree distribution, for 10 different initial conditions (randomly chosen initial nodes).Average values are shown.The vertical lines represent the mean length of the SARWs on both random topologies, which are approximately 170/N and 120/N , respectively.

Self-avoiding random walk with resetting (SARWR) -Additional figures
Let us first provide more details on the resetting parameter r.Since it is reasonable to assume that this parameter is intrinsic to the walking process, we chose to keep r constant across the walk, i.e., r(t) ≡ r.The probability that the first resetting takes place at time t is described by a geometric random variable R 1 with parameter r, with distribution Considering identically distributed and independent consecutive resettings R i , E[R i ] also represents the mean waiting time (τ ) between two consecutive resetting events.Values of r close to 1 lead to the classical random walk, while for r → 0 we are, again, in the SARW scenario.We observed that an interesting range for the resetting parameter is [⟨L⟩ −1 , 1], since r opt is always contained in it.This aspect can be easily seen in Fig. 3, noticing that on the x-axis we represent the values τ /⟨L⟩ that correspond to [r⟨L⟩] −1 .FIG. SM15.SARWR on the two real networks -probability to find the walker on a degree-k node.We compare our theoretical predictions (solid lines) with the simulations results (markers).The panels show the probability dr(t, k) as a function of time for some fixed value of k. (Left) dr(t, k) is computed for the FAA network and the resetting parameter r is approximately equal to 1/35.(Right) dr(t, k) is computed for the email's network and the resetting parameter r is approximately equal to 1/58.Simulations are run for 5000 different initial conditions (randomly chosen initial nodes).Average values are shown.
FIG. SM1.SARW conditional temporal degree distribution for ER random graphs with N = 1000 and ⟨k⟩0 = 7.We compare our theoretical predictions (solid lines) with the simulation results, indicated by markers.(Left) The distribution pt(k) is represented as a function of t/N for some fixed values of k.The vertical line represents the mean length of the SARW, that in this case is approximately equal to 170.(Right) The distribution pt(k) is represented as a function of k for some fixed values of t.The lack of markers for t > 0.5N in both panels is due to the absence of simulations surviving longer than 0.5N .Simulations are run on a sample of 1000 random networks from the ER model with fixed initial degree distribution, for 5 different initial conditions (randomly chosen initial nodes).Average values are shown.

FIG. SM8 .
FIG. SM8.SARWR temporal degree distribution for ER random graphs with N = 1000, ⟨k⟩0 = 7 and different resetting parameter r.We compare our theoretical predictions (solid lines) with the simulation results, indicated by markers.The distribution pr(t, k) is represented as a function of time for some fixed values of k.Simulations are run on a sample of 1000 random networks from the ER model with fixed initial degree distribution, for 5 different initial conditions (randomly chosen initial nodes).Average values are shown.(Left) The resetting parameter r is approximately equal to 1/51.(Right) The resetting parameter r is approximately equal to 1/259.The vertical lines represent the 1 r value.