Online Algorithms Lecture 11
Today DC on trees DC on arbitrary metrics DC on circle Scheduling
K-server on trees Theorem The DC Algorithm is k-competitive for the k server problem on arbitrary tree metrics. Proof: = Lemma 1. Φ 0;5 Φ = k min - d s 0, o ( 0 ( * + Lemma 2. Φ 0 Φ 0;5 3 045 Φ 0;5 + k OPT 0 (σ) = DC 0 (σ) if 3;5 3 + - - d(s 0, s 8 ) 045 840:5
10.1 k-server-problem on trees We consider the k-server-problem on trees. Let {o 1,...,o k } and {s 1,...,s k } be two sets of servers. We use the metric and the notion of neighborhood from the lecture. As previously an assignment is optimal if = argmin 2Sk P k i=1 d(x i,y (i) ). Let j 2 {1,...,k} be an arbitrary index and let I be the set of indices of the neighbors s i of o j. That is, I = {i s i is neighbor of o j }. Show that there is an optimal assignment with (i) =j for an i 2 I.
Applying the DC-Algorithm P Idea: Approximate an arbitrary metric with a tree metric Use the DC algorithm for trees 2 10.2 Application of the DC algorithm Let G =(V,E) be a graph with edge weights w(e) and T =(V,E T ) be a minimum spanning tree (MST) of G. Show that for every e = {x, y} 2 E the distance from x to y in T is at most (n 1)w(e) where n = V. Use the DC algorithm on tree metrics and above insight to prove: There is a deterministic O(nk)- competitive algorithm for arbitrary metric spaces with n points. Corollary The DC-algorithm is (n 1)k-competitive for arbitrary metrics with n points.
Applying the DC-Algorithm (2) 10.3 DC on a Circle Consider the k-server-problem on a circle C with circumference 1. The distance d(x, y) of two points x, y 2 C is the length of the shortest arc between them. Describe a randomize online algorithm for the k-server problem on the metric space (C, d) that is 2k-competitive against oblivious adversaries. Hint: First show the following statement: If we cut the circle at a point p 2 C chosen uniformly at random and interpret the resulting arc C 0 as a line with the usual metric d 0 then for every two points x, y 2 C the following holds: E[d 0 (x, y)] apple 2d(x, y) where the expectation is taken over all points p 2 C.
Applying the DC-Algorithm (3) We saw two simple methods to approximate metric spaces by a tree metric Without decreasing distances Increasing distances only by a certain factor n for arbitrary metric spaces (deterministic) 2 for a circle metric (randomized) What is the best that we can achieve for arbitrary metric spaces?
Approximation of metric spaces There is a randomized algorithm to compute a distribution over tree metrics such that distances increase by a factor of O(log n) in expectation and do not decrease. Corollary There is a randomized online algorithm for the k server problem which is O(k logn)-competitive for arbitrary metrics with n points.
Makespan-Scheduling Set of jobs J = {1, n} Set of machines M = {1, m} Each job j J has a size p 8 R > 0 Each machine i M has a speed s 0 R > 0 If a job j J is processed by machine i M it takes time ]^ a _` A schedule π J M assigns each job to a machine L 0 (π) is the load of machine i M in schedule π j M,π(j)=i p 8 L 0 (π) = s 0 Makespan C(π) is the maximal load i.e. C π = max 0 j L 0(π) Objective: Find a schedule with minimal Makespan.
Online Scheduling Set of machines and speed are known. jobs arrive one after another. job have to be assigned immediately to a machine. number and size of future jobs are unknown. Example: 2 machines, each with speed 1 Sequence of jobs: 1, 1, (2)
Results for today Identical machines (all have speed 1) Least Loaded is strict (2 5 l )-competitive Matching lower bound for Least Loaded. Machines with speed Algorithm Slowfit(α) Algorithm Slowfit is strict 8-competitive
Slowfit(α) Assume we now the makespan of OPT. Let α = OPT(σ) slowfit(α) tries to compute a schedule with makespan at most 2α. 1. Sort machines according to speed in increasing order, i.e., s 5 s n s l 2. Let π 8 be the schedule of slowfit(α) for the jobs 1,, j. 3. slowfit(α) schedules a new job j with size p 8 to the slowest machine i = M which has load no more then 2α after this assignment. That is i = = min{i M L 0 (π 8;5 ) + ]^ 2α }. If no such machine exists, output an error. _`
Slowfit 1. Set α q = ] r _ s 2. Start with phase k = 0 3. For a job j do the following: a) try to schedule j with slowfit(α 3 ) while ignoring all jobs of previous rounds 0,, k 1 b) If slowfit(α 3 ) produces an error, increase k by one, Set α 3 = 2 3 α t, and Goto 3a).