It is difficult to construct good randomized online algorithms ... Universe of pages in âslowâ memory. Fast memory can hold k pages. Requests ̺ = r1r2...rn for pages have to be served ..... A âreasonable algorithmâ will move to configurations in.
Online Computation Knowledge States
Knowledge States: A Tool in Randomized Online Algorithms Wolfgang Bein Center for the Advanced Study of Algorithms School of Computer Science University of Nevada, Las Vegas
ADS 2007 coauthors: Lawrence L. Larmore, John Noga, Rudiger ¨ Reischuk supported by NSF grant CCR-0312093
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Online Problems
offline: all input data is completely available before the algorithm starts.
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Online Problems
offline: all input data is completely available before the algorithm starts. online: input data arrives a piece at a time the algorithm must make a decision without knowledge of the entire input.
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Online Problems
offline: all input data is completely available before the algorithm starts. online: input data arrives a piece at a time the algorithm must make a decision without knowledge of the entire input. online problems: resource allocation in operating systems, network routing, robotics, data-structuring, distributed computing, scheduling...
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Theme of the Talk It is difficult to construct good randomized online algorithms Use of work functions in the context of randomized online algorithms
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Theme of the Talk It is difficult to construct good randomized online algorithms Use of work functions in the context of randomized online algorithms Give distributional descriptions of algorithms
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Theme of the Talk It is difficult to construct good randomized online algorithms Use of work functions in the context of randomized online algorithms Give distributional descriptions of algorithms Use the concept of forgiveness
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Theme of the Talk It is difficult to construct good randomized online algorithms Use of work functions in the context of randomized online algorithms Give distributional descriptions of algorithms Use the concept of forgiveness Give two new results: better than 2-comptitive 2-server algorithm in cross polytope spaces optimally competitive k-paging with only O(k) memory
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Papers Equitable Revisited. Bein, Larmore, Noga, ESA 2007 A Randomized Algorithm for Two Servers in Cross Polytope Spaces. Bein, Iwama, Kawahara, Larmore, Oravec, WAOA 2007 Knowledge States: A Tool for Randomized Online Algorithms. Bein, Larmore, Reischuk, HICSS 2008 Knowledge State Algorithms: Randomization with Limited Information. Bein, Larmore, Reischuk, Arxiv 2007 Knowledge States for the Caching Problem in Shared Memory Multiprocessor Systems. Bein, Larmore, Reischuk, IJFCS, to appear Bein, Larmore. Trackless and Limited-Bookmark Algorithms for Paging. Bein, Larmore, ACM SIGACT News, 2004 Tutorial at www.cs.unlv.edu/∼bein/tutorial Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Paging Universe of pages in “slow” memory Fast memory can hold k pages Requests ̺ = r 1 r 2 ...r n for pages have to be served Hit (no cost) or Miss (cost 1) Fast Memory a b f h j k
Fast Memory x a b f j k Eject h Request x
Slow Memory
Slow Memory
Solution can be described as a sequence of configurations
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The CNN Problem
News crew in Manhattan (streets and avenues) “event” sequence ̺ = r 1r 2, . . . , r n
r1
Event can be “seen” either horizontally or vertically Solution can be described as a sequence configurations Goal: minimize total movement cost
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The CNN Problem
News crew in Manhattan (streets and avenues) “event” sequence ̺ = r 1r 2, . . . , r n
r1
Event can be “seen” either horizontally or vertically Solution can be described as a sequence configurations Goal: minimize total movement cost
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The CNN Problem
News crew in Manhattan (streets and avenues) “event” sequence ̺ = r 1r 2, . . . , r n Event can be “seen” either horizontally or vertically Solution can be described as a sequence configurations
r2
Goal: minimize total movement cost
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The CNN Problem
News crew in Manhattan (streets and avenues) “event” sequence ̺ = r 1r 2, . . . , r n Event can be “seen” either horizontally or vertically Solution can be described as a sequence configurations
r2
Goal: minimize total movement cost
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The CNN Problem
News crew in Manhattan (streets and avenues) “event” sequence ̺ = r 1r 2, . . . , r n
r3
Event can be “seen” either horizontally or vertically Solution can be described as a sequence configurations Goal: minimize total movement cost
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The CNN Problem
News crew in Manhattan (streets and avenues) “event” sequence ̺ = r 1r 2, . . . , r n
r3
Event can be “seen” either horizontally or vertically Solution can be described as a sequence configurations Goal: minimize total movement cost
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The CNN Problem
News crew in Manhattan (streets and avenues) “event” sequence ̺ = r 1r 2, . . . , r n Event can be “seen” either horizontally or vertically Solution can be described as a sequence configurations
r4
Goal: minimize total movement cost
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The CNN Problem
News crew in Manhattan (streets and avenues) “event” sequence ̺ = r 1r 2, . . . , r n Event can be “seen” either horizontally or vertically Solution can be described as a sequence configurations
r4
Goal: minimize total movement cost
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The 2-Server Problem
Server 2
2 servers in a metric space M request sequence ̺ = r 1r 2, . . . , r n
Server 1
online: decision must be made before r i+1 is revealed Goal: minimize total movement cost
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The 2-Server Problem
Server 2
2 servers in a metric space M request sequence ̺ = r 1r 2, . . . , r n
Server 1 r1
online: decision must be made before r i+1 is revealed Goal: minimize total movement cost
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The 2-Server Problem
2 servers in a metric space M request sequence ̺ = r 1r 2, . . . , r n online: decision must be made before r i+1 is revealed
Server 1 r1 Server 2
Goal: minimize total movement cost
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The 2-Server Problem
2 servers in a metric space M request sequence ̺ = r 1r 2, . . . , r n online: decision must be made before r i+1 is revealed
Server 1 r2 Server 2
Goal: minimize total movement cost
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The 2-Server Problem
2 servers in a metric space M request sequence ̺ = r 1r 2, . . . , r n online: decision must be made before r i+1 is revealed
Server 1 r2 Server 2
Goal: minimize total movement cost
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The 2-Server Problem
2 servers in a metric space M request sequence ̺ = r 1r 2, . . . , r n online: decision must be made before r i+1 is revealed
Server 1
r3
Server 2
Goal: minimize total movement cost
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The 2-Server Problem
2 servers in a metric space M request sequence ̺ = r 1r 2, . . . , r n online: decision must be made before r i+1 is revealed
r3
Server 2
Server 1
Goal: minimize total movement cost
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The 2-Server Problem
2 servers in a metric space M r4
request sequence ̺ = r 1r 2, . . . , r n online: decision must be made before r i+1 is revealed Goal: minimize total movement cost
Wolfgang Bein
r3
Server 2
Server 1
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The 2-Server Problem
2 servers in a metric space M r4 Server 2
request sequence ̺ = r 1r 2, . . . , r n online: decision must be made before r i+1 is revealed Goal: minimize total movement cost
Wolfgang Bein
Server 1
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Configurations for the 2-Server Problem
the locations of the two servers is called a configuration solution can be described as a sequence of configurations
Server 2 r4
Server 1 r2
r1
r3
the movement cost is the transportation distance between configurations
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Configurations for the 2-Server Problem
the locations of the two servers is called a configuration solution can be described as a sequence of configurations
r4
Server 1 r2
r1 Server 2
r3
the movement cost is the transportation distance between configurations
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Configurations for the 2-Server Problem
the locations of the two servers is called a configuration solution can be described as a sequence of configurations
Server 1
r4
r2 r3
Server 2
the movement cost is the transportation distance between configurations
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Configurations for the 2-Server Problem
the locations of the two servers is called a configuration
r4
solution can be described as a sequence of configurations the movement cost is the transportation distance between configurations
Wolfgang Bein
r3
Server 2
Server 1
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Configurations for the 2-Server Problem
the locations of the two servers is called a configuration
r4 Server 2
solution can be described as a sequence of configurations the movement cost is the transportation distance between configurations
Wolfgang Bein
Server 1
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Online Algorithms
1
Algorithm A is at some initial configuration a0
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Online Algorithms
1 2
Algorithm A is at some initial configuration a0 Requests: ̺ = r 1 , . . . , r n .
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Online Algorithms
1 2 3
Algorithm A is at some initial configuration a0 Requests: ̺ = r 1 , . . . , r n .
At time (t − 1), A is at configuration at−1 .
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Online Algorithms
1 2 3 4
Algorithm A is at some initial configuration a0 Requests: ̺ = r 1 , . . . , r n .
At time (t − 1), A is at configuration at−1 . A has to serve r t not knowing r t+1 , . . .
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Online Algorithms
1 2 3 4 5
Algorithm A is at some initial configuration a0 Requests: ̺ = r 1 , . . . , r n .
At time (t − 1), A is at configuration at−1 . A has to serve r t not knowing r t+1 , . . . A chooses a configuration at .
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Online Algorithms
1 2 3 4 5 6
Algorithm A is at some initial configuration a0 Requests: ̺ = r 1 , . . . , r n .
At time (t − 1), A is at configuration at−1 . A has to serve r t not knowing r t+1 , . . . A chooses a configuration at . A incurs cost(at−1 , r t , at ).
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Online Algorithms
1 2 3 4 5 6
Algorithm A is at some initial configuration a0 Requests: ̺ = r 1 , . . . , r n .
At time (t − 1), A is at configuration at−1 . A has to serve r t not knowing r t+1 , . . . A chooses a configuration at . A incurs cost(at−1 , r t , at ).
If A uses randomization in bullet 5 then A is called a randomized online algorithm.
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
2-Server Example Example: k = 2 and ̺ = xyxyz y
2
z
1
x
2
x y z y
x
y z x
x y z
y
x
y z x
z y z x
cost = 7
“Work Function Algorithm” (WFA) Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The Adversary: Optimal Cost Function on configurations: Dynamic programming The optimal cost of being there then 0
y 2
y
z
1 2
x
x
2
z y
x
1
y
4
y z y
x
z
2
2
z
3
2
y
x
2
y
x
4
z z
x
optcost = 4 = min last workfunction
x
4
Given request sequence ρ ω ρ (a) = min cost of serving ρ and ending in configuration a ∈ X
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Support of a Work Functions
initial request x request y request x request y request z
ω({y , z}) 0 2 2 4 4 4
ω({x , z}) 1 1 3 3 4 4
ω({x , y }) 2 2 2 2 2 6
S ⊆ X supports ω if for any b ∈ X there exists some a ∈ S such that ω(b) = ω(a) + |a, b|.
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Support of a Work Functions
initial request x request y request x request y request z
ω({y , z}) 0 2 2 4 4 4
ω({x , z}) 1 1 3 3 4 4
ω({x , y }) 2 2 2 2 2 6
S ⊆ X supports ω if for any b ∈ X there exists some a ∈ S such that ω(b) = ω(a) + |a, b|. A “reasonable algorithm” will move to configurations in the support.
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Support of a Work Functions
initial request x request y request x request y request z
ω({y , z}) 0 2 2 4 4 4
ω({x , z}) 1 1 3 3 4 4
ω({x , y }) 2 2 2 2 2 6
S ⊆ X supports ω if for any b ∈ X there exists some a ∈ S such that ω(b) = ω(a) + |a, b|. A “reasonable algorithm” will move to configurations in the support. WFA moves for request r from configuration a to configuration b such that |a, b| + ω(b) is minimized.
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Competitiveness For request sequence ̺ = r 1 , r 2 , . . . consider costA (̺): the cost on ̺ achieved by A
costopt (̺): the cost on ̺ achieved by opt We say that A is C-competitive if for each sequence ̺ we have EcostA (̺) ≤ C · costopt (̺) + K
——————————————————Example: cost W FA (xyxyz) cost opt (xyxyz)
=
7 4
Wolfgang Bein
WF A is 2-competitive
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The Distributional Model A randomized algorithm can be viewed as a determistic algorithm on distributions. X = all configurations
π is a distribution on X . Algorithm A is at some initial configuration a0 .
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The Distributional Model A randomized algorithm can be viewed as a determistic algorithm on distributions. X = all configurations
π is a distribution on X . Algorithm A is at some initial configuration a0 . Requests: ̺ = r 1 , . . . , r n .
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The Distributional Model A randomized algorithm can be viewed as a determistic algorithm on distributions. X = all configurations
π is a distribution on X . Algorithm A is at some initial configuration a0 . Requests: ̺ = r 1 , . . . , r n .
At time (t − 1), A is at distribution π t−1 .
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The Distributional Model A randomized algorithm can be viewed as a determistic algorithm on distributions. X = all configurations
π is a distribution on X . Algorithm A is at some initial configuration a0 . Requests: ̺ = r 1 , . . . , r n .
At time (t − 1), A is at distribution π t−1 . A has to serve r t not knowing r t+1 , . . .
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The Distributional Model A randomized algorithm can be viewed as a determistic algorithm on distributions. X = all configurations
π is a distribution on X . Algorithm A is at some initial configuration a0 . Requests: ̺ = r 1 , . . . , r n .
At time (t − 1), A is at distribution π t−1 . A has to serve r t not knowing r t+1 , . . .
A chooses deterministically a distribution π t .
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Cost in the Distributional Model y
1 2
y x
cost 0, 1/4transport z
1 4
z x
cost 2, 1/4 transport x
1 2
y x
y
z cost 2, 1/4 transport
z x
z
3 4
Total cost: 1
“Transportaion Cost” = 1 The cost incured by moving from one distribution to the next is calculated by moving mass along a transportaion problem. The transportation problem has the Monge property. Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Work Function “Guided”
_1 2
a 1 b
c _1 2
d
a b
_1 3
c
_1 3
_1 4
e
a
_1 3 b
_1 4
d
a _1 4
_1 4
b
c
Problem: The “support” grows without bound.
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Forgiveness Lower the work function on selective configurations
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Forgiveness Lower the work function on selective configurations d _1 3
c
_1 3
_1 4
e
a
_1 3 b
_1 4
d
a _1 4
_1 4
b
c
e
a
1 b d c
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Forgiveness Lower the work function on selective configurations d _1 3
c
_1 3
_1 4
e
a
_1 3 b
_1 4
d
a _1 4
_1 4
b
c
e
a
1 b d c
Work functions are now estimators Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Las Vegas
Algorithm is constructed using the “mixed model” of online computation _1 2
a 1 1 b
1
d
a
1 1
c _1 2
_1 3
b
c
_1 3
_1 3
a
b _ _2 3
0
_1 1 3
_1 3
_1 3
1
Wolfgang Bein
c
b
1
a c
c
a
a
d d
d 1
_1 3
b
b
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The Randomized 2-Server Problem Best: RANDOM SLACK 2-competitive [Coppersmith, Doyle, Raghavan, Snir, 90]
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The Randomized 2-Server Problem Best: RANDOM SLACK 2-competitive [Coppersmith, Doyle, Raghavan, Snir, 90] Not known to be best possible.
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The Randomized 2-Server Problem Best: RANDOM SLACK 2-competitive [Coppersmith, Doyle, Raghavan, Snir, 90] Not known to be best possible. 1
Lower Bound: 1 + e− 2 ≈ 1.6065 [Chrobak, Larmore, Lund, Reingold, 97]
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The Randomized 2-Server Problem Best: RANDOM SLACK 2-competitive [Coppersmith, Doyle, Raghavan, Snir, 90] Not known to be best possible. 1
Lower Bound: 1 + e− 2 ≈ 1.6065 [Chrobak, Larmore, Lund, Reingold, 97] Line: 155 78 ≈ 1.987 [Bartal, Chrobak, Larmore, 98]
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
2-Server Problem: M24 M24 consists of all metric spaces such that All distances are 1 or 2.
d (x, y) + d (x, z) + d (y, z) ≤ 4
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Why M24 ?
A step in the direction of the goal (better than 2-competitive randomized algorithm for the 2-server problem).
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Why M24 ?
A step in the direction of the goal (better than 2-competitive randomized algorithm for the 2-server problem). Allows a simple example of the knowledge state method.
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Why M24 ?
A step in the direction of the goal (better than 2-competitive randomized algorithm for the 2-server problem). Allows a simple example of the knowledge state method. An interesting class in its own right, generalizing the octahedron.
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Exactly Three Infinite Families of Convex Regular Polytopes ¨ 1852) (Ludwig Schlafli, Infinite Family of Regular Polytopes
Graph Class
Metric Space Class
Regular Simplices
Complete Graphs
Uniform Spaces
Cross Polytopes = Orthoplices
Circulant Graphs Ci 1,...,n−1(2n)
M24
Hypercubes
Hypercubes
Hamming Metric Spaces
Wolfgang Bein
3−d
4−d
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
What is a Knowledge State? Knowledge state k = (ω, π): ω : X → R is the estimator. π is a distribution on X .
0
7/8
x
z 1/8 1/2
y
π(x , y ) is the probability we are at {x , y }. ω(x , y ) is the estimated unpaid cost of the adversary if it is at {x , y }.
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
A Closer Look 0
7/8
x
1/8 10
z 0 1/8 1/2
1
y
Bxyz
The estimator and distribution are defined for all configurations but characterized by their values only on the
support
0 3/2
If a ∈ X − S, then π(a) = 0. ω(a) = minb∈S {ω(b) + ka, bk} Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Knowledge States for the 2-Server Problem 1_ 0 2 x 0 z 1_ 0 4 7 _ 6
Axz x
z 1_ 0 4
y 1_ 0 2 x
10 x
_7 12
z
_5 1 1_ 24 0 x _ 2 z Dxyz
1 z
Bxyz _5 12 z Exz
1_ 0 2 _ x Gxz
7_ 4
Cz
y _ _ 0 x 19 24
19 _ 24 0 _ z 29 _ 24
1_ 0 4 _ z
_3 0 8
3 _0 _ 8 x
_5 12
10
z x Fxz _5 0 24
z
x Hxz
Up to symmetry, there are 8 knowledge states of a algorithm for M2,4 . Wolfgang Bein
_ z
z _1 20
19 12 -competitive
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
There are Numerous Moves. Here is One. Intermediate State W
x
_ 11 _ 33
_1 0 4
x _ z
z y
_7 6
1_ 0 2
_ x
10 __ 9
13 2 _ _ 12 3
Dxyz _1 0 4
1 1_ _ 43
_ z
1_ 3
_ z
_1 0 2
_ x 1
_ Gzx
1_ 0 2
_ x
1_ 3
y z
11 _ _ 43 z
1 _ _y 1 6 3
10 _ 4
Wolfgang Bein
y
1 _ 20
_ x 7 _ 6
1_ 3
1 0 _ 4
_ Dyzx
10 _ 2
_ x
x z
1 _ 40
7 _ 6
x _ z
1 _0 4
__ Dyzx
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
One Move of the Algorithm
Start at a standard knowledge state over (x , y , z).
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
One Move of the Algorithm
Start at a standard knowledge state over (x , y , z). Read a request r .
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
One Move of the Algorithm
Start at a standard knowledge state over (x , y , z). Read a request r . Update the estimator.
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
One Move of the Algorithm
Start at a standard knowledge state over (x , y , z). Read a request r . Update the estimator. Move the distribution.
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
One Move of the Algorithm
Start at a standard knowledge state over (x , y , z). Read a request r . Update the estimator. Move the distribution. Las Vegas. Randomly pick a subsequent.
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
One Move of the Algorithm
Start at a standard knowledge state over (x , y , z). Read a request r . Update the estimator. Move the distribution. Las Vegas. Randomly pick a subsequent. We are at a standard knowledge state over (x , y , r ), (y , x , r ), (x , z, r ), (z, x , r ), (y , z, r ), or (z, y , r ).
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Behavioral Version: The Wireframe Algorithm
dxyz
z
x
d yzx_ y
z _ x
y
z
_ 1 3
1_ 6 request x
x
_ z
_ z
y
1_ 3
1_ 6
d yzx_
x
_ z
_ x
Wolfgang Bein
x
z _ x
__ dyzx _ z y
x
__ dyzx y
z
_ z
_ x
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Results for the 2-Server Problem in M2,4
2-Server Problem on M2,4 , C =
Wolfgang Bein
7 4
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Results for the 2-Server Problem in M2,4
2-Server Problem on M2,4 , C = 2-Server Problem on M2,4 , C =
Wolfgang Bein
7 4 19 12
≈ 1.583
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Results for the 2-Server Problem in M2,4
2-Server Problem on M2,4 , C = 2-Server Problem on M2,4 , C = This is optimal for M2,4 .
Wolfgang Bein
7 4 19 12
≈ 1.583
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Results for the 2-Server Problem in M2,4
2-Server Problem on M2,4 , C = 2-Server Problem on M2,4 , C = This is optimal for M2,4 .
7 4 19 12
≈ 1.583
Uniform spaces i.e. paging, the optimal competitiveness is C = 1.5.
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Results for the 2-Server Problem in M2,4
2-Server Problem on M2,4 , C = 2-Server Problem on M2,4 , C = This is optimal for M2,4 .
7 4 19 12
≈ 1.583
Uniform spaces i.e. paging, the optimal competitiveness is C = 1.5. Open: a better than 2-competitive randomized algorithm for 2 servers in general spaces.
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Paging Paging: k-server problem in uniform spaces
CNN Amazon ..requesting NYTimes Yahoo UNLV Sandia
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
History of k-paging [Fiat, Karp, Luby, McGeoch, Sleator, Young, 1991] Pk Lower bound, Hk = i=1 1/i (2Hk − 1)-competitive algorithm “RM ARK” RM ARK uses O(n) memory
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
History of k-paging [Fiat, Karp, Luby, McGeoch, Sleator, Young, 1991] Pk Lower bound, Hk = i=1 1/i (2Hk − 1)-competitive algorithm “RM ARK” RM ARK uses O(n) memory [McGeoch, Sleator, 1991] Hk -competitive algorithm PARTITION unbounded memory
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
History of k-paging [Fiat, Karp, Luby, McGeoch, Sleator, Young, 1991] Pk Lower bound, Hk = i=1 1/i (2Hk − 1)-competitive algorithm “RM ARK” RM ARK uses O(n) memory [McGeoch, Sleator, 1991] Hk -competitive algorithm PARTITION unbounded memory [Achlioptas, Chrobak, Noga, 2000] Hk -competitive algorithm E QUITABLE O(k 2 log k ) memory
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
History of k-paging [Fiat, Karp, Luby, McGeoch, Sleator, Young, 1991] Pk Lower bound, Hk = i=1 1/i (2Hk − 1)-competitive algorithm “RM ARK” RM ARK uses O(n) memory [McGeoch, Sleator, 1991] Hk -competitive algorithm PARTITION unbounded memory [Achlioptas, Chrobak, Noga, 2000] Hk -competitive algorithm E QUITABLE O(k 2 log k ) memory [Bein, Larmore, Noga, 2007] Hk -competitive algorithm E QUITABLE 2 O(k ) memory Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Bookmarks Aab
ab c 1_ 2
ca Bcab
_1 2
b
cb
b bookmarked
Acb
A trackless algorithm (i.e. an algorithm that does not use any bookmarks) cannot have optimal competitiveness. [Bein, Fleischer, Larmore, 00]
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
An Optimally Competitive Algorithm for 2-Paging
Algorithm K2 : a
a
a b b
c
1− 2
c a b
1− 2
c b a
a b c b
b a
b a
c
1 − 3
d a
2− 3
d b
c a
Competitiveness: CK2 =
Wolfgang Bein
d
3 2
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Models of Online Computation Behavioral
Distributional a
a _1 2
c
b c
1 b
_1 2
c a
_1 2
c
a
c
b
a
b
a
c _1 2
b
a
1
a
1 1 a
a
c
c
b
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Work Functions and Offset Functions a
1 0
c
c
b
a c 0 offset 1 c
c b
d
c 1
b
0
a
0
b
2
d
a
c
d
a
b
c
a
d
b
0 a
a
d offset 1 0
Wolfgang Bein
0
d a
2
2
2
a
0 c
b
c
b
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Offset Function Guided Algorithm EQUITABLE [Achlioptas, Chrobak, Noga, 2000] The algorithm is descibed using the distributional model The algorithm’s distribution mass is only on the support of the work funtion
_1 2
a 1 b
c _1 2
d
a b
_1 3
c
_1 3
_1 4
e
a
_1 3 b
a
_1 4
_1 4
_1 4
d
b
c d _1 3
c
_1 3
_1 4
e
a
_1 3 b
_1 4
d
a _1 4
_1 4
b
c
e
a
1 b d c Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Las Vegas
Algorithm is constructed using the “mixed model” of online computation _1 2
a 1 1 b
1
d
a
1 1
c _1 2
_1 3
b
c
_1 3
_1 3
a
b _ _2 3
0
_1 1 3
_1 3
_1 3
1
Wolfgang Bein
c
b
1
a c
c
a
a
d d
d 1
_1 3
b
b
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Behavioral Translation 1
d _2 3
b
c
_1 2
d
a
c
b
_1 3
b d
a
c
b
d
a
c
b
d
a
c
b
_1 3
a
c _1 2
a
_2 3
d
a
c
b
1
a
d
d
a
c
b
1 c
Wolfgang Bein
b
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Knowledge State Description of K2 Work functions are denoted using the “bar notation”. A tuple T is in the support: at least i members of T are to the left of the i th bar. 0
A
a|b
1, 1 new (c)
1/2
B
A
0
d|a
c|ab new (d) 1/3, 1
1/3 C
d|abc
0
1/3
A
d|b
1/3 0
A
d|c Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
The Case k = 3 A
a|b|c 0
Las Vegas Step 0
5/6
A
a|b|c c or d 0, 1/2 1/2
C
ab||cd e or d 0, 3/4
new 1, 1
1, 1 new
B
a|bcd|
1, 1 new
b, c or d 0, 1/3 c 0, 1/2 d or e 0, 3/4 ab||cde E 1
5/3
D
a|bcde|
a|b|d
1/10
1/10
a|e|f 0 new 0, 1
A0
1/10
a|bcdef|+6/5
−1/5, 1 new
b, c, d or e 0, 1/2
A
Q
Las Vegas Step
0
A 0 a|b|c
1
a|bc|def +1
C
1/2
C
1/2
C
1/2
ab||cd
c or b 0, 1/4
a|bc|de
new
F
1/ 6, 1
5/4
P
0
1/2
R
1/6 1/6
Las Vegas Step
a|bcd|ef+5/6 1/6
Wolfgang Bein
ab||cf
ac||df
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Equitable, Equitable2
For general k: E QUITABLE forgives to a “cone” after O(k 2 log k) bookmarks
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Equitable, Equitable2
For general k: E QUITABLE forgives to a “cone” after O(k 2 log k) bookmarks E QUITABLE forgives to a work function with small support (but not a cone) after O(k) bookmarks
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Further Research
The 2-server problem for general spaces
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms
Online Computation Knowledge States
Further Research
The 2-server problem for general spaces CNN:
√ Deterministic: lower bound: 6 + 17 [Koutsoupias, Taylor, 2005] Deterministic: upper bound: 105 , 879 [Sitters Stougie 2005] Randomized: Open
Wolfgang Bein
Knowledge States: A Tool in Randomized Online Algorithms