CS 591: Assignments |
Homework
A. Verify that the competitive analysis of the simple randomized paging algorithm falls apart if the adversary is adaptive and offline: show where the proof fails and give a sequence of requests that increases the ratio as much as possible.
B. Consider the following modification to the BIT algorithm for list maintenance: only complement the bit when the item is not at the head of the list. Show that the resulting algorithm is no longer 7/4-competitive.
C. Define the following on-line game: the player receives, one at a time,
a succession of values; at step i, the player must decide whether to choose
value vi or to move to the next step. Once the player has
accepted value vi, that value is the player's earning.
If the player refuses to pick any value, then the player's earning at the end
of the game is simply the lowest value encountered in the game, or the last value, or
some fixed lower bound on values (depending on the game's details).
(An interesting elaboration, known as one-way trading,
has the player convert an initial stake in some currency, say dollars,
to another currency, say pounds; at step i, the value
vi is the exchange rate and the player decides
what fraction of his/her remaining dollar funds to convert to pounds
at that step.)
Assume that all values are drawn from the real interval [low,high] and
define r to be the ratio high/low and assume, for simplicity,
that r is a power of 2. Define a trivial
deterministic algorithm RPPi ("reservation price policy")
that simply accepts the first value
greater than low*2i, for some 1<=i<=log r.
The randomized algorithm EXP chooses, with equal probability,
a value of i in the set {1,2,...,log r} and runs
algorithm RPPi.
Prove that the competitive ratio of EXP against an offline
(non-adaptive!) adversary is O(log r), while its competitive
ratio against an offline adaptive adversary is O(r/log r)
(expected ratio) or O(\sqrt(r) log r) (ratio of expected payoffs).
Further prove that, even if neither low nor high are known,
but r is known, the same bound (for a nonadaptive adversary)
holds -- EXP now picks the first value v1 to serve
in lieu of low, but its payoff is defined slightly differently:
if it does not select anything, it can use v1
as its payoff.
In contrast, prove that, when only r is known, no deterministic
algorithm can have a competitive ratio better than r -- that is,
knowledge of r alone does not help at all in a deterministic context.