Algorithmic Game Theory and Internet Computing
description
Transcript of Algorithmic Game Theory and Internet Computing
Algorithmic Game Theoryand Internet Computing
Vijay V. Vazirani
Georgia Tech
Dispelling an Old Myth
about an Ancient Algorithm
Central to the Theory of Algorithms
Kuhn, 1955: Primal-dual paradigm
Edmonds, 1965: Definition of P
Valiant, 1979: Definition of #P
Jerrum, Valiant & Vazirani, 1986: Equivalance
of random generation and approximate counting
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
Maximum matching: a matching
of maximum cardinality in graph
U V
alternating path
U V
augmenting path: alternating
path between 2 unmatched
vertices.
alternating path
U V
alternating path
augmenting path: alternating
path between 2 unmatched
vertices.
U V
alternating path
augmenting path: alternating
path between 2 unmatched
vertices.
U V
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;
Disjoint.Therefore aug paths w.r.t. M.
Maximal set.
M
Shortest augmenting paths
M ← ∅;While ∃ an augmenting path w.r.t. M do: Find a maximal set of disjoint mimimum length paths;
AugmentM;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
0U
0
1
U
V
0
2
1
U
U
V
0
3
2
1
U
U
V
V
a b
{a, b}
Set ofpredecessors
0
4
3
2
1
U
U
U
V
V
0
4
3
2
1
U
U
U
V
V
0
4
3
2
1
U
U
U
V
V
0
4
3
2
1
U
U
U
V
V
V 5
0
4
3
2
1
U
U
U
V
V
V 5
0
4
3
2
1
U
U
U
V
V
V 5
0
4
3
2
1
U
U
U
V
V
V 5
0
4
3
2
1
U
U
U
V
V
V 5
0
4
3
2
1
U
U
U
V
V
V 5
0
4
3
2
1
U
U
U
V
V
V 5
General Graphs
0
2
3
1
3
445 5
6 6
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:
Minimum length alternating paths in bipartite
graphs are BFS honest.
f vu
Qualitative difference
BFS honesty:
Minimum length alternating paths in bipartite
graphs are BFS honest.
Not so in non-bipartite graphs!
f vu
Qualitative difference
BFS honesty:
Not so in non-bipartite graphs!
Because shortest f to u path has v on it at
opposite parity.
f vu
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
0
1
0
2
1
0
2
3
1
3
Will mark predecessors
0
2
3
1
3
44
0
2
3
1
3
44
0
2
3
1
3
445 5
6 6
0
23
1
3
445 5
6 67
0
2
3
1
3
44
bridge
base
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.
0
2
3
1
3
44
2
1
base
0
2
3
1
3
445 5
6 6
2
1
7
8
WANT
Find “blossom” by identifying “base”
i.e., highest bottleneck w.r.t. predecessors.
0
2
3
1
3
44
2
1
3
4
55
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
0
2
3
1
3
44
2
1
3
4
55
2
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.
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!
0
2
3
1
4
2
1
3
4
55
0
2
3
1
4
2
1
3
4
55
tenacity(v) = evenlevel(v) + oddlevel(v)
= Length of min alternating
walk (may be self-intersecting) between
unmatched vertices on which v occurs once.
0
2
3
1
3
445 5
6 6
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
vv
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))
base3(v)
=base2 (v)
Theorem: base(v), base2 (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) unmatched ⇒tenacity(u,v) = evenlevel(u) + evenlevel(v)+1
(u,v) matched ⇒tenacity(u,v) = oddlevel(u) + oddlevel(v)+1
u v
u v
0
2
3
1
3
445 5
6 6
9
9 9
99
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
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.
Algorithm: intertwined BSF & DDFS
1315
1315
19
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.
Algorithm: intertwined BSF & DDFS
0
2
3
1
3
44
2
1
3
4
0
2
3
1
3
44
2
1
3
4
5 5
0
2
3
1
3
44
2
1
3
4
5 5
8
tenacity(bridge) = 13Will do DDFS at
search level 6.
0
2
3
1
3
44
2
1
3
4
5 5
8
9
11
12
10
After DDFS atsearch level 6.
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.
Algorithm: intertwined BSF & DDFS
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?
Theorem: base(v), base2 (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?!