220 likes | 402 Views
Distributed Approximate Matching (DAM). Zvi Lotker, Boaz Patt-Shamir, Adi Rosen Presentation: Deniz Çokuslu May 2008. Motivation. Matching A matching M in a graph G is a set of nonloop edges with no shared endpoints.
E N D
Distributed Approximate Matching (DAM) Zvi Lotker, Boaz Patt-Shamir, Adi Rosen Presentation: Deniz Çokuslu May 2008
Motivation • Matching • A matching M in a graph G is a set of nonloop edges with no shared endpoints. • The vertices incident to M are saturated (matched) by M and the others are unsaturated (unmatched). v2 v3 v5 v6 v4 v7 v1
Motivation • A maximal matching in a graph G is a matching that cannot be enlarged by adding more edges • A maximum matching in a graph G is a matching of maximum size among all matchings • A perfect matching covers all vertices of the graph (all are saturated) • A maximal weighted matching in a weighted graph, is a matching that maximizes the weight of the selected edges
Motivation • Matching Algorithms • A. Israeli and A. Itai, A fast and simple randomized parallel algorithm for maximal matching (1986) • Time complexity: O(log n) • M. Wattenhofer and R. Wattenhofer. Distributed weighted matching (2004) • For trees: 4-approx. Algorithm • Time Complexity: Constant • For general graphs: 5-approx. Algorithm • Time Complexity: O(log2 n) • F. Kuhn, T. Moscibroda and R. Wattenhofer. The price of being near-sighted (2005) • Lowerbound of any distributed algorithm that approximates the maximum weighted matching:
Distributed Approximate Matching (DAM) • Works on general weighted graphs • Static Graph Algorithm • Finds Maximum weighted matching within a factor of 4+ε • Time complexity: O(ε-1 log ε-1 log n), for ε > 0 • Dynamic Graph Algorithm • Nodes are inserted or deleted one at a time • Unweighted matching: (1 + ε)-approximate, Θ(1/ ε) time per delete/insert • Weighted matching: Constant approximate, constant running time
Distributed Approximate Matching (DAM) • The system is modeled as a unidirected graph G(V,E) • Time progress in synchronous rounds • In each round each processor may send messages to any subset of its neighbors • All messages that are sent, are received and processed at the same round • Edges may have weights (min weight = 1)
DAM General Idea • Sort edges in descendent order • Divide the list into classes • Divide the classes into subclasses • Run a maximal unweighted matching algorithm on the subclasses concurrently • Refine resulting edge set
DAM in Static Graphs • Aim is to define an approximation algorithm whose approximation factor is close to 4 • Let ε is a positive constant • Aim: Find a (4 + 5ε’)-approximate algorithm • For simplicity let ε = ε’/5, then approximate factor is (4 + ε) • α = 1 + 1/ ε • β = α / α-1 = ε + 1
DAM in Static Graphs • Assume 1/n ≤ ε ≤ 1/2 • Otherwise: • If ε > ½ then run algorithm with ε = ½ • If ε < 1/n run Hoepman* algorithm • Each class i include edges weighted: w[αi , αi+1) • Each class is divided into k = [logβα] subclasses • Subclass (i, j) contains edges in class i whose weights are in [αi * βj , αi * βj+1) *J.-H. Hoepman. Simple Distributed WeightedMatchings CoRR cs.DC/0410047, 2004
DAM in Static Graphs • Approach is to reduce the weighted case to multiple instances of unweighted cases • Let UWM* is a black-box model for a maximal unweighted matching algorithm • TUWM is the runtime of the UWM • Run UWM for each subclasses concurrently * A. Israeli and A. Itai. A fast and simple randomizedparallel algorithm for maximal matching. Info. Proc.Lett., 22(2):77–80, 1986
DAM in Static Graphs • Running the UWM on the subclasses sequentially, • From heaviest to the lightest • Deleting matched nodes from consideration • Approximation factor: 2β • Running time: # of subclasses * TUWM • At the end of concurrent operations, the result may not be a matching • First Phase: Run UWM on each subclass of each classes synchronously, this finds matchings in each class • Second Phase: Resolve conflicts between different classes
DAM in Static Graphs • Second Phase: Resolve conflicts • Resulting edges at the end of the first phase is denoted by A • Partition edges in A according to weight classes • Edges in i’th class is denoted by Ai • Note that a node may have at most one incident edge in each Ai • If a node has two incident edges in A, the edges are in different classes • In such a case, we should select the heaviest edge, BUT...
DAM in Static Graphs • The heaviest edge dominates other incident edges of the node • However, an edge may dominate others in one endpoint, and be dominated in other endpoint • So: Select edges which are dominating in both endpoints (Combine Procedure)
DAM in Static Graphs • Analysis • The number of phases in the first stage: • k = [logβα] • Each phase takes TUWM • Since 0 < ε ≤ ½ • logβα = ln α / ln β = ln ( 1+1/ ε) / ln (1 + ε) ≤ (2 log 1/ ε) / ε • Total runtime of the first stage : O(1/ ε log 1/ ε TUWM) • The number of iterations in the second stage: • 3 logα n = O( log n / log 1/ ε ) • Total runtime of the complete algorithm: • O( 1/ ε log 1/ ε TUWM + log n / log 1/ ε )
DAM in Unweighted Dynamic Graphs • Each topological change is insertion or deletion of a single node • Aim is to develop an algorithm: • Whose running time per topological change is O(1/ ε) • Whose output is at least 1/(1+ε) times the size of the maximum matching
DAM in Unweighted Dynamic Graphs • AUGMENTING PATH • Let G = (V,E) be a graph, let M E be a set of non-intersecting edges in E, and let k ≥ 1. • A path v0, v1, . . . , v2(k−1), v2k−1 is an augmenting path of length 2k − 1 with respect to M if for all 1 ≤ i ≤ k − 1, (v2i−1, v2i) M, for all 1 ≤ i ≤ k (v2(i−1), v2i−1) M, and both v0 and v2k−1 are not endpoints of any edge in M.
e1 e2 e3 DAM in Unweighted Dynamic Graphs • AUGMENTING PATH • A node is free if none of its incident edges is in a matching • Augmenting path is a path of alternating sequence of matched and unmatched edges with free end nodes • Theorem • If there is no augmenting path of length 2k-1 then the size of the largest matching is at most {(k+1)/k } * |M| where M is the set of non-intersecting edges • The output of the algorithm never contains augmenting paths shorter than 2/ε
DAM in Unweighted Dynamic Graphs • Insertion • Algorithm searches for all augmenting paths that starts with the new node v’ • V’ starts an exploration of the topology of the graph up to (2/ε)+1 from itself to findout if there is an augmenting path of size at most 2/ε • If no path is found terminate • Otherwise the shortest augmenting path is chosen and roles of the edges are flipped (matching non-matching and vice versa)
DAM in Unweighted Dynamic Graphs • Deletion • If deleted node v was not matched, then terminate • Otherwise • Find a neighbor on the otherside of the matched edge • Re-insert that neighbor using the insertion method
DAM in Weighted Dynamic Graphs • Basic idea is to reduce the weighted case to the unweighted case • Partition the edges into disjoint classes where all edges in class i have weights in [4i, 4i+1) • When a node is inserted, it initiates the unweighted algorithm for each weight class according to the weights of its incident edges • After O(1) times all algorithms terminate in each classes • Each node then picks the matched incident edge in the highest weight class • An edge is added iff both its two endpoints choose it
DAM in Weighted Dynamic Graphs • The runtime of the algorithm is constant • Each of the class weight algorithms works only to distance O(1/ε) • Since only one hop neighborhood is affected by the change, we use ε = 1, therefore O(1/ε) = O(1) • Only this neighborhood change the output