We investigate the behavior of the FPT probability density on several types of networks. In each of these networks, we select an absorbing node *x*_{a} and calculate the probability density \( {\rho}_{x_0}(t) \) of the FPT to this node from a prescribed starting point x_{0}. In this article we focus on the effects of heterogeneity by introducing a trap node *x*_{h}, at which the travel time distribution is different from the remaining nodes. Although the HCTRW model allows for arbitrary travel time distributions, we restrict our analysis to the simplest case of the exponential distribution. In this case \( {\psi}_{x{x}^{\prime }}(t)={e}^{-t/\tau }/\tau \), where *τ* is the mean travel time and \( {\tilde{\psi}}_{x{x}^{\prime }}(s)=1/\left( s\tau +1\right) \) is the Laplace transform of \( {\psi}_{x{x}^{\prime }}(t) \). When a random walk arrives at the trap node, it is kept there for much longer times than *τ*. This mechanism could be realized by using the exponential distribution with a much larger mean travel time. However, to highlight the effect of the trap node (heterogeneity) x_{h}, we will consider the distribution with infinite mean travel time, typically of the form \( {\tilde{\psi}}_{x_h{x}^{\prime }}(s)=1/\left(1+{s}^a{\tau}^a\right) \), with an exponent α between 0 and 1. We will investigate how the presence of such a trap node and of eventual links avoiding this trap affect the FPT density.

We start with the HCTRW on regular structures, such as one-dimensional lattice chain and finite fractals (“HCTRW on regular graphs” subsection), then we study FPT properties on random networks (“HCTRW on random networks” subsection). In “Analytical insights onto the FPT density” subsection we give some analytical insights onto the FPT density on networks. Finally, we finish with a real-world network example (“Applications to real-world networks” subsection).

### HCTRW on regular graphs

We use the following setup of the HCTRW model on regular loopless graphs. After setting up the trap *x*_{h} and locating the absorbing node *x*_{a} in a given graph we add an avoiding link \( {e}_{x_h^{\prime }{x^{\prime}}_h^{\prime }} \); e.g. in the case of the chain, the nodes \( {x}_h^{\prime } \) and \( {x^{\prime}}_h^{\prime } \) are around the trap node *x*_{h}. Then we compute FPT densities for the cases with and without the avoiding link.

First, we consider the HCTRW on a one-dimensional chain with one absorbing node at x_{a} = 1, one reflecting node x_{r} = 100 and one trap node x_{h}, which is located either to the left or to the right from x_{0}. The corresponding FPT densities (see Fig. 1) show the same long-time behavior *t*^{−t − a}, discussed in (Grebenkov and Tupikina 2018). This result can be understood from the fact that a random walk on a one-dimensional chain with or without avoiding link will eventually get into a trap node even though an avoiding link potentially is allowing for a random walker to overjump over the trap.

Second, we consider a generalized Vicsek fractal, Gv_{gf}, as an example of regular loopless structures, which resembles the dendrimers construction (Blumen et al. 2004; Liu et al. 2015). The fractal Gv_{gf} is constructed iteratively in a deterministic way by going from generation g to generation *g* + 1 with coordination number *f*. A Vicsek fractal graph for *f* = 3 and *g* = 3 is shown in Fig. 2 (top). At the same time, it is known that the spectral properties of graph Laplacians are reflected in dynamical properties of random walks on them. In the case of the Vicsek fractal, the graph Laplacian obeys the simple scaling, determined by the spectral dimension of the Vicsek fractal *d*_{s}=\( \frac{\ln\;\left(f+1\right)}{\ln\;\left(3f+3\right)}\approx 0.557 \).

We use the HCTRW setup, where all travel time distributions are \( {\tilde{\psi}}_{x{x}^{\prime }}(s)=1/\left(1+ s\tau \right) \), except for the trap node *x*_{h}, at which \( {\tilde{\psi}}_{x_h{x}^{\prime }}(s)=1/\left(1+{s}^a{\tau}^a\right) \) with *α* = 0.5. We compute the FPT density on a Vicsek fractal for two positions of the trap: when the trap *x*_{h} is placed on the shortest path between *x*_{0} and *x*_{a}, or outside of this path, shown on Fig. 2 (top). As we observe from Fig. 2 (bottom) the short-time regime of the FPT density with avoiding link differs from that without avoiding link, whereas these cases give the same power-law scaling \( {t}^{-2{d}_s-1-a} \) in the long-time regime, where *d*_{s} is the spectral dimension of the Vicsek fractal.

