Illustration of bipartite graph maximum matching and equivalence with the minimum vertex cover problem. Simple algorithms for their computation are shown
v1 v2 An alternating path is a path in which the edges belong alternatively in the matching and not in it u1 v1 u2 An augmenting path is an alternating path with starts an ends in unmatched vertices u1 v1 u2 v2
a G=(V, E) we have that there are at most |V| augmenting paths. And since each augmenting path can be found with BFS in O(|V| + |E|). Thus we can find a maximum matching in a bipartite graph in O(|V|2+ |V||E|)
v1 v2 Given G = (U∪V, E), and the maximum matching M then a minimum vertex cover of G is given by (U - T) ∪ (V ∩ T) Where T is the set of vertices which can be reached by a directed path from a matched vertex in U