Graph Theory37 sections · 1633 units
Open in Course

Finding Augmenting Paths

(DFS from unmatched nodes)

To find an augmenting path, start from an unmatched vertex uLu \in L and run a DFS or BFS. Follow these rules: from vertices in LL, take non-matching edges to RR. From vertices in RR, take matching edges back to LL.

If you reach an unmatched vertex in RR, you have found an augmenting path. If all unmatched vertices in LL fail to find paths, the current matching is maximum. This search takes O(E)O(E) time.

Space complexity is O(V)O(V) for the data structures used.