Introduction
Random walks in directed graphs is an algorithmic building block in modern network analysis. One important type is the discounted random walk, where at each step, the walk either terminates with some probability α ∈ ( 0 , 1 ) \alpha\in(0,1) α ∈ ( 0 , 1 ) , or moves to a uniformly random out-neighbor with probability 1 − α 1-\alpha 1 − α . For simplicity, we assume that every vertex has at least one out-neighbor. This assumption can be easily satisfied by adding a self-loop to each dangling vertex. Following previous works [LBGC14, WYX+17, BPP23, WWWY24, TW26], we also assume that α \alpha α is a constant throughout the paper.
Let π ( s , t ) \pi(s,t) π ( s , t ) denote the probability that a discounted random walk starting from vertex s s s terminates at vertex t t t . This probability is referred to as the Personalized PageRank (PPR) of t t t with respect to s s s . The notion of PPR was introduced by the co-founders of Google in [BP98, PBMW98] for personalized web search and has since become a widely used measure of node proximity, finding various applications in graph analysis and learning [3 LSK+11, BL11, KBG19, BKP+20a, EMP+22, WCL24] . The “Google” papers [BP98, PBMW98] also introduced PageRank for global webpage ranking. The PageRank π ( t ) \pi(t) π ( t ) for a vertex t t t is defined as the average of the PPR values π ( s , t ) \pi(s,t) π ( s , t ) over all vertices s ∈ V s \in V s ∈ V , i.e., π ( t ) = ∑ s ∈ V π ( s , t ) / n \pi(t) = \sum_{s \in V} \pi(s,t)/n π ( t ) = ∑ s ∈ V π ( s , t ) / n , where n n n is the number of vertices in the graph. Thus, by definition, an algorithm for estimating PPR π ( s , t ) \pi(s,t) π ( s , t ) can be extended to estimate the PageRank π ( t ) \pi(t) π ( t ) by adding a pseudo vertex s ∗ s^* s ∗ with outgoing edges to all vertices in the graph and estimating π ( s ∗ , t ) \pi(s^*,t) π ( s ∗ , t ) .
In this paper, we study the single-pair PPR problem , which aims to estimate π ( s , t ) \pi(s,t) π ( s , t ) for a given source vertex s s s and a given target vertex t t t in a directed graph G = ( V , E ) G = (V,E) G = ( V , E ) within a constant multiplicative factor with constant success probability. This problem and its variants have received considerable attention over the past decades [LBGC14, LBG16, WYX+17, BPP18, BPP23, WWWY24, TWWY26, TW26], with applications in diverse areas, including web search [PBMW98, GP07], recommender systems [GGL+13], node embedding [YW19], graph neural networks [BKP+20b], and many others [Gle15, YWW+24]. There is also a line of work that studies this problem and its variants on undirected graphs [LBG15, Wan24, BJ26, CWY26, LXYZ26], but in this paper, we consider only directed graphs.
The focus of this paper is to find an instance-optimal algorithm for the single-pair PPR problem, that is, an algorithm whose running time is close to optimal on every input graph among all correct algorithms, or rather probabilistically correct since most algorithms for PPR are randomized.
Instance-Optimality
Traditionally, theory of computing has focused on worst-case complexity, but algorithms that are worst-case efficient may perform very poorly on easy instances encountered in practice, and it is their performance on practical instances that determines actual computational costs and energy consumption. This has motivated research on designing algorithms that are average-case efficient or perform well on specific classes of instances, e.g., power-law graphs or sparse graphs. However, it is often difficult to determine which classes of instances or graph parameters are most relevant (e.g., whether sparse or dense graphs are more important), as the answer depends on the applications, which may evolve over time. An ideal solution would be to design an algorithm that achieves optimal running time on every possible instance, thereby covering all instances encountered in practice. Such an algorithm is called an instance-optimal algorithm .
A beautiful illustration of the advantage of an instance-optimal algorithm over a worst-case optimal algorithm is the shortest-path problem: What is the fastest way to get from A A A to B B B ? Dijkstra’s algorithm [Dij59], Problem 2, stated for single-pair, not single-source) with a priority queue establishes the Θ ~ ( m ) \widetilde{\Theta}(m) Θ ( m ) worst-case complexity of this problem assuming non-negative weights, with many great works devoted to understanding the logarithmic factor hidden by the Θ ~ \widetilde{\Theta} Θ notation (see [DMM+25, DMSY26] and the references therein). However, individual instances can be much easier. As an example, imagine that you want to go to Rome. This is easy because all roads lead to Rome. More mathematically, think of an undirected star graph with Rome in the center: Dijkstra will find the center from any node in constant time. However, when you want to go back home from Rome after the party, Dijkstra may lead you to explore the whole graph. Bidirectional Dijkstra will be fast in both directions, and it is, in fact, instance-optimal within a logarithmic factor for positively weighted multigraphs [HHR+25].
Instance-optimality is much stronger than worst-case optimality or average-case optimality, since it requires the algorithm to be the best, or close to best, among all good algorithms on every instance, rather than merely excel in the worst case or on average. It is therefore regarded as the ultimate notion of optimality [CL16, ABC17]. Here, a good (randomized) algorithm refers to one that is (probabilistically) correct on every valid instance . When we say that an algorithm is instance-optimal, we mean that its running time on every instance is at most a small factor larger than that of the fastest good algorithm on that instance, e.g., a polylogarithmic factor when the running times are polynomial. A good algorithms may be instance-smart in the sense that it is tuned to be fast on a particular instance (but may be slow on other instances). This subsume algorithms that receive good but not fully trusted advice (e.g., advice from AI [MV22]). But the instance-smart algorithm must verify that its answer is probabilistically correct, so that it is not fooled when given an input that is not the instance for which it was tuned. Thus, an algorithm that simply outputs an answer without verifying its correctness is not considered a competitor of instance-optimal algorithm.
For most problems, instance-optimal algorithms do not exist [2 HHR+24] . Some positive examples are known, e.g., in quantity estimation [DKLR00], database aggregation [FLN03], sequential estimation [VV16, DLSV23, NRTT24], computational geometry [2 dBvR+25] , distribution testing and learning [VV17, VV20, BCW25], contextual bandits [LRN+22], and the above-mentioned shortest-path problem with positive weights [HHR+25, BJT+26a]. Additionally, [HHR+24] establishes universal optimality for a new priority-queue in Dijkstra’s single-source shortest paths problem. The notion of universal optimality is strictly weaker than instance-optimality but still substantially stronger than worst-case optimality. The most relevant work is a recent paper that investigates the instance-optimality of estimating a vertex’s PageRank [TW26]. We will return to this work and its connection to our paper later.
Personalized PageRank (PPR)
As mentioned earlier, in this paper, we study the single-pair Personalized PageRank (PPR) problem and investigate its instance-optimality. Recall that the problem is to estimate π ( s , t ) \pi(s,t) π ( s , t ) with constant relative error and constant success probability, given a source vertex s s s and a target vertex t t t in a directed graph G G G . Some previous works also introduce an approximation threshold parameter δ ∈ [ 0 , 1 ] \delta\in[0,1] δ ∈ [ 0 , 1 ] and only require an estimate of π ( s , t ) \pi(s,t) π ( s , t ) when π ( s , t ) > δ \pi(s,t) > \delta π ( s , t ) > δ . We note that π ( s , t ) \pi(s,t) π ( s , t ) can be as small as 1 / n Ω ( n ) 1/n^{\Omega(n)} 1/ n Ω ( n ) (we shall see example in Figure 3 ). For our own algorithms, we will at first not parameterize the problem by δ \delta δ , that is, we consider δ = 0 \delta= 0 δ = 0 , but we will later show that our instance-optimality results extend to the setting where such an approximation threshold δ \delta δ is given.
Figure 3. Illustrative example where π ( s , t ) \pi(s,t) π ( s , t ) is extremely small.
We will now discuss some of the previous work on this problem, most of which involves δ \delta δ .
Worst-case complexity. Let n n n and m m m denote the number of vertices and edges in G G G , respectively. The best-known worst-case complexity is O ( min { 1 / δ , m log ( 1 / δ ) } ) O(\min\{1/\delta, m\log(1/\delta)\}) O ( min { 1/ δ , m log ( 1/ δ )}) , obtained simply by combining Monte Carlo sampling and the power method. Specifically, Monte Carlo sampling estimates π ( s , t ) \pi(s,t) π ( s , t ) in O ( 1 / δ ) O(1/\delta) O ( 1/ δ ) time by generating O ( 1 / δ ) O(1/\delta) O ( 1/ δ ) random walks from the source vertex s s s and using the fraction of walks that terminate at t t t as the estimate of π ( s , t ) \pi(s,t) π ( s , t ) . The power method , introduced in the seminal paper that proposes PPR and PageRank [PBMW98], iteratively applies the definition equation of PPR: π s = ( 1 − α ) P π s + α 1 s \boldsymbol{\pi}_s = (1-\alpha)\mathbf{P}\boldsymbol{\pi}_s + \alpha\mathbf{1}_s π s = ( 1 − α ) P π s + α 1 s , where π s \boldsymbol{\pi}_s π s is an n n n -dimensional PPR vector with π s [ t ] = π ( s , t ) \boldsymbol{\pi}_s[t] = \pi(s,t) π s [ t ] = π ( s , t ) , P \mathbf{P} P is the random-walk transition matrix, and 1 s \mathbf{1}_s 1 s is an n n n -dimensional one-hot vector with only 1 [ s ] = 1 \mathbf{1}[s] = 1 1 [ s ] = 1 . Each iteration takes O ( m ) O(m) O ( m ) time for computing P π s \mathbf{P}\boldsymbol{\pi}_s P π s as it touches all edges in the graph. The geometric convergence rate of ( 1 − α ) (1-\alpha) ( 1 − α ) ensures that after log ( 1 − α ) δ = O ( log ( 1 / δ ) ) \log_{(1-\alpha)}\delta= O(\log(1/\delta)) log ( 1 − α ) δ = O ( log ( 1/ δ )) iterations, the absolute error falls below δ \delta δ , thus yielding the O ( m log ( 1 / δ ) ) O(m \log(1/\delta)) O ( m log ( 1/ δ )) runtime.3
The O ( min { 1 / δ , m log ( 1 / δ ) } ) O(\min\{1/\delta, m \log(1/\delta)\}) O ( min { 1/ δ , m log ( 1/ δ )}) upper bound also holds for the single-source PPR problem, that is, estimating π ( s , t ) \pi(s,t) π ( s , t ) for all possible targets t ∈ V t \in V t ∈ V , since both Monte Carlo sampling and the power method can estimate π ( s , t ) \pi(s,t) π ( s , t ) simultaneously for all targets t ∈ V t \in V t ∈ V . One might hope that the single-pair complexity should be smaller than that of the single-source. However, our unpublished manuscript [BJT+25] establishes a tight Ω ( min { 1 / δ , m } ) \Omega(\min\{1/\delta,m\}) Ω ( min { 1/ δ , m }) lower bound for both the single-pair and single-source PPR problems. Therefore, in the worst case, solving the single-pair PPR problem requires as much time as solving the single-source problem.
Better algorithms for some instances. Analogous to the aforementioned shortest path problem where Dijkstras algorithm is worst-case optimal yet other algorithms, such as bidirectional Dijkstra, can be much faster on particular instances, previous work on single-pair PPR has also sought to improve performance on individual instances despite the worst-case lower bound. This includes [DKLR00], which proposes an adaptive Monte Carlo sampling method that estimates π ( s , t ) \pi(s,t) π ( s , t ) in O ( min { 1 / δ , 1 / π ( s , t ) } ) O(\min\{1/\delta, 1/\pi(s,t)\}) O ( min { 1/ δ , 1/ π ( s , t )}) time, which is faster on instances where π ( s , t ) > δ \pi(s,t) > \delta π ( s , t ) > δ .
Another line of work [LBGC14, LBG16] seeks to go beyond worst-case complexity by considering the average-case complexity: complexity of estimating π ( s , t ) \pi(s,t) π ( s , t ) for an arbitrary source s s s and a uniformly random target t ∈ V t \in V t ∈ V . [LBG16] proposes a bidirectional search algorithm, which we refer to as BiPPR. The BiPPR algorithm combines Monte Carlo sampling with a so-called backward push method [1 ] , which deterministically propagates random-walk probability mass backward from the target vertex t t t along incoming edges, step by step. For this bidirectional BiPPR, the worst-case running time is still O ( min { 1 / δ , m log ( 1 / δ ) } ) O(\min\{1/\delta, m \log(1/\delta)\}) O ( min { 1/ δ , m log ( 1/ δ )}) , but [LBG16] proves that it achieves an average-case complexity of O ( ( m / n ) / δ ) O(\sqrt{(m/n)/\delta}) O ( ( m / n ) / δ ) [LBG16], which is better than the aforementioned worst-case complexity of O ( min { 1 / δ , m log ( 1 / δ ) } ) O(\min\{1/\delta, m \log(1/\delta)\}) O ( min { 1/ δ , m log ( 1/ δ )}) when δ > n / m \delta> n/m δ > n / m .
Another set of research [BM08, BPP23, WWWY24, TWWY26, TW26] studies the PageRank estimation problem: estimating the PageRank π ( t ) \pi(t) π ( t ) of a given target vertex t t t . Recall that an algorithm for estimating single-pair PPR π ( s , t ) \pi(s,t) π ( s , t ) for a given source s s s and a given target t t t can be trivially extended to estimate the PageRank π ( t ) = ∑ s ∈ V π ( s , t ) / n \pi(t) = \sum_{s \in V} \pi(s,t)/n π ( t ) = ∑ s ∈ V π ( s , t ) / n for a given target t t t : adding a pseudo vertex s ∗ s^* s ∗ with outgoing edges to all vertices in the graph and estimating π ( s ∗ , t ) \pi(s^*,t) π ( s ∗ , t ) for the given target t t t . [WWWY24] revisits the above-mentioned BiPPR method and shows that it solves the PageRank estimation problem in O ( n 1 / 2 m 1 / 4 ) O(n^{1/2}m^{1/4}) O ( n 1/2 m 1/4 ) time and that this bound is already worst-case optimal. Recently, [TW26] showed that the adaptive variant of this BiPPR method is even instance-optimal for PageRank estimation on a class of graphs G ∗ \mathcal{G}^* G ∗ in which each graph has at most a polylogarithmic number of vertices with in- or out-degree at least ( 1 − o ( 1 ) ) n (1-o(1))n ( 1 − o ( 1 )) n . The graph class G ∗ \mathcal{G}^* G ∗ contains almost all graphs including all sparse graphs.
For all that is known, it could be that BiPPR was always instance-optimal for PPR, but we shall see that it can be off by a factor Ω ( m / log n ) \Omega(m/\log n) Ω ( m / log n ) even when π ( s , t ) = Ω ( 1 / m ) \pi(s,t) = \Omega(1/m) π ( s , t ) = Ω ( 1/ m ) .
Main contributions
In this paper, we design a simple algorithm called TriPPR for the single-pair PPR problem: estimating π ( s , t ) \pi(s,t) π ( s , t ) for a given s s s and t t t with constant relative error and constant success probability. Like in many previous works, we can also benefit from an approximation threshold parameter δ ∈ [ 0 , 1 ] \delta\in[0,1] δ ∈ [ 0 , 1 ] where we only require an estimate of π ( s , t ) \pi(s,t) π ( s , t ) when π ( s , t ) > δ \pi(s,t) > \delta π ( s , t ) > δ . We show that our new algorithm instance-optimal if n n n is not known. When n n n is known, our algorithm is still instance-optimal for sparse graphs with m = O ~ ( n ) m = \widetilde{O}(n) m = O ( n ) . For denser graphs, when n n n is known, we show that no algorithm can achieve general instance-optimality.
As we discuss below in § 1.4 , not knowing n n n is a common case for some of the large networks for which we want to compute PPR values. Having an algorithm not knowing n n n is thus very relevant.
For the multiplicative approximation of PPR, that is, δ = 0 \delta= 0 δ = 0 , we also improve the worst-case complexity from O ( m n log n ) O(mn \log n) O ( mn log n ) [PBMW98] to the near-optimal O ( m log n ) O(m \log n) O ( m log n ) . This improvement is not only for the single-pair discussed above, but also for single-source and single-target.
Model
For our algorithms and running-time upper bounds we assume the standard unit-cost RAM model with word-size Θ ( log n ) \Theta(\log n) Θ ( log n ) . This includes arithmetic operations on floating-point numbers with O ( log n ) O(\log n) O ( log n ) -bit exponent and mantissa.
Our lower bounds are proved in the adjacency-list query model for sublinear graph algorithms. The latter supports in- and out-degree queries indeg ( v ) \operatorname{indeg}(v) indeg ( v ) and outdeg ( v ) \operatorname{outdeg}(v) outdeg ( v ) , which return the in- and out-degree of a vertex v v v , respectively, as well as in- and out-neighbor queries in ( v , i ) \operatorname{in}(v,i) in ( v , i ) and out ( v , i ) \operatorname{out}(v,i) out ( v , i ) , which return the i i i -th in- and out-neighbor of v v v , respectively. Each query incurs unit cost. Basically, we are only given direct access to s s s and t t t in a large unknown network. The only way to access other nodes is to follow in- and out-edges from vertices already visited. We do not have any other global information on the network. In particular, we do not necessarily know the number n n n of vertices in the graph. Our TriPPR algorithm does not use knowledge of n n n . We consider its instance-optimality both when n n n is known and when n n n is not known.
The above kind of limited local access without knowledge of n n n aligns with the graph queries provided by application programming interfaces (APIs) for large real-world networks. For example, consider the World Wide Web. No single entity owns or maintains the entire web, and there is no universal API that provides the exact number of existing web pages. Similarly, large-scale social networks such as Facebook do not provide an API operation for querying the total number of vertices n n n [7 ] .
This also reflects the capabilities of APIs for large real-world networks. For example, Google has explicitly acknowledged that it does not know the exact number of unique pages on the web [5 ] , noting that the web is too large for its crawlers to discover every publicly accessible URL [Goo26]. Similarly, consider large-scale social networks such as Facebook. Maintaining an exact, globally consistent vertex count in Facebook’s massive, continuously evolving social graph could require substantial communication and synchronization overhead [LPD+25].
We remark that prior work on PageRank estimation, such as [ALN07, BBCT12, BBCT14, BPP23, WWWY24, TW26], also introduces a query called JUMP(), which returns a uniformly random vertex in the graph. This JUMP query is important for PageRank estimation as it because, by definition, the PageRank score π ( t ) \pi(t) π ( t ) of a vertex t t t is the average of π ( s , t ) \pi(s,t) π ( s , t ) over all source vertices s s s in the graph, i.e., π ( t ) = E [ π ( JUMP ( ) , t ) ] \pi(t) = \mathbb{E}[\pi(\operatorname{JUMP}(),t)] π ( t ) = E [ π ( JUMP ( ) , t )] . [BM08, BPP13] show that without the JUMP query, no sublinear-time algorithm exists for PageRank estimation. In contrast, the JUMP query is not necessary for PPR estimation. Prior work on PPR estimation, whether for the single-pair, single-source, or single-target problem, e.g., [LBG16, WYX+17, ABC+08], does not assume access to such a query, and neither do we. Indeed, a JUMP-query that is guaranteed to finds any vertex with probability close to 1 / n 1/n 1/ n has issues similar to a query on n n n , e.g., it is not available in an an API like [7 ] . Thus, when we prove instance optimality not knowing n n n , we also assume that there is no JUMP query. Observe that when we reduce PageRank to PPR, we introduced a node s ∗ s^* s ∗ with out-edges to all other nodes, so going to a random out-neighbor from s ∗ s^{*} s ∗ is the same as a Jump, except that we may not have the knowledge that d o u t ( s ∗ ) = n d_{\mathrm{out}}(s^{*})=n d out ( s ∗ ) = n .
Note that our lower-bounds are information theoretic based on query complexity. In particular, they can never go above Ω ( m ) \Omega(m) Ω ( m ) if we read the whole graph. For contrast, our upper bounds are time bounds, and our algorithms may do multiple operations on the same vertices and edges.
Technical Perspective
The design of TriPPR is motivated by two challenges. First, existing PPR algorithms can spend substantial time exploring parts of a graph that an instance-smart algorithm can handle much more efficiently. We explain how TriPPR addresses this by combining forward push, backward push, and Monte Carlo sampling. Second, existing pushing algorithms can become very expensive when estimating extremely small PPR values. We address this problem with a vertex-freezing technique that limits the amount of work spent on each vertex. Finally, we consider what changes when the number of vertices n n n is known. We explain why this additional information makes instance-optimality impossible, and then provide a more refined characterization of the achievable instance-optimality ratio, showing in particular that TriPPR remains instance-optimal for sparse graphs and a much broader class of locally solvable instances.
Issues with Existing Algorithms
Before inventing a new algorithm for single-pair PPR estimation, let us first ask if the currently best algorithm BiPPR could be instance optimal. We recall that it is worst-case optimal within a factor O ( log 1 / δ ) O(\log1/\delta) O ( log 1/ δ ) , and we know from [TW26] that it is instance-optimal for the special case of PageRank estimation.
The example instance of Figure 1 shows that BiPPR may be very far from instance-optimal. In this example, BiPPR spends Ω ( m ) \Omega(m) Ω ( m ) time while the instance can be solved by an instance-smart algorithm in O ( log n ) O(\log n) O ( log n ) time.
Figure 1. Hard instances for single-pair PPR estimation, on which an instance-smart algorithm takes O ( log n ) O(\log n) O ( log n ) time, while the previously best BiPPR algorithm [LBG16] takes O ( m ) O(m) O ( m ) time, and pure Monte Carlo sampling takes ω ( m n ) \omega(mn) ω ( mn ) time.
The toy graph in Figure 1 consists of a binary tree of depth log m \log m log m connecting the source vertex s s s to a vertex u u u , a complete bipartite graph with m \sqrt{m} m vertices on each side connecting u u u to another vertex v v v , and a depth-one tree rooted at v v v with n n n leaves (the getting-home-from-Rome example mentioned earlier), one of which is the target vertex t t t . We note that in this graph,
π ( s , t ) = π ( s , u ) π ( u , v ) π ( v , t ) / α 2 = ( ( 1 − α ) / 2 ) log m ( 1 − α ) 3 ( ( 1 − α ) / n ) α = o ( 1 / ( n m ) ) \pi(s,t)=\pi(s,u)\pi(u,v)\pi(v,t)/\alpha^{2}=((1-\alpha)/2)^{\log m}(1-\alpha)^{3}((1-\alpha)/n)\alpha=o(1/(nm)) π ( s , t ) = π ( s , u ) π ( u , v ) π ( v , t ) / α 2 = (( 1 − α ) /2 ) l o g m ( 1 − α ) 3 (( 1 − α ) / n ) α = o ( 1/ ( nm ))
To estimate π ( s , t ) \pi(s,t) π ( s , t ) , a pure forward Monte Carlo sampling of discounted random walks from s s s needs ω ( n m ) \omega(nm) ω ( nm ) samples since π ( s , t ) = o ( 1 / ( m n ) ) \pi(s,t) = o(1/(mn)) π ( s , t ) = o ( 1/ ( mn )) ; otherwise it will not reach t t t with constant probability.
The BiPPR method requires Ω ( m ) \Omega(m) Ω ( m ) time as it combines Monte Carlo sampling from s s s and backward push from t t t . One of them, or both, must reach u u u . To reach u u u with constant probability, the Monte Carlo sampling needs Ω ( 1 / π ( s , u ) ) = ω ( m ) \Omega(1/\pi(s,u)) = \omega(m) Ω ( 1/ π ( s , u )) = ω ( m ) samples. The backward-push method [1 ] deterministically propagates random-walk probability mass backward from the target vertex t t t along incoming edges, step by step. To reach u u u from t t t , it will explore the Ω ( m ) \Omega(m) Ω ( m ) edges in the subgraph between u u u and v v v . It follows that BiPPR takes Ω ( m ) \Omega(m) Ω ( m ) time on this instance.
In contrast, an instance-smart algorithm can first completely explore the O ( log m ) O(\log m) O ( log m ) -sized subgraph between s s s and u u u and ascertain that any path from s s s leaving this subgraph must pass through u u u . Having explored this subgraph completely, it will know π ( s , u ) \pi(s,u) π ( s , u ) , but only costing O ( log m ) O(\log m) O ( log m ) time. Likewise, since ( v , t ) (v,t) ( v , t ) is the only edge entering t t t , it knows that every s s s -t t t path must pass through v v v and that π ( v , t ) = ( 1 − α ) / d o u t ( v ) = ( 1 − α ) / n \pi(v,t) = (1-\alpha)/d_{\mathrm{out}}(v) = (1-\alpha)/n π ( v , t ) = ( 1 − α ) / d out ( v ) = ( 1 − α ) / n . It remains to estimate π ( u , v ) \pi(u,v) π ( u , v ) , which can be done by Monte Carlo sampling in constant time; for all paths in the middle subgraph lead from u u u to v v v in three hops, so π ( u , v ) = ( 1 − α ) 3 = Ω ( 1 ) \pi(u,v) = (1-\alpha)^3 = \Omega(1) π ( u , v ) = ( 1 − α ) 3 = Ω ( 1 ) .
Basic Idea for the TriPPR Algorithm
Our new TriPPR algorithm is motivated by examples such as the one in Figure 1 . It overcomes the limitations of Algorithm 3 by using a three-component algorithm, a bit like the instance-smart algorithm mentioned above: forward push from s s s , backward push from t t t , and Monte Carlo sampling.
Forward push is the counterpart to backward push and was proposed even earlier [3 ] . Like backward push, it deterministically propagates random-walk probability mass step by step through the graph, but along outgoing edges rather than incoming edges. Looking again at Figure 1 , forward push estimates π ( s , u ) \pi(s,u) π ( s , u ) in only O ( log n ) O(\log n) O ( log n ) time, and backward push estimates π ( v , t ) \pi(v,t) π ( v , t ) in constant time. Monte Carlo sampling then estimates the probability of the intermediate walk from u u u to v v v , by sampling random walks from u u u until one of them successfully terminates at v v v , spending only constant time on the example. These three probability estimates then combine to estimate π ( s , t ) \pi(s,t) π ( s , t ) .
We show how this three-part combination extends to general instances. Our more surprising main result is that this combination is instance-optimal for all instances (at least if n n n is not known). We invite the reader to consider an alternative example where two copies of Figure 1 are placed in series (the second copy with source s ′ s' s ′ and target t ′ t' t ′ identifies its source s ′ s' s ′ with the current target t t t , and the goal is to compute π ( s , t ′ ) \pi(s,t') π ( s , t ′ ) ). Is it clear that TriPPR is instance-optimal in this instance, or would it be better with a 6-part “HexaPPR” algorithm? Our proof says that TriPPR is close to optimal, also on this instance.
We now provide a high-level sketch of TriPPR for the sake of intuition. Let us temporarily imagine that we can guess a parameter r ∈ ( 0 , 1 ] r \in(0,1] r ∈ ( 0 , 1 ] ; note that in our technical section, we do not explicitly use r r r , but what the algorithm finally does will be similar to what we describe below with
the optimal r r r .
See Figure 2 for an illustration of the three components in general. First, we perform backward pushes from t t t , deterministically finding all vertices u u u with π ( u , t ) ≥ r \pi(u,t) \ge r π ( u , t ) ≥ r . The procedure starts with probability mass 1 1 1 at t t t and repeatedly pushes this mass backward along all in-edges of vertices with more than r r r mass, so it runs in asymptotic time
Figure 2. The three components of TriPPR: Forward push, backward push and Monte Carlo.
T b ( r ) = ∑ u ∈ V , π ( u , t ) ≥ r ( 1 + d i n ( u ) ) . T_b(r) = \sum_{u \in V,\pi(u,t)\ge r}(1+d_{\mathrm{in}}(u)). T b ( r ) = u ∈ V , π ( u , t ) ≥ r ∑ ( 1 + d in ( u )) .
Next, we perform forward pushes from s s s , by starting with probability mass 1 1 1 at s s s and repeatedly pushing this mass forward along all out-edges of certain vertices. This set of vertices vaguely expands like a ball around s s s with some frontier F ⊆ V F \subseteq V F ⊆ V . We will shortly describe more precisely which vertices we push from.
The last part of the algorithm is Monte Carlo sampling. Recall that we can estimate π ( s , t ) \pi(s,t) π ( s , t ) in asymptotic time 1 / π ( s , t ) 1/\pi(s,t) 1/ π ( s , t ) by Monte Carlo sampling (i.e. simulating) random walks from s s s , each of which runs in expected time 1 / α = O ( 1 ) 1/\alpha= O(1) 1/ α = O ( 1 ) . We can give our random walks a head start by starting them from a vertex v ∈ F v \in F v ∈ F sampled proportionately to π ( s , v ) \pi(s,v) π ( s , v ) , instead of starting them from s s s . Instead of sampling 1 / π ( s , t ) 1/\pi(s,t) 1/ π ( s , t ) walks from s s s , it suffices to sample π ( s , u ) / π ( s , t ) \pi(s,u)/\pi(s,t) π ( s , u ) / π ( s , t ) walks from every u ∈ F u \in F u ∈ F . Furthermore, our random walks do not have to hit t t t to succeed. If they hit the explored backward set B = { u ∈ V ∣ π ( u , t ) ≥ r } B = \{u \in V \mid\pi(u,t) \ge r\} B = { u ∈ V ∣ π ( u , t ) ≥ r } , we can consider them as having achieved an r r r fraction of success in our estimator. To get sufficiently low error, we now only need to sample π ( s , u ) r / π ( s , t ) \pi(s,u)r/\pi(s,t) π ( s , u ) r / π ( s , t ) random walks from every u ∈ F u \in F u ∈ F .
We are now ready to tell which vertices we perform forward push from. We forward push from vertices where pushing is cheaper than Monte Carlo sampling, i.e. vertices u u u where d o u t ( u ) < π ( s , u ) r / π ( s , t ) d_{\mathrm{out}}(u) < \pi(s,u)r/\pi(s,t) d out ( u ) < π ( s , u ) r / π ( s , t ) . Of course, we do not know π ( s , t ) \pi(s,t) π ( s , t ) and only have estimates of π ( s , u ) \pi(s,u) π ( s , u ) ; we also do not really know r r r . So, the real algorithm will actually try to guess the optimal running time, use it as a budget, and spend equal time in the three parts. Then it decides whether the estimate of π ( s , t ) \pi(s,t) π ( s , t ) is good enough. If not, it doubles the budget and repeat.
This gives us a total asymptotic running time of
T ∗ = inf r ∈ ( 0 , 1 ] max { T f ( r ) , T b ( r ) } = max r ∈ ( 0 , 1 ] min { T f ( r ) , T b ( r ) } , T^* = \inf_{r\in(0,1]} \max\{T_f(r),T_b(r)\} = \max_{r\in(0,1]} \min\{T_f(r),T_b(r)\}, T ∗ = r ∈ ( 0 , 1 ] inf max { T f ( r ) , T b ( r )} = r ∈ ( 0 , 1 ] max min { T f ( r ) , T b ( r )} ,
where
T f ( r ) = ∑ u ∈ V , π ( s , u ) > 0 min { d o u t ( u ) , π ( s , u ) r π ( s , t ) } , and T b ( r ) = ∑ v ∈ V , π ( v , t ) ≥ r ( 1 + d i n ( v ) ) . T_f(r) = \sum_{u\in V,\pi(s,u)>0} \min\left\{d_{\mathrm{out}}(u),\frac{\pi(s,u)r}{\pi(s,t)}\right\}, \qquad\text{and} \qquad T_b(r) = \sum_{v\in V,\pi(v,t)\ge r}(1+d_{\mathrm{in}}(v)). T f ( r ) = u ∈ V , π ( s , u ) > 0 ∑ min { d out ( u ) , π ( s , t ) π ( s , u ) r } , and T b ( r ) = v ∈ V , π ( v , t ) ≥ r ∑ ( 1 + d in ( v )) .
For this sketch to go through, existing pushing algorithms are not quite sufficient, so we strengthen them as explained below.
The Difficulty of Small PPR Values
Another challenge in achieving instance-optimality is that prior work cannot efficiently estimate π ( s , t ) \pi(s,t) π ( s , t ) when it is very small. Recall from § 1.2 that the previous best worst-case complexity is O ( min { 1 / δ , m log ( 1 / δ ) } ) O(\min\{1/\delta,m\log(1/\delta)\}) O ( min { 1/ δ , m log ( 1/ δ )}) , while the lower bound is Ω ( min { 1 / δ , m } ) \Omega(\min\{1/\delta,m\}) Ω ( min { 1/ δ , m }) . So there is a O ( log 1 / δ ) O(\log1/\delta) O ( log 1/ δ ) gap. This gap can be as large as Ω ( n log n ) \Omega(n\log n) Ω ( n log n ) because π ( s , t ) \pi(s,t) π ( s , t ) , and hence δ \delta δ , can be as small as 1 / n Θ ( n ) 1/n^{\Theta(n)} 1/ n Θ ( n ) . An example of this is illustrated in Figure 3 .
Closing such gap may be of lesser interest from a practical worst-case perspective since we may only care about π ( s , t ) \pi(s,t) π ( s , t ) values above a not so small threshold δ \delta δ . A devil’s advocate could argue that this is a case of sour grapes [4 ] ; that δ \delta δ was introduced in practice because small probabilities were too expensive to estimate. Theoretically, it is clearly nicer not to be restricted to larger probabilities..
The point in instance-optimality is that we do not need to speculate on what instances are most important in practice. Ambitiously, we want an algorithm that is best, or close to best, on every possible instance, and this includes those with small π ( s , t ) \pi(s,t) π ( s , t ) .
The issue is illustrated in the toy graph shown in Figure 3 . The target vertex t t t can be reached from the source vertex s s s only along the path s v 1 v 2 ⋯ t sv_1v_2\cdots t s v 1 v 2 ⋯ t of length n n n . Each vertex on this path also has outgoing edges to each of another n n n vertices, which we refer to as the w w w -vertices, and incoming edges from each of another n n n vertices, which we refer to as the u u u -vertices. Every pair of u u u -vertices and every pair of w w w -vertices are connected by bidirectional edges. At every node on the path s v 1 v 2 ⋯ t sv_1v_2\cdots t s v 1 v 2 ⋯ t , there is a 1 − 1 / ( n + 1 ) 1-1/(n+1) 1 − 1/ ( n + 1 ) probability of going to the w w w -vertices, and then it would never come back to the path, so π ( s , t ) < 1 / n n − 1 \pi(s,t)<1/n^{n-1} π ( s , t ) < 1/ n n − 1 in this example.
In this example, Monte Carlo sampling is useless, since a random walk starting from almost any vertex in the graph has an extremely low probability of reaching t t t . The previously best-known upper bound of O ( min { 1 / δ , m log ( 1 / δ ) } ) O(\min\{1/\delta,m\log(1/\delta)\}) O ( min { 1/ δ , m log ( 1/ δ )}) on this example becomes O ( m n log n ) O(mn\log n) O ( mn log n ) . It is achieved by both the power method [PBMW98] and the BiPPR method [LBG16] and the bound is tight for this example. Basically forward pushing will keep pushing probability mass between the w w w -vertices, and backwards pushing will keep pushing probability mass between the u u u -vertices. For contrast, an instance-smart algorithm would take at most O ( m ) O(m) O ( m ) time to verify the above structure of the instance.
Vertex Freezing
Motivated by this example, our TriPPR algorithm introduces a vertex-freezing strategy, to improve the pushing strategies in forward and backward push. We will be far more conservative about when we push from a vertex, not pushing if we can deduce that it is not needed for the final approximation. A vertex freezes if no more pushing is needed from it, and we will show that at at most O ( log n ) O(\log n) O ( log n ) pushes are needed from each vertex. This enables TriPPR to run in only O ( m log n ) O(m\log n) O ( m log n ) time, improving upon the previous best O ( m n log n ) O(mn\log n) O ( mn log n ) upper bound and almost matching the Ω ( m ) \Omega(m) Ω ( m ) lower bound from [BJT+25] up to a logarithmic factor. We get this upper-bound, not only for single-pair, but also for the single-source and single-target version of PPR. In combination with the pure Monte Carlo based bound of O ( 1 / δ ) O(1/\delta) O ( 1/ δ ) , we now get that all these problem have a worst-case complexity of
O ( min { 1 / δ , m log n } ) , (1) O(\min\{1/\delta,m\log n\}), \tag*{(1)} O ( min { 1/ δ , m log n }) , (1)
almost matching the Ω ( min { 1 / δ , m } ) \Omega(\min\{1/\delta,m\}) Ω ( min { 1/ δ , m }) lower-bound from [BJT+25].
Note that bounding the number of pushes to O ( log n ) O(\log n) O ( log n ) is crucial for getting instance-optimality within factors of ( log n ) (\log n) ( log n ) for our lower bounds are all based on query complexity, which would only count for the first push on the vertex.
Another example of work aimed at estimating small (not PPR) values more efficiently is the recent work [FGY26] on computing entrywise approximate solutions for SDDM systems in O ( m n o ( 1 ) ) O(mn^{o(1)}) O ( m n o ( 1 ) ) time. Here, SDDM stands for any invertible symmetric diagonally dominant M-matrix. In our setting, entries correspond to our individual π ( s , t ) \pi(s,t) π ( s , t ) values in the π ( s , ⋅ ) \pi(s,\cdot) π ( s , ⋅ ) vector. The problems are of course very different. The SDDM systems are more general, but symmetric, while our directed graphs are asymmetric. Also, we have a factor log n \log n log n instead of n o ( 1 ) n^{o(1)} n o ( 1 ) , and our vertex-freezing technique is very simple.
Understanding of PPR Instance Optimality When n n n is Known
As stated earlier, our main contribution when n n n is unknown is that TriPPR is instance-optimal. We now consider what changes when n n n is known.
The fundamental issue is that, while knowing n n n may not be useful for a natural general-purpose PPR algorithm, there exist instances of denser graphs where an instance-smart algorithm can exploit the knowledge of n n n in ways that are unavailable to a general PPR algorithm. For example, an instance-smart algorithm may deliberately query the degrees of a particular vertex v v v whose in- or out-degree is n − 1 n-1 n − 1 , thereby inferring that it has edges to all other vertices in the graph. In contrast, a general algorithm may struggle to find the vertex v v v .
We show that TriPPR is still instance-optimal for all sparse graphs, and complement this by showing that there cannot be a general instance-optimal algorithm for denser graphs. More precisely, we will prove that the best possible instance-optimality factor is Θ ~ ( d ) \widetilde{\Theta}(d) Θ ( d ) where d = ⌈ m / n ⌉ d=\lceil m/n\rceil d = ⌈ m / n ⌉ and Θ ~ \widetilde{\Theta} Θ hides polylog-factors.
Technically, it makes a big difference whether or not an instance-smart algorithm can solve an instance in o ( n ) o(n) o ( n ) time. When o ( n ) o(n) o ( n ) time is possible, we call the instance locally solvable.
If an instance is not locally solvable, then an instance-factor of O ( d log n ) O(d\log n) O ( d log n ) is trivial; for by definition, an instance-smart algorithm needs Ω ( n ) \Omega(n) Ω ( n ) time, and our worst-case bound is O ( m log n ) O(m\log n) O ( m log n ) . The hard part here is to show a lower-bound of Ω ( d ~ ) \Omega(\widetilde{d}) Ω ( d ) on the instance-optimality factor.
For any density d = ⌈ m / n ⌉ d=\lceil m/n\rceil d = ⌈ m / n ⌉ , we need to find a class of graph instances where each instance can be solved by an instance-smart algorithm in O ~ ( n ) \widetilde{O}(n) O ( n ) time but where for any general algorithm, some instances takes Ω ~ ( m ) \widetilde{\Omega}(m) Ω ( m ) time. For each of our instances, an instance-smart algorithm can first visit all vertices (since n n n is known, it knows when it has seen them all), check their degrees, and use this information to estimate π ( s , t ) \pi(s,t) π ( s , t ) . For contrast, a general algorithm may have no efficient way to find all the vertices. We note that an instance-smart algorithm has time to check all vertices only because the instance is not locally solvable.
We now consider the locally-solvable instances, noting that for very large graphs, locally solvable instances may be the only ones we can realistically solve in practice. For these locally solvable instances, the O ~ ( d ) \widetilde{O}(d) O ( d ) -instance-optimality bound is far from obvious. We resolve this case by showing that TriPPR obtains the following instance factor (in general).
We prove that if there are at most h h h vertices with degree above ( 1 − ε ) n (1-\varepsilon)n ( 1 − ε ) n , then TriPPR is instance-optimal within a factor of
O ~ ( 1 ε max { h + 1 , 1 n min { m , 1 δ } } ) . (2) \widetilde{O}\left(\frac{1}{\varepsilon}\max\left\{h+1,\frac{1}{n}\min\left\{m,\frac{1}{\delta}\right\}\right\}\right). \tag*{(2)} O ( ε 1 max { h + 1 , n 1 min { m , δ 1 } } ) . (2)
We emphasize that this bound holds for any chosen ε \varepsilon ε and matching h h h .
As a first consequence, choosing ε = 1 / 2 \varepsilon= 1/2 ε = 1/2 gives h = O ( m / n ) h = O(m/n) h = O ( m / n ) , so Equation (2) implies that TriPPR achieves an instance-optimality factor of O ~ ( d ) \widetilde{O}(d) O ( d ) on all instances, including the non-trivial locally solvable ones, where d = ⌈ m / n ⌉ d = \lceil m/n \rceil d = ⌈ m / n ⌉ . In particular, TriPPR is instance-optimal up to polylogarithmic factors on all sparse graphs with m = O ~ ( n ) m = \widetilde{O}(n) m = O ( n ) .
We now consider instead cases where 1 / δ = O ~ ( n ) 1/\delta= \widetilde{O}(n) 1/ δ = O ( n ) , noting that this may include very dense graphs. In that case Equation (2) simplifies to,
O ~ ( ( h + 1 ) / ε ) . (3) \widetilde{O}((h+1)/\varepsilon). \tag*{(3)} O (( h + 1 ) / ε ) . (3)
Define the graph class G ∗ \mathcal{G}^* G ∗ to include all graphs where the factor in Equation (2) is polylogarithmic, that is, ( h + 1 ) / ε = O ~ ( 1 ) (h+1)/\varepsilon= \widetilde{O}(1) ( h + 1 ) / ε = O ( 1 ) for some ε \varepsilon ε and h h h . Then G ∗ \mathcal{G}^* G ∗ is much more than just sparse graphs, e.g., it includes almost all graphs; for a random graph has max-degree below 2 n / 3 2n/3 2 n /3 with very high probability, so with ε = 1 / 3 \varepsilon= 1/3 ε = 1/3 we get h = 0 h = 0 h = 0 . The definition of the graph class G ∗ \mathcal{G}^* G ∗ is taken from [TW26] and we shall further discuss the relation below.
We will now explain how our result for PPR generalizes and improves the result on PageRank from [TW26].
First recall that PageRank reduces to PPR with an artificial source s ∗ s^* s ∗ with out-edges to all other nodes including t t t . With n n n known, we can recognize this instance, so we know that taking a random out-neighbor from s ∗ s^* s ∗ corresponds to a Jump in the original graph. We call this the PageRank-instance of PPR.
We have π ( s ∗ , t ) ≥ α ( 1 − α ) / n \pi(s^*,t) \ge\alpha(1-\alpha)/n π ( s ∗ , t ) ≥ α ( 1 − α ) / n , so we can set δ = α ( 1 − α ) / n \delta= \alpha(1-\alpha)/n δ = α ( 1 − α ) / n , implying that TriPPR solves the PageRank-instance within the instance-optimality factor in Equation (3) . In fact, due to the high out-degree from s ∗ s^* s ∗ , TriPPR may never push forward from s ∗ s^* s ∗ , so it reduces to BiPPR on the PageRank-instance, and this is exactly the algorithm analyzed in [TW26] for PageRank.
However, in [TW26], the instance-optimality factor they proved was ( ( h + 1 ) 2 / ε ) log O ( 1 ) n ((h+1)^2/\varepsilon)\log^{O(1)} n (( h + 1 ) 2 / ε ) log O ( 1 ) n , that is, they had a quadratic dependence on ( h + 1 ) (h+1) ( h + 1 ) whereas our dependence is linear. For the definition of G ∗ \mathcal{G}^* G ∗ is does not matter if the dependence is linear or quadratic, but as described above, we need the linear dependence to prove an instance-optimality factor of O ~ ( ⌈ m / n ⌉ ) \widetilde{O}(\lceil m/n\rceil) O (⌈ m / n ⌉) for the general PPR problem.
Summing up the major differences, [TW26] shows that within the class G ∗ \mathcal{G}^* G ∗ , the classic BiPPR is instance-optimal for PageRank. However, PageRank is only a very special case of PPR, and we demonstrate that BiPPR has almost worst possible performance on some instances of PPR. We propose the new algorithm TriPPR for PPR that we show is instance-optimal on all sparse graphs. To strictly generalize the result from [TW26], we also show that TriPPR is instance-optimal within a factor O ~ ( ( h + 1 ) / ε ) \widetilde{O}((h+1)/\varepsilon) O (( h + 1 ) / ε ) on any PPR instance graph from G ∗ \mathcal{G}^* G ∗ with π ( s , t ) = Ω ~ ( 1 / n ) \pi(s,t) = \widetilde{\Omega}(1/n) π ( s , t ) = Ω ( 1/ n ) , and this subsumes the case of PageRank. We note that for such graphs, we do not have any issues with the ( log 1 / δ ) (\log1/\delta) ( log 1/ δ ) -factor since it is O ( log n ) O(\log n) O ( log n ) .
We also show that for the PPR problem, there cannot exist an instance-optimal algorithm for denser graphs. More precisely, we show that the best general instance-optimality factor is Θ ~ ( ⌈ m / n ⌉ ) \widetilde{\Theta}(\lceil m/n\rceil) Θ (⌈ m / n ⌉) . In [TW26] there is no proof that instance-optimality for all graphs is impossible for PageRank.
Finally, we show that TriPPR is instance-optimal on every PPR instance if the number of nodes n n n is not known. As pointed out in § 1.4 , not knowing n n n is a common case for large networks. We believe that we are the first work to make this point and use it to get general instance-optimality which is not possible when n n n is known.
Paper Organization
In the body the paper, we first describe our TriPPR algorithm and establish its running-time upper bound in § 4 . Then, in § 5 , we establish an instance-wise lower bound, showing that when n n n is unknown, no good algorithm can outperform TriPPR by more than a polylogarithmic factor. We next consider the case where n n n is known. In § 6 , we first show that no instance-optimal algorithm exists for dense graphs. Finally, in § 7 , we establish an instance-wise lower bound for the case where n n n is known.
The use of generative AI
The paper is entirely human-made. The authors wrote this paper and used ChatGPT Pro only to assist with working out some technical details and with proofreading, including comments for the exposition.
Review of Push Operations
As mentioned before, our TriPPR algorithm consists of three components: forward push from s s s , backward push from t t t , and Monte Carlo sampling.
In this section, we briefly review forward and backward push, along with their properties that will be used later in our analysis. At the end of this section, we also discuss the BiPPR method [LBG16] and the power method in more detail. The former has been proven instance-optimal for PageRank estimation, while the latter achieves the best-known worst-case complexity. However, neither is instance-optimal for single-pair PPR estimation. Readers primarily interested in our TriPPR algorithm may skip this final part.
Forward Push and Its Invariant
The forward push operation was introduced in [3 ] for estimating single-source PPR and identifying local clusters around the given source vertex. It deterministically propagates random-walk probability mass along outgoing edges step by step through the graph. Each forward push operation maintains two variables for each vertex v ∈ V v \in V v ∈ V : the forward reserve p f ( v ) p_f(v) p f ( v ) and the forward residue r f ( v ) r_f(v) r f ( v ) . Initially, p f ( v ) p_f(v) p f ( v ) and r f ( v ) r_f(v) r f ( v ) are set to 0 for all v v v , except r f ( s ) = 1 r_f(s)=1 r f ( s ) = 1 . The following invariant is maintained for every v ∈ V v \in V v ∈ V :
π ( s , v ) = p f ( v ) + ∑ u ∈ V r f ( u ) π ( u , v ) . (4) \pi(s,v)=p_f(v)+\sum_{u\in V}r_f(u)\pi(u,v). \tag*{(4)} π ( s , v ) = p f ( v ) + u ∈ V ∑ r f ( u ) π ( u , v ) . (4)
The forward push operation is atomic and can be applied to any vertex u u u in the graph, following the steps outlined in Algorithm 1. [3 Lemma 1] proves that the invariant (4) is maintained before and after every forward push operation, regardless of the order in which vertices are processed.
Algorithm 1: ForwardPush(u u u ) [3 ]
Input: vertex u u u Output: updated p f ( ) p_f() p f ( ) and r f ( ) r_f() r f ( )
r ← r f ( u ) r \leftarrow r_f(u) r ← r f ( u ) ;
r f ( u ) ← 0 r_f(u) \leftarrow0 r f ( u ) ← 0 ;
p f ( u ) ← p f ( u ) + α r p_f(u) \leftarrow p_f(u) + \alpha r p f ( u ) ← p f ( u ) + α r ;
for each v ∈ N o u t ( u ) v \in\mathcal{N}_{\mathrm{out}}(u) v ∈ N out ( u ) do
r f ( v ) ← r f ( v ) + ( 1 − α ) r / d o u t ( u ) r_f(v) \leftarrow r_f(v) + (1-\alpha)r/d_{\mathrm{out}}(u) r f ( v ) ← r f ( v ) + ( 1 − α ) r / d out ( u ) ;
return p f ( ) p_f() p f ( ) and r f ( ) r_f() r f ( ) ;
Backward Push and Its Invariant
As a counterpart of forward push, the backward push operation deterministically propagates random-walk probability mass backward from the target vertex t t t along incoming edges, step by step. It was originally introduced in [1 ] for the estimating single-target PPR.
Analogous to forward push operations, each backward push operation maintains two variables for each vertex v ∈ V v \in V v ∈ V : the backward reserve p b ( v ) p_b(v) p b ( v ) and the backward residue r b ( v ) r_b(v) r b ( v ) . Initially, p b ( v ) p_b(v) p b ( v ) and r b ( v ) r_b(v) r b ( v ) are set to 0 0 0 for all v v v , except r b ( t ) = 1 r_b(t)=1 r b ( t ) = 1 for the target vertex t t t . The following invariant is maintained for every u ∈ V u \in V u ∈ V :
π ( u , t ) = p b ( u ) + ∑ v ∈ V π ( u , v ) r b ( v ) . (5) \pi(u,t) = p_b(u) + \sum_{v\in V}\pi(u,v)r_b(v). \tag*{(5)} π ( u , t ) = p b ( u ) + v ∈ V ∑ π ( u , v ) r b ( v ) . (5)
A backward push operation is also atomic. It consists of the steps shown in Algorithm 2. A backward push operation can be applied to any vertex. As proven in [1 Lemma 1] , the invariant (5) is maintained throughout the backward push process, regardless of the push order.
Algorithm 2: BackwardPush(v v v ) [1 ]
Input: vertex v v v Output: updated r b ( ) r_b() r b ( ) and p b ( ) p_b() p b ( )
r ← r b ( v ) r \leftarrow r_b(v) r ← r b ( v )
r b ( v ) ← 0 r_b(v) \leftarrow0 r b ( v ) ← 0
p b ( v ) ← p b ( v ) + α r p_b(v) \leftarrow p_b(v) + \alpha r p b ( v ) ← p b ( v ) + α r
for each u ∈ N i n ( v ) u \in\mathcal{N}_{\mathrm{in}}(v) u ∈ N in ( v ) do
r b ( u ) ← r b ( u ) + ( 1 − α ) r / d o u t ( u ) r_b(u) \leftarrow r_b(u) + (1-\alpha)r/d_{\mathrm{out}}(u) r b ( u ) ← r b ( u ) + ( 1 − α ) r / d out ( u )
return r b ( ) r_b() r b ( ) and p b ( ) p_b() p b ( )
The BiPPR Method
Recall that [LBG16] proposes a method called BiPPR, which combines backward push and Monte Carlo sampling to estimate single-pair PPR. Specifically, it sets a push threshold r ˉ \bar{r} r ˉ , and repeatedly performs backward push operations until no vertex has a backward residue r b ( v ) ≥ r ˉ r_b(v) \ge\bar{r} r b ( v ) ≥ r ˉ . Then it performs Monte Carlo sampling by generating discounted random walks from s s s . The algorithm balances the running times of the two phases, and the final estimate π ^ ( s , t ) \hat{\pi}(s,t) π ^ ( s , t ) of π ( s , t ) \pi(s,t) π ( s , t ) is obtained by combining their results, as illustrated in Algorithm 3.
Algorithm 3: BiPPR ( t , r ˉ , q ) (t,\bar{r},q) ( t , r ˉ , q ) [LBG16]
Input: target vertex t t t , threshold r ˉ \bar{r} r ˉ , total number of random walks q q q
Output: estimate for π ( t ) \pi(t) π ( t )
p b ( ) p_b() p b ( ) , r b ( ) ← r_b() \leftarrow r b ( ) ← arrays with all entries 0 0 0
r b ( t ) ← 1 r_b(t) \leftarrow1 r b ( t ) ← 1
while ∃ v ∈ V \exists v \in V ∃ v ∈ V with r b ( v ) ≥ r ˉ r_b(v) \ge\bar{r} r b ( v ) ≥ r ˉ do
\quad BackwardPush( v ) (v) ( v ) // invoke Algorithm 2
q ( v ) ← 0 q(v) \leftarrow0 q ( v ) ← 0 for each v ∈ V v \in V v ∈ V // recording the number of random walks terminating at v v v
for i i i from 1 1 1 to q q q do
\quad Simulate a discounted random walk from s s s and use v v v to denote the ending vertex
q ( v ) ← q ( v ) + 1 \quad q(v) \leftarrow q(v) + 1 q ( v ) ← q ( v ) + 1
return π ^ ( s , t ) ← p b ( s ) + ∑ v ∈ V ( q ( v ) / q ) r b ( v ) \hat{\pi}(s,t) \leftarrow p_b(s) + \sum_{v \in V}(q(v)/q)r_b(v) π ^ ( s , t ) ← p b ( s ) + ∑ v ∈ V ( q ( v ) / q ) r b ( v )
The recent work [TW26] shows that the adaptive variant of BiPPR is instance-optimal for PageRank estimation on all graphs with at most polylogarithmically many vertices whose in- or out-degree is ( 1 − o ( 1 ) ) n (1-o(1))n ( 1 − o ( 1 )) n , i.e., in the graph class G ∗ \mathcal{G}^* G ∗ . However, it is easy to see that no reasonable variant of BiPPR is instance-optimal for single-pair PPR estimation, as it can be much slower than an instance-smart algorithm on the examples in Figure 1 . In the example in Figure 1 , Monte Carlo sampling requires Ω ( m ) \Omega(m) Ω ( m ) time to reach u u u from s s s , and backward push requires Ω ( m ) \Omega(m) Ω ( m ) time to propagate probability mass from t t t to u u u . The time cost of BiPPR is the summation of that of Monte Carlo sampling and backward push, and achieves the minimum when balancing the time cost of the two phases, thus also requiring Ω ( m ) \Omega(m) Ω ( m ) time on the example. In contrast, the instance-smart algorithm costs only O ( log n ) O(\log n) O ( log n ) time on the example, as explained in § 1.6 .
The Power Method
Recall that the power method was proposed in the seminar paper [PBMW98, BP98] that introduces PPR and PageRank. We introduced the power method earlier in § 1.2 from the perspective of iteratively applying the PPR recurrence, but it is actually equivalent to performing forward push on all vertices synchronously and repeatedly until the probability mass accumulated at t t t converges, as illustrated in Algorithm 4.
Algorithm 4: ForwardPowerMethod ( s , δ ) (s,\delta) ( s , δ )
Input: source vertex s s s , approximation threshold δ \delta δ
Output: estimate for π ( s , t ) \pi(s,t) π ( s , t )
Initialize p f ( v ) ← 0 p_f(v) \leftarrow0 p f ( v ) ← 0 and r f ( v ) ← 0 r_f(v) \leftarrow0 r f ( v ) ← 0 for all v ∈ V v \in V v ∈ V ;
r f ( s ) ← 1 r_f(s) \leftarrow1 r f ( s ) ← 1 ;
for ℓ = 0 , 1 , 2 , … , ⌈ log 1 − α δ ⌉ \ell= 0,1,2,\ldots,\lceil\log_{1-\alpha}\delta\rceil ℓ = 0 , 1 , 2 , … , ⌈ log 1 − α δ ⌉ do
\quad Run ForwardPush( v ) (v) ( v ) synchronously on every v ∈ V v \in V v ∈ V ;
return p f ( t ) p_f(t) p f ( t ) ;
The running time of the power method is O ( m log ( 1 / δ ) ) O(m\log(1/\delta)) O ( m log ( 1/ δ )) for estimating π ( s , t ) ≥ δ \pi(s,t) \ge\delta π ( s , t ) ≥ δ . However, as illustrated in Figure 3 , this can be as large as O ( m n log n ) O(mn\log n) O ( mn log n ) when estimating extremely small values of π ( s , t ) \pi(s,t) π ( s , t ) . Specifically, in the example in Figure 3 , starting from the source vertex s s s , forward push first propagates probability mass to v 1 v_1 v 1 and all the w w w -vertices (i.e., the outgoing neighbors of s s s ). In expectation (depending on the ordering of vertices in the adjacency lists), the algorithm may perform forward push on almost all the w w w -vertices before pushing from v 1 v_1 v 1 . Only after pushing from v 1 v_1 v 1 does v 2 v_2 v 2 receive probability mass. Similarly, before pushing from v 2 v_2 v 2 , the algorithm may again perform forward push on almost all the w w w -vertices. This pattern repeats as the algorithm progresses along the path s v 1 v 2 ⋯ t sv_1v_2\cdots t s v 1 v 2 ⋯ t . Since each forward push on a w w w -vertex costs Θ ( n ) \Theta(n) Θ ( n ) time to propagate probability mass to its Θ ( n ) \Theta(n) Θ ( n ) outgoing neighbors, and Θ ( n ) \Theta(n) Θ ( n ) such w w w -vertices are processed before advancing one step along the path, the total running time before probability mass reaches t t t is Ω ( m n ) \Omega(mn) Ω ( mn ) , i.e., Ω ( n 3 ) \Omega(n^3) Ω ( n 3 ) in this example.
The power method can also be implemented in a backward fashion by repeatedly performing backward push synchronously on all vertices, starting from t t t . For completeness, we provide its pseudocode in Algorithm 5 below.
Algorithm 5: BackwardPowerMethod( s , δ ) (s,\delta) ( s , δ )
Input: target vertex t t t , approximation threshold δ \delta δ
Output: estimate for π ( s , t ) \pi(s,t) π ( s , t )
Initialize p b ( v ) ← 0 p_b(v) \leftarrow0 p b ( v ) ← 0 and r b ( v ) ← 0 r_b(v) \leftarrow0 r b ( v ) ← 0 for all v ∈ V v \in V v ∈ V ;
r b ( t ) ← 1 r_b(t) \leftarrow1 r b ( t ) ← 1 ;
for i = 0 , 1 , 2 , … , ⌈ log 1 − α δ ⌉ i = 0,1,2,\ldots,\lceil\log_{1-\alpha}\delta\rceil i = 0 , 1 , 2 , … , ⌈ log 1 − α δ ⌉ do
Run BackwardPush( v ) (v) ( v ) synchronously on every v ∈ V v \in V v ∈ V ;
return p b ( s ) p_b(s) p b ( s ) ;
On this example, this backward version behaves symmetrically: starting from t t t , it spends substantial time processing the v v v -vertices before advancing backward along the path t ⋯ v 2 v 1 s t\cdots v_2v_1s t ⋯ v 2 v 1 s , thus also incurring a running time of O ( m n log n ) O(mn\log n) O ( mn log n ) .
Push with Vertex Freezing
Recall that our TriPPR algorithm introduces a vertex-freezing technique to efficiently estimate π ( s , t ) \pi(s,t) π ( s , t ) when its value is extremely small. Before presenting the full TriPPR algorithm, we first describe this technique in this section. The technique is simple and can be readily incorporated into both forward and backward push processes. Below, we describe the technique in the context of forward push and defer its backward counterpart to the end of this section for completeness.
Basic Idea
The high-level idea behind the vertex-freezing technique is that if the probability mass a vertex v v v will receive in the future is sufficiently small compared to the mass it has already received, then further pushes from v v v will contribute only negligibly to π ( s , t ) \pi(s,t) π ( s , t ) . We can therefore freeze v v v in this case, meaning that no further pushes will be performed from v v v .
More specifically, given a source vertex s s s , we initialize r f ( u ) = p f ( u ) = 0 r_f(u)=p_f(u)=0 r f ( u ) = p f ( u ) = 0 for all u ≠ s u \ne s u = s , and set r f ( s ) = 1 r_f(s)=1 r f ( s ) = 1 and p f ( s ) = 1 p_f(s)=1 p f ( s ) = 1 , as in the standard forward-push algorithm. The pseudocode for initialization is given in Algorithm 6.
After initialization, we proceed iteratively for ℓ = 0 , 1 , 2 , … \ell=0,1,2,\ldots ℓ = 0 , 1 , 2 , … , performing forward push synchronously in each iteration, as in the power method described in Algorithm 4. However, instead of pushing from every vertex in each iteration, we start pushing from a vertex u u u only when its forward residue satisfies:
r f ( u ) / d o u t ( u ) ≥ R f / κ f . r_f(u)/d_{\mathrm{out}}(u) \ge R_f/\kappa_f. r f ( u ) / d out ( u ) ≥ R f / κ f .
We refer to this as activating a vertex. Once activated, a vertex continues to be pushed in subsequent iterations until it is frozen.
Specifically, we maintain a candidate set C f C_f C f , which contains all activated vertices that have not yet been frozen. Whenever a vertex is activated, it is added to the candidate set. In each iteration, we perform forward push only on vertices in C f C_f C f , and only when their total forward residual mass satisfies:
∑ u ∈ C f ( ℓ ) r f ( ℓ ) ( u ) ≥ R f ( ℓ ) / 2. \sum_{u\in C_f^{(\ell)}} r_f^{(\ell)}(u) \ge R_f^{(\ell)}/2. u ∈ C f ( ℓ ) ∑ r f ( ℓ ) ( u ) ≥ R f ( ℓ ) /2.
Moreover, we introduce a freezing threshold L f L_f L f to limit the number of forward-push operations performed on each vertex. Specifically, we perform forward push on each vertex u u u at most L f L_f L f times, after which the vertex is frozen , meaning that no further forward-push operations will be performed on u u u . We maintain a set F f F_f F f of frozen vertices. Once a vertex is frozen, it is added to F f F_f F f and permanently removed from the candidate set C f C_f C f . Frozen vertices would never be unfrozen, so the size of F f F_f F f is non-decreasing.
The pseudocode for the forward-push process with the vertex-freezing technique is provided in Algorithm 7. The algorithm takes a running-time budget κ f ≥ 0 \kappa_f \ge0 κ f ≥ 0 as input. Before each iteration ℓ \ell ℓ , we compute its anticipated running time, given by ∑ u ∈ C f d o u t ( u ) \sum_{u\in C_f}d_{\mathrm{out}}(u) ∑ u ∈ C f d out ( u ) , which is the cost of performing forward push on all vertices in C f C_f C f in the current iteration. If the anticipated running time exceeds the remaining budget, we do not proceed with the iteration.
Algorithm 6: ForwardPush-Init(s s s )
Input: source vertex s s s
F f ← ∅ F_f \leftarrow\varnothing F f ← ∅ // set of frozen vertices
C f ← { s } C_f \leftarrow\{s\} C f ← { s } // set of active vertices
cnt f ( u ) ← 0 \operatorname{cnt}_f(u) \leftarrow0 cnt f ( u ) ← 0 for each u ∈ V u\in V u ∈ V // count the number of forward pushes on u u u
r f ( u ) ← 0 r_f(u) \leftarrow0 r f ( u ) ← 0 for each u ≠ s u\ne s u = s , and r f ( s ) ← 1 r_f(s)\leftarrow1 r f ( s ) ← 1
p f ( u ) ← 0 p_f(u)\leftarrow0 p f ( u ) ← 0 for each u ∈ V u\in V u ∈ V
Algorithm 7: ForwardPushWithFreezing(s , κ f , L f s,\kappa_f,L_f s , κ f , L f )
Input: source vertex s s s , budget κ f \kappa_f κ f , freezing threshold L f L_f L f
κ f ′ ← κ f \kappa'_f\leftarrow\kappa_f κ f ′ ← κ f // remaining budget
for ℓ = 1 , 2 , … \ell=1,2,\ldots ℓ = 1 , 2 , … do
R f ← ∑ u ∈ ( V ∖ F f ) r f ( u ) R_f\leftarrow\sum_{u\in(V\setminus F_f)}r_f(u) R f ← ∑ u ∈ ( V ∖ F f ) r f ( u ) // total residue of all non-frozen vertices
C f ← { u ∈ ( V ∖ F f ) ∣ r f ( u ) / d o u t ( u ) ≥ R f / κ f } ∪ { C f ∖ F f } C_f\leftarrow\{u\in(V\setminus F_f)\mid r_f(u)/d_{\mathrm{out}}(u)\ge R_f/\kappa_f\}\cup\{C_f\setminus F_f\} C f ← { u ∈ ( V ∖ F f ) ∣ r f ( u ) / d out ( u ) ≥ R f / κ f } ∪ { C f ∖ F f }
if C f C_f C f is empty or ∑ u ∈ C f r f ( u ) < R f / 2 \sum_{u\in C_f}r_f(u)<R_f/2 ∑ u ∈ C f r f ( u ) < R f /2 , or ∑ u ∈ C f d o u t ( u ) > κ f ′ \sum_{u\in C_f}d_{\mathrm{out}}(u)>\kappa'_f ∑ u ∈ C f d out ( u ) > κ f ′ then break
Run ForwardPush(u u u ) synchronously on every u ∈ C f u\in C_f u ∈ C f // invoke Algorithm 1
κ f ′ ← κ f ′ − ∑ u ∈ C f d o u t ( u ) \kappa'_f\leftarrow\kappa'_f-\sum_{u\in C_f}d_{\mathrm{out}}(u) κ f ′ ← κ f ′ − ∑ u ∈ C f d out ( u )
Increase cnt f ( u ) \operatorname{cnt}_f(u) cnt f ( u ) for each vertex u ∈ C f u\in C_f u ∈ C f by 1 and add all u u u with cnt f ( u ) ≥ L f \operatorname{cnt}_f(u)\ge L_f cnt f ( u ) ≥ L f into F f F_f F f
Approximation Error
We now analyze the approximation error of Algorithm 7. For each iteration ℓ ≥ 0 \ell\ge0 ℓ ≥ 0 , we use C f ( ℓ ) C_f^{(\ell)} C f ( ℓ ) and F f ( ℓ ) F_f^{(\ell)} F f ( ℓ ) to denote the set of vertices that have been activated and have been frozen at the beginning of iteration ℓ \ell ℓ , respectively. We also define R f ( ℓ ) = ∑ u ∈ V ∖ F f ( ℓ ) r f ( ℓ ) ( u ) R_f^{(\ell)} = \sum_{u\in V\setminus F_f^{(\ell)}} r_f^{(\ell)}(u) R f ( ℓ ) = ∑ u ∈ V ∖ F f ( ℓ ) r f ( ℓ ) ( u ) , that is, the total forward residue over all non-frozen vertices at the beginning of iteration ℓ \ell ℓ . Additionally, we use r f ( ℓ ) ( u ) r_f^{(\ell)}(u) r f ( ℓ ) ( u ) and p f ( ℓ ) ( u ) p_f^{(\ell)}(u) p f ( ℓ ) ( u ) to denote the forward residue r f ( u ) r_f(u) r f ( u ) and reserve p f ( u ) p_f(u) p f ( u ) , respectively, at the beginning of iteration ℓ \ell ℓ .
Lemma 3.1. For each integer ℓ ≥ 0 \ell\ge0 ℓ ≥ 0 , performing forward push synchronously on all vertices in C f ( ℓ ) C_f^{(\ell)} C f ( ℓ ) only when ∑ u ∈ C f ( ℓ ) r f ( ℓ ) ( u ) ≥ R f ( ℓ ) / 2 \sum_{u\in C_f^{(\ell)}} r_f^{(\ell)}(u) \ge R_f^{(\ell)}/2 ∑ u ∈ C f ( ℓ ) r f ( ℓ ) ( u ) ≥ R f ( ℓ ) /2 ensures that
R f ( ℓ ) ≤ ( 1 − α / 2 ) ℓ , and R f ( ℓ + 1 ) ≤ ( 1 − α / 2 ) R f ( ℓ ) . R_f^{(\ell)} \le(1-\alpha/2)^\ell,\qquad\text{and}\qquad R_f^{(\ell+1)} \le(1-\alpha/2)R_f^{(\ell)}. R f ( ℓ ) ≤ ( 1 − α /2 ) ℓ , and R f ( ℓ + 1 ) ≤ ( 1 − α /2 ) R f ( ℓ ) .
Proof. We prove this lemma by induction on ℓ \ell ℓ . For ℓ = 0 \ell= 0 ℓ = 0 , the frozen vertices’ set F f ( 0 ) F_f^{(0)} F f ( 0 ) is an empty set and r f ( 0 ) ( u ) = 0 r_f^{(0)}(u) = 0 r f ( 0 ) ( u ) = 0 for all u u u except r f ( 0 ) ( s ) = 1 r_f^{(0)}(s) = 1 r f ( 0 ) ( s ) = 1 , so
R f ( 0 ) = ∑ u ∈ ( V ∖ F f ( 0 ) ) r f ( 0 ) ( u ) = r f ( 0 ) ( s ) = 1 = ( 1 − α / 2 ) 0 . R_f^{(0)} = \sum_{u\in(V\setminus F_f^{(0)})} r_f^{(0)}(u) = r_f^{(0)}(s) = 1 = (1-\alpha/2)^0. R f ( 0 ) = u ∈ ( V ∖ F f ( 0 ) ) ∑ r f ( 0 ) ( u ) = r f ( 0 ) ( s ) = 1 = ( 1 − α /2 ) 0 .
So Lemma 3.1 holds when ℓ = 0 \ell= 0 ℓ = 0 .
We now fix an ℓ \ell ℓ and assume the following holds for ℓ \ell ℓ :
R f ( ℓ ) = ∑ u ∈ ( V ∖ F f ( ℓ ) ) r f ( ℓ ) ( u ) ≤ ( 1 − α / 2 ) ℓ . (6) R_f^{(\ell)} = \sum_{u\in(V\setminus F_f^{(\ell)})} r_f^{(\ell)}(u) \le(1-\alpha/2)^\ell. \tag*{(6)} R f ( ℓ ) = u ∈ ( V ∖ F f ( ℓ ) ) ∑ r f ( ℓ ) ( u ) ≤ ( 1 − α /2 ) ℓ . (6)
We know that F f ( ℓ ) ⊆ F f ( ℓ + 1 ) F_f^{(\ell)} \subseteq F_f^{(\ell+1)} F f ( ℓ ) ⊆ F f ( ℓ + 1 ) , since once a vertex is frozen, it will never be unfrozen. This implies
R f ( ℓ + 1 ) = ∑ u ∈ ( V ∖ F f ( ℓ + 1 ) ) r f ( ℓ + 1 ) ( u ) ≤ ∑ u ∈ ( V ∖ F f ( ℓ ) ) r f ( ℓ + 1 ) ( u ) ≤ ∑ u ∈ ( V ∖ F f ( ℓ ) ) r f ( ℓ ) ( u ) − ∑ u ∈ C f ( ℓ ) α r f ( ℓ ) ( u ) , (7) R_f^{(\ell+1)} = \sum_{u\in(V\setminus F_f^{(\ell+1)})} r_f^{(\ell+1)}(u) \le\sum_{u\in(V\setminus F_f^{(\ell)})} r_f^{(\ell+1)}(u) \le\sum_{u\in(V\setminus F_f^{(\ell)})} r_f^{(\ell)}(u)-\sum_{u\in C_f^{(\ell)}}\alpha r_f^{(\ell)}(u), \tag*{(7)} R f ( ℓ + 1 ) = u ∈ ( V ∖ F f ( ℓ + 1 ) ) ∑ r f ( ℓ + 1 ) ( u ) ≤ u ∈ ( V ∖ F f ( ℓ ) ) ∑ r f ( ℓ + 1 ) ( u ) ≤ u ∈ ( V ∖ F f ( ℓ ) ) ∑ r f ( ℓ ) ( u ) − u ∈ C f ( ℓ ) ∑ α r f ( ℓ ) ( u ) , (7)
where the last inequality is not necessarily an equality, since some residue may be pushed to frozen vertices, whereas R R R only accounts for the total residue over non-frozen vertices.
By definition ∑ u ∈ ( V ∖ F f ( ℓ ) ) r f ( ℓ ) ( u ) = R f ( ℓ ) \sum_{u\in(V\setminus F_f^{(\ell)})} r_f^{(\ell)}(u) = R_f^{(\ell)} ∑ u ∈ ( V ∖ F f ( ℓ ) ) r f ( ℓ ) ( u ) = R f ( ℓ ) . We also note that we only push on vertices in C f ( ℓ ) C_f^{(\ell)} C f ( ℓ ) when ∑ u ∈ C f ( ℓ ) r f ( ℓ ) ( u ) ≥ R f ( ℓ ) / 2 \sum_{u\in C_f^{(\ell)}} r_f^{(\ell)}(u) \ge R_f^{(\ell)}/2 ∑ u ∈ C f ( ℓ ) r f ( ℓ ) ( u ) ≥ R f ( ℓ ) /2 . Substituting these into Equation (7) , we obtain
R f ( ℓ + 1 ) = ∑ u ∈ ( V ∖ F f ( ℓ + 1 ) ) r f ( ℓ + 1 ) ( u ) ≤ R f ( ℓ ) − α R f ( ℓ ) / 2 = ( 1 − α / 2 ) R f ( ℓ ) . R_f^{(\ell+1)} = \sum_{u\in(V\setminus F_f^{(\ell+1)})} r_f^{(\ell+1)}(u) \le R_f^{(\ell)}-\alpha R_f^{(\ell)}/2 = (1-\alpha/2)R_f^{(\ell)}. R f ( ℓ + 1 ) = u ∈ ( V ∖ F f ( ℓ + 1 ) ) ∑ r f ( ℓ + 1 ) ( u ) ≤ R f ( ℓ ) − α R f ( ℓ ) /2 = ( 1 − α /2 ) R f ( ℓ ) .
Since we assume R f ( ℓ ) ≤ ( 1 − α / 2 ) ℓ R_f^{(\ell)} \le(1-\alpha/2)^\ell R f ( ℓ ) ≤ ( 1 − α /2 ) ℓ in Equation (6) , we then have R f ( ℓ ) ≤ ( 1 − α / 2 ) ℓ R_f^{(\ell)} \le(1-\alpha/2)^\ell R f ( ℓ ) ≤ ( 1 − α /2 ) ℓ . Therefore,
R f ( ℓ + 1 ) ≤ ( 1 − α / 2 ) ( 1 − α / 2 ) ℓ = ( 1 − α / 2 ) ℓ + 1 , R_f^{(\ell+1)} \le(1-\alpha/2)(1-\alpha/2)^\ell= (1-\alpha/2)^{\ell+1}, R f ( ℓ + 1 ) ≤ ( 1 − α /2 ) ( 1 − α /2 ) ℓ = ( 1 − α /2 ) ℓ + 1 ,
completing the inductive step. □ \square □
Lemma 3.2. For a vertex u u u , activating it for the first time when r f ( u ) / d o u t ( u ) ≥ R f / κ f r_f(u)/d_{\mathrm{out}}(u) \ge R_f/\kappa_f r f ( u ) / d out ( u ) ≥ R f / κ f and then freezing it after L f L_f L f forward-push operations ensure that
r f ( u ) π ( u , t ) ≤ ( 1 − α / 2 ) L f κ f π ( s , t ) r_f(u)\pi(u,t) \le(1-\alpha/2)^{L_f}\kappa_f\pi(s,t) r f ( u ) π ( u , t ) ≤ ( 1 − α /2 ) L f κ f π ( s , t ) after it is frozen.
Proof. Suppose that u u u is activated in iteration ℓ u \ell_u ℓ u . This implies
r f ( ℓ u ) ( u ) ≥ d o u t ( u ) R f ( ℓ u ) κ f . (8) r_f^{(\ell_u)}(u) \ge\frac{d_{\mathrm{out}}(u)R_f^{(\ell_u)}}{\kappa_f}. \tag*{(8)} r f ( ℓ u ) ( u ) ≥ κ f d out ( u ) R f ( ℓ u ) . (8)
By the forward push invariant (4) , at the beginning of iteration ℓ u \ell_u ℓ u , we have
π ( s , t ) = p f ( ℓ u ) ( t ) + ∑ v ∈ V r f ( ℓ u ) ( v ) π ( v , t ) ≥ r f ( ℓ u ) ( u ) π ( u , t ) . (9) \pi(s,t)=p_f^{(\ell_u)}(t)+\sum_{v\in V}r_f^{(\ell_u)}(v)\pi(v,t)\ge r_f^{(\ell_u)}(u)\pi(u,t). \tag*{(9)} π ( s , t ) = p f ( ℓ u ) ( t ) + v ∈ V ∑ r f ( ℓ u ) ( v ) π ( v , t ) ≥ r f ( ℓ u ) ( u ) π ( u , t ) . (9)
Combining Equation (8) and Equation (9) yields
π ( u , t ) ≤ π ( s , t ) r f ( ℓ u ) ( u ) ≤ π ( s , t ) κ f d o u t ( u ) R f ( ℓ u ) . (10) \pi(u,t)\le\frac{\pi(s,t)}{r_f^{(\ell_u)}(u)}\le\frac{\pi(s,t)\kappa_f}{d_{\mathrm{out}}(u)R_f^{(\ell_u)}}. \tag*{(10)} π ( u , t ) ≤ r f ( ℓ u ) ( u ) π ( s , t ) ≤ d out ( u ) R f ( ℓ u ) π ( s , t ) κ f . (10)
Since vertex u u u is activated in iteration ℓ u \ell_u ℓ u , it will be frozen at the end of iteration ℓ u + L f − 1 \ell_u+L_f-1 ℓ u + L f − 1 . Let r f ( u ) r_f(u) r f ( u ) denote the forward residue of u u u after it is frozen. We have
r f ( u ) ≤ ∑ x ∈ V ∖ F f ( ℓ u + L f ) r f ( ℓ u + L f ) ( x ) = R f ( ℓ u + L f ) . (11) r_f(u)\le\sum_{x\in V\setminus F_f^{(\ell_u+L_f)}}r_f^{(\ell_u+L_f)}(x)=R_f^{(\ell_u+L_f)}. \tag*{(11)} r f ( u ) ≤ x ∈ V ∖ F f ( ℓ u + L f ) ∑ r f ( ℓ u + L f ) ( x ) = R f ( ℓ u + L f ) . (11)
This is straightforward because, once u u u is frozen, it can no longer push residual mass to other vertices, and can only receive residual mass propagated from other vertices that have not been frozen by the end of iteration ℓ u + L f − 1 \ell_u+L_f-1 ℓ u + L f − 1 . Therefore,
r f ( u ) ≤ ∑ x ∈ V ∖ F f ( ℓ u + L f ) r f ( ℓ u + L f ) ( x ) Pr { x → u } , r_f(u)\le\sum_{x\in V\setminus F_f^{(\ell_u+L_f)}}r_f^{(\ell_u+L_f)}(x)\Pr\{x\to u\}, r f ( u ) ≤ x ∈ V ∖ F f ( ℓ u + L f ) ∑ r f ( ℓ u + L f ) ( x ) Pr { x → u } ,
where Pr { x → u } \Pr\{x\to u\} Pr { x → u } denotes the fraction of residue mass that can be transferred from x x x to u u u . Since Pr { x → u } ≤ 1 \Pr\{x\to u\}\le1 Pr { x → u } ≤ 1 by definition, we obtain Equation (11) .
Recall from Lemma 3.1 that R f ( ℓ + 1 ) ≤ ( 1 − α / 2 ) R f ( ℓ ) R_f^{(\ell+1)}\le(1-\alpha/2)R_f^{(\ell)} R f ( ℓ + 1 ) ≤ ( 1 − α /2 ) R f ( ℓ ) holds for every iteration ℓ \ell ℓ . Applying this bound repeatedly and combining it with Equation (11) , we obtain
r f ( u ) ≤ R f ( ℓ u ) ( 1 − α / 2 ) L f . (12) r_f(u)\le R_f^{(\ell_u)}(1-\alpha/2)^{L_f}. \tag*{(12)} r f ( u ) ≤ R f ( ℓ u ) ( 1 − α /2 ) L f . (12)
Further combining Equation (10) with Equation (12) yields
r f ( u ) π ( u , t ) ≤ R f ( ℓ u ) ( 1 − α / 2 ) L f ⋅ π ( s , t ) κ f d o u t ( u ) R f ( ℓ u ) = ( 1 − α / 2 ) L f κ f d o u t ( u ) π ( s , t ) ≤ ( 1 − α / 2 ) L f κ f π ( s , t ) , r_f(u)\pi(u,t)\le R_f^{(\ell_u)}(1-\alpha/2)^{L_f}\cdot\frac{\pi(s,t)\kappa_f}{d_{\mathrm{out}}(u)R_f^{(\ell_u)}}=\frac{(1-\alpha/2)^{L_f}\kappa_f}{d_{\mathrm{out}}(u)}\pi(s,t)\le(1-\alpha/2)^{L_f}\kappa_f\pi(s,t), r f ( u ) π ( u , t ) ≤ R f ( ℓ u ) ( 1 − α /2 ) L f ⋅ d out ( u ) R f ( ℓ u ) π ( s , t ) κ f = d out ( u ) ( 1 − α /2 ) L f κ f π ( s , t ) ≤ ( 1 − α /2 ) L f κ f π ( s , t ) ,
as claimed.
Lemma 3.3. Setting L f = ⌈ log 1 − α / 2 ε r 2 i κ f 2 ⌉ L_f=\left\lceil\log_{1-\alpha/2}\frac{\varepsilon_r}{2^i\kappa_f^2}\right\rceil L f = ⌈ log 1 − α /2 2 i κ f 2 ε r ⌉ ensures that
∑ u ∈ F f r f ( u ) π ( u , t ) ≤ ( ε r / 2 i ) π ( s , t ) \sum_{u\in F_f}r_f(u)\pi(u,t)\le(\varepsilon_r/2^i)\pi(s,t) u ∈ F f ∑ r f ( u ) π ( u , t ) ≤ ( ε r / 2 i ) π ( s , t ) at the end of Algorithm 7.
Proof. Let F f F_f F f denote the set of frozen vertices at the end of Algorithm 7. Since each vertex must be pushed at least once before being frozen, and each push incurs at least unit cost, the number of frozen vertices satisfies ∣ F f ∣ ≤ κ f |F_f| \le\kappa_f ∣ F f ∣ ≤ κ f . By Lemma 3.2 , for each u ∈ F f u \in F_f u ∈ F f , r f ( u ) π ( u , t ) ≤ ( 1 − α / 2 ) L f κ f π ( s , t ) r_f(u)\pi(u,t) \le(1-\alpha/2)^{L_f}\kappa_f\pi(s,t) r f ( u ) π ( u , t ) ≤ ( 1 − α /2 ) L f κ f π ( s , t ) . Summing over all frozen vertices, we obtain
∑ u ∈ F f r f ( u ) π ( u , t ) ≤ ( 1 − α / 2 ) L f κ f 2 π ( s , t ) . \sum_{u\in F_f} r_f(u)\pi(u,t) \le(1-\alpha/2)^{L_f}\kappa_f^2\pi(s,t). u ∈ F f ∑ r f ( u ) π ( u , t ) ≤ ( 1 − α /2 ) L f κ f 2 π ( s , t ) .
Therefore, setting L f = ⌈ log 1 − α / 2 ε r 2 i κ f 2 ⌉ L_f=\left\lceil\log_{1-\alpha/2}\frac{\varepsilon_r}{2i\kappa_f^2}\right\rceil L f = ⌈ log 1 − α /2 2 i κ f 2 ε r ⌉ ensures that ∑ u ∈ F f r f ( u ) π ( u , t ) ≤ ε r 2 π ( s , t ) \sum_{u\in F_f}r_f(u)\pi(u,t)\le\frac{\varepsilon_r}{2}\pi(s,t) ∑ u ∈ F f r f ( u ) π ( u , t ) ≤ 2 ε r π ( s , t ) .
Running Time
We now upper bound the running time of Algorithm 7.
Lemma 3.4. The running time of Algorithm 7 is O ( κ f ) O(\kappa_f) O ( κ f ) .
Proof. The running time of Algorithm 7 is dominated by two components. The first is the cost of performing forward push in each iteration. Recall that in Algorithm 7, before starting an iteration, we compute the anticipated cost of the forward-push operations and check whether it exceeds the remaining budget. If so, we terminate the algorithm without executing that iteration. Therefore, the total number of arithmetic operations performed throughout the forward-push process is O ( κ f ) O(\kappa_f) O ( κ f ) .
Maintaining R f R_f R f . We maintain R f = ∑ u ∈ V ∖ F f r f ( u ) R_f=\sum_{u\in V\setminus F_f}r_f(u) R f = ∑ u ∈ V ∖ F f r f ( u ) in each iteration using only addition, and claim that the total number of addition operations is O ( κ f ) O(\kappa_f) O ( κ f ) .
For active vertices, the cost of summing their residues is covered by the forward-push operations performed on them in that iteration. For inactive, unfrozen vertices with nonzero residues, we claim that the cost of summing their residues in each iteration is also covered by the forward-push operations performed in that iteration.
To see this, consider an inactive, unfrozen vertex v v v with nonzero residue in iteration ℓ \ell ℓ . Suppose that v v v first receives residue from an in-neighbor u u u in iteration ℓ u ≤ ℓ \ell_u\le\ell ℓ u ≤ ℓ . By the vertex activation rule in Algorithm 7, we have r f ( ℓ u ) ( u ) / d o u t ( u ) ≥ R f ( ℓ u ) / κ f r_f^{(\ell_u)}(u)/d_{\mathrm{out}}(u)\ge R_f^{(\ell_u)}/\kappa_f r f ( ℓ u ) ( u ) / d out ( u ) ≥ R f ( ℓ u ) / κ f . The forward-push operation performed on u u u in iteration ℓ u \ell_u ℓ u increases r f ( v ) r_f(v) r f ( v ) by ( 1 − α ) r f ( u ) / d o u t ( u ) (1-\alpha)r_f(u)/d_{\mathrm{out}}(u) ( 1 − α ) r f ( u ) / d out ( u ) , thus implies
r f ( ℓ u ) ( v ) ≥ ( 1 − α ) r f ( ℓ u ) ( u ) d o u t ( u ) ≥ ( 1 − α ) R f ( ℓ u ) κ f . (13) r_f^{(\ell_u)}(v)\ge\frac{(1-\alpha)r_f^{(\ell_u)}(u)}{d_{\mathrm{out}}(u)}\ge\frac{(1-\alpha)R_f^{(\ell_u)}}{\kappa_f}. \tag*{(13)} r f ( ℓ u ) ( v ) ≥ d out ( u ) ( 1 − α ) r f ( ℓ u ) ( u ) ≥ κ f ( 1 − α ) R f ( ℓ u ) . (13)
Note that v v v first receives residue from u u u in iteration ℓ u \ell_u ℓ u . This means that u u u is activated in iteration ℓ u \ell_u ℓ u , since once u u u is activated, forward push starts being performed on u u u , and v v v starts receiving residue. At the end of iteration ℓ u + L f − 1 \ell_u+L_f-1 ℓ u + L f − 1 , u u u will be frozen. By Lemmas 3.1 and 3.3 , we have
R f ( ℓ u + L f ) ≤ ( 1 − α / 2 ) L f R f ( ℓ u ) ≤ ε r 8 κ f 2 R f ( ℓ u ) , R_f^{(\ell_u+L_f)}\le(1-\alpha/2)^{L_f}R_f^{(\ell_u)}\le\frac{\varepsilon_r}{8\kappa_f^2}R_f^{(\ell_u)}, R f ( ℓ u + L f ) ≤ ( 1 − α /2 ) L f R f ( ℓ u ) ≤ 8 κ f 2 ε r R f ( ℓ u ) ,
where the second inequality follows from L f = ⌈ log 1 − α / 2 ε r 8 κ f 2 ⌉ L_f=\left\lceil\log_{1-\alpha/2}\frac{\varepsilon_r}{8\kappa_f^2}\right\rceil L f = ⌈ log 1 − α /2 8 κ f 2 ε r ⌉ . Consequently,
r f ( ℓ u + L f ) ( v ) ≤ R f ( ℓ u + L f ) ≤ ε r 8 ( 1 − α ) κ f ⋅ ( 1 − α ) R f ( ℓ u ) κ f . r_f^{(\ell_u+L_f)}(v)\le R_f^{(\ell_u+L_f)}\le\frac{\varepsilon_r}{8(1-\alpha)\kappa_f}\cdot\frac{(1-\alpha)R_f^{(\ell_u)}}{\kappa_f}. r f ( ℓ u + L f ) ( v ) ≤ R f ( ℓ u + L f ) ≤ 8 ( 1 − α ) κ f ε r ⋅ κ f ( 1 − α ) R f ( ℓ u ) .
As a result, when κ f > ε r / ( 8 ( 1 − α ) ) \kappa_f > \varepsilon_r/(8(1-\alpha)) κ f > ε r / ( 8 ( 1 − α )) , v v v must have been activated by iteration ℓ u + L f \ell_u + L_f ℓ u + L f . Otherwise, this would contradict Equation (13) , since the residue of an inactive vertex never decreases before it becomes active. Since ε r / ( 8 ( 1 − α ) ) = O ( 1 ) \varepsilon_r/(8(1-\alpha)) = O(1) ε r / ( 8 ( 1 − α )) = O ( 1 ) , we conclude that, for κ f \kappa_f κ f larger than this constant, v v v must become active before u u u is frozen. More generally, when κ f > ε r / ( 8 ( 1 − α ) ) \kappa_f > \varepsilon_r/(8(1-\alpha)) κ f > ε r / ( 8 ( 1 − α )) , every inactive vertex with nonzero residue continues to receive residue from at least one of its active in-neighbors until it becomes active. Therefore, the cost of summing the residue of v v v in each iteration can be charged to the forward-push operations that propagate residue to v v v in that iteration.
When κ f ≤ ε r / ( 8 ( 1 − α ) ) = O ( 1 ) \kappa_f \le\varepsilon_r/(8(1-\alpha)) = O(1) κ f ≤ ε r / ( 8 ( 1 − α )) = O ( 1 ) , the analysis is simpler. In this case, the number of inactive vertices in each iteration is at most κ f \kappa_f κ f and is therefore constant. Thus, we can simply scan all inactive vertices in each iteration to compute their total residue. Since each such vertex remains inactive for at most κ f \kappa_f κ f iterations, the total cost is O ( κ f ) = O ( 1 ) O(\kappa_f) = O(1) O ( κ f ) = O ( 1 ) .
Consequently, the total cost of maintaining R f R_f R f is covered by the forward-push cost and is therefore O ( κ f ) O(\kappa_f) O ( κ f ) .
Finding newly activated vertices. We now analyze the cost of identifying the vertices to be activated in each iteration, i.e., computing C f ( ℓ ) C_f^{(\ell)} C f ( ℓ ) for each iteration ℓ ≥ 1 \ell\ge1 ℓ ≥ 1 . Recall that
C_f^{(\ell)} = \left\{ u \in\left(V \setminus F_f^{(\ell)}\right) \mathrel{\left|} \frac{r_f^{(\ell)}(u)}{d_{\mathrm{out}}(u)} \ge\frac{R_f^{(\ell)}}{\kappa_f} \right. \right\} \cup\left\{ C_f^{(\ell-1)} \setminus F_f^{(\ell)} \right\}.
Given C f ( ℓ − 1 ) C_f^{(\ell-1)} C f ( ℓ − 1 ) and F f ( ℓ ) F_f^{(\ell)} F f ( ℓ ) , the key is to compute C f ( ℓ ) ∖ C f ( ℓ − 1 ) C_f^{(\ell)} \setminus C_f^{(\ell-1)} C f ( ℓ ) ∖ C f ( ℓ − 1 ) for each ℓ \ell ℓ , i.e., to identify all newly activated vertices in iteration ℓ \ell ℓ .
As established above, when κ f > ε r / ( 8 ( 1 − α ) ) \kappa_f > \varepsilon_r/(8(1-\alpha)) κ f > ε r / ( 8 ( 1 − α )) , once an inactive vertex starts receiving residue, it continues to receive residue in subsequent iterations until it becomes active. Therefore, the cost of identifying newly activated vertices in each iteration can also be charged to the forward-push operations performed in that iteration.
When κ f ≤ ε r / ( 8 ( 1 − α ) ) = O ( 1 ) \kappa_f \le\varepsilon_r/(8(1-\alpha)) = O(1) κ f ≤ ε r / ( 8 ( 1 − α )) = O ( 1 ) , the number of inactive vertices in each iteration is at most κ f = O ( 1 ) \kappa_f = O(1) κ f = O ( 1 ) . Thus, we can simply scan all inactive vertices to identify those that should be activated, at a cost of O ( κ f ) O(\kappa_f) O ( κ f ) per iteration. Since there are at most O ( κ f ) O(\kappa_f) O ( κ f ) iterations, the total cost is O ( κ f 2 ) = O ( κ f ) = O ( 1 ) O(\kappa_f^2) = O(\kappa_f) = O(1) O ( κ f 2 ) = O ( κ f ) = O ( 1 ) .
Consequently, the total cost of identifying newly activated vertices over all iterations is O ( κ f ) O(\kappa_f) O ( κ f ) .
RAM model on floating-point numbers. Recall that we work in the RAM model, where arithmetic operations on floating-point numbers with O ( log n ) O(\log n) O ( log n ) -bit exponents and mantissas take constant time. We will show that this precision suffices for all arithmetic operations in Algorithm 7, ensuring that the accumulated numerical errors do not affect the constant multiplicative factor approximation guarantee.
We first observe that Algorithm 7 does not involve subtraction; it uses only addition, multiplication, and division. More specifically, the arithmetic operations are of two types: multiplying a variable by ( 1 − α ) / d (1-\alpha)/d ( 1 − α ) / d for some vertex degree d d d in the graph, and adding two nonnegative variables. Since the total number of arithmetic operations in Algorithm 7 is bounded by κ f \kappa_f κ f and d ≤ n d \le n d ≤ n , every nonzero value arising from these operations is at least ( 1 − α ) κ f / n κ f (1-\alpha)^{\kappa_f}/n^{\kappa_f} ( 1 − α ) κ f / n κ f . As we shall show later in § 3.4 , κ f = O ( m log n ) \kappa_f = O(m \log n) κ f = O ( m log n ) . Thus, every nonzero value is at least 1 / n O ( n 2 log n ) 1/n^{O(n^2 \log n)} 1/ n O ( n 2 l o g n ) . Consequently, the maximum absolute exponent is O ( n 2 log 2 n ) O(n^2 \log^2 n) O ( n 2 log 2 n ) , which can be represented using O ( log n ) O(\log n) O ( log n ) bits.
Next, we analyze the accumulated numerical errors introduced by the floating-point representation. Suppose each floating-point operation introduces a relative error of at most ε r \varepsilon_r ε r . This implies that each multiplication or division by an exact value increases the relative error by at most ε r \varepsilon_r ε r . Moreover, since all additions involve nonnegative values, the relative error of their sum is at most ε r \varepsilon_r ε r larger than the maximum relative error of the two operands. Therefore, after κ f \kappa_f κ f arithmetic operations, the maximum accumulated relative error is O ( κ f ε r ) O(\kappa_f\varepsilon_r) O ( κ f ε r ) .
Since κ f = O ( m log n ) = O ( n 2 log n ) \kappa_f = O(m\log n) = O(n^2\log n) κ f = O ( m log n ) = O ( n 2 log n ) , setting ε r = 1 / n 4 \varepsilon_r = 1/n^4 ε r = 1/ n 4 gives a maximum accumulated relative error of O ( n 2 log n n 4 ) = o ( 1 ) O\left(\frac{n^2\log n}{n^4}\right) = o(1) O ( n 4 n 2 l o g n ) = o ( 1 ) . We also note that using O ( log n ) O(\log n) O ( log n ) bits for the mantissa suffices to ensure that each floating-point operation introduces a relative error of at most 1 / n 4 1/n^4 1/ n 4 . Therefore, O ( log n ) O(\log n) O ( log n ) bits suffice for both the exponent and the mantissa, ensuring that the accumulated numerical errors do not affect the constant-factor approximation guarantee.
Combining all results above establishes the O ( κ f ) O(\kappa_f) O ( κ f ) running time of Algorithm 7.
Worst-Case Complexity
By incorporating the vertex-freezing technique into the forward-push process as shown in Algorithm 7, we can already improve the worst-case complexity of single-pair PPR estimation.
Recall that the previously best worst-case complexity is O ( min { 1 / δ , m log ( 1 / δ ) } ) O(\min\{1/\delta, m\log(1/\delta)\}) O ( min { 1/ δ , m log ( 1/ δ )}) , achieved by combining Monte Carlo sampling and the power method. The adaptive variant of Algorithm 7 improves this bound to O ( min { 1 / δ , m log n } ) O(\min\{1/\delta, m\log n\}) O ( min { 1/ δ , m log n }) , replacing the log ( 1 / δ ) \log(1/\delta) log ( 1/ δ ) factor, which can be as large as Θ ( n log n ) \Theta(n\log n) Θ ( n log n ) , with log n \log n log n . This matches the lower bound of Ω ( min { 1 / δ , m } ) \Omega(\min\{1/\delta,m\}) Ω ( min { 1/ δ , m }) up to an O ( log n ) O(\log n) O ( log n ) factor.
This improved complexity bound also extends to the single-source problem (computing constant-factor multiplicative approximations of π ( s , t ) \pi(s,t) π ( s , t ) for a given source s s s and all t ∈ V t \in V t ∈ V ) and the single-target problem (computing constant-factor multiplicative approximations of π ( s , t ) \pi(s,t) π ( s , t ) for a given target t t t and all s ∈ V s \in V s ∈ V ), as stated below. For both problems, this improves upon the previously best upper bound of O ( m log ( 1 / δ ) ) O(m\log(1/\delta)) O ( m log ( 1/ δ )) .
Theorem 3.5. The single-pair, single-source and single-target problems can all be solved in O ( m log n ) O(m\log n) O ( m log n ) time deterministically.
Proof. Algorithm 7 takes a running-time budget κ f \kappa_f κ f as input. We repeatedly run Algorithm 7 with an increasing budget, initially set to κ f = 2 \kappa_f = 2 κ f = 2 . Whenever the budget is exhausted while some vertices remain unfrozen, we double κ f \kappa_f κ f and continue the push process. The process terminates once all vertices have been frozen.
Note that every time we increase the budget, we do not restart the push process from scratch, but rather that we continue the pushing from previous rounds. So the sets of frozen vertices F f F_f F f and F b F_b F b are never reset, and vertices frozen in earlier rounds remain frozen in all subsequent rounds. Similarly, the push counters cnt f ( u ) \operatorname{cnt}_f(u) cnt f ( u ) and cnt b ( u ) \operatorname{cnt}_b(u) cnt b ( u ) are never reset to zero and can only increase over time. Note, however, that the freezing thresholds increase across rounds, allowing more push operations per vertex in later rounds. So a vertex is less likely to be frozen in a later round than in an earlier one. This choice of increasing freezing thresholds is essential for bounding the approximation error, specified as below.
Lemma 3.6. Let L f ( i ) L_f^{(i)} L f ( i ) be the freezing threshold in round i i i , and let F f F_f F f be the set of frozen sets at the end. Setting L f ( i ) = ⌈ log 1 − α / 2 ε r 2 3 i + 4 ⌉ L_f^{(i)} = \left\lceil\log_{1-\alpha/2}\frac{\varepsilon_r}{2^{3i+4}} \right\rceil L f ( i ) = ⌈ log 1 − α /2 2 3 i + 4 ε r ⌉ for round i i i ensures that
∑ u ∈ F f r f ( u ) π ( u , t ) ≤ ( ε r / 8 ) π ( s , t ) . \sum_{u\in F_f} r_f(u)\pi(u,t) \le(\varepsilon_r/8)\pi(s,t). u ∈ F f ∑ r f ( u ) π ( u , t ) ≤ ( ε r /8 ) π ( s , t ) . when the algorithm terminates.
Proof. Let F f ( i ) F_f^{(i)} F f ( i ) denote the set of frozen vertices in the beginning of round i i i . By Lemma 3.3 , setting L f ( i ) = ⌈ log 1 − α / 2 ε r 2 3 i + 4 ⌉ L_f^{(i)}=\left\lceil\log_{1-\alpha/2}\frac{\varepsilon_r}{2^{3i+4}}\right\rceil L f ( i ) = ⌈ log 1 − α /2 2 3 i + 4 ε r ⌉ for round i i i ensures
∑ u ∈ F f ( i ) ∖ F f ( i − 1 ) r f ( u ) π ( u , t ) ≤ ε r 16 ⋅ 2 i π ( s , t ) . \sum_{u\in F_f^{(i)}\setminus F_f^{(i-1)}} r_f(u)\pi(u,t)\leq\frac{\varepsilon_r}{16\cdot2^i}\pi(s,t). u ∈ F f ( i ) ∖ F f ( i − 1 ) ∑ r f ( u ) π ( u , t ) ≤ 16 ⋅ 2 i ε r π ( s , t ) .
Consequently,
∑ u ∈ F f r f ( u ) π ( u , t ) = ∑ i = 1 ∞ ∑ u ∈ F f ( i ) ∖ F f ( i − 1 ) r f ( u ) π ( u , t ) ≤ ( ε r / 8 ) π ( s , t ) , \sum_{u\in F_f}r_f(u)\pi(u,t)=\sum_{i=1}^{\infty}\sum_{u\in F_f^{(i)}\setminus F_f^{(i-1)}}r_f(u)\pi(u,t)\leq(\varepsilon_r/8)\pi(s,t), u ∈ F f ∑ r f ( u ) π ( u , t ) = i = 1 ∑ ∞ u ∈ F f ( i ) ∖ F f ( i − 1 ) ∑ r f ( u ) π ( u , t ) ≤ ( ε r /8 ) π ( s , t ) ,
completing the proof.
We note that when κ f \kappa_f κ f exceeds m L f mL_f m L f , all vertices must have been frozen, since forward push is performed on each vertex at most L f L_f L f times before it is frozen. By Lemma 3.6, L f = O ( log κ f ) L_f=O(\log\kappa_f) L f = O ( log κ f ) , so the algorithm terminates when κ f = O ( m log n ) \kappa_f=O(m\log n) κ f = O ( m log n ) . We further recall from Lemma 3.4 that each execution of Algorithm 7 with budget κ f \kappa_f κ f takes O ( κ f ) O(\kappa_f) O ( κ f ) time. Consequently, the total running time across all executions, up to the final budget of O ( m log n ) O(m\log n) O ( m log n ) , is O ( m log n ) O(m\log n) O ( m log n ) .
Algorithm 7 can be directly extended to solve the single-source PPR estimation problem by using p f ( u ) p_f(u) p f ( u ) as an estimate of π ( s , u ) \pi(s,u) π ( s , u ) for each u ∈ V u\in V u ∈ V . For the single-target PPR estimation problem, we will describe a backward version of the algorithm in the next subsection, whose resulting backward reserve p b ( u ) p_b(u) p b ( u ) can be used as an estimate of π ( u , t ) \pi(u,t) π ( u , t ) .
Backward Push with Vertex Freezing
We have shown above how to incorporate the vertex-freezing technique into the forward-push process. Similarly, this technique can also be incorporated into the backward-push process, as illustrated in Algorithm 5.
Table 8.
Initially, we set the backward residue r b ( v ) r_b(v) r b ( v ) and backward reserve p b ( v ) p_b(v) p b ( v ) to 0 for all v ∈ V v\in V v ∈ V , except that r b ( t ) = 1 r_b(t)=1 r b ( t ) = 1 . Let r ˉ b \bar r_b r ˉ b denote the maximum backward residue among all non-frozen vertices, i.e., r ˉ b = max v ∈ V ∖ F b r b ( v ) \bar r_b=\max_{v\in V\setminus F_b}r_b(v) r ˉ b = max v ∈ V ∖ F b r b ( v ) . A vertex v v v is activated for the first time when r b ( v ) ≥ α r ˉ b / 2 r_b(v)\geq\alpha\bar r_b/2 r b ( v ) ≥ α r ˉ b /2 . Once activated, a vertex remains in the candidate set for the next L b L_b L b iterations, after which it is frozen.
Analogously to the forward version, we proceed iteratively for ℓ = 1 , 2 , … \ell=1,2,\ldots ℓ = 1 , 2 , … . In each iteration ℓ \ell ℓ , we maintain a candidate set C b ( ℓ ) C_b^{(\ell)} C b ( ℓ ) , defined as
C b ( ℓ ) = { v ∈ V ∖ F b ( ℓ ) ∣ r b ( ℓ ) ( v ) ≥ α r ˉ b ( ℓ ) / 2 } ∪ ( C b ( ℓ − 1 ) ∖ F b ( ℓ ) ) . C_b^{(\ell)}=\left\{v\in V\setminus F_b^{(\ell)}\mid r_b^{(\ell)}(v)\geq\alpha\bar r_b^{(\ell)}/2\right\}\cup\left(C_b^{(\ell-1)}\setminus F_b^{(\ell)}\right). C b ( ℓ ) = { v ∈ V ∖ F b ( ℓ ) ∣ r b ( ℓ ) ( v ) ≥ α r ˉ b ( ℓ ) /2 } ∪ ( C b ( ℓ − 1 ) ∖ F b ( ℓ ) ) .
where F b F_b F b denotes the set of frozen vertices, and the superscript ( ℓ ) (\ell) ( ℓ ) indicates the value of each variable at the beginning of iteration ℓ \ell ℓ . We perform backward push synchronously on all vertices in C b ( ℓ ) C_b^{(\ell)} C b ( ℓ ) for every ℓ ≥ 1 \ell\geq1 ℓ ≥ 1 .
Algorithm 9: BackwardPushWithFreezing(t t t , κ b \kappa_b κ b , L b L_b L b )
Input: target vertex t t t , budget κ b \kappa_b κ b , freezing threshold L b L_b L b
κ f ′ ← κ f \kappa'_f \leftarrow\kappa_f κ f ′ ← κ f // remaining budget
for ℓ = 1 , 2 , … \ell= 1,2,\ldots ℓ = 1 , 2 , … do
r ˉ b ← max v ∈ { V ∖ F b } r b ( v ) \bar{r}_b \leftarrow\max_{v\in\{V\setminus F_b\}} r_b(v) r ˉ b ← max v ∈ { V ∖ F b } r b ( v ) // maximum residue over all non-frozen vertices
C b ← { v ∈ V ∖ F b ∣ r b ( v ) ≥ α r ˉ b / 2 } ∪ { C b ∖ F b } C_b \leftarrow\{v\in V\setminus F_b \mid r_b(v)\ge\alpha\bar{r}_b/2\}\cup\{C_b\setminus F_b\} C b ← { v ∈ V ∖ F b ∣ r b ( v ) ≥ α r ˉ b /2 } ∪ { C b ∖ F b }
if C b C_b C b is empty, or ∑ v ∈ C b d i n ( v ) > κ b \sum_{v\in C_b}d_{\mathrm{in}}(v)>\kappa_b ∑ v ∈ C b d in ( v ) > κ b then break
Run BackwardPush(v v v ) synchronously on every v ∈ C b v\in C_b v ∈ C b // invoke Algorithm 2
κ b ← κ b − ∑ v ∈ C b d i n ( v ) \kappa_b\leftarrow\kappa_b-\sum_{v\in C_b}d_{\mathrm{in}}(v) κ b ← κ b − ∑ v ∈ C b d in ( v )
Increase cnt b ( v ) \operatorname{cnt}_b(v) cnt b ( v ) for each vertex v ∈ C b v\in C_b v ∈ C b by 1 and add all v v v with cnt b ( v ) ≥ L b \operatorname{cnt}_b(v)\ge L_b cnt b ( v ) ≥ L b into F b F_b F b
The algorithm also takes a running-time budget κ b \kappa_b κ b as input and terminates if the anticipated cost of the backward-push operations in the next iteration exceeds the remaining budget.
Lemma 3.7. For each integer ℓ ≥ 0 \ell\ge0 ℓ ≥ 0 , performing backward push synchronously on all vertices in C b ( ℓ ) C_b^{(\ell)} C b ( ℓ ) ensures that
r ˉ b ( ℓ ) = max v ∈ ( V ∖ F b ( ℓ ) ) r b ( ℓ ) ( u ) ≤ ( 1 − α / 2 ) ℓ , and r ˉ b ( ℓ + 1 ) ≤ ( 1 − α / 2 ) r ˉ b ( ℓ ) . \bar{r}_b^{(\ell)}=\max_{v\in(V\setminus F_b^{(\ell)})}r_b^{(\ell)}(u)\le(1-\alpha/2)^\ell,\qquad\text{and}\qquad\bar{r}_b^{(\ell+1)}\le(1-\alpha/2)\bar{r}_b^{(\ell)}. r ˉ b ( ℓ ) = v ∈ ( V ∖ F b ( ℓ ) ) max r b ( ℓ ) ( u ) ≤ ( 1 − α /2 ) ℓ , and r ˉ b ( ℓ + 1 ) ≤ ( 1 − α /2 ) r ˉ b ( ℓ ) .
Proof. We prove the lemma by induction on ℓ \ell ℓ . For ℓ = 0 \ell=0 ℓ = 0 , F b ( 0 ) F_b^{(0)} F b ( 0 ) is an empty set, so
r ˉ b ( 0 ) = max v ∈ ( V ∖ F b ( 0 ) ) r b ( 0 ) ( v ) = r b ( 0 ) ( t ) = 1 = ( 1 − α / 2 ) 0 . \bar{r}_b^{(0)}=\max_{v\in(V\setminus F_b^{(0)})}r_b^{(0)}(v)=r_b^{(0)}(t)=1=(1-\alpha/2)^0. r ˉ b ( 0 ) = v ∈ ( V ∖ F b ( 0 ) ) max r b ( 0 ) ( v ) = r b ( 0 ) ( t ) = 1 = ( 1 − α /2 ) 0 .
We now assume that, for a fixed ℓ \ell ℓ , the following holds:
r ˉ b ( ℓ ) = max v ∈ V ∖ F b ( ℓ ) r b ( ℓ ) ( v ) ≤ ( 1 − α / 2 ) ℓ . \bar{r}_b^{(\ell)}=\max_{v\in V\setminus F_b^{(\ell)}}r_b^{(\ell)}(v)\le(1-\alpha/2)^\ell. r ˉ b ( ℓ ) = v ∈ V ∖ F b ( ℓ ) max r b ( ℓ ) ( v ) ≤ ( 1 − α /2 ) ℓ .
For each u ∈ V u\in V u ∈ V , if it has not yet been activated, then r b ( ℓ ) ( u ) ≤ α r ˉ b ( ℓ ) / 2 r_b^{(\ell)}(u)\le\alpha\bar{r}_b^{(\ell)}/2 r b ( ℓ ) ( u ) ≤ α r ˉ b ( ℓ ) /2 , and thus
r b ( ℓ + 1 ) ( u ) ≤ r b ( ℓ ) ( u ) + ∑ v ∈ C b ( ℓ ) ( 1 − α ) r b ( ℓ ) ( v ) d o u t ( u ) ≤ α r ˉ b ( ℓ ) / 2 + ( 1 − α ) r ˉ b ( ℓ ) = ( 1 − α / 2 ) r ˉ b ( ℓ ) . r_b^{(\ell+1)}(u)\le r_b^{(\ell)}(u)+\sum_{v\in C_b^{(\ell)}}\frac{(1-\alpha)r_b^{(\ell)}(v)}{d_{\mathrm{out}}(u)}
\le\alpha\bar{r}_b^{(\ell)}/2+(1-\alpha)\bar{r}_b^{(\ell)}
=(1-\alpha/2)\bar{r}_b^{(\ell)}. r b ( ℓ + 1 ) ( u ) ≤ r b ( ℓ ) ( u ) + v ∈ C b ( ℓ ) ∑ d out ( u ) ( 1 − α ) r b ( ℓ ) ( v ) ≤ α r ˉ b ( ℓ ) /2 + ( 1 − α ) r ˉ b ( ℓ ) = ( 1 − α /2 ) r ˉ b ( ℓ ) .
Otherwise, u u u must have been pushed in iteration ℓ \ell ℓ , so r b ( ℓ ) ( u ) = 0 r_b^{(\ell)}(u)=0 r b ( ℓ ) ( u ) = 0 , and
r b ( ℓ + 1 ) ( u ) = ∑ v ∈ C b ( ℓ ) ( 1 − α ) r b ( ℓ ) ( v ) d o u t ( u ) ≤ ( 1 − α ) r ˉ b ( ℓ ) . r_b^{(\ell+1)}(u)=\sum_{v\in C_b^{(\ell)}}\frac{(1-\alpha)r_b^{(\ell)}(v)}{d_{\mathrm{out}}(u)}
\le(1-\alpha)\bar{r}_b^{(\ell)}. r b ( ℓ + 1 ) ( u ) = v ∈ C b ( ℓ ) ∑ d out ( u ) ( 1 − α ) r b ( ℓ ) ( v ) ≤ ( 1 − α ) r ˉ b ( ℓ ) .
Recall that we assume r ˉ b ( ℓ ) ≤ ( 1 − α / 2 ) ℓ \bar{r}_b^{(\ell)}\le(1-\alpha/2)^\ell r ˉ b ( ℓ ) ≤ ( 1 − α /2 ) ℓ . We thus have r b ( ℓ + 1 ) ( u ) ≤ ( 1 − α / 2 ) ℓ + 1 r_b^{(\ell+1)}(u)\le(1-\alpha/2)^{\ell+1} r b ( ℓ + 1 ) ( u ) ≤ ( 1 − α /2 ) ℓ + 1 for each u ∈ V u\in V u ∈ V , completing the inductive step.
Lemma 3.8. Activating each vertex v v v for the first time when r b ( v ) ≥ α r ˉ b / 2 r_b(v)\ge\alpha\bar{r}_b/2 r b ( v ) ≥ α r ˉ b /2 and freezing it after it has remained activated for more than L b = ⌈ log 1 − α / 2 ε r α 2 32 κ b ⌉ L_b=\left\lceil\log_{1-\alpha/2}\frac{\varepsilon r\alpha^2}{32\kappa_b}\right\rceil L b = ⌈ log 1 − α /2 32 κ b ε r α 2 ⌉ rounds ensures that
∑ v ∈ F b π ( s , v ) r b ( v ) ≤ ε r π ( s , t ) / 8 \sum_{v\in F_b}\pi(s,v)r_b(v)\le\varepsilon r\pi(s,t)/8 v ∈ F b ∑ π ( s , v ) r b ( v ) ≤ ε r π ( s , t ) /8 at the end of Algorithm 9.
Proof. For each v ∈ F b v \in F_b v ∈ F b , suppose that we activate v v v in iteration ℓ v \ell_v ℓ v , so r b ( ℓ v ) ( v ) ≥ α r ˉ b ( ℓ v ) / 2 r_b^{(\ell_v)}(v) \ge\alpha\bar{r}_b^{(\ell_v)}/2 r b ( ℓ v ) ( v ) ≥ α r ˉ b ( ℓ v ) /2 , and π ( s , v ) r b ( ℓ v ) ( v ) ≤ π ( s , t ) \pi(s,v)r_b^{(\ell_v)}(v) \le\pi(s,t) π ( s , v ) r b ( ℓ v ) ( v ) ≤ π ( s , t ) .
This further implies
π ( s , v ) ≤ π ( s , t ) r b ( ℓ v ) ( v ) ≤ 2 π ( s , t ) α r ˉ b ( ℓ v ) . (14) \pi(s,v) \le\frac{\pi(s,t)}{r_b^{(\ell_v)}(v)} \le\frac{2\pi(s,t)}{\alpha\bar{r}_b^{(\ell_v)}}. \tag*{(14)} π ( s , v ) ≤ r b ( ℓ v ) ( v ) π ( s , t ) ≤ α r ˉ b ( ℓ v ) 2 π ( s , t ) . (14)
Let r b ( v ) r_b(v) r b ( v ) denote its value at the end of Algorithm 9. Since v v v is activated in iteration ℓ v \ell_v ℓ v , it is frozen at the end of iteration ( ℓ v + L b − 1 ) (\ell_v+L_b-1) ( ℓ v + L b − 1 ) . Afterwards, it receive residue mass from its non-frozen out-neighbors, but never push these residue back. Therefore
r b ( v ) ≤ r b ( ℓ v + L b ) ( v ) + ∑ ℓ = ℓ v + L b ∞ ∑ w ∈ { N o u t ( v ) ∩ C b ( ℓ ) } ( 1 − α ) r b ( ℓ ) ( w ) d o u t ( v ) ≤ r ˉ b ( ℓ v + L b ) + ∑ ℓ = ℓ v + L b ∞ ∑ w ∈ { N o u t ( v ) ∩ C b ( ℓ ) } ( 1 − α ) r ˉ b ( ℓ ) d o u t ( v ) . \begin{aligned}
r_b(v) &\le r_b^{(\ell_v+L_b)}(v)+\sum_{\ell=\ell_v+L_b}^{\infty}\sum_{w\in\{N_{\mathrm{out}}(v)\cap C_b^{(\ell)}\}}\frac{(1-\alpha)r_b^{(\ell)}(w)}{d_{\mathrm{out}}(v)} \\
&\le\bar{r}_b^{(\ell_v+L_b)}+\sum_{\ell=\ell_v+L_b}^{\infty}\sum_{w\in\{N_{\mathrm{out}}(v)\cap C_b^{(\ell)}\}}\frac{(1-\alpha)\bar{r}_b^{(\ell)}}{d_{\mathrm{out}}(v)}.
\end{aligned} r b ( v ) ≤ r b ( ℓ v + L b ) ( v ) + ℓ = ℓ v + L b ∑ ∞ w ∈ { N out ( v ) ∩ C b ( ℓ ) } ∑ d out ( v ) ( 1 − α ) r b ( ℓ ) ( w ) ≤ r ˉ b ( ℓ v + L b ) + ℓ = ℓ v + L b ∑ ∞ w ∈ { N out ( v ) ∩ C b ( ℓ ) } ∑ d out ( v ) ( 1 − α ) r ˉ b ( ℓ ) .
Recall from Lemma 3.7 that r ˉ b ( ℓ + 1 ) ≤ ( 1 − α / 2 ) r ˉ b ( ℓ ) \bar{r}_b^{(\ell+1)} \le(1-\alpha/2)\bar{r}_b^{(\ell)} r ˉ b ( ℓ + 1 ) ≤ ( 1 − α /2 ) r ˉ b ( ℓ ) for each ℓ \ell ℓ . We then have
r b ( v ) ≤ ( 1 − α / 2 ) L b r ˉ b ( ℓ v ) + ∑ ℓ = ℓ v + L b ∞ ( 1 − α ) r ˉ b ( ℓ ) ≤ ( 1 − α / 2 ) L b r ˉ b ( ℓ v ) + ∑ ℓ = L b ∞ ( 1 − α ) ( 1 − α / 2 ) ℓ r ˉ b ( ℓ v ) = r ˉ b ( ℓ v ) ( 1 − α / 2 ) L b ( 1 + 2 ( 1 − α ) / α ) ≤ r ˉ b ( ℓ v ) ( 1 − α / 2 ) L b ( 2 / α ) . (15) \begin{aligned}
r_b(v) &\le(1-\alpha/2)^{L_b}\bar{r}_b^{(\ell_v)}+\sum_{\ell=\ell_v+L_b}^{\infty}(1-\alpha)\bar{r}_b^{(\ell)} \\
&\le(1-\alpha/2)^{L_b}\bar{r}_b^{(\ell_v)}+\sum_{\ell=L_b}^{\infty}(1-\alpha)(1-\alpha/2)^\ell\bar{r}_b^{(\ell_v)} \\
&=\bar{r}_b^{(\ell_v)}(1-\alpha/2)^{L_b}\left(1+2(1-\alpha)/\alpha\right) \le\bar{r}_b^{(\ell_v)}(1-\alpha/2)^{L_b}(2/\alpha). \tag*{(15)}
\end{aligned} r b ( v ) ≤ ( 1 − α /2 ) L b r ˉ b ( ℓ v ) + ℓ = ℓ v + L b ∑ ∞ ( 1 − α ) r ˉ b ( ℓ ) ≤ ( 1 − α /2 ) L b r ˉ b ( ℓ v ) + ℓ = L b ∑ ∞ ( 1 − α ) ( 1 − α /2 ) ℓ r ˉ b ( ℓ v ) = r ˉ b ( ℓ v ) ( 1 − α /2 ) L b ( 1 + 2 ( 1 − α ) / α ) ≤ r ˉ b ( ℓ v ) ( 1 − α /2 ) L b ( 2/ α ) . (15)
Combining Equation (14) and Equation (15) gives
π ( s , v ) r b ( v ) ≤ 2 π ( s , t ) α r ˉ b ( ℓ v ) ⋅ 2 r ˉ b ( ℓ v ) ( 1 − α / 2 ) L b α = 4 ( 1 − α / 2 ) L b π ( s , t ) α 2 . \pi(s,v)r_b(v) \le\frac{2\pi(s,t)}{\alpha\bar{r}_b^{(\ell_v)}}\cdot\frac{2\bar{r}_b^{(\ell_v)}(1-\alpha/2)^{L_b}}{\alpha}=\frac{4(1-\alpha/2)^{L_b}\pi(s,t)}{\alpha^2}. π ( s , v ) r b ( v ) ≤ α r ˉ b ( ℓ v ) 2 π ( s , t ) ⋅ α 2 r ˉ b ( ℓ v ) ( 1 − α /2 ) L b = α 2 4 ( 1 − α /2 ) L b π ( s , t ) .
This further implies:
∑ v ∈ F b π ( s , v ) r b ( v ) ≤ ∣ F b ∣ 4 ( 1 − α / 2 ) L b π ( s , t ) α 2 . \sum_{v\in F_b}\pi(s,v)r_b(v)\le|F_b|\frac{4(1-\alpha/2)^{L_b}\pi(s,t)}{\alpha^2}. v ∈ F b ∑ π ( s , v ) r b ( v ) ≤ ∣ F b ∣ α 2 4 ( 1 − α /2 ) L b π ( s , t ) .
Recall that the total running time of backward push never exceed the required budget κ b \kappa_b κ b . Each vertex must be pushed L b L_b L b time before being frozen, and each push incurs at least unit cost. The number of frozen vertices therefore satisfies ∣ F b ∣ ≤ κ b |F_b|\le\kappa_b ∣ F b ∣ ≤ κ b . As a result, setting L b = ⌈ log 1 − α / 2 ε α 2 32 κ b ⌉ L_b=\left\lceil\log_{1-\alpha/2}\frac{\varepsilon\alpha^2}{32\kappa_b}\right\rceil L b = ⌈ log 1 − α /2 32 κ b ε α 2 ⌉ ensures that 4 ∣ F b ∣ ( 1 − α / 2 ) L b α 2 ≤ 4 κ b ( 1 − α / 2 ) L b α 2 ≤ ε 8 \frac{4|F_b|(1-\alpha/2)^{L_b}}{\alpha^2}\le\frac{4\kappa_b(1-\alpha/2)^{L_b}}{\alpha^2}\le\frac{\varepsilon}{8} α 2 4∣ F b ∣ ( 1 − α /2 ) L b ≤ α 2 4 κ b ( 1 − α /2 ) L b ≤ 8 ε .
Our TriPPR Algorithm
In this section, we present our TriPPR algorithm, and show that its expected running time is O ( T ∗ log n ) O(T^*\log n) O ( T ∗ log n ) , where
T ∗ = max r ∈ ( 0 , 1 ] min { T f ( r ) , T b ( r ) } , with T^*=\max_{r\in(0,1]}\min\{T_f(r),T_b(r)\},\quad\text{with} T ∗ = r ∈ ( 0 , 1 ] max min { T f ( r ) , T b ( r )} , with
T f ( r ) = ∑ u ∈ V , π ( s , u ) > 0 min { d o u t ( u ) , π ( s , u ) r π ( s , t ) } , and T b ( r ) = ∑ v ∈ V , π ( v , t ) ≥ r ( 1 + d i n ( v ) ) . (16) T_f(r)=\sum_{\substack{u\in V,\pi(s,u)>0}}\min\left\{d_{\mathrm{out}}(u),\frac{\pi(s,u)r}{\pi(s,t)}\right\},\quad\text{and}\quad T_b(r)=\sum_{v\in V,\pi(v,t)\ge r}(1+d_{\mathrm{in}}(v)). \tag*{(16)} T f ( r ) = u ∈ V , π ( s , u ) > 0 ∑ min { d out ( u ) , π ( s , t ) π ( s , u ) r } , and T b ( r ) = v ∈ V , π ( v , t ) ≥ r ∑ ( 1 + d in ( v )) . (16)
For simplicity, we assume δ = 0 \delta= 0 δ = 0 here. In Appendix § 8 , we will show how to extend it to a general δ \delta δ . We recall that d i n ( v ) d_{\mathrm{in}}(v) d in ( v ) and d o u t ( v ) d_{\mathrm{out}}(v) d out ( v ) denote the in- and out-degree of vertex v v v , respectively, and recall that for simplicity we assume d o u t ( v ) > 0 d_{\mathrm{out}}(v) > 0 d out ( v ) > 0 for each v ∈ V v \in V v ∈ V throughout the paper.
Theorem 4.1. Without prior knowledge of n n n , the estimate π ^ ( s , t ) \hat{\pi}(s,t) π ^ ( s , t ) for π ( s , t ) \pi(s,t) π ( s , t ) obtained by the TriPPR algorithm satisfies
Pr [ ∣ π ^ ( s , t ) − π ( s , t ) ∣ ≤ ε r π ( s , t ) ] ≥ 3 / 4. \Pr\left[ \left|\hat{\pi}(s,t)-\pi(s,t)\right| \le\varepsilon_r\pi(s,t) \right] \ge3/4. Pr [ ∣ π ^ ( s , t ) − π ( s , t ) ∣ ≤ ε r π ( s , t ) ] ≥ 3/4. The expected running time of TriPPR is O ~ ( T ∗ ) \widetilde{O}(T^*) O ( T ∗ ) .
Three-Component Structure
Our TriPPR algorithm consists of three components. We first run ForwardPushWithFreezing from s s s , as described in Algorithm 7, followed by BackwardPushWithFreezing from t t t , as described in Algorithm 9, and finally perform Monte Carlo sampling in the graph.
Specifically, in the Monte Carlo sampling phase, we generate independent discounted random walks from each vertex u u u that has not been frozen in the forward push process. Since we only need to control the variance, pairwise independence among these walks suffices. Let q q q denote the total number of discounted random walks generated. The number of random walks generated from each vertex u u u is set to q ( u ) = ⌈ q ⋅ r f ( u ) / R f ⌉ q(u) = \lceil q \cdot r_f(u)/R_f \rceil q ( u ) = ⌈ q ⋅ r f ( u ) / R f ⌉ , where r f ( u ) r_f(u) r f ( u ) denotes the forward residue of u u u , and R f = ∑ u ∈ V ∖ F f r f ( u ) R_f = \sum_{u \in V \setminus F_f} r_f(u) R f = ∑ u ∈ V ∖ F f r f ( u ) is the total forward residue over all non-frozen vertices at the end of the forward-push process.
Let 1 k ( u , v ) \mathbb{1}_k(u,v) 1 k ( u , v ) denote the indicator variable that equals 1 if the k k k -th random walk generated from u u u terminates at vertex v v v , and 0 otherwise. Therefore, 1 k ( u , v ) \mathbb{1}_k(u,v) 1 k ( u , v ) is an unbiased estimate for π ( u , v ) \pi(u,v) π ( u , v ) by definition. The final estimate X X X of π ( s , t ) \pi(s,t) π ( s , t ) produced by TriPPR is obtained by combining the quantities computed by the three components, as follows.
X = p b ( s ) + ∑ v ∉ F b p f ( v ) r b ( v ) + ∑ u ∉ F f ∑ k = 1 q ( u ) ∑ v ∉ F b r f ( u ) r b ( v ) 1 k ( u , v ) / q ( u ) , (17) X = p_b(s) + \sum_{v \notin F_b} p_f(v)r_b(v) + \sum_{u \notin F_f}\sum_{k=1}^{q(u)}\sum_{v \notin F_b} r_f(u)r_b(v)\mathbb{1}_k(u,v)/q(u), \tag*{(17)} X = p b ( s ) + v ∈ / F b ∑ p f ( v ) r b ( v ) + u ∈ / F f ∑ k = 1 ∑ q ( u ) v ∈ / F b ∑ r f ( u ) r b ( v ) 1 k ( u , v ) / q ( u ) , (17)
where r f ( u ) , p f ( u ) , r b ( u ) , p b ( u ) , F f , F b r_f(u),p_f(u),r_b(u),p_b(u),F_f,F_b r f ( u ) , p f ( u ) , r b ( u ) , p b ( u ) , F f , F b denote their respective values at the end of the forward- and backward-push processes. The pseudocode for the Monte Carlo sampling component is provided in Algorithm 10.
Lemma 4.2. The variance of X X X derived in Algorithm 10 satisfies: Var [ X ] ≤ R f r ˉ b π ( s , t ) / q \operatorname{Var}[X] \le R_f\bar{r}_b\pi(s,t)/q Var [ X ] ≤ R f r ˉ b π ( s , t ) / q .
Proof. Both the forward and backward processes are deterministic, so the randomness in X X X , as defined in Equation (17) , arises solely from Monte Carlo sampling. Therefore,
Var [ X ] = Var [ ∑ u ∉ F f ∑ k = 1 q ( u ) ∑ v ∉ F b r f ( u ) r b ( v ) 1 k ( u , v ) / q ( u ) ] \operatorname{Var}[X] = \operatorname{Var}\left[\sum_{u \notin F_f}\sum_{k=1}^{q(u)}\sum_{v \notin F_b} r_f(u)r_b(v)\mathbb{1}_k(u,v)/q(u)\right] Var [ X ] = Var u ∈ / F f ∑ k = 1 ∑ q ( u ) v ∈ / F b ∑ r f ( u ) r b ( v ) 1 k ( u , v ) / q ( u )
All random walks are generated independently. For any fixed u u u and k k k , the random variables 1 k ( u , v ) \mathbb{1}_k(u,v) 1 k ( u , v ) , indexed by v ∈ V v \in V v ∈ V , are negatively correlated, and Var [ 1 k ( u , v ) ] ≤ π ( u , v ) \operatorname{Var}[\mathbb{1}_k(u,v)] \le\pi(u,v) Var [ 1 k ( u , v )] ≤ π ( u , v ) . Therefore,
Var [ X ] ≤ ∑ u ∉ F f ∑ v ∉ F b r f 2 ( u ) r b 2 ( v ) π ( u , v ) / q ( u ) . (18) \operatorname{Var}[X] \le\sum_{u \notin F_f}\sum_{v \notin F_b} r_f^2(u)r_b^2(v)\pi(u,v)/q(u). \tag*{(18)} Var [ X ] ≤ u ∈ / F f ∑ v ∈ / F b ∑ r f 2 ( u ) r b 2 ( v ) π ( u , v ) / q ( u ) . (18)
Algorithm 10: MonteCarloR(q q q )
Input: the number of random walks q q q , a random seed R R R for the q q q random walks which should be 2-independent of each other
Output: estimate X X X of π ( s , t ) \pi(s,t) π ( s , t )
X ← p b ( s ) + ∑ v ∉ F b p f ( v ) r b ( v ) X \gets p_b(s) + \sum_{v \notin F_b} p_f(v)r_b(v) X ← p b ( s ) + ∑ v ∈ / F b p f ( v ) r b ( v )
if R f r ˉ b = 0 R_f\bar{r}_b = 0 R f r ˉ b = 0 then return X X X
foreach u ∈ ( V ∖ F f ) u \in(V \setminus F_f) u ∈ ( V ∖ F f ) with r f ( u ) > 0 r_f(u) > 0 r f ( u ) > 0 do
q ( u ) ← ⌈ q ⋅ r f ( u ) / R f ⌉ q(u) \gets\lceil q \cdot r_f(u)/R_f \rceil q ( u ) ← ⌈ q ⋅ r f ( u ) / R f ⌉
for k = 1 , … , q ( u ) k = 1,\ldots,q(u) k = 1 , … , q ( u ) do
Generate a discounted random walk from u u u ; let v v v be its endpoint
if v ∉ F b v \notin F_b v ∈ / F b then
X ← X + r f ( u ) r b ( v ) / q ( u ) X \gets X + r_f(u)r_b(v)/q(u) X ← X + r f ( u ) r b ( v ) / q ( u )
return $X
Since r b ( v ) ≤ r ˉ b r_b(v) \le\bar{r}_b r b ( v ) ≤ r ˉ b and q ( u ) = ⌈ q ⋅ r f ( u ) / R f ⌉ q(u) = \lceil q \cdot r_f(u)/R_f \rceil q ( u ) = ⌈ q ⋅ r f ( u ) / R f ⌉ , we further have
Var [ X ] ≤ ∑ u ∉ F f ∑ v ∉ F b r f 2 ( u ) r b ( v ) r ˉ b π ( u , v ) ⌈ q r f ( u ) R f ⌉ − 1 ≤ R f r ˉ b q ∑ u ∉ F f ∑ v ∉ F b r f ( u ) r b ( v ) π ( u , v ) . (19) \operatorname{Var}[X] \le\sum_{u\notin F_f}\sum_{v\notin F_b} r_f^2(u)r_b(v)\bar{r}_b\pi(u,v)\left\lceil\frac{q r_f(u)}{R_f}\right\rceil^{-1} \le\frac{R_f\bar{r}_b}{q}\sum_{u\notin F_f}\sum_{v\notin F_b} r_f(u)r_b(v)\pi(u,v). \tag*{(19)} Var [ X ] ≤ u ∈ / F f ∑ v ∈ / F b ∑ r f 2 ( u ) r b ( v ) r ˉ b π ( u , v ) ⌈ R f q r f ( u ) ⌉ − 1 ≤ q R f r ˉ b u ∈ / F f ∑ v ∈ / F b ∑ r f ( u ) r b ( v ) π ( u , v ) . (19)
Recall from the backward push invariant (5) that
π ( s , t ) = p b ( s ) + ∑ v ∈ V π ( s , v ) r b ( v ) = p b ( s ) + ∑ v ∈ F b π ( s , v ) r b ( v ) + ∑ v ∉ F b π ( s , v ) r b ( v ) . \pi(s,t)=p_b(s)+\sum_{v\in V}\pi(s,v)r_b(v)=p_b(s)+\sum_{v\in F_b}\pi(s,v)r_b(v)+\sum_{v\notin F_b}\pi(s,v)r_b(v). π ( s , t ) = p b ( s ) + v ∈ V ∑ π ( s , v ) r b ( v ) = p b ( s ) + v ∈ F b ∑ π ( s , v ) r b ( v ) + v ∈ / F b ∑ π ( s , v ) r b ( v ) .
Substituting π ( s , v ) \pi(s,v) π ( s , v ) in the last term using the forward-push invariant (4) , which states that π ( s , v ) = p f ( v ) + ∑ u ∈ V r f ( u ) π ( u , v ) \pi(s,v)=p_f(v)+\sum_{u\in V}r_f(u)\pi(u,v) π ( s , v ) = p f ( v ) + ∑ u ∈ V r f ( u ) π ( u , v ) , yields
π ( s , t ) = p b ( s ) + ∑ v ∈ F b π ( s , v ) r b ( v ) + ∑ v ∉ F b p f ( v ) r b ( v ) + ∑ v ∉ F b ∑ u ∈ V r f ( u ) π ( u , v ) r b ( v ) . (20) \pi(s,t)=p_b(s)+\sum_{v\in F_b}\pi(s,v)r_b(v)+\sum_{v\notin F_b}p_f(v)r_b(v)+\sum_{v\notin F_b}\sum_{u\in V}r_f(u)\pi(u,v)r_b(v). \tag*{(20)} π ( s , t ) = p b ( s ) + v ∈ F b ∑ π ( s , v ) r b ( v ) + v ∈ / F b ∑ p f ( v ) r b ( v ) + v ∈ / F b ∑ u ∈ V ∑ r f ( u ) π ( u , v ) r b ( v ) . (20)
This implies
∑ u ∉ F f ∑ v ∉ F b r f ( u ) r b ( v ) π ( u , v ) ≤ π ( s , t ) . \sum_{u\notin F_f}\sum_{v\notin F_b}r_f(u)r_b(v)\pi(u,v)\le\pi(s,t). u ∈ / F f ∑ v ∈ / F b ∑ r f ( u ) r b ( v ) π ( u , v ) ≤ π ( s , t ) .
Substituting this into Equation (18) gives Var [ X ] ≤ R f r ˉ b q π ( s , t ) \operatorname{Var}[X]\le\frac{R_f\bar{r}_b}{q}\pi(s,t) Var [ X ] ≤ q R f r ˉ b π ( s , t ) , as claimed.
Adaptive Rounds
We have not specified how to set the time budgets κ f \kappa_f κ f and κ b \kappa_b κ b for the ForwardPushWithFreezing( s , κ f ) (s,\kappa_f) ( s , κ f ) and BackwardPushWithFreezing( t , κ b ) (t,\kappa_b) ( t , κ b ) components, respectively, or the number of random walks q q q for the Monte Carlo sampling component. The ideal choices of these parameters depend on the value of π ( s , t ) \pi(s,t) π ( s , t ) , which is unknown in advance. We therefore determine them adaptively.
We allocate the same running-time budget κ \kappa κ to each of the three components. Initially, we set the budget κ \kappa κ to 2 and adaptively double it in subsequent rounds. In each round, we construct three independent estimators X 1 X_1 X 1 , X 2 X_2 X 2 , and X 3 X_3 X 3 . When
max { X 1 , X 2 } ≥ 1024 R f r ˉ b ε r 2 κ , (21) \max\{X_1,X_2\}\ge\frac{1024R_f\bar{r}_b}{\varepsilon_r^2\kappa}, \tag*{(21)} max { X 1 , X 2 } ≥ ε r 2 κ 1024 R f r ˉ b , (21)
we terminate the algorithm and return X 3 X_3 X 3 as the final estimate of π ( s , t ) \pi(s,t) π ( s , t ) . Here we recall that R f = ∑ u ∈ V ∖ F f r f ( u ) R_f=\sum_{u\in V\setminus F_f}r_f(u) R f = ∑ u ∈ V ∖ F f r f ( u ) and r ˉ b = max v ∈ V ∖ F b r b ( v ) \bar r_b=\max_{v\in V\setminus F_b}r_b(v) r ˉ b = max v ∈ V ∖ F b r b ( v ) , where r f ( u ) r_f(u) r f ( u ) , p f ( u ) p_f(u) p f ( u ) , r b ( u ) r_b(u) r b ( u ) , p b ( u ) p_b(u) p b ( u ) , F f F_f F f , and F b F_b F b denote their respective values at the end of ForwardPushWithFreezing and BackwardPushWithFreezing in the current round. Since the forward- and backward-push processes are deterministic, in each round, we only need to perform the Monte Carlo sampling independently three times to obtain X 1 X_1 X 1 , X 2 X_2 X 2 , and X 3 X_3 X 3 . The pseudocode of TriPPR is presented in Algorithm 11.
Algorithm 11: TriPPR(s, t, εr)
Input: source vertex s, target vertex t, relative error εr
Output: estimate π̂(s, t) of π(s, t)
1 declare global rf(), pf(), cntf(), Ff, Rf, rb(), pb(), cntb(), Fb, r̄b
2 ForwardPush-Init(s)
3 BackwardPush-Init(t)
4 for i = 1, 2, … do
5 ForwardPushWithFreezing(s, 2^{i−1}, ⌈log_{1−α/2} εr/(2^{3i+4})⌉)
6 BackwardPushWithFreezing(t, 2^{i−1}, ⌈log_{1−α/2} εrα^2/(2^{2i+5})⌉)
7 for γ = 1, 2, 3 independently do
8 Xγ ← MonteCarloRγ(2^i)
9 τ ← 1024Rf r̄b/(εr^2 2^i)
10 if max{X1, X2} ≥ τ then return X3
To ensure that both R f R_f R f and r ˉ b \bar r_b r ˉ b are non-increasing over time, it is important that we do not restart the push operations from scratch in each round, but instead continue from where we left off in previous rounds. In particular, the sets of frozen vertices F f F_f F f and F b F_b F b are never reset, so vertices frozen in earlier rounds remain frozen in all subsequent rounds. Similarly, the push counters cnt f ( u ) \operatorname{cnt}_f(u) cnt f ( u ) and cnt b ( u ) \operatorname{cnt}_b(u) cnt b ( u ) are never reset to zero and can only increase over time. Note, however, that the freezing thresholds increase across rounds, allowing more push operations per vertex in later rounds.
A similar idea has been mentioned in § 3.4 to achieve the O ( m log n ) O(m\log n) O ( m log n ) worst-case running time for estimating π ( s , t ) \pi(s,t) π ( s , t ) . Here, we adopt analogous freezing thresholds, setting L f ( i ) = ⌈ log 1 − α / 2 ε r 2 3 i + 4 ⌉ L_f^{(i)}=\lceil\log_{1-\alpha/2}\frac{\varepsilon_r}{2^{3i+4}}\rceil L f ( i ) = ⌈ log 1 − α /2 2 3 i + 4 ε r ⌉ and L b ( i ) = ⌈ log 1 − α / 2 ε r α 2 2 2 i + 5 ⌉ L_b^{(i)}=\lceil\log_{1-\alpha/2}\frac{\varepsilon_r\alpha^2}{2^{2i+5}}\rceil L b ( i ) = ⌈ log 1 − α /2 2 2 i + 5 ε r α 2 ⌉ accordingly for each round i i i .
Setting Up the Round Analysis
For each round i = 0 , 1 , 2 , … i=0,1,2,\ldots i = 0 , 1 , 2 , … and each γ ∈ { 1 , 2 , 3 } \gamma\in\{1,2,3\} γ ∈ { 1 , 2 , 3 } , we define X γ ( i ) X_\gamma^{(i)} X γ ( i ) , R f ( i ) R_f^{(i)} R f ( i ) , r ˉ b ( i ) \bar r_b^{(i)} r ˉ b ( i ) , and τ ( i ) \tau^{(i)} τ ( i ) as the values of X γ X_\gamma X γ , R f R_f R f , r ˉ b \bar r_b r ˉ b , and τ \tau τ in the beginning of round i i i , respectively. Additionally, we define i ∗ i^* i ∗ to be the smallest integer i i i such that
τ ( i ) = 1024 R f ( i ) r ˉ b ( i ) ε r 2 2 i ≤ 32 π ( s , t ) . (22) \tau^{(i)}=\frac{1024R_f^{(i)}\bar r_b^{(i)}}{\varepsilon_r^2 2^i}\le32\pi(s,t). \tag*{(22)} τ ( i ) = ε r 2 2 i 1024 R f ( i ) r ˉ b ( i ) ≤ 32 π ( s , t ) . (22)
Since R f ( i ) R_f^{(i)} R f ( i ) and r ˉ b ( i ) \bar r_b^{(i)} r ˉ b ( i ) are nonincreasing in i i i , so is τ ( i ) \tau^{(i)} τ ( i ) .
We note that π ( s , t ) ≥ 1 / n O ( n ) \pi(s,t)\ge1/n^{O(n)} π ( s , t ) ≥ 1/ n O ( n ) , and by Theorem 3.5, p b ( s ) ≥ ( 1 − ε r ) π ( s , t ) p_b(s)\ge(1-\varepsilon_r)\pi(s,t) p b ( s ) ≥ ( 1 − ε r ) π ( s , t ) when the budget κ = ω ( m log n ) \kappa=\omega(m\log n) κ = ω ( m log n ) . Therefore, the stopping criterion in Equation (21) is guaranteed to be satisfied when κ = n ω ( n ) \kappa=n^{\omega(n)} κ = n ω ( n ) . Since the budget doubles in each round, the algorithm is therefore guaranteed to terminate after at most i T = O ( n log n ) i^T=O(n\log n) i T = O ( n log n ) adaptive rounds.
To analyze the approximation error and expected runtime of our TriPPR algorithm, we consider a variant of our algorithm that executes through the entire i T i^T i T rounds, regardless of whether the stopping condition is satisfied before reaching round i T i^T i T .
With this variant, we will reach any round i ≤ i T i \le i^{T} i ≤ i T regardless of what happens in previous rounds. We also have
Lemma 4.3. For each i ∈ [ 1 , i T ] i \in[1,i^{T}] i ∈ [ 1 , i T ] and γ ∈ { 1 , 2 , 3 } \gamma\in\{1,2,3\} γ ∈ { 1 , 2 , 3 } , ( 1 − ε r / 4 ) π ( s , t ) ≤ E [ X γ ( i ) ] ≤ π ( s , t ) (1-\varepsilon_{r}/4)\pi(s,t) \le\mathbb{E}[X_{\gamma}^{(i)}] \le\pi(s,t) ( 1 − ε r /4 ) π ( s , t ) ≤ E [ X γ ( i ) ] ≤ π ( s , t ) .
Proof. Recall that
X γ ( i ) = p b ( i ) ( s ) + ∑ v ∉ F b ( i ) p f ( i ) ( v ) r b ( i ) ( v ) + ∑ u ∉ F f ( i ) ∑ k = 1 q ( u ) ∑ v ∉ F b ( i ) r f ( i ) ( u ) r b ( i ) ( v ) 1 k ( i ) ( u , v ) / q ( u ) , X_{\gamma}^{(i)} = p_{b}^{(i)}(s) + \sum_{v\notin F_{b}^{(i)}}p_{f}^{(i)}(v)r_{b}^{(i)}(v) + \sum_{u\notin F_{f}^{(i)}}\sum_{k=1}^{q(u)}\sum_{v\notin F_{b}^{(i)}}r_{f}^{(i)}(u)r_{b}^{(i)}(v)\mathbb{1}_{k}^{(i)}(u,v)/q(u), X γ ( i ) = p b ( i ) ( s ) + v ∈ / F b ( i ) ∑ p f ( i ) ( v ) r b ( i ) ( v ) + u ∈ / F f ( i ) ∑ k = 1 ∑ q ( u ) v ∈ / F b ( i ) ∑ r f ( i ) ( u ) r b ( i ) ( v ) 1 k ( i ) ( u , v ) / q ( u ) , where the superscript ( i ) (i) ( i ) denotes the corresponding value in the beginning of round i i i . Since E [ 1 k ( i ) ( u , v ) ] = π ( u , v ) \mathbb{E}\left[\mathbb{1}_{k}^{(i)}(u,v)\right] = \pi(u,v) E [ 1 k ( i ) ( u , v ) ] = π ( u , v ) for each i , k , u , v i,k,u,v i , k , u , v , we have
E [ X γ ( i ) ] = p b ( i ) ( s ) + ∑ v ∉ F b ( i ) p f ( i ) ( v ) r b ( i ) ( v ) + ∑ u ∉ F f ( i ) ∑ v ∉ F b ( i ) r f ( i ) ( u ) r b ( i ) ( v ) π ( u , v ) . \mathbb{E}[X_{\gamma}^{(i)}] = p_{b}^{(i)}(s) + \sum_{v\notin F_{b}^{(i)}}p_{f}^{(i)}(v)r_{b}^{(i)}(v) + \sum_{u\notin F_{f}^{(i)}}\sum_{v\notin F_{b}^{(i)}}r_{f}^{(i)}(u)r_{b}^{(i)}(v)\pi(u,v). E [ X γ ( i ) ] = p b ( i ) ( s ) + v ∈ / F b ( i ) ∑ p f ( i ) ( v ) r b ( i ) ( v ) + u ∈ / F f ( i ) ∑ v ∈ / F b ( i ) ∑ r f ( i ) ( u ) r b ( i ) ( v ) π ( u , v ) . We therefore have E [ X γ ( i ) ] ≤ π ( s , t ) \mathbb{E}[X_{\gamma}^{(i)}] \le\pi(s,t) E [ X γ ( i ) ] ≤ π ( s , t ) . Moreover,
π ( s , t ) − E [ X γ ( i ) ] = ∑ v ∈ F b ( i ) π ( s , v ) r b ( i ) ( v ) + ∑ v ∉ F b ( i ) ∑ u ∈ F f ( i ) r f ( i ) ( u ) π ( u , v ) r b ( i ) ( v ) \pi(s,t)-\mathbb{E}[X_{\gamma}^{(i)}] = \sum_{v\in F_{b}^{(i)}}\pi(s,v)r_{b}^{(i)}(v) + \sum_{v\notin F_{b}^{(i)}}\sum_{u\in F_{f}^{(i)}}r_{f}^{(i)}(u)\pi(u,v)r_{b}^{(i)}(v) π ( s , t ) − E [ X γ ( i ) ] = v ∈ F b ( i ) ∑ π ( s , v ) r b ( i ) ( v ) + v ∈ / F b ( i ) ∑ u ∈ F f ( i ) ∑ r f ( i ) ( u ) π ( u , v ) r b ( i ) ( v ) ≤ ∑ v ∈ F b ( i ) π ( s , v ) r b ( i ) ( v ) + ∑ u ∈ F f ( i ) r f ( i ) ( u ) ∑ v ∈ V π ( u , v ) r b ( i ) ( v ) . \le\sum_{v\in F_{b}^{(i)}}\pi(s,v)r_{b}^{(i)}(v) + \sum_{u\in F_{f}^{(i)}}r_{f}^{(i)}(u)\sum_{v\in V}\pi(u,v)r_{b}^{(i)}(v). ≤ v ∈ F b ( i ) ∑ π ( s , v ) r b ( i ) ( v ) + u ∈ F f ( i ) ∑ r f ( i ) ( u ) v ∈ V ∑ π ( u , v ) r b ( i ) ( v ) . Since ∑ v ∈ V π ( u , v ) r b ( i ) ( v ) ≤ π ( u , t ) \sum_{v\in V}\pi(u,v)r_{b}^{(i)}(v) \le\pi(u,t) ∑ v ∈ V π ( u , v ) r b ( i ) ( v ) ≤ π ( u , t ) by the backward push invariant (5) , we then have
π ( s , t ) − E [ X γ ( i ) ] ≤ ∑ v ∈ F b ( i ) π ( s , v ) r b ( i ) ( v ) + ∑ u ∈ F f ( i ) r f ( i ) ( u ) π ( u , t ) . \pi(s,t)-\mathbb{E}[X_{\gamma}^{(i)}] \le\sum_{v\in F_{b}^{(i)}}\pi(s,v)r_{b}^{(i)}(v) + \sum_{u\in F_{f}^{(i)}}r_{f}^{(i)}(u)\pi(u,t). π ( s , t ) − E [ X γ ( i ) ] ≤ v ∈ F b ( i ) ∑ π ( s , v ) r b ( i ) ( v ) + u ∈ F f ( i ) ∑ r f ( i ) ( u ) π ( u , t ) . Recall from Lemma 3.6 and Lemma 3.8 that
∑ v ∈ F b ( i ) π ( s , v ) r b ( i ) ( v ) ≤ ε r π ( s , t ) / 8 , and ∑ u ∈ F f ( i ) r f ( i ) ( u ) π ( u , t ) ≤ ε r π ( s , t ) / 8. \sum_{v\in F_{b}^{(i)}}\pi(s,v)r_{b}^{(i)}(v) \le\varepsilon_{r}\pi(s,t)/8,\qquad\text{and}\qquad\sum_{u\in F_{f}^{(i)}}r_{f}^{(i)}(u)\pi(u,t) \le\varepsilon_{r}\pi(s,t)/8. v ∈ F b ( i ) ∑ π ( s , v ) r b ( i ) ( v ) ≤ ε r π ( s , t ) /8 , and u ∈ F f ( i ) ∑ r f ( i ) ( u ) π ( u , t ) ≤ ε r π ( s , t ) /8. We therefore have π ( s , t ) − E [ X γ ( i ) ] ≤ ε r π ( s , t ) / 4 \pi(s,t)-\mathbb{E}[X_{\gamma}^{(i)}] \le\varepsilon_{r}\pi(s,t)/4 π ( s , t ) − E [ X γ ( i ) ] ≤ ε r π ( s , t ) /4 , as claimed.
Therefore, by Lemma 4.2, for each i ∈ [ 0 , i T ] i \in[0,i^{T}] i ∈ [ 0 , i T ] and γ ∈ { 1 , 2 , 3 } \gamma\in\{1,2,3\} γ ∈ { 1 , 2 , 3 } , we have
E [ X γ ( i ) ] ≤ π ( s , t ) , Var [ X γ ( i ) ] ≤ R f ( i ) r b ( i ) π ( s , t ) 2 i . (23) \mathbb{E}[X_{\gamma}^{(i)}] \le\pi(s,t),\qquad\operatorname{Var}[X_{\gamma}^{(i)}] \le\frac{R_{f}^{(i)}r_{b}^{(i)}\pi(s,t)}{2^{i}}. \tag*{(23)} E [ X γ ( i ) ] ≤ π ( s , t ) , Var [ X γ ( i ) ] ≤ 2 i R f ( i ) r b ( i ) π ( s , t ) . (23)
Goodness
Suppose that the stopping criterion in Equation (21) is satisfied for the first time in round i R i^{R} i R . So Algorithm 11 outputs X 3 ( i R ) X_{3}^{(i^{R})} X 3 ( i R ) as its final estimate of π ( s , t ) \pi(s,t) π ( s , t ) . We now prove that X 3 ( i R ) X_{3}^{(i^{R})} X 3 ( i R ) is a good estimate of π ( s , t ) \pi(s,t) π ( s , t ) .
Lemma 4.4. Pr { ∣ X 3 ( i R ) − π ( s , t ) ∣ ≥ ε r π ( s , t ) } ≤ 1 / 4 \Pr\left\{\left|X_{3}^{(i^{R})}-\pi(s,t)\right| \ge\varepsilon_{r}\pi(s,t)\right\} \le1/4 Pr { X 3 ( i R ) − π ( s , t ) ≥ ε r π ( s , t ) } ≤ 1/4 .
Proof. Recall from Lemma 4.2 that
( 1 − ε r / 4 ) π ( s , t ) ≤ E [ X γ ( i R ) ] ≤ π ( s , t ) , deterministically. (1-\varepsilon_r/4)\pi(s,t) \le\mathbb{E}[X_{\gamma}^{(i_R)}] \le\pi(s,t), \qquad\text{deterministically.} ( 1 − ε r /4 ) π ( s , t ) ≤ E [ X γ ( i R ) ] ≤ π ( s , t ) , deterministically.
So we only need to ensure
Pr { ∣ X 3 ( i R ) − E [ X 3 ( i R ) ] ∣ ≥ ( 3 ε r / 4 ) π ( s , t ) } ≤ 1 / 4. \Pr\left\{\left|X_3^{(i_R)}-\mathbb{E}[X_3^{(i_R)}]\right| \ge(3\varepsilon_r/4)\pi(s,t)\right\}\le1/4. Pr { X 3 ( i R ) − E [ X 3 ( i R ) ] ≥ ( 3 ε r /4 ) π ( s , t ) } ≤ 1/4.
Recall that i ∗ i^* i ∗ is the smallest integer i i i such that
τ ( i ) = 1024 R f ( i ) R ˉ b ( i ) ε r 2 2 i ≤ 32 π ( s , t ) ⟺ R f ( i ) R ˉ b ( i ) ε r 2 2 i ≤ π ( s , t ) 32 . \tau^{(i)}=\frac{1024R_f^{(i)}\bar{R}_b^{(i)}}{\varepsilon_r^2 2^i}\le32\pi(s,t)
\Longleftrightarrow
\frac{R_f^{(i)}\bar{R}_b^{(i)}}{\varepsilon_r^2 2^i}\le\frac{\pi(s,t)}{32}. τ ( i ) = ε r 2 2 i 1024 R f ( i ) R ˉ b ( i ) ≤ 32 π ( s , t ) ⟺ ε r 2 2 i R f ( i ) R ˉ b ( i ) ≤ 32 π ( s , t ) .
For each i ≥ i ∗ i\ge i^* i ≥ i ∗ , applying Chebyshev’s inequality together with Equation (23) and the above inequality yields
Pr { ∣ X 3 ( i ) − E [ X 3 ( i ) ] ∣ ≥ ( 3 ε r / 4 ) π ( s , t ) } ≤ 2 Var [ X 3 ( i ) ] ε r 2 π 2 ( s , t ) ≤ 2 R f ( i ) R ˉ b ( i ) ε r 2 2 i π ( s , t ) ≤ 1 16 ⋅ 2 i − i ∗ . (24) \Pr\left\{\left|X_3^{(i)}-\mathbb{E}[X_3^{(i)}]\right|\ge(3\varepsilon_r/4)\pi(s,t)\right\}
\le\frac{2\operatorname{Var}[X_3^{(i)}]}{\varepsilon_r^2\pi^2(s,t)}
\le\frac{2R_f^{(i)}\bar{R}_b^{(i)}}{\varepsilon_r^2 2^i\pi(s,t)}
\le\frac{1}{16\cdot2^{i-i^*}}. \tag*{(24)} Pr { X 3 ( i ) − E [ X 3 ( i ) ] ≥ ( 3 ε r /4 ) π ( s , t ) } ≤ ε r 2 π 2 ( s , t ) 2 Var [ X 3 ( i ) ] ≤ ε r 2 2 i π ( s , t ) 2 R f ( i ) R ˉ b ( i ) ≤ 16 ⋅ 2 i − i ∗ 1 . (24)
By the union bound, with probability at least 1 − 1 / 8 1-1/8 1 − 1/8 , the estimate X 3 ( i ) X_3^{(i)} X 3 ( i ) is within a multiplicative factor of ( 1 ± ε r ) (1\pm\varepsilon_r) ( 1 ± ε r ) of π ( s , t ) \pi(s,t) π ( s , t ) simultaneously in all rounds i ≥ i ∗ i\ge i^* i ≥ i ∗ .
For each i < i ∗ i<i^* i < i ∗ , Markov’s inequality gives
Pr { X γ ( i ) ≥ τ ( i ) } ≤ E [ X γ ( i ) ] τ ( i ) ≤ π ( s , t ) 1024 R f ( i ) R ˉ b ( i ) / ( ε r 2 2 i ) ≤ 1 32 ⋅ 2 i ∗ − i − 1 . (25) \Pr\left\{X_\gamma^{(i)}\ge\tau^{(i)}\right\}
\le\frac{\mathbb{E}[X_\gamma^{(i)}]}{\tau^{(i)}}
\le\frac{\pi(s,t)}{1024R_f^{(i)}\bar{R}_b^{(i)}/(\varepsilon_r^2 2^i)}
\le\frac{1}{32\cdot2^{i^*-i-1}}. \tag*{(25)} Pr { X γ ( i ) ≥ τ ( i ) } ≤ τ ( i ) E [ X γ ( i ) ] ≤ 1024 R f ( i ) R ˉ b ( i ) / ( ε r 2 2 i ) π ( s , t ) ≤ 32 ⋅ 2 i ∗ − i − 1 1 . (25)
So the probability that the stopping criterion of Algorithm 11 is satisfied in round i i i is at most
Pr { max { X 1 ( i ) , X 2 ( i ) } ≥ τ ( i ) } ≤ 1 16 ⋅ 2 i ∗ − i − 1 . \Pr\left\{\max\{X_1^{(i)},X_2^{(i)}\}\ge\tau^{(i)}\right\}\le\frac{1}{16\cdot2^{i^*-i-1}}. Pr { max { X 1 ( i ) , X 2 ( i ) } ≥ τ ( i ) } ≤ 16 ⋅ 2 i ∗ − i − 1 1 .
Applying the union bound over all rounds i < i ∗ i<i^* i < i ∗ , we conclude that the probability of termination before round i ∗ i^* i ∗ is at most 1 / 8 1/8 1/8 . Equivalently, i R ≥ i ∗ i_R\ge i^* i R ≥ i ∗ with probability at least 1 − 1 / 8 1-1/8 1 − 1/8 .
Combining these two bounds establishes the claimed results.
Efficiency
We now prove that the expected running time of TriPPR is O ( T ∗ log n ) O(T^*\log n) O ( T ∗ log n ) .
Lemma 4.5. The expected time of Algorithm 11 is O ( 2 i ∗ ) O(2^{i^*}) O ( 2 i ∗ ) .
Proof. By Lemma 3.4 , both ForwardPushWithFreezing and BackwardPushWithFreezing run in O ( κ ) O(\kappa) O ( κ ) time with budget parameter κ \kappa κ . Thus, in round i i i , these two components take O ( 2 i ) O(2^i) O ( 2 i ) time in total. The Monte Carlo sampling phase generates 2 i 2^i 2 i discounted random walks and also takes O ( 2 i ) O(2^i) O ( 2 i ) time. Therefore, if we get to round i i i , the total time cost we spend is O ( 2 i ) O(2^i) O ( 2 i ) . As a result, the expected time of Algorithm 11 is bounded by
∑ i = 1 i T 2 i Pr { max { X 1 ( i ) , X 2 ( i ) } < τ ( i ) } . (26) \sum_{i=1}^{i^T}2^i\Pr\left\{\max\{X_1^{(i)},X_2^{(i)}\}<\tau^{(i)}\right\}. \tag*{(26)} i = 1 ∑ i T 2 i Pr { max { X 1 ( i ) , X 2 ( i ) } < τ ( i ) } . (26)
where i T i^{T} i T denotes the largest possible round the algorithm can reach.
To bound the expected running time of Algorithm 11 by O ( 2 i ∗ ) O(2^{i^{*}}) O ( 2 i ∗ ) , it suffices to analyze rounds i > i ∗ + 5 i>i^{*}+5 i > i ∗ + 5 , since the total running time of all earlier rounds is O ( 2 i ∗ ) O(2^{i^{*}}) O ( 2 i ∗ ) . Recall from Equation (22) that
τ ( i ∗ ) = 1024 R f ( i ∗ ) r ˉ b ( i ∗ ) ε r 2 2 2 i ∗ ≤ 32 π ( s , t ) . \tau^{(i^{*})}=\frac{1024R_{f}^{(i^{*})}\bar{r}_{b}^{(i^{*})}}{\varepsilon_{r}^{2}2^{2i^{*}}}\le32\pi(s,t). τ ( i ∗ ) = ε r 2 2 2 i ∗ 1024 R f ( i ∗ ) r ˉ b ( i ∗ ) ≤ 32 π ( s , t ) .
Since R f ( i ) R_{f}^{(i)} R f ( i ) and r ˉ b ( i ) \bar{r}_{b}^{(i)} r ˉ b ( i ) are nonincreasing in i i i , for every i > i ∗ + 5 i>i^{*}+5 i > i ∗ + 5 we have
τ ( i ) ≤ τ ( i ∗ ) 2 i − i ∗ ≤ 32 π ( s , t ) 2 i − i ∗ ≤ π ( s , t ) 2 . \tau^{(i)}\le\frac{\tau^{(i^{*})}}{2^{i-i^{*}}}\le\frac{32\pi(s,t)}{2^{i-i^{*}}}\le\frac{\pi(s,t)}{2}. τ ( i ) ≤ 2 i − i ∗ τ ( i ∗ ) ≤ 2 i − i ∗ 32 π ( s , t ) ≤ 2 π ( s , t ) .
Together with ( 1 − ε r / 4 ) π ( s , t ) ≤ E [ X γ ( i ) ] ≤ π ( s , t ) (1-\varepsilon_{r}/4)\pi(s,t)\le\mathbb{E}[X_{\gamma}^{(i)}]\le\pi(s,t) ( 1 − ε r /4 ) π ( s , t ) ≤ E [ X γ ( i ) ] ≤ π ( s , t ) from Lemma 4.2, this gives
Pr { X γ ( i ) < τ ( i ) } ≤ Pr { π ( s , t ) − X γ ( i ) > π ( s , t ) / 2 } ≤ Pr { E [ X γ ( i ) ] − X γ ( i ) > π ( s , t ) / 4 } . \Pr\left\{X_{\gamma}^{(i)}<\tau^{(i)}\right\}\le\Pr\left\{\pi(s,t)-X_{\gamma}^{(i)}>\pi(s,t)/2\right\}\le\Pr\left\{\mathbb{E}[X_{\gamma}^{(i)}]-X_{\gamma}^{(i)}>\pi(s,t)/4\right\}. Pr { X γ ( i ) < τ ( i ) } ≤ Pr { π ( s , t ) − X γ ( i ) > π ( s , t ) /2 } ≤ Pr { E [ X γ ( i ) ] − X γ ( i ) > π ( s , t ) /4 } .
Applying Chebyshevs inequality together with the variance bound Var [ X γ ( i ) ] ≤ R f r ˉ b π ( s , t ) / 2 i \operatorname{Var}[X_{\gamma}^{(i)}]\le R_{f}\bar{r}_{b}\pi(s,t)/2^{i} Var [ X γ ( i ) ] ≤ R f r ˉ b π ( s , t ) / 2 i from Equation (23) , we obtain
Pr { E [ X γ ( i ) ] − X γ ( i ) > π ( s , t ) / 4 } ≤ 16 Var [ X γ ( i ) ] π 2 ( s , t ) ≤ 16 R f r ˉ b 2 i π ( s , t ) π 2 ( s , t ) ≤ 1 64 ⋅ 2 i − i ∗ − 5 . \Pr\left\{\mathbb{E}[X_{\gamma}^{(i)}]-X_{\gamma}^{(i)}>\pi(s,t)/4\right\}\le\frac{16\operatorname{Var}[X_{\gamma}^{(i)}]}{\pi^{2}(s,t)}\le\frac{16\frac{R_{f}\bar{r}_{b}}{2^{i}}\pi(s,t)}{\pi^{2}(s,t)}\le\frac{1}{64\cdot2^{i-i^{*}-5}}. Pr { E [ X γ ( i ) ] − X γ ( i ) > π ( s , t ) /4 } ≤ π 2 ( s , t ) 16 Var [ X γ ( i ) ] ≤ π 2 ( s , t ) 16 2 i R f r ˉ b π ( s , t ) ≤ 64 ⋅ 2 i − i ∗ − 5 1 .
By the independence of X 1 ( i ) X_{1}^{(i)} X 1 ( i ) and X 1 ( i ) X_{1}^{(i)} X 1 ( i ) for each i i i , we further have
Pr { max { X 1 ( i ) , X 1 ( 2 ) } < τ ( i ) } ≤ 1 64 2 ⋅ 4 i − i ∗ − 5 . \Pr\left\{\max\left\{X_{1}^{(i)},X_{1}^{(2)}\right\}<\tau^{(i)}\right\}\le\frac{1}{64^{2}\cdot4^{i-i^{*}-5}}. Pr { max { X 1 ( i ) , X 1 ( 2 ) } < τ ( i ) } ≤ 6 4 2 ⋅ 4 i − i ∗ − 5 1 .
Substituting into Equation (26) gives the time cost upper bound as
2 i ∗ + 5 + ∑ i = i ∗ + 5 i T 2 i 64 2 ⋅ 4 i − i ∗ − 5 = O ( 2 i ∗ ) , 2^{i^{*}+5}+\sum_{i=i^{*}+5}^{i^{T}}\frac{2^{i}}{64^{2}\cdot4^{i-i^{*}-5}}=O(2^{i^{*}}), 2 i ∗ + 5 + i = i ∗ + 5 ∑ i T 6 4 2 ⋅ 4 i − i ∗ − 5 2 i = O ( 2 i ∗ ) ,
as claimed.
Lemma 4.6. 2 i ∗ = O ( T ∗ log n ) 2^{i^{*}}=O(T^{*}\log n) 2 i ∗ = O ( T ∗ log n ) .
Proof. Recall from Equation (22) that i ∗ i^{*} i ∗ is the smallest integer i i i such that
τ ( i ) = 1024 R f ( i ) r ˉ b ( i ) ε r 2 2 i ≤ 32 π ( s , t ) ⟺ R f ( i ) r ˉ b ( i ) ≤ ε r 2 2 2 i 32 π ( s , t ) . \tau^{(i)}=\frac{1024R_{f}^{(i)}\bar{r}_{b}^{(i)}}{\varepsilon_{r}^{2}2^{i}}\le32\pi(s,t)\quad\Longleftrightarrow\quad R_{f}^{(i)}\bar{r}_{b}^{(i)}\le\frac{\varepsilon_{r}^{2}2^{2i}}{32}\pi(s,t). τ ( i ) = ε r 2 2 i 1024 R f ( i ) r ˉ b ( i ) ≤ 32 π ( s , t ) ⟺ R f ( i ) r ˉ b ( i ) ≤ 32 ε r 2 2 2 i π ( s , t ) .
Thus, for any round i < i ∗ i<i^{*} i < i ∗ , we have
R f ( i ) r ˉ b ( i ) > ε r 2 2 2 i 32 π ( s , t ) . (27) R_{f}^{(i)}\bar{r}_{b}^{(i)}>\frac{\varepsilon_{r}^{2}2^{2i}}{32}\pi(s,t). \tag*{(27)} R f ( i ) r ˉ b ( i ) > 32 ε r 2 2 2 i π ( s , t ) . (27)
Fix such a round i i i . Relating T b ( r ) T_b(r) T b ( r ) to the running time of round i i i . Let U b ( i ) U_b^{(i)} U b ( i ) denote the set of vertices activated during the backward-push phase of round i i i , namely, during BackwardPushWithFreezing( t , 2 i ) (t,2^i) ( t , 2 i ) , and write
D b ( i ) = ∑ v ∈ U b ( i ) ( 1 + d i n ( v ) ) . D_b^{(i)}=\sum_{v\in U_b^{(i)}}(1+d_{\mathrm{in}}(v)). D b ( i ) = v ∈ U b ( i ) ∑ ( 1 + d in ( v )) .
Since backward push is performed on each activated vertex at most L b L_b L b times, the total cost of the backward-push operations already performed is at most L b D b ( i ) L_bD_b^{(i)} L b D b ( i ) .
Since i < i ∗ i<i^* i < i ∗ , Equation (27) implies that r ˉ b ( i ) > 0 \bar r_b^{(i)}>0 r ˉ b ( i ) > 0 . Thus, the backward-push procedure terminates in round i i i only when the anticipated cost of the next iteration exceeds the remaining budget. This next iteration, which is not executed, would perform at most one backward push on each vertex in a subset of U b ( i ) U_b^{(i)} U b ( i ) , so its anticipated cost is at most D b ( i ) D_b^{(i)} D b ( i ) . Hence, the cost already incurred plus the anticipated cost of the next iteration exceeds 2 i 2^i 2 i , giving
2 i < L b D b ( i ) + D b ( i ) = ( L b + 1 ) D b ( i ) . 2^i<L_bD_b^{(i)}+D_b^{(i)}=(L_b+1)D_b^{(i)}. 2 i < L b D b ( i ) + D b ( i ) = ( L b + 1 ) D b ( i ) .
Consequently,
D b ( i ) = ∑ v ∈ U b ( i ) ( 1 + d i n ( v ) ) > 2 i L b + 1 . (28) D_b^{(i)}=\sum_{v\in U_b^{(i)}}(1+d_{\mathrm{in}}(v))>\frac{2^i}{L_b+1}. \tag*{(28)} D b ( i ) = v ∈ U b ( i ) ∑ ( 1 + d in ( v )) > L b + 1 2 i . (28)
Let r ˉ b − ( i ) \bar r_b^{-(i)} r ˉ b − ( i ) denote the value of r ˉ b \bar r_b r ˉ b at the end of round i i i . By Lemma 3.8 3.8 3.8 , this is its minimum value over all iterations of BackwardPushWithFreezing( t , 2 i ) (t,2^i) ( t , 2 i ) . The activation condition r b ( v ) ≥ α r ˉ b / 2 r_b(v)\geq\alpha\bar r_b/2 r b ( v ) ≥ α r ˉ b /2 in Algorithm 9 therefore ensures that every v ∈ U b ( i ) v\in U_b^{(i)} v ∈ U b ( i ) has backward residue at least α r ˉ b − ( i ) / 2 \alpha\bar r_b^{-(i)}/2 α r ˉ b − ( i ) /2 upon activation. By the backward invariant (5) , we have π ( v , t ) ≥ r b ( v ) π ( v , v ) \pi(v,t)\geq r_b(v)\pi(v,v) π ( v , t ) ≥ r b ( v ) π ( v , v ) . By definition, π ( v , v ) ≥ α \pi(v,v)\geq\alpha π ( v , v ) ≥ α , since a discounted random walk starting at v v v terminates immediately with probability α \alpha α . It follows
π ( v , t ) ≥ α 2 r ˉ b − ( i ) / 2 for every v ∈ U b ( i ) . \pi(v,t)\geq\alpha^2\bar r_b^{-(i)}/2\qquad\text{for every }v\in U_b^{(i)}. π ( v , t ) ≥ α 2 r ˉ b − ( i ) /2 for every v ∈ U b ( i ) .
Recall from Equation (16) that
T b ( r ) = ∑ v ∈ V : π ( v , t ) ≥ r ( 1 + d i n ( v ) ) . T_b(r)=\sum_{v\in V:\,\pi(v,t)\geq r}(1+d_{\mathrm{in}}(v)). T b ( r ) = v ∈ V : π ( v , t ) ≥ r ∑ ( 1 + d in ( v )) .
Combining this definition with Equation (28) , we obtain
T b ( α 2 r ˉ b − ( i ) / 2 ) ≥ ∑ v ∈ U b ( i ) ( 1 + d i n ( v ) ) > 2 i L b + 1 . (29) T_b\left(\alpha^2\bar r_b^{-(i)}/2\right)\geq\sum_{v\in U_b^{(i)}}(1+d_{\mathrm{in}}(v))>\frac{2^i}{L_b+1}. \tag*{(29)} T b ( α 2 r ˉ b − ( i ) /2 ) ≥ v ∈ U b ( i ) ∑ ( 1 + d in ( v )) > L b + 1 2 i . (29)
Relating T f ( r ) T_f(r) T f ( r ) to the running time of round i i i . In the ForwardPushWithFreezing( s , 2 i ) (s,2^i) ( s , 2 i ) algorithm as shown in Algorithm 7, we may terminate because the anticipated cost of the next iteration exceeds the remaining budget, or the total residue of the candidate set is less than R f ( i ) / 2 R_f^{(i)}/2 R f ( i ) /2 . For the former, let U f ( i ) U_f^{(i)} U f ( i ) denote the set of vertices activated during the forward-push phase of round i i i , namely, during ForwardPushWithFreezing( s , 2 i ) (s,2^i) ( s , 2 i ) . Then an analogous budget argument gives
∑ u ∈ U f ( i ) d o u t ( u ) > 2 i L f + 1 . (30) \sum_{u\in U_f^{(i)}}d_{\mathrm{out}}(u)>\frac{2^i}{L_f+1}. \tag*{(30)} u ∈ U f ( i ) ∑ d out ( u ) > L f + 1 2 i . (30)
Let R f ( i ) R_f^{(i)} R f ( i ) denote the value of R f R_f R f at the end of round i i i . By Lemma 3.3 , this is its minimum value over all iterations of ForwardPushWithFreezing(s , 2 i s,2^i s , 2 i ). The activation condition r f ( u ) ≥ R f d o u t ( u ) / 2 i r_f(u) \ge R_fd_{\mathrm{out}}(u)/2^i r f ( u ) ≥ R f d out ( u ) / 2 i in Algorithm 7 therefore ensures that every u ∈ U f ( i ) u \in U_f^{(i)} u ∈ U f ( i ) has forward residue at least R f ( i ) d o u t ( u ) / 2 i R_f^{(i)}d_{\mathrm{out}}(u)/2^i R f ( i ) d out ( u ) / 2 i upon activation. Analogously, by the forward push invariant (4) , we have
π ( s , u ) ≥ α R f ( i ) d o u t ( u ) 2 i for every u ∈ U f ( i ) . \pi(s,u) \ge\frac{\alpha R_f^{(i)}d_{\mathrm{out}}(u)}{2^i}
\qquad\text{for every } u \in U_f^{(i)}. π ( s , u ) ≥ 2 i α R f ( i ) d out ( u ) for every u ∈ U f ( i ) .
Recall from Equation (27) that R f ( i ) r ˉ b ( i ) > ε r 2 2 i 32 π ( s , t ) R_f^{(i)}\bar r_b^{(i)} > \frac{\varepsilon_r^2 2^i}{32}\pi(s,t) R f ( i ) r ˉ b ( i ) > 32 ε r 2 2 i π ( s , t ) . It follows
π ( s , u ) ≥ α R f ( i ) d o u t ( u ) 2 i ≥ α ε r 2 π ( s , t ) d o u t ( u ) 32 r ˉ b ( i ) . \pi(s,u) \ge\frac{\alpha R_f^{(i)}d_{\mathrm{out}}(u)}{2^i} \ge\frac{\alpha\varepsilon_r^2\pi(s,t)d_{\mathrm{out}}(u)}{32\bar r_b^{(i)}}. π ( s , u ) ≥ 2 i α R f ( i ) d out ( u ) ≥ 32 r ˉ b ( i ) α ε r 2 π ( s , t ) d out ( u ) .
This further implies
π ( s , u ) π ( s , t ) ≥ α 2 r ˉ b ( i ) 2 ≥ α 3 ε r 2 64 d o u t ( u ) . \frac{\pi(s,u)}{\pi(s,t)} \ge\frac{\alpha^2\bar r_b^{(i)}}{2} \ge\frac{\alpha^3\varepsilon_r^2}{64}d_{\mathrm{out}}(u). π ( s , t ) π ( s , u ) ≥ 2 α 2 r ˉ b ( i ) ≥ 64 α 3 ε r 2 d out ( u ) .
Recall from Equation (16) that
T f ( r ) = ∑ u ∈ V : π ( s , u ) > 0 min { d o u t ( u ) , π ( s , u ) r π ( s , t ) } . T_f(\boldsymbol r)=\sum_{u\in V:\pi(s,u)>0}\min\left\{d_{\mathrm{out}}(u),\frac{\pi(s,u)r}{\pi(s,t)}\right\}. T f ( r ) = u ∈ V : π ( s , u ) > 0 ∑ min { d out ( u ) , π ( s , t ) π ( s , u ) r } .
Since α 3 ε r 2 / 64 < 1 \alpha^3\varepsilon_r^2/64<1 α 3 ε r 2 /64 < 1 , the preceding bound together with Equation (30) gives
T f ( α 2 r ˉ b ( i ) 2 ) ≥ α 3 ε r 2 64 ∑ u ∈ U f ( i ) d o u t ( u ) > α 3 ε r 2 2 i 64 ( L f + 1 ) . (31) T_f\left(\frac{\alpha^2\bar r_b^{(i)}}{2}\right)\ge\frac{\alpha^3\varepsilon_r^2}{64}\sum_{u\in U_f^{(i)}}d_{\mathrm{out}}(u)>\frac{\alpha^3\varepsilon_r^2 2^i}{64(L_f+1)}. \tag*{(31)} T f ( 2 α 2 r ˉ b ( i ) ) ≥ 64 α 3 ε r 2 u ∈ U f ( i ) ∑ d out ( u ) > 64 ( L f + 1 ) α 3 ε r 2 2 i . (31)
As mentioned above, the forward-push phase may also terminate because the total residue of vertices in the candidate set C f ( i ) C_f^{(i)} C f ( i ) is less than R f ( i ) / 2 R_f^{(i)}/2 R f ( i ) /2 . That is, when ∑ u ∈ C f ( i ) r f ( i ) ( u ) < R f ( i ) / 2 \sum_{u\in C_f^{(i)}}r_f^{(i)}(u)<R_f^{(i)}/2 ∑ u ∈ C f ( i ) r f ( i ) ( u ) < R f ( i ) /2 , where we recall that R f ( i ) = ∑ u ∈ V ∖ F f ( i ) r f ( i ) ( u ) R_f^{(i)}=\sum_{u\in V\setminus F_f^{(i)}}r_f^{(i)}(u) R f ( i ) = ∑ u ∈ V ∖ F f ( i ) r f ( i ) ( u ) . This implies
∑ u ∈ ( V ∖ F f ( i ) ) ∖ C f ( i ) r f ( i ) ( u ) > R f ( i ) / 2. (32) \sum_{u\in(V\setminus F_f^{(i)})\setminus C_f^{(i)}}r_f^{(i)}(u)>R_f^{(i)}/2. \tag*{(32)} u ∈ ( V ∖ F f ( i ) ) ∖ C f ( i ) ∑ r f ( i ) ( u ) > R f ( i ) /2. (32)
We also note that d o u t ( u ) > 2 i r f ( i ) ( u ) / R f ( i ) d_{\mathrm{out}}(u)>2^ir_f^{(i)}(u)/R_f^{(i)} d out ( u ) > 2 i r f ( i ) ( u ) / R f ( i ) for every u ∈ ( V ∖ F f ( i ) ) ∖ C f ( i ) u\in(V\setminus F_f^{(i)})\setminus C_f^{(i)} u ∈ ( V ∖ F f ( i ) ) ∖ C f ( i ) , given that the candidate set C f ( i ) C_f^{(i)} C f ( i ) is defined to contain all vertices v v v with r f ( i ) ( v ) / d o u t ( v ) ≥ R f ( i ) / 2 i r_f^{(i)}(v)/d_{\mathrm{out}}(v)\ge R_f^{(i)}/2^i r f ( i ) ( v ) / d out ( v ) ≥ R f ( i ) / 2 i . Combining this with Equation (32) gives
∑ u ∈ ( V ∖ F f ( i ) ) ∖ C f ( i ) d o u t ( u ) > ∑ u ∈ ( V ∖ F f ( i ) ) ∖ C f ( i ) 2 i r f ( i ) ( u ) R f ( i ) > 2 i / 2. \sum_{u\in(V\setminus F_f^{(i)})\setminus C_f^{(i)}}d_{\mathrm{out}}(u)>
\sum_{u\in(V\setminus F_f^{(i)})\setminus C_f^{(i)}}\frac{2^ir_f^{(i)}(u)}{R_f^{(i)}}>2^i/2. u ∈ ( V ∖ F f ( i ) ) ∖ C f ( i ) ∑ d out ( u ) > u ∈ ( V ∖ F f ( i ) ) ∖ C f ( i ) ∑ R f ( i ) 2 i r f ( i ) ( u ) > 2 i /2.
Additionally, we have π ( s , u ) ≥ α r f ( i ) ( u ) \pi(s,u)\ge\alpha r_f^{(i)}(u) π ( s , u ) ≥ α r f ( i ) ( u ) by the forward push invariant (4) . We also recall from Equation (27) that
R f ( i ) r ˉ b ( i ) > ε r 2 2 i 32 π ( s , t ) . R_f^{(i)}\bar r_b^{(i)}>\frac{\varepsilon_r^2 2^i}{32}\pi(s,t). R f ( i ) r ˉ b ( i ) > 32 ε r 2 2 i π ( s , t ) .
Consequently,
π ( s , u ) π ( s , t ) α 2 r b ( i ) 2 ≥ α 3 r f ( i ) ( u ) r b ( i ) 2 π ( s , t ) ≥ α 3 ε 2 2 i 64 R f ( i ) r f ( i ) ( u ) . \frac{\pi(s,u)}{\pi(s,t)}\frac{\alpha^{2}r_b^{(i)}}{2} \ge\frac{\alpha^{3}r_f^{(i)}(u)r_b^{(i)}}{2\pi(s,t)} \ge\frac{\alpha^{3}\varepsilon^{2}2^{i}}{64R_f^{(i)}}r_f^{(i)}(u). π ( s , t ) π ( s , u ) 2 α 2 r b ( i ) ≥ 2 π ( s , t ) α 3 r f ( i ) ( u ) r b ( i ) ≥ 64 R f ( i ) α 3 ε 2 2 i r f ( i ) ( u ) .
Combining this with Equation (32) gives
T f ( α 2 r b ( i ) / 2 ) ≥ α 3 ε 2 2 i 64 R f ( i ) ∑ u ∈ ( V ∖ F f ( i ) ) ∖ C f ( i ) r f ( i ) ( u ) > α 3 ε 2 2 i 128 ≥ α 3 ε 2 2 i 64 ( L f + 1 ) . (33) T_f\left(\alpha^{2}r_b^{(i)}/2\right) \ge\frac{\alpha^{3}\varepsilon^{2}2^{i}}{64R_f^{(i)}}\sum_{u\in(V\setminus F_f^{(i)})\setminus C_f^{(i)}}r_f^{(i)}(u) > \frac{\alpha^{3}\varepsilon^{2}2^{i}}{128} \ge\frac{\alpha^{3}\varepsilon^{2}2^{i}}{64(L_f+1)}. \tag*{(33)} T f ( α 2 r b ( i ) /2 ) ≥ 64 R f ( i ) α 3 ε 2 2 i u ∈ ( V ∖ F f ( i ) ) ∖ C f ( i ) ∑ r f ( i ) ( u ) > 128 α 3 ε 2 2 i ≥ 64 ( L f + 1 ) α 3 ε 2 2 i . (33)
where the last inequality uses L f ≥ 1 L_f \ge1 L f ≥ 1 .
Combining T f ( r ) T_f(r) T f ( r ) and T b ( r ) T_b(r) T b ( r ) . Combining Equations (29) , (31) and (33) , we obtain
T ∗ ≥ min { T f ( α 2 r b ( i ) / 2 ) , T b ( α 2 r b ( i ) / 2 ) } > α 3 ε 2 2 i 64 max { L b + 1 , L f + 1 } . T^* \ge\min\left\{T_f\left(\alpha^{2}r_b^{(i)}/2\right),T_b\left(\alpha^{2}r_b^{(i)}/2\right)\right\} > \frac{\alpha^{3}\varepsilon^{2}2^{i}}{64\max\{L_b+1,L_f+1\}}. T ∗ ≥ min { T f ( α 2 r b ( i ) /2 ) , T b ( α 2 r b ( i ) /2 ) } > 64 max { L b + 1 , L f + 1 } α 3 ε 2 2 i .
By Lemmas 3.3 and 3.8 , both L b L_b L b and L f L_f L f are O ( i + 1 ) O(i+1) O ( i + 1 ) . Thus,
2 i = O ( T ∗ ( i + 1 ) ) . (34) 2^i=O\left(T^*(i+1)\right). \tag*{(34)} 2 i = O ( T ∗ ( i + 1 ) ) . (34)
Setting i = i ∗ − 1 i=i^*-1 i = i ∗ − 1 gives 2 i ∗ = O ( T ∗ i ∗ ) 2^{i^*}=O(T^*i^*) 2 i ∗ = O ( T ∗ i ∗ ) , which implies i ∗ = O ( log ( 2 + T ∗ ) ) i^*=O(\log(2+T^*)) i ∗ = O ( log ( 2 + T ∗ )) . Consequently,
2 i ∗ = O ( T ∗ log ( 2 + T ∗ ) ) = O ( T ∗ log n ) , 2^{i^*}=O\left(T^*\log(2+T^*)\right)=O(T^*\log n), 2 i ∗ = O ( T ∗ log ( 2 + T ∗ ) ) = O ( T ∗ log n ) ,
completing the proof.
Combining Lemmas 4.4 to 4.6 establishes Theorem 4.1 .
Lower Bound When n n n is Unknown
In this section, we prove a lower bound of Ω ( T ∗ ) \Omega(T^*) Ω ( T ∗ ) for any good algorithm when n n n is unknown, showing that our TriPPR algorithm is instance optimal in this case. For simplicity, we also assume δ = 0 \delta=0 δ = 0 here. In Appendix § 8 , we will show how to extend it to a general δ \delta δ . We start with notations and some general technical lemmas about random walk probabilities.
Notations. For any edge e = ( u , v ) e=(u,v) e = ( u , v ) , let π ( w , e ) = π ( w , u ) / d o u t ( u ) \pi(w,e)=\pi(w,u)/d_{\mathrm{out}}(u) π ( w , e ) = π ( w , u ) / d out ( u ) . For any vertices u , v u,v u , v , let H ( u , v ) H(u,v) H ( u , v ) denote the probability that an α \alpha α -discounted random walk starting from u u u visits v v v before termination. For any edge e = ( u , v ) e=(u,v) e = ( u , v ) , let H ( w , e ) H(w,e) H ( w , e ) denote the probability that an α \alpha α -discounted random walk starting from w w w visits e e e .
For any set of edges F F F , let π ( u , F ) = ∑ e ∈ F π ( u , e ) \pi(u,F)=\sum_{e\in F}\pi(u,e) π ( u , F ) = ∑ e ∈ F π ( u , e ) . Let π ( u , F , v ) \pi(u,F,v) π ( u , F , v ) be the probability that an α \alpha α -discounted random walk starting from u u u visits at least one edge in F F F and eventually terminates at v v v . Conversely, π ( u , F ‾ , v ) \pi(u,\overline{F},v) π ( u , F , v ) denotes the probability that the walk terminates at v v v without visiting any edge in F F F .
Let V s = { u ∈ V ∣ π ( s , u ) > 0 } V_s=\{u\in V\mid\pi(s,u)>0\} V s = { u ∈ V ∣ π ( s , u ) > 0 } . Recall that
T ∗ = max r ∈ ( 0 , 1 ] min { T f ( r ) , T b ( r ) } , T^*=\max_{r\in(0,1]}\min\{T_f(r),T_b(r)\}, T ∗ = r ∈ ( 0 , 1 ] max min { T f ( r ) , T b ( r )} ,
where
T f ( r ) = ∑ u ∈ V s min { d o u t ( u ) , π ( s , u ) r π ( s , t ) } and T b ( r ) = ∑ v ∈ V , π ( v , t ) ≥ r ( 1 + d i n ( v ) ) . T_f(r)=\sum_{u\in V_s}\min\left\{d_{\mathrm{out}}(u),\frac{\pi(s,u)r}{\pi(s,t)}\right\}
\qquad\text{and}\qquad
T_b(r)=\sum_{v\in V,\pi(v,t)\ge r}(1+d_{\mathrm{in}}(v)). T f ( r ) = u ∈ V s ∑ min { d out ( u ) , π ( s , t ) π ( s , u ) r } and T b ( r ) = v ∈ V , π ( v , t ) ≥ r ∑ ( 1 + d in ( v )) .
Lemma 5.1. For any vertices u u u , v v v , w w w , π ( u , v ) ≥ π ( u , w ) π ( w , v ) \pi(u,v) \ge\pi(u,w)\pi(w,v) π ( u , v ) ≥ π ( u , w ) π ( w , v ) .
Proof. By definition, we have
π ( u , w ) = H ( u , w ) π ( w , w ) and π ( u , v ) ≥ H ( u , w ) π ( w , v ) . \pi(u,w) = H(u,w)\pi(w,w) \quad\text{and}\quad\pi(u,v) \ge H(u,w)\pi(w,v). π ( u , w ) = H ( u , w ) π ( w , w ) and π ( u , v ) ≥ H ( u , w ) π ( w , v ) .
Then
π ( u , v ) ≥ π ( u , w ) π ( w , v ) π ( w , w ) ≥ π ( u , w ) π ( w , v ) . \pi(u,v) \ge\frac{\pi(u,w)\pi(w,v)}{\pi(w,w)} \ge\pi(u,w)\pi(w,v). π ( u , v ) ≥ π ( w , w ) π ( u , w ) π ( w , v ) ≥ π ( u , w ) π ( w , v ) .
Lemma 5.2. For any vertices u u u and v v v and any set of edges E ′ E' E ′ ,
max { π ( u , E ′ ‾ , v ) , π ( μ ( E ′ , v ) , E ′ ‾ , v ) } = Ω ( π ( u , v ) ) , (35) \max\left\{\pi(u,\overline{E'},v),\pi(\mu(E',v),\overline{E'},v)\right\} = \Omega(\pi(u,v)), \tag*{(35)} max { π ( u , E ′ , v ) , π ( μ ( E ′ , v ) , E ′ , v ) } = Ω ( π ( u , v )) , (35) where μ ( E ′ , v ) = arg max w : ∃ u , ( u , w ) ∈ E ′ π ( w , E ′ ‾ , v ) \mu(E',v) = \arg\max_{w:\exists u,(u,w)\in E'} \pi(w,\overline{E'},v) μ ( E ′ , v ) = arg max w : ∃ u , ( u , w ) ∈ E ′ π ( w , E ′ , v ) .
Proof. By definition, we have
π ( u , v ) = π ( u , E ′ , v ) + π ( u , E ′ ‾ , v ) . \pi(u,v) = \pi(u,E',v) + \pi(u,\overline{E'},v). π ( u , v ) = π ( u , E ′ , v ) + π ( u , E ′ , v ) .
If π ( u , E ′ ‾ , v ) ≥ π ( u , v ) / 2 \pi(u,\overline{E'},v) \ge\pi(u,v)/2 π ( u , E ′ , v ) ≥ π ( u , v ) /2 , then Equation (35) follows. So in the following we only consider the case where π ( u , E ′ , v ) ≥ π ( u , v ) / 2 \pi(u,E',v) \ge\pi(u,v)/2 π ( u , E ′ , v ) ≥ π ( u , v ) /2 .
Let π ( ℓ ) ( u , v ) \pi^{(\ell)}(u,v) π ( ℓ ) ( u , v ) denote the probability that a standard (non-terminating) random walk starting at u u u visits v v v at its ℓ \ell ℓ -th step, that is, π ( u , v ) = ∑ i = 0 ∞ α ( 1 − α ) i π ( i ) ( u , v ) \pi(u,v) = \sum_{i=0}^{\infty}\alpha(1-\alpha)^i\pi^{(i)}(u,v) π ( u , v ) = ∑ i = 0 ∞ α ( 1 − α ) i π ( i ) ( u , v ) . Then we have
π ( u , E ′ , v ) ≤ ∑ w : ∃ u , ( u , w ) ∈ E ′ ∑ ℓ = 0 ∞ ( 1 − α ) ℓ π ( ℓ ) ( u , w ) π ( w , E ′ , v ) ≤ ∑ w : ∃ u , ( u , w ) ∈ E ′ ∑ ℓ = 0 ∞ ( 1 − α ) ℓ π ( ℓ ) ( u , w ) π ( μ ( E ′ , v ) , E ′ , v ) \begin{aligned}
\pi(u,E',v) \le\sum_{w:\exists u,(u,w)\in E'}\sum_{\ell=0}^{\infty}(1-\alpha)^\ell\pi^{(\ell)}(u,w)\pi(w,E',v) \\
&\le\sum_{w:\exists u,(u,w)\in E'}\sum_{\ell=0}^{\infty}(1-\alpha)^\ell\pi^{(\ell)}(u,w)\pi(\mu(E',v),E',v)
\end{aligned} π ( u , E ′ , v ) ≤ w : ∃ u , ( u , w ) ∈ E ′ ∑ ℓ = 0 ∑ ∞ ( 1 − α ) ℓ π ( ℓ ) ( u , w ) π ( w , E ′ , v ) ≤ w : ∃ u , ( u , w ) ∈ E ′ ∑ ℓ = 0 ∑ ∞ ( 1 − α ) ℓ π ( ℓ ) ( u , w ) π ( μ ( E ′ , v ) , E ′ , v )
Since ∑ w : ∃ u , ( u , w ) ∈ E ′ π ( ℓ ) ( u , w ) ≤ ∑ w ∈ V π ( ℓ ) ( u , w ) = 1 \sum_{w:\exists u,(u,w)\in E'}\pi^{(\ell)}(u,w) \le\sum_{w\in V}\pi^{(\ell)}(u,w) = 1 ∑ w : ∃ u , ( u , w ) ∈ E ′ π ( ℓ ) ( u , w ) ≤ ∑ w ∈ V π ( ℓ ) ( u , w ) = 1 , this implies
π ( u , E ′ , v ) ≤ ∑ ℓ = 0 ∞ ( 1 − α ) ℓ π ( μ ( E ′ , v ) , E ′ , v ) = π ( μ ( E ′ , v ) , E ′ , v ) / α . \pi(u,E',v) \le\sum_{\ell=0}^{\infty}(1-\alpha)^\ell\pi(\mu(E',v),E',v) = \pi(\mu(E',v),E',v)/\alpha. π ( u , E ′ , v ) ≤ ℓ = 0 ∑ ∞ ( 1 − α ) ℓ π ( μ ( E ′ , v ) , E ′ , v ) = π ( μ ( E ′ , v ) , E ′ , v ) / α .
Recall that π ( u , E ′ , v ) ≥ π ( u , v ) / 2 \pi(u,E',v) \ge\pi(u,v)/2 π ( u , E ′ , v ) ≥ π ( u , v ) /2 , so Equation (35) follows.
The next lemma has been proven by [TW26].
Lemma 5.3 ([TW26] Lemma 3.2). For any edge ( u , v ) (u,v) ( u , v ) , if we replace it with edges ( u , w ) (u,w) ( u , w ) and ( w , v ) (w,v) ( w , v ) where w w w is a new vertex, then for any vertices u ′ u' u ′ , v ′ v' v ′ , π ( u ′ , v ′ ) \pi(u',v') π ( u ′ , v ′ ) can only be decreased by a factor of at most ( 2 − α ) / ( 1 − α ) (2-\alpha)/(1-\alpha) ( 2 − α ) / ( 1 − α ) .
Theorem 5.4. For any graph G G G , any good algorithm must spend Ω ( T ∗ ) \Omega(T^*) Ω ( T ∗ ) time when n n n is unknown.
Proof. Consider any graph G G G , any good algorithm A A A and any r ∈ ( 0 , 1 ] r \in(0,1] r ∈ ( 0 , 1 ] . For any edge ( u , v ) (u,v) ( u , v ) , let P ( u , v ) P(u,v) P ( u , v ) denote the probability that A A A visits ( u , v ) (u,v) ( u , v ) . For any vertex v v v , let P ( v ) P(v) P ( v ) denote the probability that A A A queries the degree of v v v . Let
Q ( v ) = P ( v ) + ∑ u ∈ N i n P ( u , v ) + ∑ w ∈ N o u t P ( v , w ) . Q(v) = P(v) + \sum_{u \in N_{\mathrm{in}}} P(u,v) + \sum_{w \in N_{\mathrm{out}}} P(v,w). Q ( v ) = P ( v ) + u ∈ N in ∑ P ( u , v ) + w ∈ N out ∑ P ( v , w ) .
For any set of edges F F F , let P ( F ) = ∑ e ∈ F P ( e ) P(F)=\sum_{e \in F}P(e) P ( F ) = ∑ e ∈ F P ( e ) . For any set of vertices U U U , let Q ( U ) = ∑ v ∈ U Q ( v ) Q(U)=\sum_{v \in U}Q(v) Q ( U ) = ∑ v ∈ U Q ( v ) . Note that for any vertex v v v , the probability that A A A visits v v v is at most Q ( v ) Q(v) Q ( v ) , and A A A spends Ω ( Q ( V ) ) \Omega(Q(V)) Ω ( Q ( V )) time in total.
Let C C C be some large enough constant to be determined later. Suppose for contradiction that
Q ( V ) < min { T f ( r ) , T b ( r ) } / C . Q(V) < \min\{T_f(r),T_b(r)\}/C. Q ( V ) < min { T f ( r ) , T b ( r )} / C .
We will construct a graph G ′ G' G ′ from G G G such that π G ′ ( s , t ) ≫ π G ( s , t ) \pi_{G'}(s,t) \gg\pi_G(s,t) π G ′ ( s , t ) ≫ π G ( s , t ) and
P ( E ′ ) + Q ( V ′ ) ≪ 1 , (36) P(E')+Q(V') \ll1, \tag*{(36)} P ( E ′ ) + Q ( V ′ ) ≪ 1 , (36)
where E ′ E' E ′ is the set of edges deleted from G G G and V ′ V' V ′ is the set of vertices in G G G whose degrees are changed. Then A A A cannot distinguish G G G and G ′ G' G ′ with constant probability, which is a contradiction.
We first have
r > C π ( s , t ) / 10 , (37) r > C\pi(s,t)/10, \tag*{(37)} r > C π ( s , t ) /10 , (37)
since otherwise Q ( V ) < T f ( r ) / C ≤ 0.1 Q(V)<T_f(r)/C\le0.1 Q ( V ) < T f ( r ) / C ≤ 0.1 , which means that A A A does not query anything with probability at least 0.9.
Since Q ( V ) < T b ( r ) / C Q(V)<T_b(r)/C Q ( V ) < T b ( r ) / C , there is a vertex y y y such that π ( y , t ) ≥ r \pi(y,t)\ge r π ( y , t ) ≥ r and Q ( y ) < ( 1 + d i n ( y ) ) / C Q(y)<(1+d_{\mathrm{in}}(y))/C Q ( y ) < ( 1 + d in ( y )) / C . By Lemma 5.1 , we have
π ( s , y ) ≤ π ( s , t ) / r . (38) \pi(s,y)\le\pi(s,t)/r. \tag*{(38)} π ( s , y ) ≤ π ( s , t ) / r . (38)
Lemma 5.5. At least one of the following is true:
There is a vertex u ≠ y u\ne y u = y such that π ( s , u ) / d o u t ( u ) > ( C / 50 ) π ( s , t ) / r \pi(s,u)/d_{\mathrm{out}}(u)>(C/50)\pi(s,t)/r π ( s , u ) / d out ( u ) > ( C /50 ) π ( s , t ) / r and Q ( u ) < d o u t ( u ) / 20 Q(u)<d_{\mathrm{out}}(u)/20 Q ( u ) < d out ( u ) /20 ;
There is a vertex u ≠ y u\ne y u = y such that π ( s , u ) / d o u t ( u ) ≤ ( C / 50 ) π ( s , t ) / r \pi(s,u)/d_{\mathrm{out}}(u)\le(C/50)\pi(s,t)/r π ( s , u ) / d out ( u ) ≤ ( C /50 ) π ( s , t ) / r , π ( s , u ) > ( C / 50 ) π ( s , t ) / r \pi(s,u)>(C/50)\pi(s,t)/r π ( s , u ) > ( C /50 ) π ( s , t ) / r and Q ( u ) < ( 50 / C ) π ( s , u ) r / 20 π ( s , t ) Q(u)<(50/C)\pi(s,u)r/20\pi(s,t) Q ( u ) < ( 50/ C ) π ( s , u ) r /20 π ( s , t ) ;
There is a set of vertices U ∌ y U\not\ni y U ∋ y such that π ( s , u ) ≤ ( C / 50 ) π ( s , t ) / r \pi(s,u)\le(C/50)\pi(s,t)/r π ( s , u ) ≤ ( C /50 ) π ( s , t ) / r for all u ∈ U u\in U u ∈ U , π ( s , U ) > ( C / 50 ) π ( s , t ) / r \pi(s,U)>(C/50)\pi(s,t)/r π ( s , U ) > ( C /50 ) π ( s , t ) / r and Q ( U ) < 1 / 20 Q(U)<1/20 Q ( U ) < 1/20 .
Proof. Let V 0 = { u ∈ V s ∖ { y } ∣ π ( s , u ) d o u t ( u ) > C π ( s , t ) 50 r } V_0=\{u\in V_s\setminus\{y\}\mid\frac{\pi(s,u)}{d_{\mathrm{out}}(u)}>\frac{C\pi(s,t)}{50r}\} V 0 = { u ∈ V s ∖ { y } ∣ d out ( u ) π ( s , u ) > 50 r C π ( s , t ) } , V 1 = { u ∈ V s ∖ ( V 0 ∪ { y } ) ∣ π ( s , u ) > C π ( s , t ) 50 r } V_1=\{u\in V_s\setminus(V_0\cup\{y\})\mid\pi(s,u)>\frac{C\pi(s,t)}{50r}\} V 1 = { u ∈ V s ∖ ( V 0 ∪ { y }) ∣ π ( s , u ) > 50 r C π ( s , t ) } and V 2 = V s ∖ ( V 0 ∪ V 1 ∪ { y } ) V_2=V_s\setminus(V_0\cup V_1\cup\{y\}) V 2 = V s ∖ ( V 0 ∪ V 1 ∪ { y }) . Then
Q ( V ) < ( ∑ u ∈ V 0 d o u t ( u ) + π ( s , V 1 ) r π ( s , t ) + π ( s , V 2 ) r π ( s , t ) + π ( s , y ) r π ( s , t ) ) / C . Q(V)<\left(\sum_{u\in V_0}d_{\mathrm{out}}(u)+\frac{\pi(s,V_1)r}{\pi(s,t)}+\frac{\pi(s,V_2)r}{\pi(s,t)}+\frac{\pi(s,y)r}{\pi(s,t)}\right)/C. Q ( V ) < ( u ∈ V 0 ∑ d out ( u ) + π ( s , t ) π ( s , V 1 ) r + π ( s , t ) π ( s , V 2 ) r + π ( s , t ) π ( s , y ) r ) / C .
If there is a vertex u ∈ V 0 u\in V_0 u ∈ V 0 such that Q ( u ) < d o u t ( u ) / 20 Q(u)<d_{\mathrm{out}}(u)/20 Q ( u ) < d out ( u ) /20 , or there is a vertex u ∈ V 1 u\in V_1 u ∈ V 1 such that Q ( u ) < ( 50 / C ) π ( s , u ) r / 20 π ( s , t ) Q(u)<(50/C)\pi(s,u)r/20\pi(s,t) Q ( u ) < ( 50/ C ) π ( s , u ) r /20 π ( s , t ) , then we are done. Otherwise, we have
Q ( V 2 ) < ( ( 1 − C / 20 ) ∣ V 0 ∣ − 1.5 ( C / 50 ) ∣ V 1 ∣ + π ( s , V 2 ) r π ( s , t ) + 1 ) / C . Q(V_2)<\left((1-C/20)|V_0|-1.5(C/50)|V_1|+\frac{\pi(s,V_2)r}{\pi(s,t)}+1\right)/C. Q ( V 2 ) < ( ( 1 − C /20 ) ∣ V 0 ∣ − 1.5 ( C /50 ) ∣ V 1 ∣ + π ( s , t ) π ( s , V 2 ) r + 1 ) / C .
We claim that π ( s , V 2 ) > ( C / 50 ) π ( s , t ) / r \pi(s,V_2) > (C/50)\pi(s,t)/r π ( s , V 2 ) > ( C /50 ) π ( s , t ) / r . When V 0 ∪ V 1 ≠ ∅ V_0 \cup V_1 \ne\varnothing V 0 ∪ V 1 = ∅ , this is true for large enough C C C because
π ( s , V 2 ) r π ( s , t ) + 1 − ( C / 20 − 1 ) ∣ V 0 ∣ − 1.5 ( C / 50 ) ∣ V 1 ∣ > 0. \frac{\pi(s,V_2)r}{\pi(s,t)} + 1 - (C/20 - 1)|V_0| - 1.5(C/50)|V_1| > 0. π ( s , t ) π ( s , V 2 ) r + 1 − ( C /20 − 1 ) ∣ V 0 ∣ − 1.5 ( C /50 ) ∣ V 1 ∣ > 0.
When V 0 = V 1 = ∅ V_0 = V_1 = \varnothing V 0 = V 1 = ∅ , we have V 2 = V ∖ { y } V_2 = V \setminus\{y\} V 2 = V ∖ { y } , so
π ( s , V 2 ) = 1 − π ( s , y ) > ( C / 10 − 1 ) π ( s , t ) / r \pi(s,V_2) = 1 - \pi(s,y) > (C/10 - 1)\pi(s,t)/r π ( s , V 2 ) = 1 − π ( s , y ) > ( C /10 − 1 ) π ( s , t ) / r
by Equations (37) and (38) .
We sort the vertices in V 2 V_2 V 2 in the decreasing order of π ( s , u ) / Q ( u ) \pi(s,u)/Q(u) π ( s , u ) / Q ( u ) , and let U U U be the shortest prefix such that π ( s , U ) > ( C / 50 ) π ( s , t ) / r \pi(s,U) > (C/50)\pi(s,t)/r π ( s , U ) > ( C /50 ) π ( s , t ) / r . By definition, we have
π ( s , U ) ≤ ( C / 25 ) π ( s , t ) / r \pi(s,U) \le(C/25)\pi(s,t)/r π ( s , U ) ≤ ( C /25 ) π ( s , t ) / r
and
π ( s , U ) Q ( U ) ≥ π ( s , V 2 ) Q ( V 2 ) . \frac{\pi(s,U)}{Q(U)} \ge\frac{\pi(s,V_2)}{Q(V_2)}. Q ( U ) π ( s , U ) ≥ Q ( V 2 ) π ( s , V 2 ) .
So we have
Q ( U ) ≤ Q ( V 2 ) π ( s , V 2 ) π ( s , U ) < 1 C ( r π ( s , t ) + 1 π ( s , V 2 ) ) π ( s , U ) < 1 + 50 / C C r π ( s , t ) π ( s , U ) ≤ 1 20 . Q(U) \le\frac{Q(V_2)}{\pi(s,V_2)}\pi(s,U) < \frac{1}{C}\left(\frac{r}{\pi(s,t)}+\frac{1}{\pi(s,V_2)}\right)\pi(s,U) < \frac{1+50/C}{C}\frac{r}{\pi(s,t)}\pi(s,U) \le\frac{1}{20}. Q ( U ) ≤ π ( s , V 2 ) Q ( V 2 ) π ( s , U ) < C 1 ( π ( s , t ) r + π ( s , V 2 ) 1 ) π ( s , U ) < C 1 + 50/ C π ( s , t ) r π ( s , U ) ≤ 20 1 .
Lemma 5.6. There is a set of edges F F F such that π ( s , F ) > ( C / 50 ) π ( s , t ) / r \pi(s,F) > (C/50)\pi(s,t)/r π ( s , F ) > ( C /50 ) π ( s , t ) / r and P ( F ) < 1 / 10 P(F) < 1/10 P ( F ) < 1/10 . Let U = { u ∈ V ∣ ∃ v ( u , v ) ∈ F } U = \{u \in V \mid\exists v\ (u,v) \in F\} U = { u ∈ V ∣ ∃ v ( u , v ) ∈ F } , we also have y ∉ U y \notin U y ∈ / U .
Proof. Consider the 3 cases in Lemma 5.5 .
Case 1. There is a vertex u ≠ y u \ne y u = y such that π ( s , u ) / d o u t ( u ) > ( C / 50 ) π ( s , t ) / r \pi(s,u)/d_{\mathrm{out}}(u) > (C/50)\pi(s,t)/r π ( s , u ) / d out ( u ) > ( C /50 ) π ( s , t ) / r and Q ( u ) < d o u t ( u ) / 20 Q(u) < d_{\mathrm{out}}(u)/20 Q ( u ) < d out ( u ) /20 . Since Q ( u ) < d o u t ( u ) / 20 Q(u) < d_{\mathrm{out}}(u)/20 Q ( u ) < d out ( u ) /20 , there is an edge ( u , v ) (u,v) ( u , v ) such that P ( u , v ) < 1 / 20 P(u,v) < 1/20 P ( u , v ) < 1/20 . Let F = { ( u , v ) } F = \{(u,v)\} F = {( u , v )} and U = { u } U = \{u\} U = { u } .
Case 2. There is a vertex u ≠ y u \ne y u = y such that π ( s , u ) / d o u t ( u ) ≤ ( C / 50 ) π ( s , t ) / r \pi(s,u)/d_{\mathrm{out}}(u) \le(C/50)\pi(s,t)/r π ( s , u ) / d out ( u ) ≤ ( C /50 ) π ( s , t ) / r , π ( s , u ) > ( C / 50 ) π ( s , t ) / r \pi(s,u) > (C/50)\pi(s,t)/r π ( s , u ) > ( C /50 ) π ( s , t ) / r and Q ( u ) < ( 50 / C ) π ( s , u ) r / 20 π ( s , t ) Q(u) < (50/C)\pi(s,u)r/20\pi(s,t) Q ( u ) < ( 50/ C ) π ( s , u ) r /20 π ( s , t ) . Sort the out-edges of u u u in the increasing order of P ( u , v ) P(u,v) P ( u , v ) . Let F F F be the shortest prefix such that π ( s , F ) > ( C / 50 ) π ( s , t ) / r \pi(s,F) > (C/50)\pi(s,t)/r π ( s , F ) > ( C /50 ) π ( s , t ) / r . By definition, we have
π ( s , F ) ≤ ( C / 25 ) π ( s , t ) / r \pi(s,F) \le(C/25)\pi(s,t)/r π ( s , F ) ≤ ( C /25 ) π ( s , t ) / r and
P ( F ) ∣ F ∣ ≤ Q ( u ) d o u t ( u ) . \frac{P(F)}{|F|} \le\frac{Q(u)}{d_{\mathrm{out}}(u)}. ∣ F ∣ P ( F ) ≤ d out ( u ) Q ( u ) . So
P ( F ) ≤ Q ( u ) ∣ F ∣ d o u t ( u ) = Q ( u ) π ( s , F ) π ( s , u ) < 1 10 . P(F) \le\frac{Q(u)|F|}{d_{\mathrm{out}}(u)} = \frac{Q(u)\pi(s,F)}{\pi(s,u)} < \frac{1}{10}. P ( F ) ≤ d out ( u ) Q ( u ) ∣ F ∣ = π ( s , u ) Q ( u ) π ( s , F ) < 10 1 . Case 3. There is a set of vertices U ∌ y U \not\ni y U ∋ y such that π ( s , U ) > ( C / 50 ) π ( s , t ) / r \pi(s,U) > (C/50)\pi(s,t)/r π ( s , U ) > ( C /50 ) π ( s , t ) / r and Q ( U ) < 1 / 20 Q(U) < 1/20 Q ( U ) < 1/20 . Let F F F be the set of all out-edges of vertices in $U.
We create a new vertex w w w . For every edge ( u , v ) ∈ F (u,v) \in F ( u , v ) ∈ F , we create two new vertex w u v w_{uv} w uv and w u v ′ w'_{uv} w uv ′ , and replace ( u , v ) (u,v) ( u , v ) by ( u , w u v ) (u,w_{uv}) ( u , w uv ) , ( w u v , w ) (w_{uv},w) ( w uv , w ) and ( w u v ′ , v ) (w'_{uv},v) ( w uv ′ , v ) . Call this new graph G ′ G' G ′ . Then we have π G ′ ( s , w ) = Ω ( π G ( s , t ) / r ) \pi_{G'}(s,w)=\Omega(\pi_G(s,t)/r) π G ′ ( s , w ) = Ω ( π G ( s , t ) / r ) by the following lemma.
Lemma 5.7. π G ′ ( s , w ) = Ω ( π G ( s , F ′ ) ) \pi_{G'}(s,w)=\Omega(\pi_G(s,F')) π G ′ ( s , w ) = Ω ( π G ( s , F ′ )) .
Proof. The probability that a random walk in G G G stops at F F F (which means the last edge of the random walk is in F F F ) is Ω ( π G ( s , F ) ) \Omega(\pi_G(s,F)) Ω ( π G ( s , F )) . Let F ′ = { ( u , w u v ) ∣ ( u , v ) ∈ F } F'=\{(u,w_{uv})\mid(u,v)\in F\} F ′ = {( u , w uv ) ∣ ( u , v ) ∈ F } . Since we only deleted F F F and the out-degrees of U U U are unchanged, a random walk in G ′ G' G ′ will behave as if in G G G until it visits F ′ F' F ′ . So, the probability that a random walk in G ′ G' G ′ visits F ′ F' F ′ is at least the probability that a random walk in G G G visits F F F , which is at least Ω ( π G ( s , F ) ) \Omega(\pi_G(s,F)) Ω ( π G ( s , F )) . Given that a random walk in G ′ G' G ′ visits F ′ F' F ′ , the conditional probability that it stops at w w w is ( 1 − α ) α = Ω ( 1 ) (1-\alpha)\alpha=\Omega(1) ( 1 − α ) α = Ω ( 1 ) , so the lemma follows.
Since π ( y , t ) = Ω ( r ) \pi(y,t)=\Omega(r) π ( y , t ) = Ω ( r ) , by Lemma 5.2 , there exists y ′ ∈ { y , μ ( F , t ) } y'\in\{y,\mu(F,t)\} y ′ ∈ { y , μ ( F , t )} such that π G ( y ′ , F ‾ , t ) = Ω ( r ) \pi_G(y',\overline{F},t)=\Omega(r) π G ( y ′ , F , t ) = Ω ( r ) . Since we only deleted F F F and the out-degrees of U U U are unchanged, π G ′ ( y ′ , t ) ≥ π G ′ ( y ′ , F ‾ , t ) = π G ( y ′ , F ‾ , t ) = Ω ( r ) \pi_{G'}(y',t)\ge\pi_{G'}(y',\overline{F},t)=\pi_G(y',\overline{F},t)=\Omega(r) π G ′ ( y ′ , t ) ≥ π G ′ ( y ′ , F , t ) = π G ( y ′ , F , t ) = Ω ( r ) . The only remaining thing is to connect w w w with y ′ y' y ′ . We do it as follows:
If y ′ = y y'=y y ′ = y and d i n ( y ) > 0 d_{\mathrm{in}}(y)>0 d in ( y ) > 0 , since Q ( y ) < ( 1 + d i n ( y ) ) / C Q(y)<(1+d_{\mathrm{in}}(y))/C Q ( y ) < ( 1 + d in ( y )) / C , there exists an edge ( x , y ) (x,y) ( x , y ) such that P ( x , y ) < 2 / C P(x,y)<2/C P ( x , y ) < 2/ C . We replace ( x , y ) (x,y) ( x , y ) with ( x , w ) (x,w) ( x , w ) and ( w , y ) (w,y) ( w , y ) .
If y ′ = y y'=y y ′ = y and d i n ( y ) = 0 d_{\mathrm{in}}(y)=0 d in ( y ) = 0 , then Q ( y ) < ( 1 + d i n ( y ) ) / C = 1 / C Q(y)<(1+d_{\mathrm{in}}(y))/C=1/C Q ( y ) < ( 1 + d in ( y )) / C = 1/ C . We simply add an edge ( w , y ) (w,y) ( w , y ) .
If y ′ = μ ( F , t ) y'=\mu(F,t) y ′ = μ ( F , t ) , then there exists an edge ( x , y ′ ) ∈ F (x,y')\in F ( x , y ′ ) ∈ F . Recall that this edge has been replaced by ( w x y ′ ′ , y ′ ) (w'_{xy'},y') ( w x y ′ ′ , y ′ ) (and something else). We further replace ( w x y ′ ′ , y ′ ) (w'_{xy'},y') ( w x y ′ ′ , y ′ ) with ( w , y ′ ) (w,y') ( w , y ′ ) .
Call the new graph G ′ ′ G'' G ′′ .
Lemma 5.8. π G ′ ′ ( s , t ) > Ω ( C π G ( s , t ) ) \pi_{G''}(s,t)>\Omega(C\pi_G(s,t)) π G ′′ ( s , t ) > Ω ( C π G ( s , t )) .
Proof. Since ( w , y ) (w,y) ( w , y ) is the only out-edge of w w w , we have π G ′ ′ ( s , t ) = Ω ( π G ′ ′ ( s , w ) π G ′ ′ ( y ′ , t ) ) \pi_{G''}(s,t)=\Omega(\pi_{G''}(s,w)\pi_{G''}(y',t)) π G ′′ ( s , t ) = Ω ( π G ′′ ( s , w ) π G ′′ ( y ′ , t )) . We claim that π G ′ ′ ( s , w ) = Ω ( π G ′ ( s , w ) ) \pi_{G''}(s,w)=\Omega(\pi_{G'}(s,w)) π G ′′ ( s , w ) = Ω ( π G ′ ( s , w )) and π G ′ ′ ( y ′ , t ) = Ω ( π G ′ ( y ′ , t ) ) \pi_{G''}(y',t)=\Omega(\pi_{G'}(y',t)) π G ′′ ( y ′ , t ) = Ω ( π G ′ ( y ′ , t )) . This is because, the only things we may do from G ′ G' G ′ to G ′ ′ G'' G ′′ are:
Adding an edge ( w , y ′ ) (w,y') ( w , y ′ ) where this edge becomes the only out-edge of w w w . This will not decrease any π ( ⋅ , ⋅ ) \pi(\cdot,\cdot) π ( ⋅ , ⋅ ) .
Deleting an edge ( w x y ′ ′ , y ′ ) (w'_{xy'},y') ( w x y ′ ′ , y ′ ) where d i n ( w x y ′ ′ ) = 0 d_{\mathrm{in}}(w'_{xy'})=0 d in ( w x y ′ ′ ) = 0 . This will not decrease any π ( u , ⋅ ) \pi(u,\cdot) π ( u , ⋅ ) for u ≠ w x y ′ ′ u\ne w'_{xy'} u = w x y ′ ′ .
Replacing ( x , y ′ ) (x,y') ( x , y ′ ) with ( x , w ) (x,w) ( x , w ) where the only out-edge of w w w is ( w , y ′ ) (w,y') ( w , y ′ ) . This is equivalent to subdividing ( x , y ′ ) (x,y') ( x , y ′ ) and then merging the new vertex with w w w . By Lemma 5.3 , this can only decrease any π ( ⋅ , ⋅ ) \pi(\cdot,\cdot) π ( ⋅ , ⋅ ) by a constant factor.
By Lemmas 5.6 and 5.7 , π G ′ ( s , w ) > Ω ( C π ( s , t ) / r ) \pi_{G'}(s,w)>\Omega(C\pi(s,t)/r) π G ′ ( s , w ) > Ω ( C π ( s , t ) / r ) . By definition, π G ′ ( y ′ , t ) = Ω ( r ) \pi_{G'}(y',t)=\Omega(r) π G ′ ( y ′ , t ) = Ω ( r ) . So π G ′ ′ ( s , t ) > Ω ( C π G ( s , t ) ) \pi_{G''}(s,t)>\Omega(C\pi_G(s,t)) π G ′′ ( s , t ) > Ω ( C π G ( s , t )) .
We remark that, by Lemma 5.8 , we can choose a large enough C C C so that, e.g. π G ′ ′ ( s , t ) > 10 π G ( s , t ) \pi_{G''}(s,t)>10\pi_G(s,t) π G ′′ ( s , t ) > 10 π G ( s , t ) . It is straightforward to check that our modification from G G G to G ′ ′ G'' G ′′ satisfies Equation (36) .
Combining Theorems 4.1 and 5.4 proves the instance-optimality of TriPPR.
Instance-Non-Optimality on Non-Sparse Graphs When n n n is Known
We show that when n n n is known, every good algorithm must spend the usual worst-case time Ω ( min { m , 1 / π ( s , t ) } ) \Omega(\min\{m,1/\pi(s,t)\}) Ω ( min { m , 1/ π ( s , t )}) on an instance which can be solved in time O ( n ) O(n) O ( n ) by some correct algorithm. For simplicity, we also assume δ = 0 \delta=0 δ = 0 here. In Appendix § 8 , we will show how to extend it to a general δ \delta δ .
The proof is similar to that of an analogous result for bidirectional Dijkstra’s algorithm on simple graphs [BJT+26b, Theorem 5.1]. It exploits that if n n n is known, and we observe that a vertex u u u has e.g. out-degree n − 1 n-1 n − 1 , then we know that every other vertex has an in-edge from u u u , without explicitly querying any in-edges.
Theorem 6.1. When n n n is known, every algorithm returning an estimate π ^ ( s , t ) \hat{\pi}(s,t) π ^ ( s , t ) of π ( s , t ) \pi(s,t) π ( s , t ) satisfying
Pr [ ∣ π ^ ( s , t ) − π ( s , t ) ∣ ≤ ε r π ( s , t ) ] ≥ 2 / 3 , \Pr\left[\left|\hat{\pi}(s,t)-\pi(s,t)\right|\le\varepsilon_r\pi(s,t)\right]\ge2/3, Pr [ ∣ π ^ ( s , t ) − π ( s , t ) ∣ ≤ ε r π ( s , t ) ] ≥ 2/3 , has instance-optimality ratio
Ω ( 1 n min { m , 1 π ( s , t ) } ) . \Omega\left(\frac{1}{n}\min\left\{m,\frac{1}{\pi(s,t)}\right\}\right). Ω ( n 1 min { m , π ( s , t ) 1 } ) . More precisely, for every n n n , m m m , and p p p with n ≤ m ≤ n 2 n\le m\le n^2 n ≤ m ≤ n 2 and 0 < p ≤ 1 0<p\le1 0 < p ≤ 1 , and for every correct algorithm, there exists an instance with Θ ( n ) \Theta(n) Θ ( n ) vertices, Θ ( m ) \Theta(m) Θ ( m ) edges, and π ( s , t ) = Θ ( max { 1 / m , p } ) \pi(s,t)=\Theta(\max\{1/m,p\}) π ( s , t ) = Θ ( max { 1/ m , p }) , on which the algorithm queries Ω ( min { m , 1 / p } ) = Ω ( min { m , 1 / π ( s , t ) } ) \Omega(\min\{m,1/p\})=\Omega(\min\{m,1/\pi(s,t)\}) Ω ( min { m , 1/ p }) = Ω ( min { m , 1/ π ( s , t )}) edges in expectation, but some correct algorithm spends O ( n ) O(n) O ( n ) queries and time.
Proof. We can assume that n n n is at least a sufficiently large constant for the following construction to go through. Let k = min { m , 1 / p } k=\sqrt{\min\{m,1/p\}} k = min { m , 1/ p } . We construct a graph G G G with vertices partitioned into eight subsets: V = { s , t } ∪ V 1 ∪ V 2 ∪ ⋯ ∪ V 8 V=\{s,t\}\cup V_1\cup V_2\cup\cdots\cup V_8 V = { s , t } ∪ V 1 ∪ V 2 ∪ ⋯ ∪ V 8 , where ∣ V i ∣ = Θ ( k ) |V_i|=\Theta(k) ∣ V i ∣ = Θ ( k ) for i ∈ { 1 , … , 6 } i\in\{1,\ldots,6\} i ∈ { 1 , … , 6 } , ∣ V 8 ∣ = Θ ( m / n ) |V_8|=\Theta(m/n) ∣ V 8 ∣ = Θ ( m / n ) and ∣ V 7 ∣ = n − Θ ( k ) − Θ ( m / n ) |V_7|=n-\Theta(k)-\Theta(m/n) ∣ V 7 ∣ = n − Θ ( k ) − Θ ( m / n ) , such that ∣ V ∣ = n |V|=n ∣ V ∣ = n . The source s s s has an edge to every vertex in V 1 V_1 V 1 . Every vertex in V 2 V_2 V 2 has an edge to t t t . Every vertex in V 1 ∪ V 3 ∪ V 6 V_1\cup V_3\cup V_6 V 1 ∪ V 3 ∪ V 6 has an edge to every vertex in V 5 V_5 V 5 . Every vertex in V 6 V_6 V 6 has an edge to every vertex in V 2 ∪ V 4 ∪ V 5 V_2\cup V_4\cup V_5 V 2 ∪ V 4 ∪ V 5 (including those from V 6 V_6 V 6 to V 5 V_5 V 5 already mentioned). There is a perfect matching from V 1 V_1 V 1 to V 4 V_4 V 4 and from V 3 V_3 V 3 to V 2 V_2 V 2 . The vertices in V 7 V_7 V 7 form a path, and there is an edge from t t t to the first vertex on the path. Finally, every vertex in V 8 V_8 V 8 has an edge to every other vertex in the graph, i.e. full out-degree n − 1 n-1 n − 1 . Note that the graph has Θ ( m ) \Theta(m) Θ ( m ) edges.
We also construct a modified graph G ′ G' G ′ , as follows. Pick edges ( u 1 , v 4 ) ∈ V 1 × V 4 (u_1,v_4)\in V_1\times V_4 ( u 1 , v 4 ) ∈ V 1 × V 4 and ( u 3 , v 2 ) ∈ V 3 × V 2 (u_3,v_2)\in V_3\times V_2 ( u 3 , v 2 ) ∈ V 3 × V 2 uniformly at random from the matchings in G G G . Then remove these edges and insert new edges ( u 1 , v 2 ) (u_1,v_2) ( u 1 , v 2 ) and ( u 3 , v 4 ) (u_3,v_4) ( u 3 , v 4 ) in their place in the respective adjacency lists. Note that this preserves the in-degree and out-degree of every vertex. See Figure 4 for an illustration of G G G and G ′ G' G ′ , without V 8 V_8 V 8 .
Figure 4. Graph construction for the proof of Theorem 6.1 . Blue double edges indicate that every edge from a subset to another is present. The dashed red edges are only present in G G G . The thick green edges are only present in G ′ G' G ′ . Note that t t t is reachable from s s s in G ′ G' G ′ but not in G G G .
Note that in G G G we have π ( s , t ) = 0 \pi(s,t)=0 π ( s , t ) = 0 , while in G ′ G' G ′ we have π ( s , t ) = 1 − α ∣ V 1 ∣ ⋅ 1 − α ∣ V 5 ∣ + 1 ( 1 − α ) α = Θ ( 1 / k 2 ) = Θ ( max { 1 / m , p } ) \pi(s,t)=\frac{1-\alpha}{|V_1|}\cdot\frac{1-\alpha}{|V_5|+1}(1-\alpha)\alpha=\Theta(1/k^2)=\Theta(\max\{1/m,p\}) π ( s , t ) = ∣ V 1 ∣ 1 − α ⋅ ∣ V 5 ∣ + 1 1 − α ( 1 − α ) α = Θ ( 1/ k 2 ) = Θ ( max { 1/ m , p }) . Every correct algorithm must thus distinguish G G G and G ′ G' G ′ with constant probability.
We first show that if adjacency lists are given in uniformly random orders, every algorithm must spend Ω ( k 2 ) \Omega(k^2) Ω ( k 2 ) time to distinguish G ′ G' G ′ from G G G with constant probability. This implies that every algorithm requires Ω ( k 2 ) \Omega(k^2) Ω ( k 2 ) time (in expectation over the internal randomness of the algorithm) on some (algorithm-specific) ordering. Since all in-degrees and out-degrees are the same in G G G and G ′ G' G ′ , the only way for the algorithm to deviate on the two graphs is to query the edge ( u 1 , v 2 ) (u_1,v_2) ( u 1 , v 2 ) from u 1 u_1 u 1 or v 2 v_2 v 2 , or query the edge ( u 3 , v 4 ) (u_3,v_4) ( u 3 , v 4 ) from u 3 u_3 u 3 or v 4 v_4 v 4 . Running the algorithm on G G G , each matching edge in G ′ G' G ′ is hidden among Ω ( k ) \Omega(k) Ω ( k ) neighbors at both endpoints, so q q q (adaptive) queries discover O ( q / k ) O(q/k) O ( q / k ) matching edges in expectation. Since the two selected matching edges are chosen uniformly at random among Ω ( k ) \Omega(k) Ω ( k ) options, the probability of discovering either is O ( q / k 2 ) O(q/k^{2}) O ( q / k 2 ) . Coupling the orders of G G G and G ′ G' G ′ , this shows that the algorithm must spend Ω ( k 2 ) \Omega(k^{2}) Ω ( k 2 ) queries to distinguish the two graphs.
Next, we show that on any fixed adjacency-list ordering, it can be certified that the given graph is G ′ G' G ′ in O ( n ) O(n) O ( n ) time. Let us describe a certification algorithm. First, the algorithm visits all out-neighbors of s s s and all in-neighbors of t t t , identifying V 1 V_{1} V 1 , V 2 V_{2} V 2 , and V 8 V_{8} V 8 . Here, V 8 V_{8} V 8 is distinguished as the subset of neighbors with in-degree zero. By observing that every vertex in V 8 V_{8} V 8 has out-degree n − 1 n-1 n − 1 , the algorithm certifies that every vertex in V 8 V_{8} V 8 has an edge to every other vertex in the graph, using that n n n is known. Next, querying all edges of u 1 u_{1} u 1 and v 2 v_{2} v 2 , which can be guessed correctly because we fixed the adjacency-list orderings, identifies V 5 V_{5} V 5 and V 6 V_{6} V 6 . Querying all edges of a vertex in V 5 V_{5} V 5 and a vertex in V 6 V_{6} V 6 identifies V 3 V_{3} V 3 and V 4 V_{4} V 4 . Next, the algorithm queries all matching edges, including the replaced ones, using hardwired adjacency-order guesses. The algorithm also traverses the path in V 7 V_{7} V 7 from t t t . Since n n n is known, the algorithm knows that there are no more vertices. The algorithm now observes that no vertex in { s , t } ∪ V 2 ∪ V 4 ∪ V 7 \{s,t\} \cup V_{2} \cup V_{4} \cup V_{7} { s , t } ∪ V 2 ∪ V 4 ∪ V 7 has an unqueried out-edge, and in particular no edge to V 5 V_{5} V 5 . So since each vertex in V 5 V_{5} V 5 can be seen to have in-degree ∣ V 1 ∪ V 3 ∪ V 6 ∪ V 8 ∣ \lvert V_{1} \cup V_{3} \cup V_{6} \cup V_{8} \rvert ∣ V 1 ∪ V 3 ∪ V 6 ∪ V 8 ∣ , it is certified that every vertex in V 1 ∪ V 3 ∪ V 6 V_{1} \cup V_{3} \cup V_{6} V 1 ∪ V 3 ∪ V 6 (and as already observed V 8 V_{8} V 8 ) has an edge to every vertex in V 5 V_{5} V 5 . It is similarly certified that V 6 V_{6} V 6 has an edge to every vertex of V 2 ∪ V 4 ∪ V 5 V_{2} \cup V_{4} \cup V_{5} V 2 ∪ V 4 ∪ V 5 . Summing all vertex degrees, it is certified, that there are no more edges. This certifies that the graph is G ′ G' G ′ . □
Lower Bound When n n n is Known
In this section, we will prove the following theorem.
Theorem 7.1. Fix any constant c ∈ ( 0 , 1 ) c \in(0,1) c ∈ ( 0 , 1 ) . Every algorithm that, on every valid instance, outputs an estimate π ^ ( s , t ) \hat{\pi}(s,t) π ^ ( s , t ) satisfying ∣ π ^ ( s , t ) − π ( s , t ) ∣ ≤ c π ( s , t ) \lvert\hat{\pi}(s,t) - \pi(s,t) \rvert\le c\pi(s,t) ∣ π ^ ( s , t ) − π ( s , t )∣ ≤ c π ( s , t ) with probability at least 2 / 3 2/3 2/3 , has expected
T = Ω ( ε min { T ∗ h + 1 , n log n } ) . T = \Omega\left(\varepsilon\min\left\{\frac{T^*}{h+1},\frac{n}{\log n}\right\}\right). T = Ω ( ε min { h + 1 T ∗ , log n n } ) .
This implies the following bound on the instance-optimality ratio of TriPPR.
Corollary 7.2. TriPPR is O ~ ( ( 1 / ε ) max { h + 1 , T ∗ n } ) = O ~ ( ( 1 / ε ) max { h + 1 , 1 n min { m , 1 π ( s , t ) } } ) \widetilde{O}\left((1/\varepsilon)\max\left\{h+1,\frac{T^*}{n}\right\}\right)=\widetilde{O}\left((1/\varepsilon)\max\left\{h+1,\frac{1}{n}\min\left\{m,\frac{1}{\pi(s,t)}\right\}\right\}\right) O ( ( 1/ ε ) max { h + 1 , n T ∗ } ) = O ( ( 1/ ε ) max { h + 1 , n 1 min { m , π ( s , t ) 1 } } ) -instance-optimal.
Proof. Since TriPPR has expected running time O ~ ( T ∗ ) \widetilde{O}(T^*) O ( T ∗ ) , Theorem 7.1 implies an instance-optimality ratio of
O ~ ( T ∗ ε min { T ∗ / ( h + 1 ) , n } ) = O ~ ( 1 ε max { h + 1 , T ∗ n } ) . \widetilde{O}\left(\frac{T^*}{\varepsilon\min\{T^*/(h+1),n\}}\right)=\widetilde{O}\left(\frac{1}{\varepsilon}\max\left\{h+1,\frac{T^*}{n}\right\}\right). O ( ε min { T ∗ / ( h + 1 ) , n } T ∗ ) = O ( ε 1 max { h + 1 , n T ∗ } ) . Moreover, for every r ∈ [ 0 , 1 ] r\in[0,1] r ∈ [ 0 , 1 ] ,
T f ( r ) ≤ min { m , r π ( s , t ) ∑ u ∈ V π ( s , u ) } ≤ min { m , 1 π ( s , t ) } . T_f(r)\leq\min\left\{m,\frac{r}{\pi(s,t)}\sum_{u\in V}\pi(s,u)\right\}\leq\min\left\{m,\frac{1}{\pi(s,t)}\right\}. T f ( r ) ≤ min { m , π ( s , t ) r u ∈ V ∑ π ( s , u ) } ≤ min { m , π ( s , t ) 1 } . Hence T ∗ ≤ min { m , 1 / π ( s , t ) } T^*\leq\min\{m,1/\pi(s,t)\} T ∗ ≤ min { m , 1/ π ( s , t )} , proving the corollary.
We may also want to parameterize the instance-optimality factor in terms of δ \delta δ . Recall that δ \delta δ is the approximation threshold, so we only need to approximate π ( s , t ) \pi(s,t) π ( s , t ) when π ( s , t ) ≥ δ \pi(s,t)\geq\delta π ( s , t ) ≥ δ . By the reduction in Appendix § 8 , we may therefore replace 1 / π ( s , t ) 1/\pi(s,t) 1/ π ( s , t ) by 1 / δ 1/\delta 1/ δ in the instance-optimality factor.
To prove Theorem 7.1 , we wish to show that for every good algorithm A A A and graph G G G , the running time of A A A on G G G is Ω ( T ∗ ) \Omega(T^*) Ω ( T ∗ ) . To do so, we assume for the sake of contradiction, that the running time of A A A on G G G is o ( T ∗ ) o(T^*) o ( T ∗ ) , and show that there exists a modified graph G ′ G' G ′ , which A A A does not distinguish from G G G , but where ( 1 − c ) π G ′ ( s , t ) > ( 1 + c ) π G ( s , t ) (1-c)\pi_{G'}(s,t)>(1+c)\pi_G(s,t) ( 1 − c ) π G ′ ( s , t ) > ( 1 + c ) π G ( s , t ) , contradicting correctness of A A A . To construct G ′ G' G ′ , we first find a vertex y y y , that A A A examines with low probability, such that the backward probability mass π ( y , t ) \pi(y,t) π ( y , t ) is large, even if we only count random walks inside some local subgraph around t t t . This is formalized in Lemma 7.3 and can be thought of as the lower-bound counter-part to the backward pushing in our TriPPR algorithm. Next, we modify G G G , in a way that avoids the mentioned local subgraph around t t t , and touches only edges examined with low probability by A A A , such that a large forward probability mass π ( s , W ) = ∑ w ∈ W π ( s , w ) \pi(s,W)=\sum_{w\in W}\pi(s,w) π ( s , W ) = ∑ w ∈ W π ( s , w ) is concentrated in some set W W W , which is examined with low probability, and satisfies that all low-degree vertices have many non-edges to W W W . This is formalized in Lemma 7.4 and can be thought of as the lower-bound counter-part to the forward pushing and Monte Carlo phase in our TriPPR algorithm. Finally, we obtain ( 1 − c ) π G ′ ( s , t ) > ( 1 + c ) π ( s , t ) (1-c)\pi_{G'}(s,t)>(1+c)\pi(s,t) ( 1 − c ) π G ′ ( s , t ) > ( 1 + c ) π ( s , t ) , by funneling the forward probability source in W W W into the backward probability sink in y y y , through modified edges, that are unlikely to be examined. This is formalized in the proof of Theorem 7.1 , and can be thought of as the lower-bound counter-part to the Monte Carlo sampling in our TriPPR algorithm.
Fix a graph G G G , r ∈ ( 0 , 1 ] r\in(0,1] r ∈ ( 0 , 1 ] , and ε ∈ ( 0 , 1 ) \varepsilon\in(0,1) ε ∈ ( 0 , 1 ) . Let A A A be any algorithm satisfying Theorem 7.1 , and let T T T denote its expected running time on G G G . Assume
T ≤ c 0 ε min { min { T f ( r ) , T b ( r ) } h + 1 , n log n } . (39) T\leq c_0\varepsilon\min\left\{\frac{\min\{T_f(r),T_b(r)\}}{h+1},\frac{n}{\log n}\right\}. \tag*{(39)} T ≤ c 0 ε min { h + 1 min { T f ( r ) , T b ( r )} , log n n } . (39)
where
c 0 = ( 1 − c ) 2 α 4 ( 1 − α ) 3 320000 ( 1 + c ) 2 . c_0=\frac{(1-c)^2\alpha^4(1-\alpha)^3}{320000(1+c)^2}. c 0 = 320000 ( 1 + c ) 2 ( 1 − c ) 2 α 4 ( 1 − α ) 3 .
In particular, we assume (as T T T is trivially greater than 1)
T f ( r ) , T b ( r ) ≥ ( h + 1 ) T c 0 ε ≥ h + 1 c 0 . (40) T_f(r), T_b(r) \ge\frac{(h+1)T}{c_0\varepsilon} \ge\frac{h+1}{c_0}. \tag*{(40)} T f ( r ) , T b ( r ) ≥ c 0 ε ( h + 1 ) T ≥ c 0 h + 1 . (40)
We now formalize the two ingredients described above in the following lemmas. We use the same definitions as in Section 5. Figure 5 illustrates how the two lemmas combine in the proof of Theorem 7.1 .
Figure 5. Sketch of Theorem 7.1. We find a set S S S containing t t t and a vertex y y y with large backward probability mass to t t t , chosen so that this mass remains large as long as the internal structure of S S S is preserved. We then find a set W W W that is unlikely to be examined by the algorithm, together with W ′ ⊆ W W' \subseteq W W ′ ⊆ W carrying substantial forward probability mass from s s s . Finally, we funnel the probability mass from W ′ W' W ′ to y y y by replacing edges from B B B to y y y with edges from W ′ W' W ′ to y y y , while adding replacement edges from B B B to W W W to preserve the out-degrees of vertices in B B B . These modifications are unlikely to be detected by the algorithm, but increase π ( s , t ) \pi(s,t) π ( s , t ) enough to contradict its correctness.
Lemma 7.3 (Hidden Backward Probability Mass). There exist S ⊆ V S \subseteq V S ⊆ V , y ∈ S y \in S y ∈ S , and B ⊆ N i n ( y ) ∖ H o u t B \subseteq\mathcal{N}_{\mathrm{in}}(y) \setminus H_{\mathrm{out}} B ⊆ N in ( y ) ∖ H out satisfying each of the following.
∣ S ∪ B ∣ ≤ ε n 5 |S \cup B| \le\frac{\varepsilon n}{5} ∣ S ∪ B ∣ ≤ 5 ε n .
Either B = ∅ B = \varnothing B = ∅ and Q ( y ) ≤ 1 10 Q(y) \le\frac{1}{10} Q ( y ) ≤ 10 1 , or ∣ B ∣ = h + 1 |B| = h+1 ∣ B ∣ = h + 1 and P ( B × { y } ) ≤ 1 10 P(B \times\{y\}) \le\frac{1}{10} P ( B × { y }) ≤ 10 1 .
π G ′ ( y , t ) ≥ α 2 r \pi_{G'}(y,t) \ge\alpha^2 r π G ′ ( y , t ) ≥ α 2 r where G ′ G' G ′ is any modified graph preserving the out-degrees of vertices in S S S and leaving all edges within S S S , except possibly those in B × { y } B \times\{y\} B × { y } .
We say that a deterministic algorithm A A A distinguishes two graphs G G G and G ′ G' G ′ if its query transcript on G G G differs from its query transcript on G ′ G' G ′ , where the query transcript is the ordered sequence of queries made by A A A together with the corresponding answers. Thus, differing outputs alone do not constitute distinguishing the two graphs. For a randomized algorithm, we say that A A A distinguishes G G G and G ′ G' G ′ for a given random seed if the corresponding deterministic executions distinguish them, and the probability of distinguishing is taken over the internal randomness of A A A .
Lemma 7.4 (Hidden Forward Probability Mass). Let S S S and B B B be as in Lemma 7.3 . There exists a modified graph G ′ G' G ′ of G G G preserving the vertex set, the out-degrees of vertices in S S S , and keeping all internal edges of S S S , possibly apart from edges in B × { y } B \times\{y\} B × { y } , such that A A A distinguishes G ′ G' G ′ from G G G with probability at most 1 10 \frac{1}{10} 10 1 , and such that there exists W ⊆ V ∖ ( S ∪ B ) W \subseteq V \setminus(S \cup B) W ⊆ V ∖ ( S ∪ B ) and W ′ ⊆ W W' \subseteq W W ′ ⊆ W satisfying each of the following.
H G ′ ( s , S ‾ , W ′ ) > 1 + c 1 − c h + 1 r ( 1 − α ) α 2 π G ( s , t ) H_{G'}(s,\overline{S},W') > \frac{1+c}{1-c}\frac{h+1}{r(1-\alpha)\alpha^2}\pi_G(s,t) H G ′ ( s , S , W ′ ) > 1 − c 1 + c r ( 1 − α ) α 2 h + 1 π G ( s , t ) .
Q ( W ) ≤ 1 10 Q(W) \le\frac{1}{10} Q ( W ) ≤ 10 1 in G G G .
In G ′ G' G ′ , all w ′ ∈ W ′ w' \in W' w ′ ∈ W ′ have d o u t ( w ′ ) ≤ h d_{\mathrm{out}}(w') \le h d out ( w ′ ) ≤ h .
For every b ∈ B b \in B b ∈ B there exists a w ∈ W w \in W w ∈ W with ( b , w ) ∉ E ( G ′ ) (b,w) \notin E(G') ( b , w ) ∈ / E ( G ′ ) .
1 ≤ ∣ W ′ ∣ ≤ h + 1 1 \le|W'| \le h+1 1 ≤ ∣ W ′ ∣ ≤ h + 1 .
Proof of Theorem 7.1
We now wish to obtain ( 1 − c ) π G ′ ( s , t ) > ( 1 + c ) π G ( s , t ) (1-c)\pi_{G'}(s,t) > (1+c)\pi_G(s,t) ( 1 − c ) π G ′ ( s , t ) > ( 1 + c ) π G ( s , t ) , by funneling the forward probability source in W ′ W' W ′ , obtained in Lemma Lemma 7.4 , into the backward probability sink in y y y , obtained in Lemma Lemma 7.3 , through modified edges, that are unlikely to be examined.
Proof of Theorem 7.1. We will show that our assumption (39) leads to a contradiction using our lemmas. Choose S S S , y y y and B B B as in Lemma Lemma 7.3 and choose matching G ′ G' G ′ , W W W , and W ′ W' W ′ as in Lemma Lemma 7.4 . We will construct a further modified graph G ′ ′ G'' G ′′ of G ′ G' G ′ , which A A A distinguishes from G G G with probability less than 1 3 \frac{1}{3} 3 1 , where the forward probability mass in W ′ W' W ′ is routed into y y y , ensuring ( 1 − c ) π G ′ ′ ( s , t ) > ( 1 + c ) π G ( s , t ) (1-c)\pi_{G''}(s,t) > (1+c)\pi_G(s,t) ( 1 − c ) π G ′′ ( s , t ) > ( 1 + c ) π G ( s , t ) . This will contradict A A A having success probability at least 2 / 3 2/3 2/3 , thereby showing that the assumed (39) is false, completing the proof.
Our construction G ′ ′ G'' G ′′ will preserve the out-degrees of vertices in S S S and leave all edges within S S S , except possibly those in B × { y } B \times\{y\} B × { y } , so π G ′ ′ ( y , t ) ≥ α 2 r \pi_{G''}(y,t) \ge\alpha^2r π G ′′ ( y , t ) ≥ α 2 r . Moreover, our construction will not decrease the hitting probability of W ′ W' W ′ of walks avoiding S S S , so H G ′ ′ ( s , S ‾ , W ′ ) ≥ H G ′ ( s , S ‾ , W ′ ) > 1 + c 1 − c π G ( s , t ) r ( 1 − α ) α 2 H_{G''}(s,\overline{S},W') \ge H_{G'}(s,\overline{S},W') > \frac{1+c}{1-c}\frac{\pi_G(s,t)}{r(1-\alpha)\alpha^2} H G ′′ ( s , S , W ′ ) ≥ H G ′ ( s , S , W ′ ) > 1 − c 1 + c r ( 1 − α ) α 2 π G ( s , t ) . Finally, our construction will contain every possible edge from W ′ W' W ′ to { y } \{y\} { y } , while increasing the out-degree of each vertex in W ′ W' W ′ by at most one, that is, increasing them to at most h + 1 h+1 h + 1 . We will thus have ( 1 − c ) π G ′ ′ ( s , t ) ≥ ( 1 − c ) H G ′ ′ ( s , S ‾ , W ′ ) 1 h + 1 π G ′ ′ ( y , t ) > ( 1 + c ) π G ( s , t ) (1-c)\pi_{G''}(s,t) \ge(1-c)H_{G''}(s,\overline{S},W')\frac{1}{h+1}\pi_{G''}(y,t) > (1+c)\pi_G(s,t) ( 1 − c ) π G ′′ ( s , t ) ≥ ( 1 − c ) H G ′′ ( s , S , W ′ ) h + 1 1 π G ′′ ( y , t ) > ( 1 + c ) π G ( s , t ) , as wished.
Consider first the case where B = ∅ B = \emptyset B = ∅ and Q ( y ) ≤ 1 10 Q(y) \le\frac{1}{10} Q ( y ) ≤ 10 1 . We construct G ′ ′ G'' G ′′ by inserting all missing edges W ′ × { y } W' \times\{y\} W ′ × { y } into G ′ G' G ′ . This graph G ′ ′ G'' G ′′ is not distinguished from G ′ G' G ′ unless a vertex in W ′ ∪ { y } W' \cup\{y\} W ′ ∪ { y } is queried in G ′ G' G ′ . In particular, not unless G G G is distinguished from G ′ G' G ′ or a vertex in W ′ ∪ { y } W' \cup\{y\} W ′ ∪ { y } is queried in G G G . Recall from Lemma Lemma 7.4 that G G G is distinguished from G ′ G' G ′ with probability at most 1 10 \frac{1}{10} 10 1 and Q ( W ′ ) ≤ Q ( W ) ≤ 1 10 Q(W') \le Q(W) \le\frac{1}{10} Q ( W ′ ) ≤ Q ( W ) ≤ 10 1 . Recall from Lemma Lemma 7.3 that Q ( y ) ≤ 1 10 Q(y) \le\frac{1}{10} Q ( y ) ≤ 10 1 . The probability that G G G is distinguished from G ′ ′ G'' G ′′ is thus at most 3 10 < 1 3 \frac{3}{10} < \frac{1}{3} 10 3 < 3 1 , as wished. Moreover, the construction satisfied the above promised properties giving ( 1 − c ) π G ′ ′ ( s , t ) > ( 1 + c ) π G ( s , t ) (1-c)\pi_{G''}(s,t) > (1+c)\pi_G(s,t) ( 1 − c ) π G ′′ ( s , t ) > ( 1 + c ) π G ( s , t ) , finishing the case.
Next, consider the remaining case where ∣ B ∣ = h + 1 |B| = h+1 ∣ B ∣ = h + 1 and P ( B × { y } ) ≤ 1 10 P(B \times\{y\}) \le\frac{1}{10} P ( B × { y }) ≤ 10 1 . Choose injective maps f : W ′ → B f: W' \to B f : W ′ → B and g : B → W g: B \to W g : B → W such that ( b , g ( b ) ) ∉ E ( G ′ ) (b,g(b)) \notin E(G') ( b , g ( b )) ∈ / E ( G ′ ) for all b ∈ B b \in B b ∈ B . To construct G ′ ′ G'' G ′′ , consider each w ′ ∈ W ′ w' \in W' w ′ ∈ W ′ for which ( w ′ , y ) (w',y) ( w ′ , y ) is not an edge in G ′ G' G ′ . Insert ( w ′ , y ) (w',y) ( w ′ , y ) and ( f ( w ′ ) , g ( f ( w ′ ) ) ) (f(w'),g(f(w'))) ( f ( w ′ ) , g ( f ( w ′ ))) as edges in G ′ ′ G'' G ′′ and remove ( f ( w ′ ) , y ) (f(w'),y) ( f ( w ′ ) , y ) . Note that this modification is well-defined, and the degrees of vertices in V ∖ W V \setminus W V ∖ W are preserved. More specifically, the edge ( w ′ , y ) (w',y) ( w ′ , y ) is inserted in the inward adjacency list of y y y in place of ( f ( w ′ ) , y ) (f(w'),y) ( f ( w ′ ) , y ) , and ( f ( w ′ ) , g ( f ( w ′ ) ) ) (f(w'),g(f(w'))) ( f ( w ′ ) , g ( f ( w ′ ))) is inserted in the outward adjacency list of f ( w ′ ) f(w') f ( w ′ ) in place of ( f ( w ′ ) , y ) (f(w'),y) ( f ( w ′ ) , y ) . This graph G ′ ′ G'' G ′′ is not distinguished from G ′ G' G ′ unless a vertex in W W W or an edge in B × { y } B \times\{y\} B × { y } is queried in G ′ G' G ′ . In particular, not unless G G G is distinguished from G ′ G' G ′ or a vertex in W W W or an edge in B × { y } B \times\{y\} B × { y } is queried in G G G . Again, the lemmas tell us that this happens with probability at most 1 10 + 1 10 + 1 10 < 1 3 \frac{1}{10}+\frac{1}{10}+\frac{1}{10}<\frac{1}{3} 10 1 + 10 1 + 10 1 < 3 1 , as wished. Moreover, the construction satisfied the above promised properties giving ( 1 − c ) π G ′ ′ ( s , t ) > ( 1 + c ) π G ( s , t ) (1-c)\pi_{G''}(s,t) > (1+c)\pi_G(s,t) ( 1 − c ) π G ′′ ( s , t ) > ( 1 + c ) π G ( s , t ) , since replacing an edge ( f ( w ′ ) , y ) (f(w'),y) ( f ( w ′ ) , y ) by ( f ( w ′ ) , g ( f ( w ′ ) ) ) (f(w'),g(f(w'))) ( f ( w ′ ) , g ( f ( w ′ ))) cannot decrease h ( s , S ‾ , W ′ ) h(s,\overline{S},W') h ( s , S , W ′ ) since y ∈ S y \in S y ∈ S . This completes the case.
Proof of lem:hidden-target-mass
Proof of Lemma 7.3. Let V r = { v ∈ V ∣ π ( v , t ) ≥ r } V_r=\{v\in V\mid\pi(v,t)\ge r\} V r = { v ∈ V ∣ π ( v , t ) ≥ r } . Let S ⊆ V r S\subseteq V_r S ⊆ V r be the min { ∣ V r ∣ , 10 T } \min\{|V_r|,10T\} min { ∣ V r ∣ , 10 T } vertices v ∈ V r v\in V_r v ∈ V r with largest π ( v , t ) \pi(v,t) π ( v , t ) . Note that ∣ S ∣ ≤ 10 T ≤ ε n 10 |S|\le10T\le\frac{\varepsilon n}{10} ∣ S ∣ ≤ 10 T ≤ 10 ε n .
Suppose first that S ⊊ V r S\subsetneq V_r S ⊊ V r . Then ∣ S ∣ = 10 T |S|=10T ∣ S ∣ = 10 T . Since Q ( S ) ≤ T Q(S)\le T Q ( S ) ≤ T , there must exist a y ∈ S y\in S y ∈ S with Q ( y ) ≤ T / ∣ S ∣ = 1 / 10 Q(y)\le T/|S|=1/10 Q ( y ) ≤ T /∣ S ∣ = 1/10 . In this case, choose B = ∅ B=\varnothing B = ∅ .
Otherwise, S = V r S=V_r S = V r . Then ∣ S ∣ ≤ 10 T ≤ ε T b ( r ) 10 ( h + 1 ) |S|\le10T\le\frac{\varepsilon T_b(r)}{10(h+1)} ∣ S ∣ ≤ 10 T ≤ 10 ( h + 1 ) ε T b ( r ) , and the number of in-edges of S S S is
T b ( r ) − ∣ V r ∣ ≥ T b ( r ) − ε T b ( r ) ( h + 1 ) 4 ≥ 3 T b ( r ) 4 . T_b(r)-|V_r|\ge T_b(r)-\frac{\varepsilon T_b(r)}{(h+1)4}\ge\frac{3T_b(r)}{4}. T b ( r ) − ∣ V r ∣ ≥ T b ( r ) − ( h + 1 ) 4 ε T b ( r ) ≥ 4 3 T b ( r ) .
Consider the subgraph constructed by removing all edges ( u , v ) (u,v) ( u , v ) with u ∈ H o u t u\in H_{\mathrm{out}} u ∈ H out , then removing all edges ( u , v ) (u,v) ( u , v ) with d i n ( v ) ≤ h d_{\mathrm{in}}(v)\le h d in ( v ) ≤ h , and finally removing all vertices with in-degree zero. This removes at most 2 ∣ S ∣ h < ε T b ( r ) 4 2|S|h<\frac{\varepsilon T_b(r)}{4} 2∣ S ∣ h < 4 ε T b ( r ) edges, leaving us with at least T b ( r ) / 2 T_b(r)/2 T b ( r ) /2 edges. In this subgraph, there must exist a vertex y y y with
P ( N i n ( y ) × { y } ) d i n ( y ) ≤ 2 T T b ( r ) . \frac{P(N_{\mathrm{in}}(y)\times\{y\})}{d_{\mathrm{in}}(y)}\le\frac{2T}{T_b(r)}. d in ( y ) P ( N in ( y ) × { y }) ≤ T b ( r ) 2 T .
Take such a y y y and choose B ⊆ N i n ( y ) B\subseteq N_{\mathrm{in}}(y) B ⊆ N in ( y ) to be the h + 1 h+1 h + 1 vertices v ∈ N i n ( y ) v\in N_{\mathrm{in}}(y) v ∈ N in ( y ) with smallest P ( v , y ) P(v,y) P ( v , y ) , implying that P ( B × { y } ) ≤ ( h + 1 ) 2 T T b ( r ) ≤ 1 50 P(B\times\{y\})\le\frac{(h+1)2T}{T_b(r)}\le\frac{1}{50} P ( B × { y }) ≤ T b ( r ) ( h + 1 ) 2 T ≤ 50 1 . Furthermore, in this case
T b ( r ) ≤ n ∣ S ∣ ≤ 10 n T ≤ n ε T b ( r ) 10 ( h + 1 ) , T_b(r)\le n|S|\le10nT\le\frac{n\varepsilon T_b(r)}{10(h+1)}, T b ( r ) ≤ n ∣ S ∣ ≤ 10 n T ≤ 10 ( h + 1 ) n ε T b ( r ) ,
so ∣ B ∣ = h + 1 ≤ ε n 10 |B|=h+1\le\frac{\varepsilon n}{10} ∣ B ∣ = h + 1 ≤ 10 ε n , and ∣ S ∪ B ∣ ≤ ε n 5 |S\cup B|\le\frac{\varepsilon n}{5} ∣ S ∪ B ∣ ≤ 5 ε n .
Let p S p_S p S be the probability that a discounted random walk starting in y y y terminates in t t t , without ever walking outside S S S . The probability of moving outside S S S is at most 1 − α 1-\alpha 1 − α , since it requires at least one step. Furthermore, the probability of terminating at t t t when starting outside S S S is at most max u ∈ V ∖ S π ( u , t ) ≤ π ( y , t ) \max_{u\in V\setminus S}\pi(u,t)\le\pi(y,t) max u ∈ V ∖ S π ( u , t ) ≤ π ( y , t ) , using the definition of S S S . Hence, the probability of moving outside S S S and later terminating at t t t is at most ( 1 − α ) π ( y , t ) (1-\alpha)\pi(y,t) ( 1 − α ) π ( y , t ) . Thus p S ≥ π ( y , t ) − ( 1 − α ) π ( y , t ) = α π ( y , t ) ≥ α r p_S\ge\pi(y,t)-(1-\alpha)\pi(y,t)=\alpha\pi(y,t)\ge\alpha r p S ≥ π ( y , t ) − ( 1 − α ) π ( y , t ) = α π ( y , t ) ≥ α r .
The probability that a random walk starting at y y y traverses an edge in B × { y } B\times\{y\} B × { y } is also at most 1 − α 1-\alpha 1 − α , since it requires at least one step. After traversing such an edge, the walk continues from y y y , so from that point on, it terminates at t t t without leaving S S S with probability p S p_S p S . Thus, the probability that a random walk starting in y y y terminates in t t t without leaving S S S or traversing an edge in B × { y } B\times\{y\} B × { y } is at least p S − ( 1 − α ) p S = α 2 r p_S-(1-\alpha)p_S=\alpha^2r p S − ( 1 − α ) p S = α 2 r . Finally, note that α 2 r \alpha^2r α 2 r is a lower bound on π G ′ ( y , t ) \pi_{G'}(y,t) π G ′ ( y , t ) for any modified graph G ′ G' G ′ preserving the out-degrees of vertices in S S S and leaving all edges within S S S , except possibly those in B × { y } B\times\{y\} B × { y } .
Proof of lem:hidden-source-mass
We start by sketching the proof. First, we find a suitable vertex set W ⊆ V ∖ ( S ∪ B ) W\subseteq V\setminus(S\cup B) W ⊆ V ∖ ( S ∪ B ) that is unlikely to be examined by A A A . We then analyze the forward probability mass from s s s and show: either sufficiently much of this mass already reaches W W W , or we identify a set of edges F F F , that A A A is unlikely to examine, carrying sufficiently large forward mass that can be redirected into W W W . In either case, we construct a modified graph in which W W W receives the required amount of forward probability mass while remaining unlikely to be examined. Finally, we concentrate this mass on a subset W ′ ⊆ W W'\subseteq W W ′ ⊆ W of at most ( h + 1 ) (h+1) ( h + 1 ) low-out-degree vertices, yielding the properties claimed in Lemma 7.4.
We start by finding the suitable vertex set W W W .
Lemma 7.5. Sample a subset W ⊆ V W\subseteq V W ⊆ V of vertices by sampling each vertex in V ′ = V ∖ ( S ∪ B ) V'=V\setminus(S\cup B) V ′ = V ∖ ( S ∪ B ) independently with probability 1 / ( 100 T ) 1/(100T) 1/ ( 100 T ) . With probability at least 3 / 5 3/5 3/5 , each of the following properties hold in G G G .
(Unlikely visited ) Q ( W ) ≤ 1 16 Q(W) \le\frac{1}{16} Q ( W ) ≤ 16 1 ,
(Large ) n 200 T ≤ ∣ W ∣ ≤ n 50 T \frac{n}{200T} \le|W| \le\frac{n}{50T} 200 T n ≤ ∣ W ∣ ≤ 50 T n and ε ∣ W ∣ ≥ 16 \varepsilon|W| \ge16 ε ∣ W ∣ ≥ 16 ,
(Many non-neighbors ) ∀ v ∉ H o u t : ∣ W ∖ N o u t ( v ) ∣ ≥ ε ∣ W ∣ / 4 \forall v \notin H_{\mathrm{out}} : |W \setminus N_{\mathrm{out}}(v)| \ge\varepsilon|W|/4 ∀ v ∈ / H out : ∣ W ∖ N out ( v ) ∣ ≥ ε ∣ W ∣/4 and ∀ v ∉ H i n : ∣ W ∖ N i n ( v ) ∣ ≥ ε ∣ W ∣ / 4 \forall v \notin H_{\mathrm{in}} : |W \setminus N_{\mathrm{in}}(v)| \ge\varepsilon|W|/4 ∀ v ∈ / H in : ∣ W ∖ N in ( v ) ∣ ≥ ε ∣ W ∣/4 ,
Proof. All properties hold in expectation, (with ε ∣ W ∣ ≥ 16 \varepsilon|W| \ge16 ε ∣ W ∣ ≥ 16 following from (39) ) so the remaining part of the proof is to establish concentration using Markov’s inequality and Chernoff bounds.
We will prove that these properties hold simultaneously by a union bound. By the first property of Lemma 7.3 , ∣ V ′ ∣ ≥ n − ε n / 5 ≥ 3 n / 4 |V'| \ge n - \varepsilon n/5 \ge3n/4 ∣ V ′ ∣ ≥ n − ε n /5 ≥ 3 n /4 .
Unlikelt visited. Recall Q ( V ) ≤ 2 T Q(V) \le2T Q ( V ) ≤ 2 T , and thus E [ Q ( W ) ] ≤ 1 50 \mathbb{E}[Q(W)] \le\frac{1}{50} E [ Q ( W )] ≤ 50 1 . By Markov’s inequality, Q ( W ) > 1 16 Q(W) > \frac{1}{16} Q ( W ) > 16 1 with probability at most 8 / 25 8/25 8/25 .
Large. Since ∣ S ∪ B ∣ ≤ ε n / 4 |S \cup B| \le\varepsilon n/4 ∣ S ∪ B ∣ ≤ ε n /4 , we have E [ ∣ W ∣ ] ≥ ( 1 − ε 4 ) n 100 T ≥ 3 n 400 T \mathbb{E}[|W|] \ge\left(1-\frac{\varepsilon}{4}\right)\frac{n}{100T} \ge\frac{3n}{400T} E [ ∣ W ∣ ] ≥ ( 1 − 4 ε ) 100 T n ≥ 400 T 3 n . Chernoff bounds give ∣ W ∣ < n / ( 200 T ) |W| < n/(200T) ∣ W ∣ < n / ( 200 T ) or ∣ W ∣ > n / ( 50 T ) |W| > n/(50T) ∣ W ∣ > n / ( 50 T ) with probability at most 1 / 25 1/25 1/25 . On the complement of this event, ε ∣ W ∣ ≥ ε n / ( 200 T ) ≥ log n / ( 200 c 0 ) ≥ 16 \varepsilon|W| \ge\varepsilon n/(200T) \ge\log n/(200c_0) \ge16 ε ∣ W ∣ ≥ ε n / ( 200 T ) ≥ log n / ( 200 c 0 ) ≥ 16 , assuming n n n is sufficiently large.
Many non-neighbors. Fix v ∉ H o u t v \notin H_{\mathrm{out}} v ∈ / H out . By definition of H o u t H_{\mathrm{out}} H out , v v v has at least ε n \varepsilon n ε n non-out-neighbors, of which at least ε n − ∣ S ∪ B ∣ ≥ 4 ε n / 5 \varepsilon n - |S \cup B| \ge4\varepsilon n/5 ε n − ∣ S ∪ B ∣ ≥ 4 ε n /5 lie in V ′ V' V ′ . We have E [ ∣ W ∖ N o u t ( v ) ∣ ] ≥ ε n 125 T \mathbb{E}[|W \setminus N_{\mathrm{out}}(v)|] \ge\frac{\varepsilon n}{125T} E [ ∣ W ∖ N out ( v ) ∣ ] ≥ 125 T ε n . By Chernoff’s bound and a union bound, the probability that there exists a vertex v ∉ H o u t v \notin H_{\mathrm{out}} v ∈ / H out with ∣ W ∖ N o u t ( v ) ∣ < ε n / ( 200 T ) |W \setminus N_{\mathrm{out}}(v)| < \varepsilon n/(200T) ∣ W ∖ N out ( v ) ∣ < ε n / ( 200 T ) is at most 1 / 50 1/50 1/50 . If ∣ W ∣ ≤ n / ( 50 T ) |W| \le n/(50T) ∣ W ∣ ≤ n / ( 50 T ) , then ε n / ( 200 T ) ≥ ε ∣ W ∣ / 4 \varepsilon n/(200T) \ge\varepsilon|W|/4 ε n / ( 200 T ) ≥ ε ∣ W ∣/4 . By symmetry, we can show the same for vertices in H i n H_{\mathrm{in}} H in
All properties hold simultaneously with probability at least 1 − 8 / 25 − 1 / 25 − 1 / 50 − 1 / 50 = 3 / 5 1 - 8/25 - 1/25 - 1/50 - 1/50 = 3/5 1 − 8/25 − 1/25 − 1/50 − 1/50 = 3/5 .
For a vertex v ∈ V v \in V v ∈ V , let E ( v ) = { ( a , b ) ∈ E ∣ v = a ∨ v = b } E(v) = \{(a,b) \in E \mid v = a \lor v = b\} E ( v ) = {( a , b ) ∈ E ∣ v = a ∨ v = b } be the edges incident to v v v . For a vertex set A ⊆ V A \subseteq V A ⊆ V , let E ( A ) = ⋃ v ∈ A E ( v ) E(A) = \bigcup_{v \in A} E(v) E ( A ) = ⋃ v ∈ A E ( v ) . For an edge, we define the z z z -mass of an edge ( u , v ) (u,v) ( u , v ) to be z ( u , v ) = min { 1 , π ( s , u ) r / ( π ( s , t ) d o u t ( u ) ) } z(u,v) = \min\{1, \pi(s,u)r/(\pi(s,t)d_{\mathrm{out}}(u))\} z ( u , v ) = min { 1 , π ( s , u ) r / ( π ( s , t ) d out ( u ))} . One can vaguely think of this as the amount of times the edge should be sampled in expectation by the forward push or Monte Carlo section of TriPPR. For an edge set R ⊆ E R \subseteq E R ⊆ E , let z ( R ) = ∑ e ∈ R z ( e ) z(R) = \sum_{e \in R} z(e) z ( R ) = ∑ e ∈ R z ( e ) . Let z ( v ) = z ( E ( v ) ) z(v) = z(E(v)) z ( v ) = z ( E ( v )) and z ( A ) = z ( E ( A ) ) z(A) = z(E(A)) z ( A ) = z ( E ( A )) . Note z ( V ) = z ( E ) = T f ( r ) z(V) = z(E) = T_f(r) z ( V ) = z ( E ) = T f ( r ) .
Fact 7.6. H ( s , S ) ≤ π ( s , t ) r H(s,S) \le\frac{\pi(s,t)}{r} H ( s , S ) ≤ r π ( s , t ) .
Proof. Since every u ∈ s u \in s u ∈ s satisfies π ( u , t ) ≥ r \pi(u,t) \ge r π ( u , t ) ≥ r , it follows that π ( s , t ) ≥ H ( s , S ) r \pi(s,t) \ge H(s,S)r π ( s , t ) ≥ H ( s , S ) r .
Lemma 7.7. For any set A ⊆ V A \subseteq V A ⊆ V , ( 1 − α ) π ( s , t ) 2 r z ( A ) ≤ π ( s , A ) ≤ H ( s , A ) \frac{(1-\alpha)\pi(s,t)}{2r}z(A) \le\pi(s,A) \le H(s,A) 2 r ( 1 − α ) π ( s , t ) z ( A ) ≤ π ( s , A ) ≤ H ( s , A ) .
Proof. From the basic identity
π ( s , v ) = α 1 { v = s } + ( 1 − α ) ∑ u ∈ N i n ( v ) π ( s , u ) d o u t ( u ) \pi(s,v) = \alpha1_{\{v=s\}} + (1-\alpha)\sum_{u \in N_{\mathrm{in}}(v)} \frac{\pi(s,u)}{d_{\mathrm{out}}(u)} π ( s , v ) = α 1 { v = s } + ( 1 − α ) u ∈ N in ( v ) ∑ d out ( u ) π ( s , u )
we get
∑ u ∈ N i n ( v ) π ( s , u ) d o u t ( u ) ≤ π ( s , v ) 1 − α . \sum_{u \in N_{\mathrm{in}}(v)} \frac{\pi(s,u)}{d_{\mathrm{out}}(u)} \le\frac{\pi(s,v)}{1-\alpha}. u ∈ N in ( v ) ∑ d out ( u ) π ( s , u ) ≤ 1 − α π ( s , v ) .
We then have
z ( A ) ≤ ∑ v ∈ A ( ∑ u ∈ N o u t ( v ) z ( v , u ) + ∑ u ∈ N i n ( v ) z ( u , v ) ) ≤ r π ( s , t ) ( ∑ v ∈ A π ( s , v ) + ∑ v ∈ A ∑ u ∈ N i n ( v ) π ( s , u ) d o u t ( u ) ) ≤ r π ( s , t ) ( 1 + 1 1 − α ) π ( s , A ) ≤ 2 r π ( s , A ) ( 1 − α ) π ( s , t ) . \begin{aligned}
z(A) &\le\sum_{v\in A}\left(\sum_{u\in\mathcal{N}_{\mathrm{out}}(v)} z(v,u)+\sum_{u\in\mathcal{N}_{\mathrm{in}}(v)} z(u,v)\right)\\
&\le\frac{r}{\pi(s,t)}\left(\sum_{v\in A}\pi(s,v)+\sum_{v\in A}\sum_{u\in\mathcal{N}_{\mathrm{in}}(v)}\frac{\pi(s,u)}{d_{\mathrm{out}}(u)}\right)\\
&\le\frac{r}{\pi(s,t)}\left(1+\frac{1}{1-\alpha}\right)\pi(s,A)\\
&\le\frac{2r\pi(s,A)}{(1-\alpha)\pi(s,t)}.
\end{aligned} z ( A ) ≤ v ∈ A ∑ u ∈ N out ( v ) ∑ z ( v , u ) + u ∈ N in ( v ) ∑ z ( u , v ) ≤ π ( s , t ) r v ∈ A ∑ π ( s , v ) + v ∈ A ∑ u ∈ N in ( v ) ∑ d out ( u ) π ( s , u ) ≤ π ( s , t ) r ( 1 + 1 − α 1 ) π ( s , A ) ≤ ( 1 − α ) π ( s , t ) 2 r π ( s , A ) .
Let E H = { ( u , v ) ∈ E : u ∈ H o u t ∨ v ∈ H i n } E_H=\{(u,v)\in E:u\in H_{\mathrm{out}}\lor v\in H_{\mathrm{in}}\} E H = {( u , v ) ∈ E : u ∈ H out ∨ v ∈ H in } be the set of edges coming from high-out-degree vertices or going to high-in-degree vertices.
Lemma 7.8. If z ( E H ) ≥ T f ( r ) / 4 z(E_H)\ge T_f(r)/4 z ( E H ) ≥ T f ( r ) /4 , there exists a subset W ⊆ V ∖ ( S ∪ B ) W\subseteq V\setminus(S\cup B) W ⊆ V ∖ ( S ∪ B ) satisfying the properties of Lemma 7.5 and
H G ( s , W ) > ( 1 + 32 ( 1 + c ) ( h + 1 ) ε ( 1 − c ) ( 1 − α ) 2 α 2 ) π G ( s , t ) r H_G(s,W)>\left(1+\frac{32(1+c)(h+1)}{\varepsilon(1-c)(1-\alpha)^2\alpha^2}\right)\frac{\pi_G(s,t)}{r} H G ( s , W ) > ( 1 + ε ( 1 − c ) ( 1 − α ) 2 α 2 32 ( 1 + c ) ( h + 1 ) ) r π G ( s , t )
Proof. We show that the W W W sampled in Lemma 7.5 satisfies these properties with positive probability. Let us first present a short sketch. To show the large hitting-probability, it suffices by Lemma 7.7 to show that z ( W ) z(W) z ( W ) is large. This is true in expectation, because z ( V ) z(V) z ( V ) is large, and W W W contains a Θ ( 1 / T ) \Theta(1/T) Θ ( 1/ T ) -fraction of the mass of V V V in expectation. To get small variance, we have to be more careful. For a vertex set A ⊆ V A\subseteq V A ⊆ V , we define z H ( A ) = Z ( E ( A ) ∩ E ( H i n ∪ H o u t ) ) z_H(A)=Z(E(A)\cap E(H_{\mathrm{in}}\cup H_{\mathrm{out}})) z H ( A ) = Z ( E ( A ) ∩ E ( H in ∪ H out )) . Focusing on z H z_H z H will allow us to bound the variance by a quantity involving a factor h + 1 h+1 h + 1 which otherwise have been n n n .
Note that z H ( A ) ≤ z ( H i n ∪ H o u t ) z_H(A)\le z(H_{\mathrm{in}}\cup H_{\mathrm{out}}) z H ( A ) ≤ z ( H in ∪ H out ) and z H ( A ) ≤ z ( A ) z_H(A)\le z(A) z H ( A ) ≤ z ( A ) . Let V ′ = V ∖ ( S ∪ B ) V'=V\setminus(S\cup B) V ′ = V ∖ ( S ∪ B ) denote the support of the sampling process. Every edge incident to H i n ∪ H o u t H_{\mathrm{in}}\cup H_{\mathrm{out}} H in ∪ H out is also incident to V ′ V' V ′ , unless both its endpoints belong to S ∪ B S\cup B S ∪ B . Consequently,
z H ( V ′ ) = z ( H i n ∪ H o u t ) − z ( E ( H i n ∪ H o u t ) ∩ ( S ∪ B ) 2 ) ≥ z ( H i n ∪ H o u t ) − z ( E ∩ ( S ∪ B ) 2 ) . \begin{aligned}
z_H(V')&=z(H_{\mathrm{in}}\cup H_{\mathrm{out}})-z(E(H_{\mathrm{in}}\cup H_{\mathrm{out}})\cap(S\cup B)^2)\\
&\ge z(H_{\mathrm{in}}\cup H_{\mathrm{out}})-z(E\cap(S\cup B)^2).
\end{aligned} z H ( V ′ ) = z ( H in ∪ H out ) − z ( E ( H in ∪ H out ) ∩ ( S ∪ B ) 2 ) ≥ z ( H in ∪ H out ) − z ( E ∩ ( S ∪ B ) 2 ) .
We continue to bound z ( E ∩ ( S ∪ B ) 2 ) z(E\cap(S\cup B)^2) z ( E ∩ ( S ∪ B ) 2 ) . Note that E ( S ) ∪ ( E ∩ B 2 ) ⊇ E ∩ ( S ∪ B ) 2 E(S)\cup(E\cap B^2)\supseteq E\cap(S\cup B)^2 E ( S ) ∪ ( E ∩ B 2 ) ⊇ E ∩ ( S ∪ B ) 2 . We have, by Lemma 7.7 and Fact 7.6,
z ( S ) ≤ 2 r H ( s , S ) ( 1 − α ) π ( s , t ) ≤ 2 1 − α . z(S)\le\frac{2rH(s,S)}{(1-\alpha)\pi(s,t)}\le\frac{2}{1-\alpha}. z ( S ) ≤ ( 1 − α ) π ( s , t ) 2 r H ( s , S ) ≤ 1 − α 2 .
Also note, since every out-edge of a vertex b b b has the same z z z -value,
z ( E ∩ B 2 ) ≤ ∣ B ∣ ∑ b ∈ B z ( b , y ) ≤ ∣ B ∣ r π ( s , t ) ∑ b ∈ B π ( s , b ) d o u t ( b ) ≤ ∣ B ∣ r π ( s , y ) ( 1 − α ) π ( s , t ) ≤ h + 1 1 − α . z(E\cap B^2)\le|B|\sum_{b\in B}z(b,y)\le\frac{|B|r}{\pi(s,t)}\sum_{b\in B}\frac{\pi(s,b)}{d_{\mathrm{out}}(b)}\le\frac{|B|r\pi(s,y)}{(1-\alpha)\pi(s,t)}\le\frac{h+1}{1-\alpha}. z ( E ∩ B 2 ) ≤ ∣ B ∣ b ∈ B ∑ z ( b , y ) ≤ π ( s , t ) ∣ B ∣ r b ∈ B ∑ d out ( b ) π ( s , b ) ≤ ( 1 − α ) π ( s , t ) ∣ B ∣ r π ( s , y ) ≤ 1 − α h + 1 .
Therefore z ( E ∩ ( S ∪ B ) 2 ) ≤ 1 1 − α ( 2 + h + 1 ) ≤ 3 ( h + 1 ) 1 − α ≤ T f ( r ) 8 z(E\cap(S\cup B)^2)\le\frac{1}{1-\alpha}(2+h+1)\le\frac{3(h+1)}{1-\alpha}\le\frac{T_f(r)}{8} z ( E ∩ ( S ∪ B ) 2 ) ≤ 1 − α 1 ( 2 + h + 1 ) ≤ 1 − α 3 ( h + 1 ) ≤ 8 T f ( r ) , where the last inequality uses (40) . At last, z H ( V ′ ) ≥ T f ( r ) / 8 z_H(V')\ge T_f(r)/8 z H ( V ′ ) ≥ T f ( r ) /8 , since z ( H i n ∪ H o u t ) ≥ z ( E H ) ≥ T f ( r ) / 4 z(H_{\mathrm{in}}\cup H_{\mathrm{out}})\ge z(E_H)\ge T_f(r)/4 z ( H in ∪ H out ) ≥ z ( E H ) ≥ T f ( r ) /4 using our assumption.
::: We will show that E [ z H ( W ) ] ≥ z H ( V ′ ) / T \mathbb{E}[z_H(W)] \ge z_H(V')/T E [ z H ( W )] ≥ z H ( V ′ ) / T . However, we also want to show that this holds with constant probability. Therefore, we will do a careful variance analysis.
Assign every edge ( u , v ) ∈ E ( V ′ ) ∩ E ( H i n ∪ H o u t ) (u,v) \in E(V') \cap E(H_{\mathrm{in}} \cup H_{\mathrm{out}}) ( u , v ) ∈ E ( V ′ ) ∩ E ( H in ∪ H out ) to one of its endpoints in V ′ V' V ′ as follows: If ( u , v ) ∈ ( V ′ ) 2 (u,v) \in(V')^2 ( u , v ) ∈ ( V ′ ) 2 , assign the edge to an endpoint whose other endpoint belongs to H i n ∪ H o u t H_{\mathrm{in}} \cup H_{\mathrm{out}} H in ∪ H out (e.g. if u ∈ H i n ∪ H o u t u \in H_{\mathrm{in}} \cup H_{\mathrm{out}} u ∈ H in ∪ H out assign it to v v v ), breaking ties arbitrarily. Otherwise, assign the edge to its unique endpoint in V ′ V' V ′ . For each v ∈ V ′ v \in V' v ∈ V ′ , let b ( v ) b(v) b ( v ) be the total z z z -weight assigned to v v v . Then ∑ b ( v ) = z H ( V ′ ) \sum b(v) = z_H(V') ∑ b ( v ) = z H ( V ′ ) and b ( v ) ≤ 2 h + 2 ∣ B ∣ + z ( S ) b(v) \le2h + 2|B| + z(S) b ( v ) ≤ 2 h + 2∣ B ∣ + z ( S ) , since v v v can be assigned at most 2 h 2h 2 h edges from ( V ′ ) 2 (V')^2 ( V ′ ) 2 , and at most 2 ∣ B ∣ 2|B| 2∣ B ∣ edges incident to B B B , and all z z z -mass from S S S . Thus, b ( v ) ≤ 2 h + 2 ( h + 1 ) + 2 1 − α ≤ 4 ( h + 1 ) 1 − α b(v) \le2h + 2(h+1) + \frac{2}{1-\alpha} \le\frac{4(h+1)}{1-\alpha} b ( v ) ≤ 2 h + 2 ( h + 1 ) + 1 − α 2 ≤ 1 − α 4 ( h + 1 ) . Let X = ∑ v ∈ W b ( v ) X = \sum_{v\in W} b(v) X = ∑ v ∈ W b ( v ) . We then have
E [ X ] = 1 100 T ∑ v ∈ V ′ b ( v ) = z H ( V ′ ) 100 T ≥ T f ( r ) 800 T . \mathbb{E}[X] = \frac{1}{100T}\sum_{v\in V'} b(v) = \frac{z_H(V')}{100T} \ge\frac{T f(r)}{800T}. E [ X ] = 100 T 1 v ∈ V ′ ∑ b ( v ) = 100 T z H ( V ′ ) ≥ 800 T T f ( r ) .
and
Var [ X ] ≤ 4 ( h + 1 ) 1 − α E [ X ] . \operatorname{Var}[X] \le\frac{4(h+1)}{1-\alpha}\mathbb{E}[X]. Var [ X ] ≤ 1 − α 4 ( h + 1 ) E [ X ] .
By Chebyshev’s inequality,
P [ X ≤ 1 2 E [ X ] ] ≤ P [ ∣ X − E [ X ] ∣ ≥ 1 2 E [ X ] ] ≤ 4 ⋅ 4 ( h + 1 ) 1 − α 800 T T f ( r ) ≤ 1 10 . \mathbb{P}\left[X \le\frac{1}{2}\mathbb{E}[X]\right] \le\mathbb{P}\left[|X-\mathbb{E}[X]| \ge\frac{1}{2}\mathbb{E}[X]\right] \le4 \cdot\frac{4(h+1)}{1-\alpha}\frac{800T}{T f(r)} \le\frac{1}{10}. P [ X ≤ 2 1 E [ X ] ] ≤ P [ ∣ X − E [ X ] ∣ ≥ 2 1 E [ X ] ] ≤ 4 ⋅ 1 − α 4 ( h + 1 ) T f ( r ) 800 T ≤ 10 1 .
Thus, with probability at least 9 / 10 9/10 9/10 ,
z ( W ) ≥ X ≥ T f ( r ) 1600 T ≥ h + 1 1600 c 0 ε > ( 1 + 32 ( 1 + c ) ( h + 1 ) ε ( 1 − c ) ( 1 − α ) 2 α 2 ) 2 1 − α . z(W) \ge X \ge\frac{T f(r)}{1600T} \ge\frac{h+1}{1600c_0\varepsilon} > \left(1+\frac{32(1+c)(h+1)}{\varepsilon(1-c)(1-\alpha)^2\alpha^2}\right)\frac{2}{1-\alpha}. z ( W ) ≥ X ≥ 1600 T T f ( r ) ≥ 1600 c 0 ε h + 1 > ( 1 + ε ( 1 − c ) ( 1 − α ) 2 α 2 32 ( 1 + c ) ( h + 1 ) ) 1 − α 2 .
Consequently, by Lemma 7.7,
H ( s , W ) ≥ 1 − α 2 z ( W ) π ( s , t ) r ≥ ( 1 + 32 ( 1 + c ) ( h + 1 ) ε ( 1 − c ) ( 1 − α ) 2 α 2 ) π ( s , t ) r . H(s,W) \ge\frac{1-\alpha}{2}z(W)\frac{\pi(s,t)}{r} \ge\left(1+\frac{32(1+c)(h+1)}{\varepsilon(1-c)(1-\alpha)^2\alpha^2}\right)\frac{\pi(s,t)}{r}. H ( s , W ) ≥ 2 1 − α z ( W ) r π ( s , t ) ≥ ( 1 + ε ( 1 − c ) ( 1 − α ) 2 α 2 32 ( 1 + c ) ( h + 1 ) ) r π ( s , t ) .
The remaining properties follow by a union bound with Lemma 7.5 .
For U ⊆ V U \subseteq V U ⊆ V , let π ( s , U ‾ , t ) \pi(s,\overline{U},t) π ( s , U , t ) denote the probability of termination at t t t without visiting U U U . Let z U ‾ ( u , v ) = min { 1 , r π ( s , U ‾ , u ) / ( π ( s , t ) d o u t ( u ) ) } z_{\overline{U}}(u,v) = \min\{1,r\pi(s,\overline{U},u)/(\pi(s,t)d_{\mathrm{out}}(u))\} z U ( u , v ) = min { 1 , r π ( s , U , u ) / ( π ( s , t ) d out ( u ))} be our analogous modification of z ( u , v ) z(u,v) z ( u , v ) . Let H ( s , U ‾ , u ) H(s,\overline{U},u) H ( s , U , u ) be the probability of visiting u u u no later than U U U . For an edge set F ⊆ E F \subseteq E F ⊆ E , let Δ ( F ) \Delta(F) Δ ( F ) be the maximum number of edges in F F F going out of a single vertex.
Lemma 7.9. Fix a W W W satisfying the properties of Lemma 7.5 . Let E 0 = E ∖ ( E ( S ∪ W ) ∪ E H ) E_0 = E \setminus(E(S \cup W) \cup E_H) E 0 = E ∖ ( E ( S ∪ W ) ∪ E H ) . If z S ∪ W ( E 0 ) ≥ T f ( r ) / 2 z_{S\cup W}(E_0) \ge T f(r)/2 z S ∪ W ( E 0 ) ≥ T f ( r ) /2 , then there exists F ⊆ E 0 F \subseteq E_0 F ⊆ E 0 satisfying each of the following.
z S ∪ W ( F ) ≥ 2 ( 1 + c ) ( h + 1 ) ( 1 − c ) ( 1 − α ) 3 α 2 z_{S\cup W}(F) \ge\frac{2(1+c)(h+1)}{(1-c)(1-\alpha)^3\alpha^2} z S ∪ W ( F ) ≥ ( 1 − c ) ( 1 − α ) 3 α 2 2 ( 1 + c ) ( h + 1 ) .
P ( F ) ≤ 1 32 P(F) \le\frac{1}{32} P ( F ) ≤ 32 1 .
Δ ( F ) ≤ ε ∣ W ∣ / 8 \Delta(F) \le\varepsilon|W|/8 Δ ( F ) ≤ ε ∣ W ∣/8 .
Proof. Set C F = 2 ( 1 + c ) ( 1 − c ) ( 1 − α ) 3 α 2 = Θ ( 1 ) C_F = \frac{2(1+c)}{(1-c)(1-\alpha)^3\alpha^2} = \Theta(1) C F = ( 1 − c ) ( 1 − α ) 3 α 2 2 ( 1 + c ) = Θ ( 1 ) . Let E ′ E' E ′ be a bipartite graph with a left and right copy of V V V , and edges from G G G placed from left to right. Partition these edges into at most n n n matchings P 1 , … , P ℓ ⊆ E ′ P_1,\ldots,P_\ell\subseteq E' P 1 , … , P ℓ ⊆ E ′ by bipartite edge coloring. For each P i P_i P i , let Z i = z S ∪ W ( P i ) Z_i = z_{S\cup W}(P_i) Z i = z S ∪ W ( P i ) and Q i = P ( P i ) Q_i = P(P_i) Q i = P ( P i ) .
Discard matchings with Z i < T f ( r ) / ( 4 n ) Z_i < T_f(r)/(4n) Z i < T f ( r ) / ( 4 n ) , removing total z ˉ S ∪ W \bar{z}_{S\cup W} z ˉ S ∪ W -weight at most T f ( r ) / 4 T_f(r)/4 T f ( r ) /4 . The remaining matchings have total weight at least T f ( r ) / 4 T_f(r)/4 T f ( r ) /4 . Order them by increasing Q i / Z i Q_i/Z_i Q i / Z i , and take matchings in this order until the cumulative z ˉ S ∪ W \bar{z}_{S\cup W} z ˉ S ∪ W -weight of the edges reaches C F ( h + 1 ) C_F(h+1) C F ( h + 1 ) . In the final of these matchings, we more precisely order the edges by increasing P ( e ) / z ˉ S ∪ W ( e ) P(e)/\bar{z}_{S\cup W}(e) P ( e ) / z ˉ S ∪ W ( e ) and take the shortest prefix making the total weight at least C F ( h + 1 ) C_F(h+1) C F ( h + 1 ) . Let F F F be the set of edges selected in this matching, together with all edges from the previous matchings. Since z ˉ S ∪ W ( e ) ≤ 1 \bar{z}_{S\cup W}(e) \le1 z ˉ S ∪ W ( e ) ≤ 1 , we have C F ( h + 1 ) ≤ z ˉ S ∪ W ( F ) ≤ C F ( h + 1 ) + 1 C_F(h+1) \le\bar{z}_{S\cup W}(F) \le C_F(h+1)+1 C F ( h + 1 ) ≤ z ˉ S ∪ W ( F ) ≤ C F ( h + 1 ) + 1 . Since T f ( r ) / 4 ≥ C F ( h + 1 ) T_f(r)/4 \ge C_F(h+1) T f ( r ) /4 ≥ C F ( h + 1 ) , such an F F F always exists.
We next bound P ( F ) P(F) P ( F ) . Since we picked the matchings with the lowest Q i / Z i Q_i/Z_i Q i / Z i , we have
P ( F ) z ˉ S ∪ W ( F ) ≤ ∑ P i ∈ P Q i ∑ P i ∈ P Z i . (41) \frac{P(F)}{\bar{z}_{S\cup W}(F)} \le\frac{\sum_{P_i\in\mathcal{P}} Q_i}{\sum_{P_i\in\mathcal{P}} Z_i}. \tag*{(41)} z ˉ S ∪ W ( F ) P ( F ) ≤ ∑ P i ∈ P Z i ∑ P i ∈ P Q i . (41)
where P \mathcal{P} P are the non-discarded matchings. This can be seen e.g. by writing each side as weighted averages of the individual matching ratios. Consequently,
P ( F ) ≤ 2 T T f ( r ) / 4 ( C F ( h + 1 ) + 1 ) ≤ 1 32 . P(F) \le\frac{2T}{T_f(r)/4}\bigl(C_F(h+1)+1\bigr) \le\frac{1}{32}. P ( F ) ≤ T f ( r ) /4 2 T ( C F ( h + 1 ) + 1 ) ≤ 32 1 .
Finally, every fully selected matching has weight at least T f ( r ) / ( 4 n ) T_f(r)/(4n) T f ( r ) / ( 4 n ) , and their total weight is less than C F ( h + 1 ) C_F(h+1) C F ( h + 1 ) . Hence,
Δ ( F ) ≤ 1 + 4 C F ( h + 1 ) n T f ( r ) ≤ 1 + 4 C F c 0 ε n T ≤ ε ∣ W ∣ / 8. \Delta(F) \le1+\frac{4C_F(h+1)n}{T_f(r)} \le1+\frac{4C_Fc_0\varepsilon n}{T} \le\varepsilon|W|/8. Δ ( F ) ≤ 1 + T f ( r ) 4 C F ( h + 1 ) n ≤ 1 + T 4 C F c 0 ε n ≤ ε ∣ W ∣/8.
Let G \mathcal{G} G be the set of modified graphs G ′ G' G ′ of G G G preserving the vertex set, the out-degrees of vertices in S S S , and keeping all internal edges of S S S , possibly apart from edges in B × { y } B \times\{y\} B × { y } , such that A A A distinguishes G ′ G' G ′ from G G G with probability at most 1 / 10 1/10 1/10 .
Lemma 7.10. Fix a W W W satisfying the properties of Lemma 7.5 , and let F F F satisfy the properties of Lemma 7.9 . Let W ′ ⊆ W W' \subseteq W W ′ ⊆ W with ∣ W ′ ∣ = max { 1 , Δ ( F ) } |W'|=\max\{1,\Delta(F)\} ∣ W ′ ∣ = max { 1 , Δ ( F )} . Then there exists a graph G ′ ∈ G G' \in\mathcal{G} G ′ ∈ G satisfying Q ( W ) ≤ 1 / 16 Q(W)\le1/16 Q ( W ) ≤ 1/16 and each of the following.
H G ′ ( s , S ∪ W ‾ , W ′ ) ≥ ( 1 − α ) π G ( s , t ) r z ˉ S ∪ W ( F ) H_{G'}(s,\overline{S\cup W},W') \ge(1-\alpha)\frac{\pi_G(s,t)}{r\bar{z}_{S\cup W}(F)} H G ′ ( s , S ∪ W , W ′ ) ≥ ( 1 − α ) r z ˉ S ∪ W ( F ) π G ( s , t ) .
For every v ∉ H i n v \notin H_{\mathrm{in}} v ∈ / H in , ∣ W ∖ N i n ( v ) ∣ ≥ ε ∣ W ∣ / 8 |W\setminus N_{\mathrm{in}}(v)|\ge\varepsilon|W|/8 ∣ W ∖ N in ( v ) ∣ ≥ ε ∣ W ∣/8 in G ′ G' G ′ .
For every b ∈ B b\in B b ∈ B , there exists w ∈ W w\in W w ∈ W with ( b , w ) ∉ E ( G ′ ) (b,w)\notin E(G') ( b , w ) ∈ / E ( G ′ ) .
Proof. Start by deleting edges in W × W W\times W W × W . Next we isolate W ′ W' W ′ in the following way: A vertex u ∉ H o u t ∪ W u\notin H_{\mathrm{out}}\cup W u ∈ / H out ∪ W has, by Lemma 7.5 , at least ∣ W ∖ N o u t ( v ) ∣ ≥ ε ∣ W ∣ / 4 |W\setminus N_{\mathrm{out}}(v)|\ge\varepsilon|W|/4 ∣ W ∖ N out ( v ) ∣ ≥ ε ∣ W ∣/4 non-out-neighbors in W W W . And since ∣ W ′ ∣ ≤ ε ∣ W ∣ / 8 |W'|\le\varepsilon|W|/8 ∣ W ′ ∣ ≤ ε ∣ W ∣/8 , we can move all out-edges from u u u to W ′ W' W ′ to W ∖ W ′ W\setminus W' W ∖ W ′ . Similarly, we can do the same for v ∉ H i n ∪ W v\notin H_{\mathrm{in}}\cup W v ∈ / H in ∪ W . After this isolation, W ′ W' W ′ only has out-edges from H o u t H_{\mathrm{out}} H out and in-edges from H i n H_{\mathrm{in}} H in .
We will swap the edges of F F F into W ′ W' W ′ . We do this by deleting F F F , and now restoring all the degrees of vertices. As F F F is not in E H ∪ W E_H\cup W E H ∪ W , the only vertices with out-edges in F F F is a subset of V ∖ W ∪ H o u t V\setminus W\cup H_{\mathrm{out}} V ∖ W ∪ H out . Consider such a vertex u ∉ W ∪ H o u t u\notin W\cup H_{\mathrm{out}} u ∈ / W ∪ H out . It has lost at most Δ ( F ) ≤ ε ∣ W ∣ / 8 \Delta(F)\le\varepsilon|W|/8 Δ ( F ) ≤ ε ∣ W ∣/8 edges, and since ∣ W ′ ∣ ≥ ε ∣ W ∣ / 8 |W'|\ge\varepsilon|W|/8 ∣ W ′ ∣ ≥ ε ∣ W ∣/8 , we can restore the degree of u u u by adding the lost edges to W ′ W' W ′ . We can do the exact same for the in-edges. Let G ′ G' G ′ denote the modified graph. We now verify the claimed properties. For every v ∉ H i n ∪ W v \notin H_{\mathrm{in}}\cup W v ∈ / H in ∪ W , the isolation preserves the number of in-neighbors in W W W , and swapping F F F increases it by at most Δ ( F ) \Delta(F) Δ ( F ) . Hence
∣ W ∖ N i n ( v ) ∣ ≥ ε ∣ W ∣ 4 − Δ ( F ) ≥ ε ∣ W ∣ 8 . |W\setminus\mathcal{N}_{\mathrm{in}}(v)|\ge\frac{\varepsilon|W|}{4}-\Delta(F)\ge\frac{\varepsilon|W|}{8}. ∣ W ∖ N in ( v ) ∣ ≥ 4 ε ∣ W ∣ − Δ ( F ) ≥ 8 ε ∣ W ∣ .
For v ∈ W v\in W v ∈ W , the same bound holds since v v v has at most one in-neighbor in W W W . Similarly, every b ∈ B b\in B b ∈ B has at least ε ∣ W ∣ / 8 \varepsilon|W|/8 ε ∣ W ∣/8 non-out-neighbors in W W W , since B ∩ H o u t = ∅ B\cap H_{\mathrm{out}}=\varnothing B ∩ H out = ∅ .
Consider the probability of visiting an edge of F F F no later than visiting S ∪ W ‾ \overline{S\cup W} S ∪ W in G G G ,
H G ( s , S ∪ W ‾ , F ) ≥ ( 1 − α ) ∑ ( u , v ) ∈ F π ( s , S ∪ W ‾ , u ) d o u t ( u ) ≥ ( 1 − α ) π G ( s , t ) r z S ∪ W ( F ) . H_G(s,\overline{S\cup W},F)\ge(1-\alpha)\sum_{(u,v)\in F}\frac{\pi(s,\overline{S\cup W},u)}{d_{\mathrm{out}}(u)}
\ge(1-\alpha)\frac{\pi_G(s,t)}{r}z_{S\cup W}(F). H G ( s , S ∪ W , F ) ≥ ( 1 − α ) ( u , v ) ∈ F ∑ d out ( u ) π ( s , S ∪ W , u ) ≥ ( 1 − α ) r π G ( s , t ) z S ∪ W ( F ) .
Since F F F is swapped into W ′ ⊆ W W'\subseteq W W ′ ⊆ W , we have
H G ( s , S ∪ W ‾ , F ) = H G ′ ( s , S ∪ W ‾ , F ) ≤ H G ′ ( s , S ∪ W ‾ , W ′ ) . H_G(s,\overline{S\cup W},F)=H_{G'}(s,\overline{S\cup W},F)\le H_{G'}(s,\overline{S\cup W},W'). H G ( s , S ∪ W , F ) = H G ′ ( s , S ∪ W , F ) ≤ H G ′ ( s , S ∪ W , W ′ ) .
Finally, G G G and G ′ G' G ′ cannot be distinguished unless A A A touches a vertex in W W W or examines an edge of F F F in G G G . Indeed, all degrees outside W W W are preserved, and we can order their adjacency lists so that all unchanged edges retain their original positions. Consequently, the probability that A A A distinguishes G ′ G' G ′ from G G G is at most Q ( W ) + P ( F ) ≤ 1 16 + 1 32 = 3 32 < 1 10 Q(W)+P(F)\le\frac{1}{16}+\frac{1}{32}=\frac{3}{32}<\frac{1}{10} Q ( W ) + P ( F ) ≤ 16 1 + 32 1 = 32 3 < 10 1 . Hence G ′ ∈ G G'\in\mathcal{G} G ′ ∈ G , completing the proof.
Lemma 7.11. Let U ⊆ V U\subseteq V U ⊆ V . Then z U ‾ ( E ∖ E ( U ) ) ≥ T f ( r ) − 2 r H ( s , U ) ( 1 − α ) π ( s , t ) z_{\overline{U}}(E\setminus E(U))\ge T_f(r)-\frac{2rH(s,U)}{(1-\alpha)\pi(s,t)} z U ( E ∖ E ( U )) ≥ T f ( r ) − ( 1 − α ) π ( s , t ) 2 r H ( s , U ) .
Proof. First of all,
z ( E ) − z U ‾ ( E ) = ∑ e ( z ( e ) − z U ( e ) ) ≤ r π ( s , t ) ∑ u ( π ( s , u ) − π ( s , U ‾ , u ) ) = r π ( s , t ) ( 1 − π ( s , U ‾ , V ) ) ≤ r π ( s , t ) H ( s , U ) , \begin{aligned}
z(E)-z_{\overline{U}}(E)
&=\sum_e\left(z(e)-z_U(e)\right)\\
&\le\frac{r}{\pi(s,t)}\sum_u\left(\pi(s,u)-\pi(s,\overline{U},u)\right)\\
&=\frac{r}{\pi(s,t)}\left(1-\pi(s,\overline{U},V)\right)\\
&\le\frac{r}{\pi(s,t)}H(s,U),
\end{aligned} z ( E ) − z U ( E ) = e ∑ ( z ( e ) − z U ( e ) ) ≤ π ( s , t ) r u ∑ ( π ( s , u ) − π ( s , U , u ) ) = π ( s , t ) r ( 1 − π ( s , U , V ) ) ≤ π ( s , t ) r H ( s , U ) ,
where the first inequality uses the fact that choosing the second term of z ( ⋅ ) z(\cdot) z ( ⋅ ) maximizes the difference. Furthermore, π ( s , U ‾ , u ) = 0 \pi(s,\overline{U},u)=0 π ( s , U , u ) = 0 for every u ∈ U u\in U u ∈ U . Thus
z U ‾ ( E ( U ) ) ≤ r π ( s , t ) ∑ ( u , v ) ∈ E : u ∉ U , v ∈ U π ( s , U ‾ , u ) d o u t ( u ) ≤ r ( 1 − α ) π ( s , t ) H ( s , U ) . z_{\overline{U}}(E(U))\le\frac{r}{\pi(s,t)}\sum_{\substack{(u,v)\in E:u\notin U,v\in U}}\frac{\pi(s,\overline{U},u)}{d_{\mathrm{out}}(u)}
\le\frac{r}{(1-\alpha)\pi(s,t)}H(s,U). z U ( E ( U )) ≤ π ( s , t ) r ( u , v ) ∈ E : u ∈ / U , v ∈ U ∑ d out ( u ) π ( s , U , u ) ≤ ( 1 − α ) π ( s , t ) r H ( s , U ) .
Combining both inequalities gives
z U ‾ ( E ∖ E ( U ) ) = z U ‾ ( E ) − z U ‾ ( E ( U ) ) = T f ( r ) − ( z ( E ) − z U ‾ ( E ) ) − z U ‾ ( E ( U ) ) ≥ T f ( r ) − ( 1 + 1 1 − α ) r π ( s , t ) H ( s , U ) ≥ T f ( r ) − 2 r ( 1 − α ) π ( s , t ) H ( s , U ) . \begin{aligned}
z_{\overline{U}}(E\setminus E(U))
&=z_{\overline{U}}(E)-z_{\overline{U}}(E(U))\\
&=T_f(r)-\left(z(E)-z_{\overline{U}}(E)\right)-z_{\overline{U}}(E(U))\\
&\ge T_f(r)-\left(1+\frac{1}{1-\alpha}\right)\frac{r}{\pi(s,t)}H(s,U)\\
&\ge T_f(r)-\frac{2r}{(1-\alpha)\pi(s,t)}H(s,U).
\end{aligned} z U ( E ∖ E ( U )) = z U ( E ) − z U ( E ( U )) = T f ( r ) − ( z ( E ) − z U ( E ) ) − z U ( E ( U )) ≥ T f ( r ) − ( 1 + 1 − α 1 ) π ( s , t ) r H ( s , U ) ≥ T f ( r ) − ( 1 − α ) π ( s , t ) 2 r H ( s , U ) .
Lemma 7.12 (Forward Probability Mass Dichotomy). There exists W ⊆ V ∖ ( S ∪ B ) W \subseteq V \setminus(S \cup B) W ⊆ V ∖ ( S ∪ B ) satisfying Lemma 7.5 such that at least one of the following holds.
H G ( s , W ) > ( 1 + 32 ( 1 + c ) ( h + 1 ) ε ( 1 − c ) ( 1 − α ) 2 α 2 ) π G ( s , t ) r H_G(s,W) > \left(1+\frac{32(1+c)(h+1)}{\varepsilon(1-c)(1-\alpha)^2\alpha^2}\right)\frac{\pi_G(s,t)}{r} H G ( s , W ) > ( 1 + ε ( 1 − c ) ( 1 − α ) 2 α 2 32 ( 1 + c ) ( h + 1 ) ) r π G ( s , t ) .
There exists F ⊆ E 0 = E ∖ ( E ( S ∪ W ) ∪ E H ) F \subseteq E_0 = E \setminus(E(S \cup W) \cup E_H) F ⊆ E 0 = E ∖ ( E ( S ∪ W ) ∪ E H ) satisfying the properties of Lemma 7.9 .
Proof. We can assume that z ( E H ) < T f ( r ) / 4 z(E_H)<T_f(r)/4 z ( E H ) < T f ( r ) /4 , as otherwise we are done by Lemma 7.8 . Choose any W W W satisfying Lemma 7.5 . We can assume H G ( s , W ) ≤ ( 1 + 32 ( 1 + c ) ( h + 1 ) ε ( 1 − c ) ( 1 − α ) 2 α 2 ) π G ( s , t ) r H_G(s,W) \leq\left(1+\frac{32(1+c)(h+1)}{\varepsilon(1-c)(1-\alpha)^2\alpha^2}\right)\frac{\pi_G(s,t)}{r} H G ( s , W ) ≤ ( 1 + ε ( 1 − c ) ( 1 − α ) 2 α 2 32 ( 1 + c ) ( h + 1 ) ) r π G ( s , t ) . Together with Fact 7.6 we get
H G ( s , S ∪ W ) ≤ H G ( s , S ) + H G ( s , W ) ≤ ( 2 + 32 ( 1 + c ) ( h + 1 ) ε ( 1 − c ) ( 1 − α ) 2 α 2 ) π G ( s , t ) r . H_G(s,S\cup W) \leq H_G(s,S)+H_G(s,W) \leq\left(2+\frac{32(1+c)(h+1)}{\varepsilon(1-c)(1-\alpha)^2\alpha^2}\right)\frac{\pi_G(s,t)}{r}. H G ( s , S ∪ W ) ≤ H G ( s , S ) + H G ( s , W ) ≤ ( 2 + ε ( 1 − c ) ( 1 − α ) 2 α 2 32 ( 1 + c ) ( h + 1 ) ) r π G ( s , t ) .
Using these facts together with Lemma 7.11,
z S ∪ W ( E 0 ) = z S ∪ W ( E ∖ ( E ( S ∪ W ) ∪ E H ) ) ≥ z S ∪ W ( E ∖ ( E ( S ∪ W ) ) ) − z S ∪ W ( E H ) > T f ( r ) − 2 r H G ( s , S ∪ W ) ( 1 − α ) π ( s , t ) − T f ( r ) 4 ≥ T f ( r ) 2 , \begin{aligned}
z_{S\cup W}(E_0) &= z_{S\cup W}(E\setminus(E(S\cup W)\cup E_H))\\
&\geq z_{S\cup W}(E\setminus(E(S\cup W)))-z_{S\cup W}(E_H)\\
&> T_f(r)-\frac{2rH_G(s,S\cup W)}{(1-\alpha)\pi(s,t)}-\frac{T_f(r)}{4}\\
&\geq\frac{T_f(r)}{2},
\end{aligned} z S ∪ W ( E 0 ) = z S ∪ W ( E ∖ ( E ( S ∪ W ) ∪ E H )) ≥ z S ∪ W ( E ∖ ( E ( S ∪ W ))) − z S ∪ W ( E H ) > T f ( r ) − ( 1 − α ) π ( s , t ) 2 r H G ( s , S ∪ W ) − 4 T f ( r ) ≥ 2 T f ( r ) ,
where the last inequality uses that T f ( r ) ≫ ( h + 1 ) / ε T_f(r)\gg(h+1)/\varepsilon T f ( r ) ≫ ( h + 1 ) / ε by the inequality on T T T we assumed for the sake of contradiction. Now Lemma 7.9 completes the proof.
Lemma 7.13. Let S S S and B B B be as in Lemma 7.3 . There exists a modified graph G ′ ∈ G G' \in\mathcal{G} G ′ ∈ G and sets W ⊆ V ∖ ( S ∪ B ) W \subseteq V\setminus(S\cup B) W ⊆ V ∖ ( S ∪ B ) and W ′ ⊆ W W' \subseteq W W ′ ⊆ W satisfying each of the following.
H G ′ ( s , S ∪ W ‾ , W ′ ) > 2 1 + c 1 − c π G ( s , t ) h + 1 r ( 1 − α ) 2 α 2 H_{G'}(s,\overline{S\cup W},W') > 2^{\frac{1+c}{1-c}}\pi_G(s,t)\frac{h+1}{r(1-\alpha)^2\alpha^2} H G ′ ( s , S ∪ W , W ′ ) > 2 1 − c 1 + c π G ( s , t ) r ( 1 − α ) 2 α 2 h + 1 .
Q ( W ) ≤ 1 10 Q(W)\leq\frac{1}{10} Q ( W ) ≤ 10 1 in G G G .
∀ v ∉ H i n : ∣ W ∖ N i n ( v ) ∣ ≥ ε ∣ W ∣ / 8 \forall v\notin H_{\mathrm{in}}: |W\setminus N_{\mathrm{in}}(v)|\geq\varepsilon|W|/8 ∀ v ∈ / H in : ∣ W ∖ N in ( v ) ∣ ≥ ε ∣ W ∣/8 in G ′ G' G ′ .
For every b ∈ B b\in B b ∈ B there exists a w ∈ W w\in W w ∈ W with ( b , w ) ∉ E ( G ′ ) (b,w)\notin E(G') ( b , w ) ∈ / E ( G ′ ) .
1 ≤ ∣ W ′ ∣ ≤ ε ∣ W ∣ / 16 1\leq|W'|\leq\varepsilon|W|/16 1 ≤ ∣ W ′ ∣ ≤ ε ∣ W ∣/16 .
Proof. Let W W W be as in Lemma 7.12 . Assume first that Item 1 of Lemma 7.12 holds. We choose G ′ = G G'=G G ′ = G . For each vertex w ∈ W w\in W w ∈ W , we consider the probability that a walk from s s s first enters W W W at w w w without visiting S S S before entering W W W . This is exactly the probability H ( s , S ∪ W ‾ , w ) H(s,\overline{S\cup W},w) H ( s , S ∪ W , w ) . Note that since the events are disjoint, H ( s , S ‾ , W ) = ∑ w ∈ W H ( s , S ∪ W ‾ , w ) H(s,\overline{S},W)=\sum_{w\in W}H(s,\overline{S\cup W},w) H ( s , S , W ) = ∑ w ∈ W H ( s , S ∪ W , w ) . We choose W ′ W' W ′ to consist of the ⌊ ε ∣ W ∣ / 8 ⌋ \lfloor\varepsilon|W|/8\rfloor ⌊ ε ∣ W ∣/8 ⌋ vertices with the largest such probabilities. Since ε ∣ W ∣ ≥ 16 \varepsilon|W|\geq16 ε ∣ W ∣ ≥ 16 , we have ∣ W ′ ∣ ≥ ε ∣ W ∣ / 16 |W'|\geq\varepsilon|W|/16 ∣ W ′ ∣ ≥ ε ∣ W ∣/16 and therefore,
H ( s , S ∪ W ‾ , W ′ ) ≥ ∣ W ′ ∣ ∣ W ∣ H ( s , S ∪ W ‾ , W ′ ) ≥ ε 16 ( H ( s , W ′ ) − H ( s , S ) ) . H(s,\overline{S\cup W},W')\geq\frac{|W'|}{|W|}H(s,\overline{S\cup W},W')\geq\frac{\varepsilon}{16}\left(H(s,W')-H(s,S)\right). H ( s , S ∪ W , W ′ ) ≥ ∣ W ∣ ∣ W ′ ∣ H ( s , S ∪ W , W ′ ) ≥ 16 ε ( H ( s , W ′ ) − H ( s , S ) ) .
Applying Fact 7.6 with the above inequality,
H ( s , S ∪ W ‾ , W ′ ) ≥ ε 16 ( ( 1 + 32 ( 1 + c ) ( h + 1 ) ε ( 1 − c ) ( 1 − α ) 2 α 2 ) π G ( s , t ) r − π G ( s , t ) r ) ≥ 2 1 + c 1 − c π G ( s , t ) h + 1 r ( 1 − α ) 2 α 2 . \begin{aligned}
H(s,\overline{S\cup W},W') &\geq\frac{\varepsilon}{16}\left(\left(1+\frac{32(1+c)(h+1)}{\varepsilon(1-c)(1-\alpha)^2\alpha^2}\right)\frac{\pi_G(s,t)}{r}-\frac{\pi_G(s,t)}{r}\right)\\
&\geq2^{\frac{1+c}{1-c}}\pi_G(s,t)\frac{h+1}{r(1-\alpha)^2\alpha^2}.
\end{aligned} H ( s , S ∪ W , W ′ ) ≥ 16 ε ( ( 1 + ε ( 1 − c ) ( 1 − α ) 2 α 2 32 ( 1 + c ) ( h + 1 ) ) r π G ( s , t ) − r π G ( s , t ) ) ≥ 2 1 − c 1 + c π G ( s , t ) r ( 1 − α ) 2 α 2 h + 1 .
This finishes the proof in this case.
Assume instead that Item 2 of Lemma 7.12 holds. Let F F F be as in the lemma, that is, satisfying the properties of Lemma 7.9 . Choose W ′ ⊆ W W' \subseteq W W ′ ⊆ W to be any subset of size max { 1 , Δ ( F ) } \max\{1,\Delta(F)\} max { 1 , Δ ( F )} . Now Lemma 7.10 completes the proof.
Now, Lemma 7.4 follows from Lemma 7.13 by concentrating the forward mass into a smaller subset, and moving out-edges away from this subset.
Proof of Lemma 7.4 . The graph claimed to exist will be constructed under the name G ′ ′ G'' G ′′ in the proof, and it will be a modification of the graph G ′ G' G ′ given by Lemma 7.13 . The subset of vertices claimed to exist will be constructed under the name W ′ ′ W'' W ′′ in the proof, and it will be a subset of the set W ′ W' W ′ given by Lemma 7.13 , which itself is a subset of the set W W W given by that lemma.
To construct G ′ ′ G'' G ′′ from G ′ G' G ′ , first clean the slate by removing all edges in W × W W \times W W × W .
Our next step is to reduce the out-degree of vertices in W ′ W' W ′ to at most h h h . Consider each edge ( w ′ , v ) (w',v) ( w ′ , v ) with w ′ ∈ W ′ w' \in W' w ′ ∈ W ′ and v ∉ H i n v \notin H_{\mathrm{in}} v ∈ / H in . Since ∣ W ∖ N i n ( v ) ∣ ≥ ε ∣ W ∣ / 8 ≥ ∣ W ′ ∣ |W \setminus N_{\mathrm{in}}(v)| \geq\varepsilon|W|/8 \geq|W'| ∣ W ∖ N in ( v ) ∣ ≥ ε ∣ W ∣/8 ≥ ∣ W ′ ∣ , there exists for each such edge a distinct non-edge ( w , v ) ∉ E ( G ′ ) (w,v) \notin E(G') ( w , v ) ∈ / E ( G ′ ) with w ∈ W ∖ W ′ w \in W \setminus W' w ∈ W ∖ W ′ . Replace ( w ′ , v ) (w',v) ( w ′ , v ) by ( w , v ) (w,v) ( w , v ) in G ′ ′ G'' G ′′ . Now N o u t ( w ′ ) ⊆ H i n N_{\mathrm{out}}(w') \subseteq H_{\mathrm{in}} N out ( w ′ ) ⊆ H in for each w ′ ∈ W ′ w' \in W' w ′ ∈ W ′ and in particular d o u t ( w ′ ) ≤ h d_{\mathrm{out}}(w') \leq h d out ( w ′ ) ≤ h .
We now move on to concentrating the forward probability mass of W ′ W' W ′ into a subset W ′ ′ W'' W ′′ of size at most h + 1 h+1 h + 1 . Choose W ′ ′ W'' W ′′ to be any subset of W ′ W' W ′ of size min { ∣ W ′ ∣ , h + 1 } \min\{|W'|,h+1\} min { ∣ W ′ ∣ , h + 1 } . Recall that at this point, we have no edges inside W W W . Insert all edges from the possibly empty complement W ′ ∖ W ′ ′ W' \setminus W'' W ′ ∖ W ′′ to W ′ ′ W'' W ′′ . Any vertex u ∈ W ′ ∖ W ′ ′ u \in W' \setminus W'' u ∈ W ′ ∖ W ′′ will have exactly h + 1 h+1 h + 1 edges to W ′ ′ W'' W ′′ and at most 2 h + 1 2h+1 2 h + 1 out-edges in total. The probability that a random walk standing in W ′ ∖ W ′ ′ W' \setminus W'' W ′ ∖ W ′′ moves to W ′ ′ W'' W ′′ is thus at least 1 − α 2 \frac{1-\alpha}{2} 2 1 − α . Since G ′ ′ G'' G ′′ only differs from G ′ G' G ′ in out-edges of W W W , the hitting probability guaranteed by Lemma 7.13 is maintained. Therefore, H G ′ ′ ( s , S ‾ , W ′ ′ ) ≥ H G ′ ( s , S ∪ W ‾ ) 1 − α 2 ≥ 1 + α 1 − α π G ( s , t ) h + 1 r ( 1 − α ) α 2 H_{G''}(s,\overline{S},W'') \geq H_{G'}(s,\overline{S\cup W})\frac{1-\alpha}{2} \geq\frac{1+\alpha}{1-\alpha}\pi_G(s,t)\frac{h+1}{r(1-\alpha)\alpha^2} H G ′′ ( s , S , W ′′ ) ≥ H G ′ ( s , S ∪ W ) 2 1 − α ≥ 1 − α 1 + α π G ( s , t ) r ( 1 − α ) α 2 h + 1 , as wished.
The remaining properties follow from Lemma 7.13 .
Extension to a General δ \delta δ
In this section, we show a simple modification of our algorithm so that it works for the variant that we are only required to estimate π ( s , t ) \pi(s,t) π ( s , t ) when it is at least δ \delta δ . Equivalently speaking, we are allowed to have an additional additive error of δ \delta δ .
Let
T ∗ ( δ ) = max r ∈ ( 0 , 1 ] min { T f ( δ , r ) , T b ( r ) } , T^*(\delta)=\max_{r\in(0,1]}\min\{T_f(\delta,r),T_b(r)\}, T ∗ ( δ ) = r ∈ ( 0 , 1 ] max min { T f ( δ , r ) , T b ( r )} ,
where
T f ( δ , r ) = ∑ u ∈ V s min { d o u t ( u ) , π ( s , u ) r max { π ( s , t ) , δ } } . T_f(\delta,r)=\sum_{u\in V_s}\min\left\{d_{\mathrm{out}}(u),\frac{\pi(s,u)r}{\max\{\pi(s,t),\delta\}}\right\}. T f ( δ , r ) = u ∈ V s ∑ min { d out ( u ) , max { π ( s , t ) , δ } π ( s , u ) r } .
We will show that our modified algorithm spends O ( T ∗ ( δ ) ) O(T^*(\delta)) O ( T ∗ ( δ )) time, and our lower bounds still hold after replacing T ∗ T^* T ∗ with T ∗ ( δ ) T^*(\delta) T ∗ ( δ ) .
For the algorithm, we just imagine that in the beginning, with probability δ \delta δ , we just magically fly to t t t and stop. Practically, the only modification is that, right after Line 5 of Algorithm 11, we further do X γ ← δ + ( 1 − δ ) X γ X_\gamma\leftarrow\delta+(1-\delta)X_\gamma X γ ← δ + ( 1 − δ ) X γ . Note that this only introduces an additional additive error of at most δ ( 1 − X γ ) ≤ δ \delta(1-X_\gamma)\leq\delta δ ( 1 − X γ ) ≤ δ . It is straightforward to check that, since we always have X γ ≥ δ X_\gamma\geq\delta X γ ≥ δ , the time complexity will become O ( T ∗ ( δ ) ) O(T^*(\delta)) O ( T ∗ ( δ )) .
For the lower bounds, the modification is also simple. After replacing T ∗ T^* T ∗ with T ∗ ( δ ) T^*(\delta) T ∗ ( δ ) , if a good algorithm A A A spends too little time, then by the same construction, we are able to construct a graph G ′ G' G ′ such that π G ′ ( s , t ) ≫ max { π G ( s , t ) , δ } \pi_{G'}(s,t)\gg\max\{\pi_G(s,t),\delta\} π G ′ ( s , t ) ≫ max { π G ( s , t ) , δ } and A A A cannot distinguish G G G and G ′ G' G ′ . For example, to prove the δ \delta δ -variant of Theorem 5.4 , we only need to replace all π ( s , t ) \pi(s,t) π ( s , t ) in the proof with max { π ( s , t ) , δ } \max\{\pi(s,t),\delta\} max { π ( s , t ) , δ } .