Yossi Azar Tel Aviv University Joint work with Ilan Cohen Serving in the Dark 1
Oblivious Algorithms Experts – all past information is known Competitive analysis – the past is known Bandit – only the value of the action taken chose is known What if you do not see the input and do not get any feedback ? Can one design meaningful algorithms which do not see the input ? 2
Visiting a Doctor 3
Balls and Bins m 2 balls to be assigned into m bins m out of the balls are of unit weight & all other balls are of zero weight Goal: minimize the max load Max load of 1 is trivial 4
Deterministic Oblivious Algorithms What if the algorithm does not see the weights (oblivious) ? Any deterministic algorithm: some bin has at least m balls They can all be of unit weight Max load is m (in contrast to 1) 5
Randomized Oblivious Algorithms Assign balls uniformally at random Maximum load is logm/loglogm Algorithm is oblivious of the input (weights) 6
Scheduling on idenitical machines m parallel identical machines Jobs arrive over time – job i has weight w i Each job should be dispatched to some machine Goal: minimize the total flow time Clearly each machine should run SRPT 7
Dispatching Algorithm Send a job to a random machine constant competitive for flow time [ChekuriGoelKhannaKumar, SchulzSkutella] Dispatching algorithm is oblivious (does not see the input) Processing jobs on machines are not oblivious (SRPT) 8
Routing in Graphs Given undirected graph G=(V,E) Request (s i, t i ) with demand d i Allocate a path (flow) for request i Load on edge = flow through edge Minimize the maximum load Offline/Online ratios exact or log|V| 9
Routing in Graphs What if the algorithm does not see the demands (oblivious) ? Routes between any two nodes should be chosen in advance (independent of demand) [Racke] seminal result: can be done up to log|V| factor Path = Randomized (Flow = deterministic) 10
Price of Obliviousness Ratio between serving in the dark (unknown input) vs optimal solution (in the light) 11
Returning back to Balls and Bins Algorithm should extract balls from bins (instead of assign balls into bins) Unit balls arrive to arbitrary bins at arbitrary times 12
Serving In The Dark Game B bins Sequence of Arrival & Extraction Events Arrival–new ball is assigned to empty bin If all bins are full the ball is thrown Extraction – Player chooses a bin, clears it and gains its content Goal: max the gain = # of extracted balls The Player does not get any input during the sequence! 13
Serving Game 14
The Optimal Algorithm The optimal player, in each extraction step, chooses a bin with a ball (if one exists) 15
Serving In The Dark Game 16
The Competitive ratio Price of obliviousness We compare (expected) # of extracted balls by the Player vs. an optimal player which “serves in the light” on the same sequence 17
Deterministic Algorithms The ‘round-robin’ algorithm has a competitive ratio of 2-1/B 2-1/B is a lower bound for any deterministic algorithm 18
Serving Game – ‘Round Robin’ Player Round Robin- Optimal- 19
Randomized Algorithms Suggestion: choose a bin uniformly at random at every extraction Better or worse than RoundRobin ? Competitive ratio about 1.69 [AzarCohenGamzu2013] Is there a better randomized algorithm? 20
New Results: Breaking the Uniformity! ‘Order Based’ algorithm: Order bins by their last extraction event Extraction: choose a bin according to a fixed non-decreasing probabilities, permuted according to the order above Note: extraction events may (or may not) have extracted a ball 21
ACDBE Probability: ` 22
CBDAE Probability: ` 23
Breaking the Uniformity! Round-Robin &Uniform are ‘order based’ We provide probability distribution which achieves a competitive ratio of about 1.56 Lower bound of 1.5 for randomized algorithm 24
Proof Sketch Adversary places a ball in the bin whose extraction is least probable Sequences for which the adversary has no underflow & no overflow Fractional algorithm: extract a fraction from each bin (which sum up to 1) 25
Proof sketch: Grouping bins together: Extraction Event: 26
Proof Sketch Define a deterministic fractional block process: Extraction Event: 27
Proof Sketch (fractional): Characterizing the worst sequence: Alg has overflows – balls arrive until opt is full No overflow – no balls arrives unless opt has underflow Sequence defined up to one parameter – the number of steps between two overflows! (which depend on the probability function) 28
Proof Sketch The sequence between two overflows: The number of 0’s is B-1, the number of 1’s depends on the probability function. Define, the expected number of balls extracted after d steps, starting with full load. The competitive ratio: 29
Proof Sketch Analyze for B >> 1, and smooth p. Define as a portion of the load after steps, i.e., we have Where. The competitive ratio 30
Proof Sketch Analyze the randomized versus the fractional: Analyze a single fractional block versus a single integer block. Define an hybrid process where the first blocks are integer and the rest are fractional. Replace the first fractional block by an integer one, prove that for sequences that would not overflow the first would not overflow the new one. 31
Summary Algorithms can be oblivious and meaningful Cost of Serving in the dark 2 1.69 1.56 Lower bound (randomized) =
Open problems Is the best bound 1.5 or is it larger ??? Explore oblivious algorithms Can we give an oblivious talk ? Can we write an oblivious paper ? 33
Thanks 34