Online computation with untrusted advice Joint work with Spyros - - PowerPoint PPT Presentation

online computation with untrusted advice
SMART_READER_LITE
LIVE PREVIEW

Online computation with untrusted advice Joint work with Spyros - - PowerPoint PPT Presentation

Online computation with untrusted advice Joint work with Spyros Angelopoulos, Jin S., S. Kamali, M. Renault. (ITCS2020) Christoph Drr - August 2020 Cost OPT ALG (k=B) Ski rental problem 7 Rent or buy 6 Renting skis cost 1 / day


slide-1
SLIDE 1

Christoph Dürr - August 2020

Online computation with untrusted advice

Joint work with Spyros Angelopoulos, 
 Jin S., S. Kamali, M. Renault. (ITCS’2020)

slide-2
SLIDE 2

Rent or buy

  • Renting skis cost 1 / day
  • Buying skis costs B (once)
  • Unkown number of skiing days D
  • Optimum = min{D,B}
  • Algorithm decides to buy on day k
  • Deterministic competitive ratio 


= 1+(B-1)/B ≃ 2

  • Randomized ratio ≃ e/(e-1)

Ski rental problem

Worst case

Cost 1 2 3 4 5 6 7 D 1 2 3 4 5 6 OPT ALG (k=B)

B=

slide-3
SLIDE 3

Our approach

Different approaches

  • In theory advice can be any information

computed from the instance revealing some of the hidden information and is tailored for the algorithm which exploits it.

  • In practice advice is typically a machine

learning based prediction and might be wrong.

  • Lykouris, Vassilvitskii, 2018: online

caching with competitive ratio being function of absolute error of advice

  • Kumar, Puhorit, Svitkina, 2018: advice is

either right (cooperating with algorithm) 


  • r wrong (in the adversarial sense)

Advice

May 1st May 1st May 1st May 1st May 1st May 1st May 12nd May 1st

Advice: you will stop skiing before day B Should the algorithm ignore the advice or blindly trust it?

slide-4
SLIDE 4
  • Every algorithm has
  • A trusted ratio in case advice

was right

  • An untrusted ratio in case

advice was wrong

  • Identify the Pareto-optimal

algorithms

Untrusted advice

1

1 + B − 1 B 1 + B − 1 B

sup D/B = ∞ Ignore advice Trust blindly Trusted ratio Untrusted ratio

slide-5
SLIDE 5

Parameter k

  • Advice indicates if D<B (opt rents)
  • In that case our algorithm rents

until day B-1 and buys on day B

  • Otherwise it buys on day k
  • This is Pareto optimal.
  • Puhorit-Svitkina-Kumar’s

algorithm buys either on day

  • r on day k

⌈B/k⌉

Optimal algorithm

1 + B − 1 k 1 + k − 1 B 1 + k B 1 + B k

Trusted ratio Untrusted ratio

slide-6
SLIDE 6

Introduced to illustrate doubling strategies

  • Hidden value u (

)

  • Strategy = sequence
  • Cost :=

for j such that

  • Competitive ratio =
  • Doubling strategy

has

  • ptimal competitive ratio 4

u ≥ 1 x1, x2, … x1 + x2 + … + xj xj−1 < u ≤ xj x1 + … + xj u xi = 2i

Online bidding

How much fuel is needed to escape gravitation from earth ?

U x1 x2 x3 xj

slide-7
SLIDE 7

Parameter w, Advice is u

Online bidding

W 1 4 2

w − w2 − 4w 2

  • We describe strategy by a minimisation

linear program such that:

  • Advice u is exceeded by the m-th bid
  • Competitive ratio is w in any case
  • And competitive ratio is objective of

the LP in case advice was right

  • Constraints hold with equality, so we

can solve linear recurrence to get the

  • ptimal strategy. Then we optimise m.
  • The obtained strategy is Pareto optimal.

Trusted ratio Untrusted ratio