### HCTRW on random networks

Here we consider two classes of random networks: Scale-Free (SF) and Watts-Strogatz (WS) model. We construct SF networks using the preferential attachment Barabasi-Albert model *G*(*N*, *m*, *m*_{0}), where *N* is the number of nodes, *m* is the number of initially placed nodes in a network and m_{0} is the number of nodes, a newly added node is connected to (Albert and Barabasi 2002). The preferential attachment mechanism drives the network degree distribution to obey a power law decay with the exponent γ ≈ 3 (von der Hofstadt 2017). Both, SF networks with and without loops show the small-world property.

The small-world Watts-Strogatz network model is denoted by *G*(*k*, *β*), where *k* is the average network degree and *β* is the rewiring parameter (Watts and Strogatz 1998). WS model is constructed from a regular ring lattice, a graph where each node is connected to *k* neighbors, *k* = 2 on each side, where each link is then rewired with the probability *β*.

We numerically compute the FPT density on these random networks. We begin with demonstrating the FPT densities on one random realization of SF network, while we also checked that results are qualitatively the same when considering an ensemble of random networks.

First, we investigate the influence of a single trap placed in different communities of SF networks. The network communities structure, where each community is a group of nodes, which are interlinked with each other more than with other nodes, was extensively studied in the last decades (Barthelemy 2011; Schaub et al. 2017). Here we answer a more simple question: how a random walk can “see” the places of the trap in different areas of random networks. We choose non-intersecting communities in SF network, which are connected through the only edge to each other. Then we choose the absorbing node x_{a} on this edge, as shown in Fig. 3 (top) and consider two cases by placing a single trap in two different communities with respect to the node *x*_{a}: (a) trap is placed on a path (maybe not the shortest) between *x*_{0} and *x*_{a}, denoted as *x*_{0} < *x*_{h} < *x*_{a}, hence a random walk cannot avoid getting into the trap *x*_{h}; (b) trap is placed in another community in respect to x_{0} node, such that a random walk is able to reach *x*_{a} without passing through *x*_{h}. We also randomly fix *x*_{0}. Figure 3 illustrates these cases. The FPT densities for these two cases are compared with the FPT density for the homogeneous case of CTRW model, when all travel time distributions are exponential with the same parameter \( \tau :{\tilde{\psi}}_{x{x}^{\prime }}(s)=1/\left(1+ s\tau \right) \). We find that a random walk in HCTRW from the case (b) gives the homogeneous CTRW model, since the trap node x_{h} cannot be reached by a random walk. At the same time, placing a trap in the same community with x_{0} and x_{a} (case (a)) changes the long-time behavior of the FPT density in comparison to the homogeneous case (Fig. 3 (bottom)). In contrast, for the case (b) the long-time behavior is the same as for the homogeneous case. We note that communities structure in larger networks can be more complicated than in the scheme, Fig. 3 (top), and the HCTRW framework with placing traps in different parts of a network can be used for analysis of communities and trapping efficiency.

#### FPT density on scale-free networks

From our numerical results for loopless networks (“HCTRW on regular graphs” subsection) we observe that the FPT densities can differ from each other in the short-time regime. Here we numerically calculate the FPT density for the HCTRW separately in two cases of SF networks: for SF with locally tree-like structure (*m* = 1 parameter of SF model) and with loops (*m* > 1).

First we test the influence of the global topological properties on the FPT density and plot it for SF networks with fixed m_{0} and various m parameters and homogeneous exponential travel times. Figure 4 shows that the case *m* = 1 affects mostly the short-time and intermediate-time regimes, while cases with m > 1 slightly differ in the short-time regimes.

