We first present a deterministic algorithm for computing the exact value of σ_{
T
}(v) for the case that T≤4 in the ‘A deterministic algorithm’ section and then present a randomized algorithm for estimating σ_{
T
}(v) for T≥5 in the ‘A randomized algorithm’ section.
Definition 4.
In this study, we define

a path is a sequence of nodes, each of which is connected to the next one in the sequence; and a path with no repeated nodes is called a simple path.

a cycle is a path such that the first node appears twice and the other nodes appear exactly once; and a simple cycle is a cycle such that the first and last nodes are the same.
4.1 A deterministic algorithm
According to the observation in [15], the EIS of a node v after three or four hops is negligible in most cases. Therefore, we are interested in how to compute σ_{
T
}(v) for T≤4. In [11], it has been shown that the EIS of a seed set S under the LT model can be formulated as
\begin{array}{l}\sigma \left(S\right)=\sum _{\pi \in \mathcal{P}\left(S\right)}\prod _{e\in \pi}w\left(e\right)+\leftS\right\phantom{\rule{1em}{0ex}}\left[15\right],\end{array}
where \mathcal{P}\left(S\right) denotes the set of simple paths starting from nodes in S, π denotes an element in \mathcal{P}\left(S\right), and e denotes an edge in π. Thus, ∀v∈V, we have
\begin{array}{l}\sigma \left(v\right)=\sum _{\pi \in \mathcal{P}\left(v\right)}\prod _{e\in \pi}w\left(e\right)+1,\end{array}
where \mathcal{P}\left(v\right) denotes the set of simple paths starting from node v.
As an example shown in Figure 1, considering v_{0} is an active node, then the probability that v_{4} can be activated by v_{0} is w(0,1)w(1,4)+w(0,2)w(2,4)+w(0,3)w(3,4), which is the sum of weight products of all the simple paths from v_{0} to v_{4}. Although the example is easy to understand, in a general graph G, it requires exponential time to enumerate all the simple paths. Thus, to compute the exact value of σ(v) is computational intractable, and a hop constraint T is used in this paper to balance the accuracy of EISE and the program efficiency in terms of running time.
In order to find a node v with the maximum σ_{
T
}(v), we have to compute σ_{
T
}(v) for all the nodes v∈V. Let σ_{0}(v)=1 (∀v∈V); we first consider the simple case that T=1. In such cases, we have {\sigma}_{1}\left(v\right)={\sigma}_{0}\left(v\right)+\sum _{u\in {N}_{\text{out}}\left(v\right)}w(v,u), because there is only direct influence spread without propagation. When T>1, we can compute σ_{
T
}(v) by recursively finding all the simple paths of length no more than T, starting from v, which requires O(Δ^{T}) time by using the depthfirst search (DFS) algorithm, and Δ denotes the node maximum degree. Thus, let G be a weighted directed graph; computing σ_{
T
}(v) for all the nodes in G requires O(n Δ^{T}) time if we use the above simple path method [15], where n denotes the number of nodes in G. To further improve the running time performance, we develop a dynamic programming (DP) approach to compute σ_{
T
}(v) for T≤4. It is based on searching cycles instead of simple paths.
As an example shown in Figure 2, there are three types of cycles of length 4, and only the third one is a simple cycle. Let {\mathcal{C}}_{l}\left(v\right) denote the set of cycles of length l, starting from v, and let
{\varrho}_{T}\left(v\right)=\sum _{l=2\cdots T}\sum _{\pi \in {\mathcal{C}}_{l}\left(v\right)}\prod _{e\in \pi}w\left(e\right),
we have
\begin{array}{lcr}{\sigma}_{T}\left(v\right)& =& {\sigma}_{0}\left(v\right)+\sum _{u\in {N}_{\text{out}}\left(v\right)}w(v,u)\xb7\left({\sigma}_{T1}^{V\setminus v}\right(u\left)\right)\\ =& {\sigma}_{0}\left(v\right)+\sum _{u\in {N}_{\text{out}}\left(v\right)}w(v,u)\xb7\left({\sigma}_{T1}\right(u\left)\right)\\ \phantom{\rule{1em}{0ex}}{\varrho}_{T}\left(v\right),\end{array}
where {\sigma}_{T1}^{V\setminus v}\left(u\right) denotes the EIS of node u in the induced graph of V∖v within T−1 hops, and ϱ_{
T
}(v) denotes the invalid influence spread involving cycles.
Figure 3 shows an example, in which v_{3} and v_{4} are v_{0}’s outgoing neighbors. It is easy to see σ_{2}(v_{3})=1+w(3,0)+w(3,1)+w(3,0)w(0,4) and σ_{2}(v_{4})=1. Thus,
\begin{array}{l}{\sigma}_{0}\left({v}_{0}\right)+\sum _{u\in {N}_{\text{out}}\left({v}_{0}\right)}w({v}_{0},u)\xb7\left({\sigma}_{2}\right(u\left)\right)\\ =& w(0,3)+w(0,4)+w(0,3)w(3,0)+w(0,3)w(3,1)\\ \phantom{\rule{1em}{0ex}}+w(0,3)w(3,0)w(0,4)+1,\end{array}
in which the terms w(0,3)w(3,0) and w(0,3)w(3,0)w(0,4) have to be removed since they involve cycles. The rest of this section is devoted to investigating how to compute ϱ_{
T
}(v) for T≤4.
Lemma 1
Given a weighted directed graph G(V,E,w) and an arbitrary node v∈V, ϱ_{
T
}(v) can be computed in O(Δ^{2}) time when T≤4.
A brief description for the idea of our method is presented before the formal algorithm and its proof. Firstly, ϱ_{
T
}(v) involves all the cycles of length no more than T, starting from v. In order to compute ϱ_{4}(v) efficiently, we divide ϱ_{4}(v) into three parts: \sum _{\pi \in {\mathcal{C}}_{l}\left(v\right)}\prod _{e\in \pi}w\left(e\right) (l=2,3,4) to carry on the analysis. If each part can be computed in O(Δ^{2}) time, ϱ_{4}(v), which is the sum of them, can be obtained in O(Δ^{2}) time. Secondly, considering {\mathcal{C}}_{l}\left(v\right) (2≤l≤4), we can further classify the cycles in {\mathcal{C}}_{l}\left(v\right) into l−1 types. Note that a cycle of length l, starting from v, consists of a sequence of l+1 nodes, two of which are v and others are distinct. Therefore, we can label a cycle according to the position in the sequence where the second v appears. ∀v∈V, let {\mathcal{C}}_{T}^{l}\left(v\right) denote the set of cycles of length T, whose l th node is v, we have
\begin{array}{lcr}{\varrho}_{T}\left(v\right)& =& \sum _{l=2,\cdots \phantom{\rule{0.3em}{0ex}},T}\sum _{\pi \in {\mathcal{C}}_{l}\left(v\right)}\prod _{e\in \pi}w\left(e\right)\\ =& \sum _{l=2,\cdots \phantom{\rule{0.3em}{0ex}},T}\sum _{{l}^{\prime}=3,\cdots \phantom{\rule{0.3em}{0ex}},l+1}\sum _{\pi \in {\mathcal{C}}_{l}^{{l}^{\prime}}\left(v\right)}\prod _{e\in \pi}w\left(e\right).\end{array}
In order to compute ϱ_{
T
}(v), our method will compute each \sum _{\pi \in {\mathcal{C}}_{l}^{{l}^{\prime}}\left(v\right)}\prod _{e\in \pi}w\left(e\right) separately.
Proof
We will prove Lemma 1 by showing that \sum _{\pi \in {\mathcal{C}}_{l}\left(v\right)}\prod _{e\in \pi}w\left(e\right) can be computed in O(Δ^{2}) time when l=4, and for the case that l<4, \sum _{\pi \in {\mathcal{C}}_{l}\left(v\right)}\prod _{e\in \pi}w\left(e\right) can be computed in O(Δ^{2}) time or less via a similar method. As we have mentioned above, there are only three types of cycles of length 4, as shown in Figure 2.
Consider case (I). Such a cycle consists of a simple cycle of length 2 and a simple path of length 2. Let {\mathcal{P}}_{2}\left(v\right) denote the set of simple paths of length 2, starting from v, and {\mathcal{C}}_{2}^{3}\left(v\right) denote the set of simple cycles of length 2 through v. {\mathcal{P}}_{2}\left(v\right) can be obtained in O(Δ^{2}) time by DFS, and {\mathcal{C}}_{2}^{3}\left(v\right) can be obtained by finding the set of nodes that are both incoming and outgoing neighbors of v, i.e.,
\begin{array}{l}{\mathcal{C}}_{2}^{3}\left(v\right)=\left\{\right.(v,u,v):u\in {N}_{\text{out}}\left(v\right)\cap {N}_{\text{in}}\left(v\right)\left\}\right..\end{array}
The intersection of two lists can be obtained in linear time if the two lists are sorted. Let I(v)=N_{out}(v)∩N_{in}(v) and \kappa =\sum _{u\in I\left(v\right)}w(v,u)w(u,v); we have
\begin{array}{l}\sum _{\pi \in {\mathcal{C}}_{4}^{3}\left(v\right)}\prod _{e\in \pi}w\left(e\right)\\ =& \sum _{\pi \in {\mathcal{P}}_{2}\left(v\right)}\sum _{u\in I\left(v\right)\setminus \pi}w(v,u)w(u,v)\prod _{e\in \pi}w\left(e\right)\\ =& \sum _{\pi \in {\mathcal{P}}_{2}\left(v\right)}\left(\kappa \sum _{u\in \pi \cap I\left(v\right)}w(v,u)w(u,v)\right)\prod _{e\in \pi}w\left(e\right)\\ =& \sum _{\pi \in {\mathcal{P}}_{2}\left(v\right)}\left(\kappa \sum _{u\in \pi \setminus v}w(v,u)w(u,v)\right)\prod _{e\in \pi}w\left(e\right),\end{array}
in which I(v)∖π denotes the set of nodes in I(v) but not in π, e∈π denotes an edge in π, and u∈π denotes a node in π. Note that if u∉I(v), we have (v,u)∉E or (u,v)∉E. In such cases, w(v,u)w(u,v)=0. Therefore, \sum _{u\in \pi \cap I\left(v\right)}w(v,u)w(u,v)=\sum _{u\in \pi \setminus v}w(v,u)w(u,v). Since {\mathcal{P}}_{2}\left(v\right) consists of at most Δ^{2} elements, each of which includes only two edges, \sum _{\pi \in {\mathcal{P}}_{2}\left(v\right)}(\kappa \sum _{u\in \pi \setminus v}w(v,u\left)w\right(u,v\left)\right)\prod _{e\in \pi}w\left(e\right) can be computed in O(Δ^{2}) time.
Consider case (II). \sum _{\pi \in {\mathcal{C}}_{4}^{4}\left(v\right)}\prod _{e\in \pi}w\left(e\right) can be computed by a similar method. A cycle in {\mathcal{C}}_{4}^{4}\left(v\right) consists of a simple cycle of length 3, in which the first and last nodes are v. Therefore, instead of directly constructing a set of simple cycles of length 3, we can construct a set {\mathcal{P}}_{2}\left(v\right) of simple paths of length 2. Let l(π) denote the last node of a path \pi \in {\mathcal{P}}_{2}\left(v\right) and let \tau =\sum _{u\in {N}_{\text{out}}\left(v\right)}w(v,u); we have
\begin{array}{l}\sum _{\pi \in {\mathcal{C}}_{4}^{4}\left(v\right)}\prod _{e\in \pi}w\left(e\right)\\ =& \sum _{\pi \in {\mathcal{P}}_{2}\left(v\right)}w\left(l\right(\pi ),v)\left(\sum _{u\in {N}_{\text{out}}\left(v\right)\setminus \pi}w(v,u)\right)\prod _{e\in \pi}w\left(e\right)\\ =& \sum _{\pi \in {\mathcal{P}}_{2}\left(v\right)}w\left(l\right(\pi ),v)\left(\tau \sum _{u\in \pi \setminus v}w(v,u)\right)\prod _{e\in \pi}w\left(e\right),\end{array}
in which w(l(π),v)=0 if l(π)∉N_{in}(v). Therefore, \sum _{\pi \in {\mathcal{C}}_{4}^{4}\left(v\right)}\prod _{e\in \pi}w\left(e\right) can also be computed in O(Δ^{2}) time.
Consider case (III). The analysis is somewhat more complicated. Instead of computing \sum _{\pi \in {\mathcal{C}}_{4}^{5}\left(v\right)}\prod _{e\in \pi}w\left(e\right) directly, we first show that \sum _{\pi \in \left({\mathcal{C}}_{4}^{5}\right(v)\cup {\mathcal{C}}^{\prime}(v\left)\right)}\prod _{e\in \pi}w\left(e\right) can be computed in O(Δ^{2}) time, where {\mathcal{C}}^{\prime}\left(v\right) denotes the set of cycles as shown in Figure 4. That is, cycles consist of three nodes in which the first two nodes are visited twice. Let ρ_{2}(v,v^{′}) denote the probability that v^{′} is reachable from v with exact two hops, i.e., {\rho}_{2}(v,{v}^{\prime})=\sum _{u\in {N}_{\text{out}}\left(v\right)\cap {N}_{\mathit{\text{in}}}\left({v}^{\prime}\right)}w(v,u)w(u,{v}^{\prime}). Let {N}_{\text{out}}^{2}\left(v\right) be the set of nodes that are reachable from v with exact two hops. To compute ρ_{2}(v,v^{′}) for all the nodes {v}^{\prime}\in {N}_{\text{out}}^{2}\left(v\right), we can build up an outgoing tree rooted at v, in which the nodes are repeatable among different paths. This can be done in O(Δ^{2}) time by DFS. In addition, let {N}_{\text{in}}^{2}\left(v\right) be the set of nodes that can reach v with exact two hops, we can build up an incoming tree rooted at v to compute ρ_{2}(v^{′},v) for all the nodes {v}^{\prime}\in {N}_{\text{in}}^{2}\left(v\right) in the same way. Then, we have
\begin{array}{l}\sum _{\pi \in \left({\mathcal{C}}_{4}^{5}\left(v\right)\cup {\mathcal{C}}^{\prime}\left(v\right)\right)}\prod _{e\in \pi}w\left(e\right)\\ =& \sum _{{v}^{\prime}\in {N}_{\text{out}}^{2}\left(v\right)\cap {N}_{\text{in}}^{2}\left(v\right)}{\rho}_{2}(v,{v}^{\prime}){\rho}_{2}({v}^{\prime},v),\end{array}
which can be computed in O(Δ^{2}) time. It is easy to see
\begin{array}{l}\sum _{\pi \in {\mathcal{C}}_{4}^{5}\left(v\right)}\prod _{e\in \pi}w\left(e\right)\\ =& \sum _{\pi \in \left({\mathcal{C}}_{4}^{5}\left(v\right)\cup {\mathcal{C}}^{\prime}\left(v\right)\right)}\prod _{e\in \pi}w\left(e\right)\sum _{\pi \in {\mathcal{C}}^{\prime}\left(v\right)}\prod _{e\in \pi}w\left(e\right).\end{array}
Therefore, to show \sum _{\pi \in {\mathcal{C}}_{4}^{5}\left(v\right)}\prod _{e\in \pi}w\left(e\right) can be computed in O(Δ^{2}) time, it is sufficient to show that \sum _{\pi \in {\mathcal{C}}^{\prime}\left(v\right)}\prod _{e\in \pi}w\left(e\right) can be computed in O(Δ^{2}) time. We have
\begin{array}{l}\sum _{\pi \in {\mathcal{C}}^{\prime}\left(v\right)}\prod _{e\in \pi}w\left(e\right)\\ =& \sum _{{v}^{\prime}\in I\left(v\right)}\sum _{u\in I\left({v}^{\prime}\right)}w(v,{v}^{\prime})w({v}^{\prime},u)w(u,{v}^{\prime})w({v}^{\prime},v),\end{array}
where I(v)=N_{out}(v)∩N_{in}(v) and I(v^{′})=N_{out}(v^{′})∩N_{in}(v^{′}). Therefore, \sum _{\pi \in {\mathcal{C}}^{\prime}\left(v\right)}\prod _{e\in \pi}w\left(e\right) can be computed in O(Δ^{2}) time.
In sum, we prove \sum _{\pi \in {\mathcal{C}}_{4}\left(v\right)}\prod _{e\in \pi}w\left(e\right) (∀v∈V) can be computed in O(Δ^{2}) time. It can be shown that \sum _{\pi \in {\mathcal{C}}_{l}\left(v\right)}\prod _{e\in \pi}w\left(e\right) (l<4) can be computed in O(Δ^{2}) time or less by a similar method. Therefore, it requires only O(Δ^{2}) time to compute ϱ_{4}(v) (∀v∈V).
Theorem 1
Given a weighted directed graph G(V,E,w), Algorithm 1 can compute σ_{4}(v) for all the nodes v∈V in O(n Δ^{2}) time, where n denotes the number of nodes in V, and Δ denotes the maximum node degree.
Proof.
Without considering the possible numerical computation error, the solution of Algorithm 1 is exact, and the time complexity analysis easily follows the algorithm. The computation of σ_{
l
}(v) only depends on σ_{l−1}(u) (u∈N_{out}(v)) and ϱ_{
l
}(v). Therefore, σ_{4}(v) for all the nodes v∈V can be computed by a DP approach. The number of subproblems is O(n) and each subproblem can be solved in O(Δ^{2}) time. Therefore, Algorithm 1 requires O(n Δ^{2}) time.
Compared with the method based on a simple path, which requires O(Δ^{4}) time to compute σ_{4}(v) for a node v, the core advantage of Algorithm 1 is its running time performance. Based on our experiments in the ‘Results and discussion’ section, when T≤4, Algorithm 1 can compute the σ_{
T
}(v) for all the nodes in a moderate size graph in about 1 s.
4.2 A randomized algorithm
Theorem 1 shows that Algorithm 1 can efficiently compute σ(v), if the EIS from node v is negligible after four hops. For the case that the EIS within a large number T hops is not negligible, it has been shown that computing σ_{
T
}(v) is #Phard [11]. To estimate σ_{
T
}(v) approximately, we can use MC simulation, i.e., simulate the influence spread process a sufficient number of times, rechoosing the thresholds uniformly at random, and use the arithmetic mean of the results instead of the EIS. Let X_{1},X_{2},⋯,X_{
r
} be the numbers of active nodes at time T for r runs, and let E\left[\overline{X}\right] be the EIS within time T. By Hoeffding’s inequality [20], we have
\begin{array}{l}\text{Pr}\left(\overline{X}\mathrm{E}[\overline{X}\left]\right\ge \epsilon \right)\le \text{exp}\left(\frac{2{\epsilon}^{2}{r}^{2}}{\sum _{i=1}^{r}{({b}_{i}{a}_{i})}^{2}}\right),\end{array}
where a_{
i
} and b_{
i
} are the lower and upper bounds for X_{
i
}, respectively. Apparently, a_{
i
}≥0 and b_{
i
}≤n, where n is the number of nodes in the graph. Thus, ∀0<δ<1, when r\ge \frac{nln\frac{1}{\delta}}{2{\epsilon}^{2}}, the probability that \overline{X}\mathrm{E}[\overline{X}\left]\right\ge \epsilon is at most δ. Therefore, the EIS estimated by using MC simulation with a sufficient number of runs is nearly exact. However, as the experiments shown in [5],[11],[15], applying the MC simulation to estimate the EIS is computational expensive, and the standard greedy algorithm with MC simulation (run 10,000 times to get the average) requires days to select 50 seeds in some realworld social networks with tens of thousands of nodes.
To improve the computation efficiency, we developed a randomized algorithm, computing σ_{
T
}(v) for T≥5. We first give the main idea of our method. Recall that the EIS of a node v can be computed by searching simple paths starting from v; thus, {\sigma}_{T}\left(v\right)=\sum _{\pi \in {\mathcal{P}}_{T}\left(v\right)}\prod _{e\in \pi}w\left(e\right). Let \text{avg}\left({\mathcal{P}}_{T}\right(v\left)\right) be the arithmetic mean of \prod _{e\in \pi}w\left(e\right) for all the elements \pi \in {\mathcal{P}}_{T}\left(v\right), and let · be the number of elements in ‘ ·’; we have {\sigma}_{T}\left(v\right)=\text{avg}\left({\mathcal{P}}_{T}\right(v\left)\right)\left{\mathcal{P}}_{T}\right(v\left)\right. However, obtaining \text{avg}\left({\mathcal{P}}_{T}\right(v\left)\right) and \left{\mathcal{P}}_{T}\right(v\left)\right requires the knowledge of {\mathcal{P}}_{T}\left(v\right) and is therefore as difficult as the original problem. We propose an alternative approach. Instead of computing σ_{
T
}(v) directly, we relax {\mathcal{P}}_{T}\left(v\right) to {\stackrel{\u0301}{\mathcal{P}}}_{T}\left(v\right) that contains all the paths starting from v, instead of simple paths. Let x(\pi \in {\mathcal{P}}_{T}(v\left)\right) be a 0 to 1 variable denote whether π is a simple path or not; we have
\begin{array}{l}{\sigma}_{T}\left(v\right)=\sum _{\pi \in {\stackrel{\u0301}{\mathcal{P}}}_{T}\left(v\right)}x\left(\right.\pi \in {\mathcal{P}}_{T}\left(v\right)\left)\right.\prod _{e\in \pi}w\left(e\right).\end{array}
The next question is how to estimate \text{avg}\left({\stackrel{\u0301}{\mathcal{P}}}_{T}\right(v\left)\right) and \left{\stackrel{\u0301}{\mathcal{P}}}_{T}\right(v\left)\right to obtain σ_{
T
}(v).
Lemma 2.
Given a directed graph G(V,E) and an integer T, there is a polynomial time algorithm to compute \left{\stackrel{\u0301}{\mathcal{P}}}_{T}\right(v\left)\right for all the nodes v∈V.
Proof.
We can compute \left{\stackrel{\u0301}{\mathcal{P}}}_{T}\right(v\left)\right by iteration or recursion. ∀1≤l≤T, we have
\left\{\begin{array}{cc}\left{\stackrel{\u0301}{\mathcal{P}}}_{l}\right(v\left)\right=\left{\mathcal{P}}_{l}\right(v\left)\right=\left{N}_{\text{out}}\right(v\left)\right,& l=1\\ \left{\stackrel{\u0301}{\mathcal{P}}}_{l}\right(v\left)\right=\sum _{u\in {N}_{\text{out}}\left(v\right)}\left{\stackrel{\u0301}{\mathcal{P}}}_{l1}\right(v\left)\right,& \text{otherwise.}\end{array}\right.
\left{\stackrel{\u0301}{\mathcal{P}}}_{1}\right(v\left)\right equals to the number of outgoing neighbors of v, and \left{\stackrel{\u0301}{\mathcal{P}}}_{l}\right(v\left)\right (l>1) can be obtained by a DP approach. Since there are O(n T) subproblems and each subproblem can be solved in O(Δ) time, \left{\stackrel{\u0301}{\mathcal{P}}}_{T}\right(v\left)\right can be obtained in O(n T Δ) time.
Theorem 2
Let ε and δ be two positive constants in the range of (0,1). There is a random walk algorithm such that given a weighted directed graph G(V,E,w) and a node v∈V, it gives a (1±ε)factor approximation solution to \text{avg}\left({\stackrel{\u0301}{\mathcal{P}}}_{T}\right(v\left)\right) in O\left(\frac{1}{{\epsilon}^{2}}ln\frac{1}{\delta}+\mathrm{nT\Delta}\right) time with probability greater than 1−δ.
Proof.
We can use uniform random sampling, which selects elements with equal probability from {\stackrel{\u0301}{\mathcal{P}}}_{T}\left(v\right). By Lemma 2, we can obtain \left{\stackrel{\u0301}{\mathcal{P}}}_{T}\right(v\left)\right for all the nodes v∈V in O(n T Δ) time. Let the probability \text{Pr}({y}_{i+1}={u}^{\prime}{y}_{i}=u)=\frac{\left{\stackrel{\u0301}{\mathcal{P}}}_{Ti}\right({u}^{\prime}\left)\right}{\left{\stackrel{\u0301}{\mathcal{P}}}_{Ti+1}\right(u\left)\right} and Pr(y_{1}=v)=1; then, a path of length T can be generated by taking T successive random steps. ∀ a path π=(v_{1},v_{2},⋯,v_{
T
}) in {\stackrel{\u0301}{\mathcal{P}}}_{T}\left(v\right), we have
\begin{array}{lcr}\text{Pr}\left(\pi \right)& =& \prod _{i=1,\cdots \phantom{\rule{0.3em}{0ex}},T1}\text{Pr}({y}_{i+1}={v}_{i+1}{y}_{i}={v}_{i})\\ =& \prod _{i=1,\cdots \phantom{\rule{0.3em}{0ex}},T}\frac{\left{\stackrel{\u0301}{\mathcal{P}}}_{Ti}\right({v}_{i+1}\left)\right}{\left{\stackrel{\u0301}{\mathcal{P}}}_{Ti+1}\right({v}_{i}\left)\right}=\frac{1}{\left{\stackrel{\u0301}{\mathcal{P}}}_{T}\right(v\left)\right}.\end{array}
Therefore, we can generate paths π_{1},π_{2},⋯,π_{
r
} uniformly at random. By Hoeffding’s inequality, we have
\begin{array}{l}\text{Pr}\left(\frac{\left\sum _{i=1,\cdots \phantom{\rule{0.3em}{0ex}},r}\prod _{e\in {\pi}_{i}}w\right(e)r}{}\text{avg}\left({\stackrel{\u0301}{\mathcal{P}}}_{T}\left(v\right)\right)\ge \epsilon \right)\\ \le \text{exp}\left(\frac{2{\epsilon}^{2}{r}^{2}}{\sum _{i=1}^{r}{\left(\underset{\pi \in {\stackrel{\u0301}{\mathcal{P}}}_{T}\left(v\right)}{max}\prod _{e\in \pi}w\left(e\right)\right)}^{2}}\right),\end{array}
where \underset{\pi \in {\stackrel{\u0301}{\mathcal{P}}}_{T}\left(v\right)}{max}\prod _{\mathrm{e\pi}}w\left(e\right) is the maximum weight product of a path of length T starting from v. Since w(e)≤1 (∀e∈E), we have \underset{\pi \in {\stackrel{\u0301}{\mathcal{P}}}_{T}\left(v\right)}{max}\prod _{\mathrm{e\pi}}w\left(e\right)\le 1. Thus, Theorem 2 is proved.
Based on Theorem 2, we now describe our randomized algorithm for computing σ_{
T
}(v) for all the nodes v∈V. It runs in O(n T Δ+n r) time, where r is a constant and does not depend on the input graph.
In Algorithm 2, it first computes \left{\stackrel{\u0301}{\mathcal{P}}}_{T}\right(v\left)\right (step 1) and then estimates σ_{
T
}(v) by uniform random sampling. As far as the running time, the most timeconsuming part is steps 2 to 8, in which r is independent of the input graph. It is clear that when r is small, the accuracy of EISE is low, but the estimation time is short, and vice verse. Compared with MC simulation, Algorithm 2 is much faster. In order to estimate the EIS of a node, it only generates a constant number of paths, while if MC simulation is applied instead of Algorithm 2, each time we have to rechoose the thresholds for all the nodes, and the time complexity is O((V+E)r), when most of the edges are accessed each time. In the experiment, we observed that the error is less than 3% when T=5, using an appropriate number of samples (r=1,000).