Download presentation
Presentation is loading. Please wait.
Published byTeguh Irawan Modified over 6 years ago
1
Rank Maximal Matching By Robert W. Irving, Telikepalli Kavitha,
Kurt Mehlhorn, Dimitrios Michail.
2
Introduce the problem Let be a bipartite graph and εbe the edge set, each edge (a,p) has a rank, find the best matching for G A rank maximum matching is : In a matching M, you can’t find another matching mi that | mi | > |Mi| with respect to edges of rank i. Just like allocation jobs to students or probationary jobs to trainee teachers
3
Definitions P(M) : The signature of a Matching M, which is represented in a r-tuple form (x1, x2, … , xr), where xi denotes the size of a match for an edge set of rank i. We also define a total order that if (x1,x2,…,xr) (y1,y2,…,yr) for some k <= r, xk < yk and for all j < k, xk = yk Mi : A subset of a rank maximum matching M having rank maximum matching with rank <= i, a subset of Mi-1
4
Algorithms Previous achives: Today’s goal: O(min(n+C, C )m)
xc= x1+……+xk Today’s goal: O(min(n+C, C )m) Another solution works in O(Cmn) C: The maximum rank of all nodes m: The number of edges n: The number of vertexes
5
Solutions: A combinational algorithm
Shortcut: Delete those who will not be used anymore. Use E, O, and U disjoint sets to partition the graph. Alternating path!
6
Definitions: E, O, and U(1/2)
Three disjoint sets: E/O: Nodes that can be reached by a free node by an even/odd-numbered path in terns of alternating path 1 1 1 2 2 Free
7
Definitions: E, O and U(2/2)
U: nodes can not be reached by any free nodes using alternating path. Lemma 2.1:The sets E, U, O are pair wise disjoint, every maximum matching in G pairs the nodes in U, matches all nodes in O, matches each node in O and another in E, and have cardinality |O| + |E|/2. There is no edge in G connecting a node in E with a node in U, or between 2 nodes in E, no maximum matching in G uses an edge connecting 2 nodes in O or one in O and another in U
8
A combinational algorithm(1/2)
Gi: Mi: A greedy matching with signature(s1,s2,…,si) Initial state: G1’ = G1, M1=maximum matching of G1’
9
A combinational aogorithm(2/2)
For i = 1 to r-1 do Partition Gi’ into node sets Ei, Oi, and Ui with respect to Mi Delete all edges incident to Oi or Ui which has rank > I Also delete all edges that connect 2 nodes in O, or one in O and another in U Add εi into Gi’, said Gi+1’ Augmenting Mi to get Mi+1
10
Prove the correctness(1/4)
Lemma 2.2:If every greedy matching of Gi is a maximum matching of Gi’, then every greedy matching of Gi+1 is contained in Gi+1’ Let Ni+1 be a greedy matching Ni = Ni+1 ε≦I Ni is a greedy matching in Gi Ni is a maximum matching in Gi Ni does not use any edge of Gi’, so will never use in Ni+1 Ni+1 is contained in Gi+1’
11
Prove the correctness(2/4)
Lemma 2.3: For every i, j such that j > I, the number of edges at most i is the same in Mi and Mj Since Mj is obtained from Mi by successive augmenting, every vertex matched by Mi is also matched by Mj all nodes in Ui and Oi are matched in Mj #(ε≦i) > #(ε≦j) #(ε≦i) in Mj < #(ε≦i) in Mi by definition
12
Prove the correctness(3/4)
By induction prove: Every greedy matching in Gk is a maximum matching in Gk’ Mk is a greedy matching in Gk Case k = 1 a greedy matching in G1 is a maximum match in G1’, trivially. Assume case k = n is true Consider case k = n+1:
13
Prove the correctness(4/4)
Mi is a greedy matching in Gi with signature (s1,s2,…,si), suppose Gi+1’s signature is (r1,r2,…,ri,ri+1) By lemma 2.3 s1 + s2 + … + si = r1 + r2 + … + ri Mi+1 = (s1,s2,…,si,ri+1) with ri+1 < si+1 By lemma 2.2 Mi is a maximum matching Mi+1 is contained in Gi+1’ Mi+1 is a maximum matching of Gi+1 its cardinality is at least s1 + s2 + … + si+1, so si+1 = ri+1 By induction hypothesis, any greedy matching Ni+1 in Gi+1is contained in Gi+1’ and Ni has the same cardinality of Mi+1 Ni+1 is a maximum matching
14
Time complexity Partition the nodes and reduce the edge set takes O(m)
Augmenting the path takes O(min(n^1/2, |Mi+1|-|Mi| + 1) * m) In total r phases takes O(min(r*n^1/2, n+ r) * m) Replace r by C check in each phase if no more size expantion happened, O(m) time O(min(C *n^1/2, n+C) * m)
15
Reduced to weighted Matching
A primer-dual linear programming problem. A reduced weighting function for each edge (e) = v(a) + v(b) – w(e) For all a A, b P Main idea: Give a wide ranged weight to each node. E.g. Give nr-I for any rank = i edges
16
An Overview of Algorithm
For i = 1, M1 can be calculated in O(n1/2m) All nodes in A and all free nodes in P is assigned 0 Matched nodes in P is assigned potential 1. Scaling: All edge scale n times Each node potential multiply by n Each node in A add 1
17
Lemmas for dual solution(1/2)
Lemma 3.1 Mi has the same number of edges of all ranks j, j < i as Mi-1 Lemma 3.2 Let πi be the sum of potential, then n*πi-1 = n*w(Mi-1)≦w(Mi)≦ πi ≦n* πi-1+ n Lemma 3.3 Assume all arithmetic operations can be done in constant time, then a phase takes O(m*n)
18
Lemmas for dual solution(2/2)
Lemma 3.4 If the reduces cost of an edge c(e) is more than n at the beginning of a phase, this edge can not become tight during the execution of this phase Lemma 3.5 Any edge which is not tight at the end of a phase, will never become tight!
19
The scaling algorithm(1/2)
Initial state: π(a) = 0 for all a belong to A, π(b) = 0 for b belong to P with no match, 1 for matched nodes. Algo: For i = 2 to r do if Mi-1 is a perfect matching, then output Mi-1, else define π(v) = n*π(v) + 1 , for all v belongs to A π(v) = n*π(v) , for all v belongs to P Add edges in εi , for each new edges e, if either and of e is in the ∞ category, delete it. For any remaining edge, compute their reduced weight by setting w(e) = 1 Use primer dual algo for maximum matching in above graph, update each nodes’ potential, if π(v) > n+1,delete it
20
The scaling algorithm(2/2)
Delete all non tight edges, and if π(v) > 2, move v to ∞ category
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.