• Nenhum resultado encontrado

Input: a graphG= (V, E), a constantc >2;

Output: a subgraphH ofG;

Initialization: n← |V|;H ←(V,∅);k←1

Clustering. Pick each node as a cluster center w.p. n1/3 c

log1/3n, and denote the set of selected nodes by C={c1, c2, . . .}. For eachci, initialize a clusterCi← ∅.

For each nodevV, choose a neighborci ofvwhich is a cluster center, if such a neighbor exists, add the edge (v, ci) toH, and addv toCi. If none of the neighbors ofv is a cluster center, add toH all the edges adjacent tov. LetH0H.

Path Buying.

Whileklog8cn1/32/3n do:

1. Sk← ∅

2. Add each cluster centerci∈ C toSk w.p. 8c2klogn, independently of the other centers 3. For each pair (ci, cj)∈ C ×Sk:

a. A← ∅ /*Ais a set of paths */

b. For each vCj:

i. Among all the shortest paths fromcitov, letPv be a path with minimum|Pv\H0| ii. If|Pv\H0|<2k, addPv toA

c. IfA6=∅, add toH one of the shortest among the paths of A 4. k←2k

ILemma 9. Algorithm6AP outputs a subgraph H of Gwith O(n4/3log4/3n) edges, with probability at least1−O(nc+1).

Proof. The algorithm starts withH= (V,∅) and only adds edges fromG, soH is indeed a subgraph ofGover the same node set.

In the first part of the clustering phase, each node adds toH at most one edge, connecting it to a single cluster center, for a total ofO(n) edges. Then, the probability that a node of degree at leastn1/3log4/3nis left unclustered is at most

1−n1/3logc1/3nn1/3log4/3n

, which isO(nc). A union bound implies that all nodes of degree at least n1/3log4/3nare clustered w.p. 1−O(nc+1), and thus the total number of edges added toH by unclustered nodes in the second part of the clustering phase isO(n4/3log4/3n), w.p. 1−O(nc+1).

O P O D I S 2 0 1 8

7:12 The Sparsest Additive Spanner via Multiple Weighted BFS Trees

x0

x y0

w

y w3

w1

c2∈Sk

c1 c3

C1 C3

C2

σ ρ

Figure 1Illustration of the proof of Lemma 10

We start the analysis of the path buying phase by bounding the size ofC. A node vV is added toC w.p. n1/3logc1/3n, soE[|C|] = logcn1/32/3n. A Chernoff bound implies that

Pr

|C|> 4cn2/3 log1/3n

≤exp

cn2/3 log1/3n

=o(nc).

Similarly, for each value ofk, we haveE[|Sk|] = 8c2n2/3klog2/3n, and

Pr

"

|Sk|> 32c2n2/3log2/3n k

#

≤exp −8c2n2/3log2/3n k

!

=O(nc),

where the last equality follows since kn2/3

log1/3n. A union bound implies that |C| = O

n2/3 log1/3n

and |Sk|=O

n2/3log2/3n k

for allk, w.p. at least 1−O(nc+1).

Finally, for eachk, for each (ci, cj)∈ C ×Sk we add at most one path with less than 2k missing edges toH. Thus, for each value ofkwe add less than|C| · |Sk| ·2k=O(n4/3log1/3n) edges toH, w.p. at least 1−O(nc+1). Summing over allO(logn) values of k, and adding the number of edges contributed by the clustering phase, we conclude thatH has at most

O(n4/3log4/3n) edges, w.p. at least 1−O(nc+1). J

ILemma 10. The graph H constructed by Algorithm6APsatisfiesδH(x, y)≤δG(x, y) + 6 for each pair(x, y)∈V ×V, with probability at least1−O nc+2

.

Proof. Consider a shortest pathρinGbetween two nodesx, yV (see Figure 1). Letx0 andy0 be the first and last clustered nodes onρ, respectively. If all nodes ofρare unclustered, thenρis fully contained inH0 and we are done.

Letc1 andc3be the centers of the clusters containingx0 andy0, respectively. Letσbe a shortest path inGbetweenc1 andc3, and denote byk0 the number of edges ofσ\H0. Let kbe the largest power of 2 such thatkk0.

An edge can be inσ\H0 only if it connects two clustered nodes. Hence,k0, the number of edges inσ\H0, is smaller than the number of clustered nodes inσ. On the other hand, σcannot contain more than three nodes of the same cluster: the distance between every two nodes in a cluster is at most two, so a shortest path cannot traverse more than three nodes of the same cluster. Thus, the number of clusters intersectingσis at leastk0/3. As k0/3≥k/3, the probability that none of the centers of these clusters is chosen to Sk is at most

