Algorithmic Game Theory and Internet Computing

148
Algorithmic Game Theory and Internet Computing Vijay V. Vazirani Georgia Tech Dispelling an Old Myth about an Ancient Algorithm

description

Dispelling an Old Myth about an Ancient Algorithm. Algorithmic Game Theory 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: Definition of #P - PowerPoint PPT Presentation

Transcript of Algorithmic Game Theory and Internet Computing

Page 1: Algorithmic Game Theory and Internet Computing

Algorithmic Game Theoryand Internet Computing

Vijay V. Vazirani

Georgia Tech

Dispelling an Old Myth

about an Ancient Algorithm

Page 2: Algorithmic Game Theory and Internet Computing

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

Page 3: Algorithmic Game Theory and Internet Computing

Matching in game theory and economics

Gale & Shapley, 1962: Stable marriage

Shapley & Shubik, 1971: Matching markets

Page 4: Algorithmic Game Theory and Internet Computing

Matching in game theory and economics

Gale & Shapley, 1962: Stable marriage

Shapley & Shubik, 1971: Matching markets

Mehta, Saberi, Vazirani & Vazirani, 2005:

Adwords market

Page 5: Algorithmic Game Theory and Internet Computing

U V

Page 6: Algorithmic Game Theory and Internet Computing

U V

Page 7: Algorithmic Game Theory and Internet Computing

Maximum matching: a matching

of maximum cardinality in graph

Page 8: Algorithmic Game Theory and Internet Computing

U V

alternating path

Page 9: Algorithmic Game Theory and Internet Computing

U V

augmenting path: alternating

path between 2 unmatched

vertices.

alternating path

Page 10: Algorithmic Game Theory and Internet Computing

U V

alternating path

augmenting path: alternating

path between 2 unmatched

vertices.

Page 11: Algorithmic Game Theory and Internet Computing

U V

alternating path

augmenting path: alternating

path between 2 unmatched

vertices.

Page 12: Algorithmic Game Theory and Internet Computing

U V

alternating path

augmenting path: alternating

path between 2 unmatched

vertices.

Page 13: Algorithmic Game Theory and Internet Computing
Page 14: Algorithmic Game Theory and Internet Computing
Page 15: Algorithmic Game Theory and Internet Computing
Page 16: Algorithmic Game Theory and Internet Computing
Page 17: Algorithmic Game Theory and Internet Computing

Maximum matching algorithm

M ← ∅;While ∃ an augmenting path w.r.t. M do: Find one, say p;

M ← M ⊕p;end;output M;

Page 18: Algorithmic Game Theory and Internet Computing

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.

Page 19: Algorithmic Game Theory and Internet Computing

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;

Page 20: Algorithmic Game Theory and Internet Computing
Page 21: Algorithmic Game Theory and Internet Computing

Disjoint.Therefore aug paths w.r.t. M.

Maximal set.

M

Page 22: Algorithmic Game Theory and Internet Computing

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

Page 23: Algorithmic Game Theory and Internet Computing

Hopcroft & Karp, 1973:

Theorem: O n( ) phases suffice

in general graphs.

Theorem: In bipartite graphs:

O(m) per phase⇒ O m n( ) algorithm.

Page 24: Algorithmic Game Theory and Internet Computing

Micali & Vazirani, 1980:

Theorem: In general graphs:

O(m) per phase ⇒ O m n( ) algorithm

Page 25: Algorithmic Game Theory and Internet Computing

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.

Page 26: Algorithmic Game Theory and Internet Computing

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.

Page 27: Algorithmic Game Theory and Internet Computing

U V

Page 28: Algorithmic Game Theory and Internet Computing

0U

Page 29: Algorithmic Game Theory and Internet Computing

0

1

U

V

Page 30: Algorithmic Game Theory and Internet Computing

0

2

1

U

U

V

Page 31: Algorithmic Game Theory and Internet Computing

0

3

2

1

U

U

V

V

a b

{a, b}

Set ofpredecessors

Page 32: Algorithmic Game Theory and Internet Computing

0

4

3

2

1

U

U

U

V

V

Page 33: Algorithmic Game Theory and Internet Computing

0

4

3

2

1

U

U

U

V

V

Page 34: Algorithmic Game Theory and Internet Computing

0

4

3

2

1

U

U

U

V

V

Page 35: Algorithmic Game Theory and Internet Computing

0

4

3

2

1

U

U

U

V

V

V 5

Page 36: Algorithmic Game Theory and Internet Computing

0

4

3

2

1

U

U

U

V

V

V 5

Page 37: Algorithmic Game Theory and Internet Computing

0

4

3

2

1

U

U

U

V

V

V 5

Page 38: Algorithmic Game Theory and Internet Computing

0

4

3

2

1

U

U

U

V

V

V 5

Page 39: Algorithmic Game Theory and Internet Computing

0

4

3

2

1

U

U

U

V

V

V 5

Page 40: Algorithmic Game Theory and Internet Computing

0

4

3

2

1

U

U

U

V

V

V 5

