The Augmented Path Algorithm:
An algorithm for finding
maximum matchings & minimum vertex covers
Question: Given a matching M, how can we make it larger?
Question: Given a matching M, how can we make it larger?
Assume we can find a “path” in our graph that alternates between
edges in M (blue) and those not in M (black):
1
2
3
a
b
c
Question: Given a matching M, how can we make it larger?
Assume we can find a “path” in our graph that alternates between
edges in M (blue) and those not in M (black):
1
2
3
a
b
c
? Provided 1 and c are not matched, we can “shift” to obtain a
larger matching!
1
2
3
a
b
c
1. Any path that alternates between edges in M (blue) and those
not in M (black) is called an alternating path.
1. Any path that alternates between edges in M (blue) and those
not in M (black) is called an alternating path. For example
1
2
a
b
3
1. Any path that alternates between edges in M (blue) and those
not in M (black) is called an alternating path. For example
1
2
a
b
3
2. Any alternating path whose first and last vertices are
unmatched, such as
1. Any path that alternates between edges in M (blue) and those
not in M (black) is called an alternating path. For example
1
2
a
b
3
2. Any alternating path whose first and last vertices are
unmatched, such as
1
2
3
4
a
b
c
d
is called an augmented path.
1. Any path that alternates between edges in M (blue) and those
not in M (black) is called an alternating path. For example
1
2
a
b
3
2. Any alternating path whose first and last vertices are
unmatched, such as
1
2
3
4
a
b
c
d
is called an augmented path.
? Shifting augmented paths make bigger
matchings!
Consider the bipartite graph:
1
2
a
3
b
4
c
5
d
Algorithm for finding a maximum matching:
6
e
Consider the bipartite graph:
1
2
a
3
b
4
c
5
d
Algorithm for finding a maximum matching:
1. Choose some edge
6
e
Consider the bipartite graph:
1
2
a
3
b
4
c
5
d
Algorithm for finding a maximum matching:
1. Choose some edge
6
e
Consider the bipartite graph:
1
2
a
3
b
4
c
5
d
Algorithm for finding a maximum matching:
1. Choose some edge
2. Find an augmented path
6
e
Consider the bipartite graph:
1
2
a
3
b
4
c
5
d
Algorithm for finding a maximum matching:
1. Choose some edge
2. Find an augmented path
6
e
Consider the bipartite graph:
1
2
a
3
b
4
c
5
d
Algorithm for finding a maximum matching:
1. Choose some edge
2. Find an augmented path
3. SHIFT!
6
e
Consider the bipartite graph:
1
2
a
3
b
4
c
5
d
Algorithm for finding a maximum matching:
1. Choose some edge
2. Find an augmented path
3. SHIFT!
6
e
Consider the bipartite graph:
1
2
a
3
b
4
c
5
d
6
e
Algorithm for finding a maximum matching:
1. Choose some edge
2. Find an augmented path
3. SHIFT!
4. Repeat (2) and (3) until an augmented path cannot be found
Consider the bipartite graph:
1
2
a
3
b
4
c
5
d
6
e
Algorithm for finding a maximum matching:
1. Choose some edge
2. Find an augmented path
3. SHIFT!
4. Repeat (2) and (3) until an augmented path cannot be found
Consider the bipartite graph:
1
2
a
3
b
4
c
5
d
6
e
Algorithm for finding a maximum matching:
1. Choose some edge
2. Find an augmented path
3. SHIFT!
4. Repeat (2) and (3) until an augmented path cannot be found
Consider the bipartite graph:
1
2
a
3
b
4
c
5
d
6
e
Algorithm for finding a maximum matching:
1. Choose some edge
2. Find an augmented path
3. SHIFT!
4. Repeat (2) and (3) until an augmented path cannot be found
Consider the bipartite graph:
1
2
a
3
b
4
c
5
d
6
e
Algorithm for finding a maximum matching:
1. Choose some edge
2. Find an augmented path
3. SHIFT!
4. Repeat (2) and (3) until an augmented path cannot be found
Consider the bipartite graph:
1
2
a
3
b
4
c
5
d
6
e
Algorithm for finding a maximum matching:
1. Choose some edge
2. Find an augmented path
3. SHIFT!
4. Repeat (2) and (3) until an augmented path cannot be found
Consider the bipartite graph:
1
2
a
3
b
4
c
5
d
6
e
Algorithm for finding a maximum matching:
1. Choose some edge
2. Find an augmented path
3. SHIFT!
4. Repeat (2) and (3) until an augmented path cannot be found
Consider the bipartite graph:
1
2
a
3
b
4
c
5
d
6
e
Algorithm for finding a maximum matching:
1. Choose some edge
2. Find an augmented path
3. SHIFT!
4. Repeat (2) and (3) until an augmented path cannot be found
5. Our maximum matching is the collection of blue edges M.
Given our maximum matching M:
A:
B:
1
2
a
3
b
4
c
5
d
Algorithm for finding a minimum vertex cover:
6
e
Given our maximum matching M:
A:
B:
1
2
a
3
b
4
c
5
d
Algorithm for finding a minimum vertex cover:
1. For each unmatched vertex in A, find all vertices in B
reachable via an alternating path. Mark them.
6
e
Given our maximum matching M:
A:
B:
1
2
a
3
b
4
c
5
d
Algorithm for finding a minimum vertex cover:
1. For each unmatched vertex in A, find all vertices in B
reachable via an alternating path. Mark them.
6
e
Given our maximum matching M:
A:
B:
1
2
a
3
b
4
c
5
d
Algorithm for finding a minimum vertex cover:
1. For each unmatched vertex in A, find all vertices in B
reachable via an alternating path. Mark them.
6
e
Given our maximum matching M:
A:
B:
1
2
a
3
b
4
c
5
d
6
e
Algorithm for finding a minimum vertex cover:
1. For each unmatched vertex in A, find all vertices in B
reachable via an alternating path. Mark them.
2. For each matching edge not touching a marked vertex, mark
its top vertex.
Given our maximum matching M:
A:
B:
1
2
a
3
b
4
c
6
5
d
e
Algorithm for finding a minimum vertex cover:
1. For each unmatched vertex in A, find all vertices in B
reachable via an alternating path. Mark them.
2. For each matching edge not touching a marked vertex, mark
its top vertex.
Given our maximum matching M:
A:
B:
1
2
a
3
b
4
c
6
5
d
e
Algorithm for finding a minimum vertex cover:
1. For each unmatched vertex in A, find all vertices in B
reachable via an alternating path. Mark them.
2. For each matching edge not touching a marked vertex, mark
its top vertex.
3. The marked vertices form a vertex cover:
VC = {a, b, c, 6}.
Given our maximum matching M:
A:
B:
1
2
a
3
b
4
c
6
5
d
e
Algorithm for finding a minimum vertex cover:
1. For each unmatched vertex in A, find all vertices in B
reachable via an alternating path. Mark them.
2. For each matching edge not touching a marked vertex, mark
its top vertex.
3. The marked vertices form a vertex cover:
VC = {a, b, c, 6}.
? Note that |VC | = 5 = |M| as guaranteed by König’s Theorem.
© Copyright 2026 Paperzz