 
Summary: Online and Approximation Algorithms Spring Semester, 2006
Final Exam: June 12, 2006
Lecturer: Prof. Yossi Azar
Write short but full and accurate answers. Each question should start on a new page and each of its parts should
not exceed a page. Solving 5 questions results in score 90. One page A4 is allowed.
1. Suppose you are in the middle of an infinite building. To go up or down one floor it takes one minute. To
scan a floor it takes 2 minutes. You need to find some treasure in some unknown floor. You would find it
once you scan completely the correct floor. When you go up or down you do not necessarily need to scan
all floors. The optimum can go (up or down) directly to the correct floor and scan completely only that
floor. The goal is to minimize the time until you find the treasure. Design a 15 competitive algorithm for
the problem (no additive constant is allowed).
2. Consider the following algorithm MoveMid for the list update problem. Given a request to an element x at
position i, MoveMid moves x to position i/2 .
(a) Show that MoveMid is 4 competitive.
(b) Show that MoveMid is at least 4  O(1/n) competitive where n is the size of the list (this can be done
by an example of a request sequence for any given n).
Hint: consider what the algorithm is doing when you request the last element of the list.
3. Consider the online load balancing problem on m (divisible by 3) machines. Job i has weight wi and a
subset Si of size m/3 of the m machines. The job has to be assigned to one machine in Si.
(a) Design a 4 competitive algorithm.