Page 41: Algorithmic Game Theory and Internet Computing

0

4

3

2

1

U

U

U

V

V

V 5

Page 42: Algorithmic Game Theory and Internet Computing

General Graphs

Page 43: Algorithmic Game Theory and Internet Computing

0

2

3

1

3

445 5

6 6

Page 44: Algorithmic Game Theory and Internet Computing

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)

Page 45: Algorithmic Game Theory and Internet Computing

Qualitative difference

BFS honesty:

Minimum length alternating paths in bipartite

graphs are BFS honest.

f vu

Page 46: Algorithmic Game Theory and Internet Computing

Qualitative difference

BFS honesty:

Minimum length alternating paths in bipartite

graphs are BFS honest.

Not so in non-bipartite graphs!

f vu

Page 47: Algorithmic Game Theory and Internet Computing

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

Page 48: Algorithmic Game Theory and Internet Computing

v

Page 49: Algorithmic Game Theory and Internet Computing

v

a

Page 50: Algorithmic Game Theory and Internet Computing

v

a

b

Page 51: Algorithmic Game Theory and Internet Computing

v

a

b

Page 52: Algorithmic Game Theory and Internet Computing

Central issue

Need to find longer and longer alternating

paths to v in order to find min alternating

paths to other vertices.

Page 53: Algorithmic Game Theory and Internet Computing

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!

Page 54: Algorithmic Game Theory and Internet Computing

Saving grace

Incredible structure of minimum length

alternating paths.

Will give a purely graph-theoretic definition

of blossoms from this perspective.

Page 55: Algorithmic Game Theory and Internet Computing

0

Page 56: Algorithmic Game Theory and Internet Computing

0

1

Page 57: Algorithmic Game Theory and Internet Computing

0

2

1

Page 58: Algorithmic Game Theory and Internet Computing

0

2

3

1

3

Will mark predecessors

Page 59: Algorithmic Game Theory and Internet Computing

0

2

3

1

3

44

Page 60: Algorithmic Game Theory and Internet Computing

0

2

3

1

3

44

Page 61: Algorithmic Game Theory and Internet Computing

0

2

3

1

3

445 5

6 6

Page 62: Algorithmic Game Theory and Internet Computing

0

23

1

3

445 5

6 67

Page 63: Algorithmic Game Theory and Internet Computing

0

2

3

1

3

44

bridge

base

Page 64: Algorithmic Game Theory and Internet Computing

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.

Page 65: Algorithmic Game Theory and Internet Computing

0

2

3

1

3

44

2

1

base

Page 66: Algorithmic Game Theory and Internet Computing

0

2

3

1

3

445 5

6 6

2

1

7

8

Page 67: Algorithmic Game Theory and Internet Computing

WANT

Find “blossom” by identifying “base”

i.e., highest bottleneck w.r.t. predecessors.

Page 68: Algorithmic Game Theory and Internet Computing

0

2

3

1

3

44

2

1

3

4

55

Page 69: Algorithmic Game Theory and Internet Computing

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.

Page 70: Algorithmic Game Theory and Internet Computing

New algorithmic procedure:Double Depth First Search

Page 71: Algorithmic Game Theory and Internet Computing

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”)

Page 72: Algorithmic Game Theory and Internet Computing

a b

Page 73: Algorithmic Game Theory and Internet Computing

a b

Page 74: Algorithmic Game Theory and Internet Computing

a b

Page 75: Algorithmic Game Theory and Internet Computing

a b

Page 76: Algorithmic Game Theory and Internet Computing

a b

Page 77: Algorithmic Game Theory and Internet Computing

a b

Page 78: Algorithmic Game Theory and Internet Computing

a b

Page 79: Algorithmic Game Theory and Internet Computing

a b

Page 80: Algorithmic Game Theory and Internet Computing

a b

Page 81: Algorithmic Game Theory and Internet Computing

a b

Page 82: Algorithmic Game Theory and Internet Computing

a b

Page 83: Algorithmic Game Theory and Internet Computing

a b

Page 84: Algorithmic Game Theory and Internet Computing

a b

Page 85: Algorithmic Game Theory and Internet Computing

a b

Page 86: Algorithmic Game Theory and Internet Computing

a b

Page 87: Algorithmic Game Theory and Internet Computing

a b

Page 88: Algorithmic Game Theory and Internet Computing

a b

Page 89: Algorithmic Game Theory and Internet Computing

0

2

3

1

3

44

2

1

3

4

55

2

1

0

Page 90: Algorithmic Game Theory and Internet Computing

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!

Page 91: Algorithmic Game Theory and Internet Computing

a b

Page 92: Algorithmic Game Theory and Internet Computing

a b

Page 93: Algorithmic Game Theory and Internet Computing

a b

Page 94: Algorithmic Game Theory and Internet Computing

a b

Page 95: Algorithmic Game Theory and Internet Computing

a b

Page 96: Algorithmic Game Theory and Internet Computing

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.

Page 97: Algorithmic Game Theory and Internet Computing

a b

