Dispelling an Old Myth
Algorithmic Game Theory
about
an
Ancient
Algorithm
and Internet Computing
Vijay V. Vazirani
Georgia Tech
Central to the Theory of Algorithms
Kuhn, 1955:
Primal-dual paradigm
Edmonds, 1965: Definition of P
Valiant, 1979:
Jerrum, Valiant & Vazirani, 1986: Equivalance
of random generation and approximate counting
Definition of #P
Matching in
game theory and economics
Gale & Shapley, 1962: Stable marriage
Shapley & Shubik, 1971: Matching markets
Matching in
game theory and economics
Gale & Shapley, 1962: Stable marriage
Shapley & Shubik, 1971: Matching markets
Mehta, Saberi, Vazirani & Vazirani, 2005:
Adwords market
U
V
U
V
Matching: M E
that don't share vertices.
Maximum matching: a matching
of maximum cardinality in graph
U
V
Matching: M E
that don't share vertices.
alternating path
U
V
Matching: M E
that don't share vertices.
alternating path
augmenting path: alternating
path between 2 unmatched
vertices.
U
V
Matching: M E
that don't share vertices.
alternating path
augmenting path: alternating
path between 2 unmatched
vertices.
U
V
Matching: M E
that don't share vertices.
alternating path
augmenting path: alternating
path between 2 unmatched
vertices.
U
V
Matching: M E
that don't share vertices.
alternating path
augmenting path: alternating
path between 2 unmatched
vertices.
Maximum matching algorithm
M ;
While an augmenting path w.r.t. M do:
Find one, say p;
M M p;
end;
output M ;
Maximum matching algorithm
M ;
While an augmenting path w.r.t. M do:
Find one, say p;
M M p;
end;
output M ;
O(n) iterations, O(m)/iteration, so O(mn) algorithm.
Shortest augmenting paths
M ;
While an augmenting path w.r.t. M do:
Find a shortest one, say p;
M M p;
end;
output M ;
M
Disjoint.
Therefore aug paths w.r.t. M.
Maximal set.
Shortest augmenting paths
M ;
While an augmenting path w.r.t. M do:
Find a maximal set of
disjoint mimimum length paths;
Augment M;
end;
output M ;
phase
Hopcroft & Karp, 1973:
Theorem: O
n phases suffice
in general graphs.
Theorem: In bipartite graphs:
O(m) per phase O m n algorithm.
Micali & Vazirani, 1980:
Theorem: In general graphs:
O(m) per phase O m n algorithm
Micali & Vazirani, 1980:
Theorem: In general graphs:
O(m) per phase O m n algorithm,
using Gabow & Tarjan, 1985:
linear time set-union on RAM.
In G =(U, V, E) w.r.t. current matching M define
level(v): length of shortest alternating path
from an unmatched U vertex to v.
Find, via an alternating BFS, starting from
all unmatched vertices in U.
At search level i: level i vertices find
level i+1 vertices.
U
V
U
0
V
1
U
0
U
2
V
1
U
0
Set of
predecessors
{a, b}
V
U
a
3
b
2
V
1
U
0
U
4
V
3
U
2
V
1
U
0
U
4
V
3
U
2
V
1
U
0
U
4
V
3
U
2
V
1
U
0
V
5
U
4
V
3
U
2
V
1
U
0
V
5
U
4
V
3
U
2
V
1
U
0
V
5
U
4
V
3
U
2
V
1
U
0
V
5
U
4
V
3
U
2
V
1
U
0
V
5
U
4
V
3
U
2
V
1
U
0
V
5
U
4
V
3
U
2
V
1
U
0
V
5
U
4
V
3
U
2
V
1
U
0
General Graphs
4
5
5
3 6
4
6 3
2
1
0
G =(V, E). W.r.t. matching M define:
evenlevel(v): length of min even alternating path
from an unmatched vertex to v.
oddlevel(v): length of min odd alternating path
from an unmatched vertex to v.
minlevel(v): smaller of e(v) and o(v)
maxlevel(v): larger of e(v) and o(v)
Qualitative difference
BFS honesty:
f
u
v
Minimum length alternating paths in bipartite
graphs are BFS honest.
Qualitative difference
BFS honesty:
f
u
v
Minimum length alternating paths in bipartite
graphs are BFS honest.
Not so in non-bipartite graphs!
Qualitative difference
BFS honesty:
f
u
Not so in non-bipartite graphs!
Because shortest f to u path has v on it at
opposite parity.
v
v
v
a
v
a
b
v
a
b
Central issue
Need to find longer and longer alternating
paths to v in order to find min alternating
paths to other vertices.
Central issue
Need to find longer and longer alternating
paths to v in order to find min alternating
paths to other vertices.
Should require exponential time!
Saving grace
Incredible structure of minimum length
alternating paths.
Will give a purely graph-theoretic definition
of blossoms from this perspective.
0
1
0
2
1
0
3
3
2
Will mark predecessors
1
0
4
4
3
3
2
1
0
4
4
3
3
2
1
0
4
5
5
3 6
4
6 3
2
1
0
4
5
5
3 6
6
2
1
0
4
7
3
bridge
4
4
3
3
base
2
1
0
prop: an edge (u, v) s.t. u is a predecessor of v,
i.e., u assigns minlevel to v.
bridge: an edge that is not a prop.
Assigns maxlevels.
base
4
4
3
3
2
2
1
1
0
4
5
5
3 6
4
6 3
2
7
2
1
8
1
0
WANT
Find “blossom” by identifying “base”
i.e., highest bottleneck w.r.t. predecessors.
5
5
4
3
4
4
3
3
2
2
1
1
0
WANT
Find “blossom” by identifying “base”
i.e., highest bottleneck w.r.t. predecessors.
If a nested blossom is encountered on the way,
should skip to its base.
New algorithmic procedure:
Double Depth First Search
In a layered graph,
assume bridge (a,b)
a and b: special vertices on highest layer
(layers correspond to minlevels)
Edges can skip layers (nested blossoms)
Accomplish WANT.
In time: O(no. of edges above “base”)
a
b
a
b
a
b
a
b
a
b
a
b
a
b
a
b
a
b
a
b
a
b
a
b
a
b
a
b
a
b
a
b
a
b
5
5
4
3
4
4
3
3
2
2
2
1
1
1
0
0
WANT
Find “blossom” by identifying “base”
i.e., highest bottleneck w.r.t. predecessors.
If a nested blossom is encountered on the way,
should skip to its base.
If no bottleneck, then reach 2 unmatched
vertices – min aug path found!
a
b
a
b
a
b
a
b
a
b
GOT MORE …
bridge = (a, b)
1). Mark each v B as red or blue.
2). For each red v, a red path from a to v.
3). Also a red path from a to base of B.
a
b
GOT MORE …
bridge = (a, b)
1). Mark each v B as red or blue.
2). For each red v, a red path from a to v.
3). Also a red path from a to base of B
or to red unmatched vertex.
a
b
WANT
Find “blossom” by identifying “base”
i.e., highest bottleneck w.r.t. predecessors.
If a nested blossom encountered on the way,
should skip to its base.
If no bottleneck, then reach 2 unmatched
vertices – min aug path found!
WANT
Find “blossom” by identifying “base”
i.e., highest bottleneck w.r.t. predecessors.
If a nested blossom encountered on the way,
should skip to its base – mark blossom so
this can be done efficiently.
If no bottleneck, then reach 2 unmatched
vertices – min aug path found!
5
5
4
4
3
3
2
2
1
1
0
5
5
4
4
3
3
2
2
1
1
0
tenacity(v) = evenlevel(v) + oddlevel(v)
= Length of min alternating
walk (may be self-intersecting) between
unmatched vertices on which v occurs once.
4
5
5
3 6
4
6 3
2
1
0
Let tenacity(v) = t. Consider the highest vertex of
tenacity > t on each minlevel(v) and maxlevel(v)
path.
v
Let tenacity(v) = t. Consider the highest vertex of
tenacity > t on each minlevel(v) and maxlevel(v)
path.
v
v
v
Let tenacity(v) = t. Consider the highest vertex of
tenacity > t on each minlevel(v) and maxlevel(v)
path.
v
v
v
v
v
v
The base of a vertex
Theorem: Let v be a vertex of tenacity t.
Consider the highest vertex of tenacity > t
on each minlevel(v) and maxlevel(v) path.
There is a ! such vertex.
Denoted: base(v)
Blossom
Let tenacity(b) > t.
The blossom of tenacity t with base b
is defined to be
Bb,t v | tenacity(v)t and base(v) b
v
base(v)
base(base(v))
2
base (v)
3
base (v)
2
Theorem: base(v), base (v), ... occur on
every evenlevel(v) and oddlevel(v) path.
tenacity(u, v) = Length of min alternating
walk (may be self-intersecting) between
unmatched vertices on which (u, v) occurs
once.
u
v
(u, v) unmatched
tenacity(u, v) = evenlevel(u) + evenlevel(v)+1
u
v
(u, v) matched
tenacity(u, v) = oddlevel(u) + oddlevel(v)+1
4
9
9
5
5
3 6
9
4
9
6 3
9
2
1
0
Support of a bridge
Let (u, v) = bridge of tenacity t
support(u, v) = vertices of tenacity t found
in DDFS from (u, v).
Bridge (u, v) is responsible for assigning
maxlevels to these vertices.
Main ideas in algorithm
DDFS
Precise
synchronization of events
Algorithm: intertwined BSF & DDFS
At search level i:
MIN: level i vertices reach, via alternating BFS,
all vertices having minlevel of i+1.
MAX: Run DDFS on each bridge of tenacity 2i+1
to find maxlevels of all vertices
of tenacity 2i+1.
15
13
15
13
19
Algorithm: intertwined BSF & DDFS
At search level i:
MIN: level i vertices reach, via alternating BFS,
all vertices having minlevel of i+1.
MAX: Run DDFS on each bridge of tenacity 2i+1
to find maxlevels of all vertices
of tenacity 2i+1.
4
4
4
3
3
3
2
1
2
1
0
5
5
4
4
4
3
3
3
2
1
2
1
0
5
5
4
4
4
3
8
3
3
2
1
2
1
0
tenacity(bridge) = 13
Will do DDFS at
search level 6.
9
4
5
5
4
4
3 10 3 8
2
11
1 12
3
2
1
0
After DDFS at
search level 6.
Algorithm: intertwined BSF & DDFS
At search level i:
MIN: level i vertices reach, via alternating BFS,
all vertices having minlevel of i+1.
MAX: Run DDFS on each bridge of tenacity 2i+1
to find maxlevels of all vertices
of tenacity 2i+1.
Are we done?
Must show: Every vertex having
tenacity 2i+1 lies in the support of
a bridge of tenacity 2i+1
Must show: Every vertex having
tenacity 2i+1 lies in the support of
a bridge of tenacity 2i+1
Theorem: On any maxlevel(v) path
! bridge of tenacity = tenacity(v),
and v lies it its support.
The agents that assign levels
minlevel:
props
maxlevel:
bridges
WANT
Find “blossom” by identifying “base”
i.e., highest bottleneck w.r.t. predecessors.
If a nested blossom encountered on the way,
should skip to its base – mark blossom so
this can be done efficiently.
If no bottleneck, then reach 2 unmatched
vertices – min aug path found!
v
Computing base*(v)
Using set-union algorithm of Tarjan, 1975.
Gabow & Tarjan, 1985: Linear time on RAM.
Open: Path compression suffices
(by charging edges of blossoms)
v
v
GOT MORE …
bridge = (a, b)
1). Mark each v B as red or blue.
2). For each red v, a red path from a to v.
3). Also a red path from a to base of B
or to red unmatched vertex.
a
b
v
Find via two DFSs:
a to v path in red subgraph,
b to "base" path in blue subgraph.
v
Q: How will next path be found in
“half-eaten” blossom?
2
Theorem: base(v), base (v), ... occur on
every evenlevel(v) and oddlevel(v) path.
Q: How will next path be found in
“half-eaten” blossom?
A: Since base*(v) is removed, no part of
“half-eaten” blossom lies on a disjoint
min augmenting path!
Single thought?!
© Copyright 2026 Paperzz