New Online Algorithms for Story Scheduling in Web Advertising Susanne Albers Achim Paßen TU Munich HU Berlin
Online advertising Worldwide online ad spending 2012/13: $ 100 billion Expected to surpass print ad spending soon Display advertising: images, videos, animations Content shown depending on browsing history of user
Story boarding
Story boarding • Maintain ad position of a web site during browsing session of a user. • Position depicts image sequences of advertisers. Advertiser pay unit shown. • Depending on history/state user becomes interesting for advertisers. • Maximize revenue of session.
Model • Session time is slotted Time t : user continues surfing with probability β 0 < β < 1 • I = J 1 , . . . , J N J i = ( a i , l i , v i ) a i = arrival time l i = length v i = per-unit value • Preemption: Job J i may be scheduled for < l i time units � β t v ( t ) • max t ≥ 0 v ( t ) = per-unit value of job scheduled at time t Dasgupta, Ghosh, Nazerzadeh, Raghavan SODA’09
Competitive analysis A : OPT: Online Offline algorithm algorithm A ( I ) OPT ( I ) A is c -competitive if for all I A ( I ) ≥ 1 c · OPT ( I ) .
Previous results c ≥ β + β 2 • Lower bound: c ≥ 2 for general β • Upper bound: c = 7 ALG: ∀ t v i of current J i ⇐ loss in delaying J k with v k > v i for 1 time unit ⇒ Dasgupta, Ghosh, Nazerzadeh, Raghavan SODA’09
Previous results c ≥ β + β 2 • Lower bound: c ≥ 2 for general β • Upper bound: c = 7 • Jobs to be scheduled immediately upon arrival � c = Ω( log µ/ log log µ ) µ = max { l max /l min , v max /v min } • Total value of v i gained only if entire J i is shown c = O (log( v max /v min )) Dasgupta, Ghosh, Nazerzadeh, Raghavan SODA’09
Our contribution • Upper bound: c = 4 / (2 − β ) √ Φ = 1+ 5 • Upper bound: c = 1 + Φ ≈ 2 . 62 Golden Ratio 2 • Problem extension: Web page with m ad positions, where stories can be shown simultaneously; job migration not allowed m � � β t v ( t, j ) max t ≥ 0 j =1 v ( t, j ) = per-unit value of job scheduled on ad position j at time t √ √ Upper bound: 3 . 414 ≈ 2 / (2 − 2) ≤ c ≤ 1 / (3 − 2 2) ≈ 5 . 828
Algorithmic approach P 3 P 1 P 2 Time: 0 k − 1 3 k − 1 k 2 k − 1 2 k • Phases P 1 , P 2 , P 3 , . . . of k consecutive time steps. • Scheduling decisions are made at the beginning of the phase. • Jobs arriving during the phase are ignored.
Simple algorithm Q n : P n Time: nk − 1 ( n − 1) k ALG1: Phase P n : Q n = { unscheduled jobs J i with a i ≤ ( n − 1) k } Schedule jobs of Q n in order of non-increasing per-unit value Preempt job at the end of P n Thm: c = 1 / ( β k − 1 (1 − β k )) c = 4 / (2 − β ) for k = ⌈− log β 2 ⌉ for k = 1 c = 1 / (1 − β )
Refined algorithm Q n : P n Time: nk − 1 ( n − 1) k ALG2: Phase P n : J n = remainder of last job in P n − 1 Q n = { J n + unscheduled jobs J i with a i ≤ ( n − 1) k } Schedule jobs of Q n in order of non-increasing per-unit value If J n contained in schedule, move it to the front Thm: c = 1 /β k − 1 · max { 1 /β k − 1 , 1 / (1 − β 2 k ) , β 3 k / (1 − β k ) } √ for k = ⌊− 1 c = 1 + Φ ≈ 2 . 618 , where Φ = (1 + 5) / 2 2 log β (1 + Φ) ⌋ + 1
Refined algorithm Q n : P n Time: nk − 1 ( n − 1) k ALG2: Phase P n : J n = remainder of last job in P n − 1 Q n = { J n + unscheduled jobs J i with a i ≤ ( n − 1) k } Schedule jobs of Q n in order of non-increasing per-unit value If J n contained in schedule, move it to the front Thm: c = 1 /β k − 1 · max { 1 /β k − 1 , 1 / (1 − β 2 k ) , β 3 k / (1 − β k ) } √ for k = ⌊− 1 c = 1 + Φ ≈ 2 . 618 , where Φ = (1 + 5) / 2 2 log β (1 + Φ) ⌋ + 1
Algorithm for m ad positions Q n : Pos. 1 Pos. 2 nk − 1 ( n − 1) k ALG3: Phase P n : Q n = { unscheduled jobs J i with a i ≤ ( n − 1) k } For t = ( n − 1) k, . . . , nk − 1 , schedule m jobs of highest per-unit value Preempt jobs at the end of P n Implementation: Units of a job are placed on same ad position
Algorithm for m ad positions Q n : Pos. 1 Pos. 2 nk − 1 ( n − 1) k ALG3: Phase P n : Q n = { unscheduled jobs J i with a i ≤ ( n − 1) k } For t = ( n − 1) k, . . . , nk − 1 , schedule m jobs of highest per-unit value Preempt jobs at the end of P n Thm: c = 1 /β k − 1 · (1 + 1 / (1 − β k )) √ √ √ c = (1 + 1 / (1 − β (2 − 2))) / (2 − 2) for k = ⌈ log β (2 − 2) ⌉ √ √ 3 . 414 ≈ 2 / (2 − 2) ≤ c ≤ 1 / (3 − 2 2) ≈ 5 . 828
Simple algorithm Q n : P n Time: nk − 1 ( n − 1) k ALG1: Phase P n : Q n = { unscheduled jobs J i with a i ≤ ( n − 1) k } Schedule jobs of Q n in order of non-increasing per-unit value Jobs of same value sorted in order of increasing arrival time Preempt job at the end of P n
Analysis simple algorithm I = J 1 , . . . , J N J i = ( a i , l i , v i ) k -quantized input I k = J ′ 1 , . . . , J ′ J ′ i = ( a ′ a ′ i , l i , v i ) i = k ⌈ a i /k ⌉ N P n nk − 1 ( n − 1) k
Analysis simple algorithm Lemma: O PT ( I k ) ≥ β k − 1 · O PT ( I ) Proof: Shift optimal schedule for I by k − 1 time units to the right. Observation: A LG 1( I k ) = A LG 1( I )
Relaxed offline algorithm C HOP : Optimal algorithm that may resume preempted jobs Always schedule job with highest per-unit value. Jobs with same per-unit value are scheduled in the same order as in ALG1. Observation: C HOP ( I k ) ≥ O PT ( I k )
Timing property S = ALG1’s schedule for I k t S ( i ) = start time of J i in S S ∗ = C HOP ’s schedule for I k t S ∗ ( i ) = start time of J i in S ∗ Lemma: t S ( i ) ≤ t S ⋆ ( i )
t S ( i ) ≤ t S ⋆ ( i ) Let J i ⋆ be first job in S ⋆ with t S ( i ⋆ ) > t S ⋆ ( i ⋆ ) = t ⋆ t ⋆ J i⋆ C HOP ALG1: J i • v i ≥ v i ⋆ • At time t ⋆ C HOP has finished J i v i > v i ⋆ : √ v i = v i ⋆ : C HOP schedules jobs of value v i in the same order as ALG1 • t S ⋆ ( i ) ≤ t ⋆ − l i t S ( i ) ≥ t ⋆ − l i + 1
Phase analysis P n Time: nk − 1 ( n − 1) k J n = { jobs scheduled by ALG1 in P n } � ALG1( P n ) = value achieved for J n ALG1( I k ) = ALG1( P n ) n C HOP ( P n ) = value achieved for J n � Lemma: C HOP ( I k ) = C HOP ( P n ) n Proof: For any J i scheduled by C HOP , t S ( i ) ≤ t S ⋆ ( i ) � { jobs scheduled by C HOP } ⊆ J n n
Phase analysis P n Time: nk − 1 ( n − 1) k Lemma: C HOP ( P n ) ≤ ALG1( P n ) / (1 − β k ) Proof: J = last job of P n with value v C HOP ( P n ) ≤ ALG1( P n ) + extra value in scheduling preempted portion of J nk − 1 β t v = ( β ( n − 1) k − β nk ) / (1 − β ) · v � ALG1( P n ) = t =( n − 1) k � β t v = β nk / (1 − β ) · v extra value = t ≥ nk C HOP ( P n ) / ALG1( P n ) ≤ 1 + β nk / ( β ( n − 1) k − β nk ) = 1 / (1 − β k )
Wrapping up C HOP ( I k ) ≤ ALG1( I k ) / (1 − β k ) β k − 1 · O PT ( I ) ≤ C HOP ( I k ) O PT ( I ) ≤ ALG1( I ) / ( β k − 1 (1 − β k ))
Analysis refined algorithm • Take care of delays if last job of previous phase is continued. • Loss of preempted jobs have to amortized over several phases; segments of up to three phases.
Analysis m ad positions • ∃ S ⋆ value is at least as high as that of optimal schedule • S ⋆ schedules up to 2 m jobs at any time • ∀ t : each J i scheduled in S ⋆ but not in S can be mapped (a) to a unit v i ′ ≥ v i scheduled in S or (b) to a job preempted by S at time t ′ < t
Open problems • Tight bounds for deterministic algorithms • Design randomized algorithms
Recommend
More recommend