Page 98: Algorithmic Game Theory and Internet Computing

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.

Page 99: Algorithmic Game Theory and Internet Computing

a b

Page 100: Algorithmic Game Theory and Internet Computing

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!

Page 101: Algorithmic Game Theory and Internet Computing

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!

Page 102: Algorithmic Game Theory and Internet Computing

0

2

3

1

4

2

1

3

4

55

Page 103: Algorithmic Game Theory and Internet Computing

0

2

3

1

4

2

1

3

4

55

Page 104: Algorithmic Game Theory and Internet Computing

tenacity(v) = evenlevel(v) + oddlevel(v)

= Length of min alternating

walk (may be self-intersecting) between

unmatched vertices on which v occurs once.

Page 105: Algorithmic Game Theory and Internet Computing

0

2

3

1

3

445 5

6 6

Page 106: Algorithmic Game Theory and Internet Computing
Page 107: Algorithmic Game Theory and Internet Computing

Let tenacity(v) = t. Consider the highest vertex of

tenacity > t on each minlevel(v) and maxlevel(v)

path.

v

Page 108: Algorithmic Game Theory and Internet Computing

Let tenacity(v) = t. Consider the highest vertex of

tenacity > t on each minlevel(v) and maxlevel(v)

path.

v v v

Page 109: Algorithmic Game Theory and Internet Computing

Let tenacity(v) = t. Consider the highest vertex of

tenacity > t on each minlevel(v) and maxlevel(v)

path.

v

v v v

vv

Page 110: Algorithmic Game Theory and Internet Computing

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)

Page 111: Algorithmic Game Theory and Internet Computing

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{ }

Page 112: Algorithmic Game Theory and Internet Computing
Page 113: Algorithmic Game Theory and Internet Computing

v

base(v)

base(base(v))

base3(v)

=base2 (v)

Page 114: Algorithmic Game Theory and Internet Computing

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.

Page 115: Algorithmic Game Theory and Internet Computing

(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

Page 116: Algorithmic Game Theory and Internet Computing

0

2

3

1

3

445 5

6 6

9

9 9

99

Page 117: Algorithmic Game Theory and Internet Computing
Page 118: Algorithmic Game Theory and Internet Computing

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.

Page 119: Algorithmic Game Theory and Internet Computing
Page 120: Algorithmic Game Theory and Internet Computing

Main ideas in algorithm

DDFS

Precise synchronization of events

Page 121: Algorithmic Game Theory and Internet Computing

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

Page 122: Algorithmic Game Theory and Internet Computing

1315

Page 123: Algorithmic Game Theory and Internet Computing

1315

19

Page 124: Algorithmic Game Theory and Internet Computing

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

Page 125: Algorithmic Game Theory and Internet Computing

0

2

3

1

3

44

2

1

3

4

Page 126: Algorithmic Game Theory and Internet Computing

0

2

3

1

3

44

2

1

3

4

5 5

Page 127: Algorithmic Game Theory and Internet Computing

0

2

3

1

3

44

2

1

3

4

5 5

8

tenacity(bridge) = 13Will do DDFS at

search level 6.

Page 128: Algorithmic Game Theory and Internet Computing

0

2

3

1

3

44

2

1

3

4

5 5

8

9

11

12

10

After DDFS atsearch level 6.

Page 129: Algorithmic Game Theory and Internet Computing

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

Page 130: Algorithmic Game Theory and Internet Computing

Are we done?

Page 131: Algorithmic Game Theory and Internet Computing

Must show: Every vertex having tenacity 2i+1 lies in the support of a bridge of tenacity 2i+1

Page 132: Algorithmic Game Theory and Internet Computing

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.

Page 133: Algorithmic Game Theory and Internet Computing

The agents that assign levels

minlevel: props

maxlevel: bridges

Page 134: Algorithmic Game Theory and Internet Computing

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!

Page 135: Algorithmic Game Theory and Internet Computing

v

Page 136: Algorithmic Game Theory and Internet Computing

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)

Page 137: Algorithmic Game Theory and Internet Computing

v

Page 138: Algorithmic Game Theory and Internet Computing

v

Page 139: Algorithmic Game Theory and Internet Computing
Page 140: Algorithmic Game Theory and Internet Computing

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.

Page 141: Algorithmic Game Theory and Internet Computing

a b

v

Find via two DFSs:

a to v path in red subgraph,

b to "base" path in blue subgraph.

Page 142: Algorithmic Game Theory and Internet Computing

v

Page 143: Algorithmic Game Theory and Internet Computing

Q: How will next path be found in

“half-eaten” blossom?

Page 144: Algorithmic Game Theory and Internet Computing

Theorem: base(v), base2 (v), ... occur on

every evenlevel(v) and oddlevel(v) path.

Page 145: Algorithmic Game Theory and Internet Computing

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!

Page 146: Algorithmic Game Theory and Internet Computing

Single thought?!

Page 147: Algorithmic Game Theory and Internet Computing
Page 148: Algorithmic Game Theory and Internet Computing