Matching. Applications Vertex Cover Cover Is Upper Bound. ∑ Simple Example. Maximum Matching

Matching. Applications Vertex Cover Cover Is Upper Bound. ∑ Simple Example. Maximum Matching

Matching. Applications Vertex Cover Given a bipartite graph, G = (U,V ,E), with edge weights w : E R, → Given a bipartite graph, G = (U,V ,E), with edge weights w : E R, find an vertex cover function of minimum total value. → find a maximum weight matching. A function p : V R, where for all edges, e = (u,v) Jobs to workers. → A matching is a set of edges where no two share an endpoint. p(u) + p(v) w(e). Teachers to classes. ≥ u a Minimize ∑v U V p(u). Blue – 3. Green - 2, Classes to classrooms. ∈ ∪ 230 u a 103 Black - 1, Non-edges - 0. v b “The assignment problem” Solution Value: 12. Solution Value: 7. Min Weight Matching. 130 v b 103 Solution Value: 12. w c Solution Value: 7. Negate values and find maximum weight matching. 130 w c 103 Solution Value: 9. Solution Value: 8. x d Solution Value: 8. 230 x d 203 Cover is upper bound. Simple example. Maximum Matching Feasible p( ), for edge e = (u,v), p(u) + p(v) w(e). · ≥ Given a bipartite graph, G = (U,V ,E), find a maximum sized w(e) Blue edge – 2, Others – 1. matching. u v 1 a x 0 Using max incident edge. Key Idea: Augmenting Alternating Paths. p(u) p(v) 2 b y 0 Example: Value: 3. For a matching M, each u is the endpoint of at most one edge in M. Using max incident edge. a x u 0 a x 1 Value: 2. Same as optimal matching! y w(e) (p(u) + p(v)) p(u) + p(v) 1 b 0 Proof of optimality. ∑ ≤ ∑ ≤ ∑ ∑ b y e=(u,v) M e=(u,v) u U v V Matching and cover are optimal, ∈ ∈ ∈ edges in matching have w(e) = p(u) + p(v). Tight edge. Start at unmatched node(s), Holds with equality if all nodes are matched. follow unmatched edge(s), for e M, w(e) = p(u) + p(v) (Defn: tight edge.) and follow matched. ∈ perfect matching. Repeat until an unmatched node. No perfect matching Back to Maximum Weight Matching. Maximum Weight Matching Goal: perfect matching on tight edges. a x Can’t increase matching size. Algorithm No alternating path from (a) to (y). Start with empty matching, feasible cover function (p( )) · Cut! Add tight edges to matching. Use alt./aug. paths of tight edges. Still no augmenting path. Want vector cover (price function) p( ) and matching where. p( ) + δ b y · · ”maximum matching algorithm.” Still Cut? Optimal solutions to both if p( ) . · . No augmenting path. Use directed graph! for e M, w(e) = p(u) + p(v) (Defn: tight edge.) and . ∈ .. p( ) Cut, (S,T ), in directed graph of tight edges! Cut in this graph. perfect matching. · . All edges across cut are not tight. (loose?) p( ) δ . c z · − Nontight edges leaving cut, go from SU , TV . Lower prices in SU , raise prices in SV , Algorithm: all explored edges still tight, Given matching. backward edges still feasible Direct unmatched edges U to V , matched V to U. Find path between unmatched nodes on left to right. (BFS, DFS). ... and get new tight edge! What’s delta? w(e) > p(u) + p(v) Until everything matched ... or output a cut. → δ = mine (S T )w(e) p(u) p(v). ∈ U × V − − Some details Example Add 0 value edges, so that optimal solution contains perfect matching. 3 u a 10 u X a Beginning “Matcher” Solution: M = . {} 213 v b 0 v b Feasible! Value = 0. Lecture 2 ended in the middle of the previous slide. 213 w c 0 w c A question was asked why don’t we just drop prices around the Beginning “Coverer” Solution: p(u) = maximum incident blue (loose) edge in the figure. Why not? edge for u U, 0 otherwise. ∈ 23 x d 0 x d Main Work: breadth first search from unmatched nodes finds cut. All matched edges tight. Update prices (find minimum delta.) Perfect matching. Feasible price function. Values the same. Optimal! Simple Implementation: Each bfs either augments or adds node to S in next cut. Notice: O(n) iterations per augmentation. no weights on the right problem. O(n) augmentations. retain previous matching through price changes. retains edges in failed search through price changes. O(n2m) time..

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    2 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us