1−8c2klognk/3

=O nc2

. For each pair of nodes, a cluster center on a shortest path between them is chosen toSk, for the appropriate value ofk, with similar probability. A union bound implies that this claim holds for all pairs inV ×V w.p. at least 1−O(nc2+2).

K. Censor-Hillel, A. Paz, and N. Ravid 7:13

Letwbe a node onσin a cluster C2 such thatc2Sk, if such a cluster exists. Denote byσ[c1, w] the sub-path ofσfromc1 tow. As there arek0<2kedges inσ\H0, there are also less than 2kedges inσ[c1, w]\H0. Thus, in step 3(b) of the path-buying phase fork, either the pathσ[c1, w] or some other path betweenc1 andw of length at mostδG(c1, w) is added toA. In step 3(c), a path fromc1 to some nodew1C2 is added toH, and this is a shortest path in A, soδH(c1, w1)≤δG(c1, w). Similarly, a shortest path fromc3 to some w3C2 is added toH, andδH(c3, w3)≤δG(c3, w).

The pathσis a shortest path fromc1 toc3in G, so|σ| ≤δG(x0, y0) + 2. AsδG(c1, w) + δG(c3, w) =|σ|, we concludeδH(c1, w1) +δH(c3, w3)≤ |σ| ≤δG(x0, y0) + 2.

Consider the path fromxtoy inH composed of the sub-path ofρfromxtox0, the edge (x0, c1), the path fromc1to w1, the edges (w1, c2) and (c2, w3), the path fromw3 toc3, the edge (c3, y0), and finally, the sub-path ofρfrom y0 toy. This is a path fromxtoy inH, implying

δH(x, y)≤δH(x, x0) + 1 +δH(c1, w1) + 2 +δH(w3, c3) + 1 +δH(y0, y)

δG(x, x0) + 4 +δG(x0, y0) + 2 +δG(y0, y) =δG(x, y) + 6,

as desired. J

We now discuss the implementation of Algorithm 6APin thecongestmodel.

ILemma 11. Algorithm6APcan be implemented inO

n2/3

log1/3n+D

rounds in thecongest model, with probability at least 1−o(nc).

Proof. For the clustering phase, each node decides locally w.p. n1/3logc1/3n to become a cluster center, and notifies its neighbors. Each node with a neighbor that is a cluster center now joins a cluster by sending a message to such a neighbor and adding the appropreate edge to the spanner. A node with no neighboring cluster centers notifies all its neighbors and adds all its edges to the spanner. This is done in a constant number of rounds.

Before the path buying phase, the nodes construct a single BFS tree, along which they compute an upper boundD0 onD, satisfyingDD0 <2D, and count the number of cluster centers,|C|. The nodes mark the edges ofH0 with weight 0 and the other edges with weight 1. Then, they construct a WBFS tree rooted at each cluster center by executing Algorithm 1 for |C|+D0 many rounds. By the proof of Lemma 9, we have |C| ∈ O

n2/3 log1/3n

w.p. at least 1−o(nc), and thus the construction of the WBFS trees takesO

n2/3

log1/3n +D rounds with the same probability.

Each nodev now knows about a “good” path to each cluster centerci, i.e., a shortest path fromci tov, with a minimal number of edges not inH after the clustering phase. A nodevin a clusterCj notifies its neighborcj about all the distances to other cluster centers inC and the number of missing edges in each such path. That is, each vCj sends|C|

messages tocj, which takes O

n2/3 log1/3n

rounds.

Each cluster center cj decides locally to join each set Sk w.p. 8c2klogn. For each other centerci∈ C,cj locally constructs the listA: for eachvCj,Acontains the shortest path from ci to vCj found by the WBFS algorithm, and the number of missing edges in it.

Then,cj chooses fromAa path fromci to somevCj with a minimal number of missing edges, and if it has at most 2kmissing edges,cj sends a “buyci” message tov.

Finally, all nodes simultaneously execute a “buy” phase, where “buyci” messages are sent up the WBFS tree. To avoid congestion, we assume that during the execution of Algorithm 1, each node keeps a record of the messages it got in each round and the WBFS source each

O P O D I S 2 0 1 8

7:14 The Sparsest Additive Spanner via Multiple Weighted BFS Trees

message referred to. Each nodev then sends messages in reversed order: ifv has a message

“buyci”, and it got a message fromuregardingci in ther-before-last round of Algorithm 1, then it sends the message “buy ci” to u in round r of the “buy” phase. Then, u adds

“buy ci” to its list of messages, and adds the edge (u, v) to the spanner. This parts takes O

n2/3

log1/3n +D

rounds, just like the execution of Algorithm 1. J