CMU 15-896 Matching 3: Online algorithms Teacher: Ariel Procaccia - - PowerPoint PPT Presentation

cmu 15 896
SMART_READER_LITE
LIVE PREVIEW

CMU 15-896 Matching 3: Online algorithms Teacher: Ariel Procaccia - - PowerPoint PPT Presentation

CMU 15-896 Matching 3: Online algorithms Teacher: Ariel Procaccia Display advertising Display advertising is the largest matching problem in the world Bipartite graph with advertisers and impressions Advertisers specify which


slide-1
SLIDE 1

CMU 15-896

Matching 3: Online algorithms

Teacher: Ariel Procaccia

slide-2
SLIDE 2

15896 Spring 2016: Lecture 15

Display advertising

  • Display advertising is the

largest matching problem in the world

  • Bipartite graph with

advertisers and impressions

  • Advertisers specify which

impressions are acceptable — this defines the edges

  • Impressions arrive online

2

slide-3
SLIDE 3

15896 Spring 2016: Lecture 15

The (simplest) model

  • There is a bipartite graph

,

  • is known “offline”, the vertices of

arrive

  • nline (with their incident edges)
  • Objective: maximize size of matching
  • ALG has competitive ratio

if for every graph and every input order

  • f ,

3

slide-4
SLIDE 4

15896 Spring 2016: Lecture 15

Algorithm GREEDY

  • Algorithm GREEDY: match to an arbitrary

unmatched neighbor (if one exists)

4

Poll 1: Competitive ratio of GREEDY?

1. 2. 3. 4.

slide-5
SLIDE 5

15896 Spring 2016: Lecture 15

Upper bound

  • Observation: The competitive ratio of any

deterministic algorithm is at most

5

slide-6
SLIDE 6

15896 Spring 2016: Lecture 15

Take 2: Algorithm RANDOM

  • Obvious idea: randomness
  • Algorithm RANDOM: Match to

an unmatched neighbor uniformly at random

  • Achieves
  • n previous

example

6

  • 2
  • 2

Competitive ratio of RANDOM

  • n graph on the right?
slide-7
SLIDE 7

15896 Spring 2016: Lecture 15

Take 3: Algorithm RANKING

  • Algorithm RANKING:
  • Choose a random permutation

: →

  • Match each vertex to its unmatched

neighbor with the lowest

  • Looks like this is doing better than

RANDOM on previous example!

  • Theorem [Karp et al. 1990]: The

competitive ratio of RANKING is

7

  • 2
  • 2
slide-8
SLIDE 8

15896 Spring 2016: Lecture 15

Proof of theorem

  • Assume for ease of exposition that OPT
  • Fix a perfect matching

  • Fix

and

  • If

is matched under , is a match event at position , otherwise miss event

  • ALG is the sum of probabilities of match

events at all positions

8

slide-9
SLIDE 9

15896 Spring 2016: Lecture 15

Proof of theorem

  • induces a matching
  • Consider a miss event

with

∗ ∗ ,

  • Define

by moving ∗ to

position

  • Claim: for each ,
  • with
  • 9

∗ ∗

slide-10
SLIDE 10

15896 Spring 2016: Lecture 15

Proof of theorem

  • Proof of claim: by illustration

10

∗ ∗ ∗

∗ ∗ ∗

∗ ∗ ∗

slide-11
SLIDE 11

15896 Spring 2016: Lecture 15

Proof of theorem

  • We have a -

mapping between miss events

∗ and match events

  • where

∗ and

  • Claim: Each miss event at position is mapped

to unique match events

  • Proof of claim:
  • Fix miss events , and , such that

, and both are mapped to ,

  • ∗ ∗ ⇒ ′
  • The map only moves from position in and ,

giving in both cases ⇒ ∎

11

slide-12
SLIDE 12

15896 Spring 2016: Lecture 15

Proof of theorem

  • We get the following set of equations for every
  • Setting

, this is

  • By minimizing the objective function
  • ver

this polytope, we get

  • 12
slide-13
SLIDE 13

15896 Spring 2016: Lecture 15

Upper bound

  • Theorem [Karp et al. 1990]: No randomized alg

has competitive ratio better than

  • The proof below is due to Wajc [2015]
  • Fractional algorithm: deterministically assign

fractional weights to edges such that s.t.

  • , ∈
  • Lemma [Wajc 2015]: For any randomized alg

there is a fractional alg with at least the same competitive ratio

13

slide-14
SLIDE 14

15896 Spring 2016: Lecture 15

Proof of theorem

  • First online vertex is

connected to all

  • Let

, in particular

  • will not be connected to any

future online vertex

14

  • 1/5

1/5 2/5 1/5

slide-15
SLIDE 15

15896 Spring 2016: Lecture 15

Proof of theorem

  • th online vertex is

connected to all

  • ∈∖ ,…,
  • will not be connected to

any future online vertex

15

slide-16
SLIDE 16

15896 Spring 2016: Lecture 15

Proof of theorem

16

Poll 2: What is OPT?

1. 2.

  • 3.

4.

slide-17
SLIDE 17

15896 Spring 2016: Lecture 15

Proof of theorem

  • After step , offline vertices that continue to be

matched are matched to an average of at least

  • Following the arrival of the -th online vertex

with

  • , it holds that offline

vertices that will neighbor future online vertices are matched to an average of

  • 1

1 1

  • ln ln

1

17

slide-18
SLIDE 18

15896 Spring 2016: Lecture 15

Proof of theorem

  • So at step ,
  • , but

because for all , this means that

  • for all
  • That is, the algorithm cannot match the

vertices

  • ALG
  • 18