We fix all travel times to be independent identical exponentially distributed \( {\tilde{\psi}}_{x{x}^{\prime }}(s)=1/\left( s\tau +1\right) \); *τ* = 1, except in *x*_{h}, at which \( {\tilde{\psi}}_{{\mathrm{x}}_{\mathrm{h}}{\mathrm{x}}^{\prime }}\left(\mathrm{s}\right)=1/{\left({\mathrm{s}}^a{\tau}^a+1\right)}^v \), *α* ∈ (0, 1), *v* = 2, where an auxiliary parameter *v* allows one to scatter more \( {\rho}_{x_0}(t) \) for different *x*_{0}. The FPT densities are computed for different starting points *x*_{0} and fixed *x*_{a} on a SF network (Figs. 5 and 6). Knowing that there are different shortest path distances between x_{0} and x_{a}, we estimate numerically the lengths of all possible shortest lengths ∣*x*_{o}, *x*_{a}∣ for fixed *x*_{a} using Dijkstra’s algorithm. We numerically explore the relation between the short-time regime of the FPT density and the intrinsic network metrics, defined by the shortest paths between nodes.

For SF network with loops there exist several shortest paths between randomly taken nodes. For example, in a SF network with *m* = 5; *m*_{0} = 6; *N* = 100, there are three groups of the shortest paths between all pairs of nodes with three different lengths. Correspondingly, we clearly observe three different early time behaviors for the FPT density, while for large time the FPT densities behave similarly for different x_{0}. This illustrates the fact that the long-time behavior of the FPT density does not capture some important information about the system.

Next, we compare the FPT densities of SF tree and non-tree networks for different starting positions x_{0} (Figs. 5 and 6). We observe that changing x_{0} in a SF tree (Fig. 5) generally affects the whole FPT density, while changing x_{0} in a SF network with m > 1 (we show it for *m* = 5) only affects the short-time regime. Generally, we observed that the short-time regime is affected by the geometric network properties, such as the distance between x_{0} and x_{a}. This illustrates the fragility of the transport properties on tree-like structures. One of simple explanations is that for the same number of nodes N a tree network has larger variety of distances between nodes than in the case of a network with loops.

#### FPT density on Watts-Strogatz networks

Another example of a network with small-world property is the WS network model (Watts and Strogatz 1998). The average shortest path length M in the WS model gives an estimate of the small-world property. For *β* = 0 (k-circular graph) the average shortest path length is *N* = 4 k (Barrat and Weigt 2000; Newman et al. 2000). While for *β* ≠ 0 the average shortest path length is smaller than N = 4 k. For *β* = 0.2; k = 8 we get M ≈ 4, Fig. 7 (top). The FPT density for WS network with various initial positions *x*_{0} and fixed *x*_{a} are shown in Fig. 7 (bottom). Here we consider the WS network with the rewiring probability *β*= 0.2, the average degree *k* = 8 and *N* = 100 nodes.

In the short-time regime we clearly see m distinct groups, where *m* is the number of different shortest paths lengths in a network. Another observation is absence of a plateau in the intermediate regime (Fig. 7) for SF -networks with *m* = 5 for *t* ∈ [10^{1}; 10^{3}], see Fig. 6.

### Analytical insights onto the FPT density

Here we discuss the analytical calculations for the short-time and long-time regimes of the FPT density for a particular case of HCTRW model. Let us consider a path of a random walk from x_{0} to an absorbing node x_{a} on a network with transition matrix Q. If all travel time distributions are exponentials with the mean (t), then the probability of making the path of length n is:

$$ {p}_n(t)=\frac{t^{n-1}}{\tau^n\Gamma (n)}\;{e}^{-t/\tau }. $$

(3)

In the short-time regime the function *t*^{n − 1} dominates, while in the long-time regime the influence of the exponential *e*^{−t/τ} is much more profound. The total probability density of arriving at x_{a} from x_{0} at time t is:

$$ {P}_{x_0{x}_a}(t)=\sum \limits_{n=1}^{\infty }{\left({Q}^n\right)}_{x_0{x}_a}{p}_n(t)=\frac{e^{-t/\tau }}{\tau}\;\sum \limits_{n=1}^{\infty }{\left({Q}^n\right)}_{x_0{x}_a}\frac{{\left(t/\tau \right)}^{n-1}}{\left(n-1\right)!}. $$

