An alternating tree is maximal if no edges can be

Info icon This preview shows pages 4–7. Sign up to view the full content.

View Full Document Right Arrow Icon
An alternating tree is maximal if no edges can be added to it. If T is a maximal alternating tree rooted at u , and v is an unmatched leaf vertex, then the ( u, v )-path in T is augmenting.
Image of page 4

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Algorithm: Construct a maximal alternating tree (using breadth- first search), only adding edges if they alternate from the root u . Lemma 1. For every bipartite graph G and vertex u of G , if T is a maximal alternating tree rooted at u and G contains an augmenting path starting at u , then T contains an augmenting path starting at u . Naive maximum bipartite matching algorithm input: a bipartite graph G output: a maximum matching in G 1. let M := 2. for each unmatched vertex u V ( G ) do Grow a maximal alternating tree T rooted at u . if some leaf vertex v of T is unmatched then Augment along the ( u, v )-path in T (thus increasing the size of M by 1). Start step 2 again. end-if end-for Maximum bipartite matching algorithm input: a bipartite graph G with bipartition { V 1 , V 2 } output: a maximum matching in G 1. Let v 1 , . . . , v n be the vertices in V 1 . Let M := and V := . [When the algorithm terminates, M is a maximum matching and V is the set of matched vertices.] 2. for i = 1 , 2 , . . . , n do If v i is matched then do nothing (just increment i ). Otherwise ( v i is unmatched) grow an alternating tree from v i . If at some stage an augmenting path P from v i is found, then augment along P to get a larger matching, and add the end vertices of P to V . Grow the tree until an augmenting path or a maximal alternating tree without such a path is found. If we do not know the bipartition { V 1 , V 2 } of G , we may run Step 2 for all vertices of G and the algorithm still works. This increases the running time by a constant factor. To find a bipartition of a given bipartite graph, we may color its vertices by two colors in such a way that adjacent vertices receive different colors. This can be done by a breadth first search starting from any vertex. In Step 1, if you have a matching at hand, we can start from there instead of the empty matching. In Step 2, as soon as we find an augmenting path, we can augment along it, and then move on to the next vertex; i.e., in this case we do not have to grow a maximal alternating tree. To prove the correctness of the algorithm we need the following:
Image of page 5
Theorem 5. Let M be a matching of a graph G that is not maximum. Let v be an unmatched vertex w.r.t. M , and let M 0 be a matching obtained from M by a single augmentation along an augmenting path. If G contains an augmenting path w.r.t. M 0 with v as an end-vertex, then G contains an augmenting path w.r.t. M with v as an end-vertex. That is, if there exists no augmenting path w.r.t. M with v as an end-vertex, then there exists no augmenting path w.r.t. M 0 with v as an end-vertex. Corollary 1. Let M 1 , M 2 , . . . , M k be matchings of a graph G such that each M i (2 i k ) is obtained from M i - 1 by an augmentation. If there exists no augmenting path w.r.t. M 1 with v as an end-vertex, then for each i , 2 i k , there exists no augmenting path w.r.t. M i with v as an end-vertex.
Image of page 6

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern