• Aucun résultat trouvé

Synchronous Matching

Dans le document To the memories of Necdet Doˇganata and (Page 196-0)

Part II Graph Theoretical Algorithms

12.4 Self-Stabilizing Matching

12.4.2 Synchronous Matching

Goddard et al. [6] provided a synchronous version of the Hsu_MM using a dis-tributed daemon for ad hoc networks and also used identifiers of the nodes. In Goddard_MM, each nodei has a pointer that either is not pointing to any node, shown byi↓, orij if it is pointing to nodej. An edge between nodesiandjis in matching({i, j} ∈MM)if(ijji), in which caseij. The algorithm evaluates three rules, and if one of them is valid, the node becomes enabled as shown

12.4 Self-Stabilizing Matching 187

in Algorithm12.8. In Rule R1, nodeithat is not pointing to a neighbor may choose one of the nodes pointing to it by accepting the proposal made by it. In Rule R2, an idle nodeithat is not pointing to any neighbor and has at least one neighbor that has a null pointer makes a proposal by pointing to it if no other neighbor is pointing to it. In case of more than one idle neighbor, it chooses the neighbor with the lowest identifier. In Rule R3, when nodeithat is pointing to a neighborj finds thatj is pointing to another nodek=i, it changes its pointer to null and becomes idle. This situation is called as backing off.

12.4.2.1 Analysis

Theorem 12.5 When Goddard_MM stabilizes, the output matching is maximal.

Proof Let us assume that the matching produced is not maximal. Every node is either matched or idle as R3 is not enabled since there are no privileged nodes. There will be two idle nodes that are neighbors as the matching is not maximal. However, these two nodes will be privileged to execute as R2 will be enabled for both, a contradiction. It is shown in [4] that this algorithm stabilizes inn+1 rounds.

12.4.3 Weighted Matching

Manne et al. [13] proposed the first self-stabilizing algorithm (Manne_MWM) that finds the MWM in arbitrary networks. Every node has a pointermi to point to the node it will be matched andhi that shows the weight of the matched edge. Initially, mi is set to null, and hi is set to 0. Two neighbors i and j are matched when mi =j andmj=i. The setSΓ (i):kS if and only ifkΓ (i)w(k, i)hk. As such, S includes all neighbors that can be matched with i with a higher or equal weight edge than its currently matched edge. The algorithm consists of a

188 12 Matching Algorithm 12.9 Manne_MWM

1:

2: procedure BestMatch(j ) 3: return max{jS|w(i, j )} 4:

5: SetMatch

6: ifmi=BestMatch(i)hi=w(i, mi)then 7: miBestMatch(i)

8: hiw(i, mi) 9: end if

Fig. 12.8 Manne_MWM execution example

function BestMatch that returns the neighborjS such that w(i, k) is maximal inSand a rule SetMatch that updatesmi andhi according to the value returned by BestMatch(i)as shown in Algorithm12.9.

A possible execution sequence of Manne_MWM is shown in Fig.12.8, where an enabled node is shown by a double circle at each step. Nodescandd are initially matched. However,chas neighbor b connected with a higher weight edge{c, b} than the current one, anddhasbas the best match similarly, and therefore both are privileged. The adversarial daemon enables noded, which then points to nodebas its best match as shown in (b), and the daemon enables nodec, which finds the best match as nodeband points to nodeb in (c), and finally nodeb executes pointing tod as the best match in (d). It should be noted that nodeb was enabled initially and could have executed before. The configuration at (d) is stable since none of the nodes will be enabled.

It was shown in [13] that Manne_MWM converges in at most 2m+1 rounds with 1/2 approximation under the distributed fair model andO(3n)time steps under the distributed adversarial model.

12.5 Chapter Notes

Although maximal matching can be achieved in polynomial time, approximation al-gorithms may be preferred due to their low time and message complexities. We have

12.5 Chapter Notes 189 Table 12.1 Matching algorithm comparison

Algorithm Time Comp. Msg. Comp.

Unweighted Matching Rank_MM O(n) O(nm)

Ecol_MM O(k) O(km)

PancRizzi_MM O(logn+Δ)

Weighted Matching Hoepman_MWM O(m) O(nm)

Self-Stab. Matching Hsu_MM O(2m+n)moves

Goddard_MM O(n)rounds Manne_MWM O(2m+1)rounds

Fig. 12.9 Example graphs for Exercise1

seen several distributed algorithms to find maximal matching in graphs. Table12.1 summarizes the algorithms analyzed in this chapter.

Edmonds [3] provided the first polynomial-time sequential algorithm for the maximum weight matching problem. In distributed settings, distributed match-ing algorithms still remain an active research area. Israeli and Itai [10] presented the first randomized distributed algorithm to compute maximal matching with ex-pected running time O(logn). Czygrinow et al. [2] presented a deterministic al-gorithm that computes a 2/3 approximation to MaxM inO(log4n)time. Kuhn et al. [11] showed that any randomized or deterministic distributed algorithm requires (Ω (plogn)/(log logn)expected time to compute a 1-approximate maximum car-dinality matching. Recently, Lotker et al. [12] gave an algorithm with (1 ε)-approximation inO(logn)time for any constantε≥0 for unweighted graphs.

For weighted graphs, Uehera et al. [17] provided a constant time distributed al-gorithm that finds an MWM of an arbitrary graph withO(Δ)approximation. Wat-tenhofer et al. [18] also presented a randomized distributed algorithm with a ratio of 5 to compute an MWM.

12.5.1 Exercises

1. Find examples of MM in (a), MaxM in (b), and MaxWM in (c) of Fig.12.9.

190 12 Matching Fig. 12.10 Example graph

for Exercise2

Fig. 12.11 Example graph for Exercise3

Fig. 12.12 Example graph for Exercise4

2. Modify Rank_MM algorithm so that the lowest degree node in a neighborhood decides on the neighbor node to match in each round. Show also the operation of this algorithm in the sample graph of Fig.12.10.

3. Show the step-by-step execution of the Ecol_MM algorithm in the 7-colored sample graph of Fig.12.11, where each edge is labeled by its color.

4. Provide a pseudocode for the greedy distributed weighted matching where a node with the highest identifier in a neighborhood selects the heaviest edge incident to it and proposes to the neighbor incident to the other end of this edge. Work out the time and message complexities of this algorithm. Show also the execution of this algorithm in the sample graph of Fig.12.12.

References

1. Avis D (1983) A survey of heuristics for the weighted matching problem. Networks 13:475–

493

2. Czygrinow A, Hanckowiak M, Szymanska E (2004) A fast distributed algorithm for approx-imating the maximum matching. In: Proc 12th ann European symp on algorithms (ESA), pp 252–263

3. Edmonds J (1965) Path, trees, and flowers. Can J Math 17:449–467

Dans le document To the memories of Necdet Doˇganata and (Page 196-0)