(4)

The calculations of the propagator for a tree-like network can be simplified using the property that the n^{th} matrix power in the infinite series becomes zero matrix for n≥d, where d is the diameter of a network (Petit et al. 2018). Variations of the shortest path ∣*x*_{0} − *x*_{a}∣ between the starting point x_{0} and the fixed absorbing node x_{a} affects \( {\left({Q}^n\right)}_{x_0{x}_a} \).

The long-time behavior in finite graphs, regardless of a network topology, has generic exponential tail (Bollt and ben-Avraham 2005). However, this result is valid for the long-term behavior on structures without traps. Let us consider a HCTRW model with induced structural or temporal perturbations, in which all nodes have a finite-moment distribution *ψ* (t) except one node x_{h} with a heavy-tail distribution \( {\psi}_{x_h}(t) \). Then the spectral properties of the generalized transition matrix Q(t) are affected by structural (*Q* → *Q*_{pert}) and distributional (*ψ* (t) for \( {x}_h\to {\psi}_{x_h}(t) \)) perturbations (Grebenkov and Tupikina 2018). In the case of distributional perturbations the graph is kept fixed with the same transition matrix *Q* but the travel time distributions \( {\psi}_{x{x}^{\prime }}(t) \) are edge dependent and the generalized transition matrix Q(t) changes. In the case of structural perturbations, adding or removing links affects the matrix Q itself, as the result, the stationary distribution changes. Both structural and distributional perturbations can be analyzed from the perspectives of temporal networks. In particular, one can consider the behavior of a random walk in the HCTRW model as a simple random walk moving on continuously changing temporal network. In this temporal networks links are available in a certain time intervals, distributed according to some probability distribution \( {e}_{x{x}^{\prime }}(t) \) for an edge \( {e}_{x{x}^{\prime }} \). Here we refer to the frameworks presented in (Ahmad et al. 2018; Lambiotte et al. 2013; Valdano et al. 2018), where continuously evolving networks were presented.

### Applications to real-world networks

Let us give an illustrative example of the HCTRW applications. If a train station with a small number of connections was shut down due to technical problems, it would not significantly increase the number of additional trips that passengers would have to take to arrive at their final destinations. However, if a random perturbation affects a station with many connections or a connecting point between several clusters of stations, the average path length can increase dramatically. In real transportation systems the road occupancy is varying over time, as such, the time of occupancy between two places x and *x*^{′} can be modeled by a random variable distributed with \( {\psi}_{x{x}^{\prime }}(t) \). Then the perturbation in the transportation liquidity (bursts) at some node can be modeled in the HCTRW as the trap x_{h} with heavy-tail travel times. Links avoiding a trap in HCTRW model correspond to additional transport connections in the real-world network, e.g. connection with buses etc. We consider a spreading entity (infection, rumour, flux of passengers, etc.), which can be modelled by a random walk behavior, although in the case of epidemics spreading the spreading quantity is not necessarily conserved. We choose to analyze the London metro (Wolfram mathematica database 2016), which shares some common features with other metro systems in the world, such as the average node degree of around 2.5 inside the core of metro network (Roth et al. 2012). The London metro on Fig. 8 (top) has *N* = 299 stations (nowadays it has around 353 stations and nearly 400 edges). The core of the London metro network, neglecting the radial stations outside the circle, exhibits the small-world property. We introduce a trap (perturbation) to the London metro to see how this affects the transportation properties on the whole network. In Fig. 8 we plot the FPT densities starting from different stations of the London metro and finishing at Piccadilly circus metro station. Comparing Fig. 8 (bottom) with the FPT density for SF and WS networks (Figs. 5, 6 and 7) helps to get us new insights. First, the whole metro network of London is separated into several groups of nodes according to the destination, in each group the short-time regimes of \( {\rho}_{x_0}(t) \) are similar. Second, the long time regime is independent from the starting point (Fig. 8).