slide-8
SLIDE 8

Only advice bits

k

  • Upper bound (we have also a result for

general )

  • Choose the best among


 4-competitive strategies

  • Is
  • competitive if advice was

right

  • Lower bound
  • Every 4-competitive algorithm has ratio

at least in case advice was right

w ≥ 4 2k 21+2−k 2 + 1 3 ⋅ 2k

Online bidding

U Example for k=1

1 1.5 2 2.5 3 Number of advice bits k 1 2 3 4 5

Advice is 0 Advice is 1

slide-9
SLIDE 9

What was known before

  • Reserve-Critical
  • Classify by size :
  • Tiny (0,1/3]
  • Small (1/3,1/2]
  • Critical (1/2,2/3]
  • Large (2/3,1]
  • Advice c = number of critical items
  • Reserve space for critical items in

dedicated bins. 
 Other than that, follow First-Fit.

Bin packing

1.5783 1.54278 1.7 1.4702 Asymptotic competitive ratio First-Fit: consider bins in the order they have been opened. Place new item in first bin where it fits, opening a new bin if necessary Deterministic competitive ratio is between these bounds Angelopoulos, D. Kamali, Renault, Rosén, 2018:
 needs O(1) advice bits 1.5 Boyar, Kamali, Larsen, López-Ortiz, 2016: Reserve-Critical needs O(log n) advice bits

slide-10
SLIDE 10

Reserve-Critical can be fooled

  • Suppose advice is c>0
  • But all items have size 1/6+ε
  • Competitive ratio is 6

Bin packing

1/6+ε Reserved 1/6+ε Reserved

slide-11
SLIDE 11

Parameter , Advice

α γ

  • There is an algorithm with

trusted ratio r and untrusted ratio max{33-18r, 7/4}

  • Maintains a proportion close to

between critical and tiny bins

  • We also analysed the algorithm

when advice is given with precision

min{α, γ} 1/2k

Bin packing

1.5 3 4.5 6 1.4 1.5 1.6 1.7 1.8

Trusted ratio Untrusted ratio

slide-12
SLIDE 12

Boyar, Kamali, Larsen, López-Ortiz, 2016

  • Timestamp: move requested item x in

front of first item requested at most

  • nce since the last request of x
  • Move-to-front-even: if total number of

requests to x is even, then move to front

  • Move-to-front-odd:
  • Move-to-front: always move requested

item to front

  • Previous work: On any request sequence
  • ne of the first 3 algorithms has ratio

5/3 
 (2 bits advice suffices)

List update

3 7 2 11 4 5 1 8

Request sequence : 2 1 2 7 8 4 11 5 ….

Serving cost (= rank in list) Free exchange (for the currently requested item) Paid exchange
 (any consecutive items)

slide-13
SLIDE 13

Parameter , Advice A {Timestamp, MTF-Even, MTF-Odd}

β ∈ [0,1/2] ∈

  • If A=Timestamp, then run A
  • Else, alternate between A and Move-to-

front.

  • When starting trusted phase, make paid

exchanges to have the list as if A was run from the beginning. (cost for m=size

  • f list).
  • End trusted phase when cost

exceeds

  • End ignoring phase when cost exceeds

≤ m2 m3 βm3

List update

A MTF A MTF A …

Trusting phase Ignoring phase

2.2 2.3 2.4 2.5 1.6 1.7 1.8 1.9 2

Trusted ratio Untrusted ratio

slide-14
SLIDE 14
  • We provide also some

randomised algorithms

  • But are they Pareto-optimal?


(Lower bounds for the randomised trusted / untrusted competitive ratios)

  • Machine learning advice is also

studied for the offline setting

Future work

2 4 5 9 13 14 17 21

17?

Machine learning predicts insertion point Number of queries is where d is the error of the prediction

O(log d)

d

Kraska, Beutel, Chi, Dean, Polyzotis, 2018