Professional Documents
Culture Documents
02-04-2022
by
Rahul Kumar
(Roll No: 21CS60R24)
1 Introduction
Extensive data center expansion in the last few years has been fueled with the help of cloud computing
and data analysis. There are thousands of servers which are used to perform these computing tasks.
That’s Why it is important to develop efficient and better algorithms is the prime factor in making
the more efficient use of network resources which are the main motivation of online switch scheduling
problems. Competitive ration is the way to measure the performance quality of online algorithms.
The main characteristic of these newly switching algorithms is that data can be sent at any time once
matching between sender and receiver is done. However, when the switching algorithm decides to dis-
connect with the current matching and configure with the different matching, because of some physical
restrictions like it takes time to rotate the mirror, and also before sending the data through a new con-
figured matching a fixed delay is incurred. Because of this there is a significant study required to form a
better scheduling algorithm that will care for this delay. When we compare cost the problem is different
for matching in switching algorithms and classical literature on scheduling in crossbar switching which
are basically based on Birkhoff von-Neumann decompositions. In this paper we basically focus on finding
the schedule which can transmit data as much as possible in a particular fixed time window. Our goal
is to design a simple and efficient online algorithm with provable guarantees for the scheduling problem
which can handle the switching delay.
2 Online Algorithm
An online algorithm is one in which at beginning all the inputs are not known. Rather than inputs
are presented in stages or piece by piece fashion therefore when input receives than algorithm processes
them. It may be possible that this algorithm may not provide us optimum solution because it does not
know the rest of the input.
Mathematically we can define this algorithm as follows. A series of request σ = σ(1), σ(2), ..., σ(n) is
defined as input for an online algorithm.It is important that the algorithm should operate these requests
in order. When algorithm work on request σ(t) then algorithm does not know anything that what will
be the future request σ(t′ ) for t′ > t i.e without knowing the future input the algorithm needs to take
decisions and these decisions are immediate and irrevocable. But in comparison to offline algorithms,
decisions need to be taken after knowing all the input requests.
2
2.2 Sky Rental Problem
The Ski-rental problem is the simple example of an online algorithm. In this problem a skier can rent skis
for a day or he has to buy once and then he can use it forever. To buy a pair of skis a person has to bear
k times as much as renting it. And also once a pair of skis bought that it can not be returned. Whenever
a skier goes skiing he has no idea whether he will ski again or how many times. These conditions make
the ski rent problem an online one.
Let’s say a skier has a scenario that the skier skis as long as he is renting skis, but he is not able to go
for any trips after he has bought them because of the bad weather. Suppose skier rent skis on the first
k’ trips and buy them on the next trip.
The total cost incurred by the skier is k ′ + k.
But optimum cost is k if k ′ + 1 > k and k ′ + 1 otherwise.
(k′ +k)
Therefor the skier ends up paying a factor of min(k,k ′ +1) as much as the optimum.
We can see in figure that our algorithm starts with points on OP T , but at the end, points contain on
dotted line which tells us that we can achieve minimum multiple of OP T .
(k′ +k)
The above factor which we got that is min(k,k ′ +1) is called competitive ratio of the algorithm. One
this that we have to note is that when we are calculating this factor, we used the worst case possible
input sequence. Also we can say that an online algorithm is A -competitive if for all input sequence σ,
Where CA is A’s cost function, COP T is the optimum’s cost function and δ is some constant.
For this ski-rent problem 2 − 1/k is both a lower and upper bound on the best competitive ratio -
no online algorithm can give better performance than this , and this is an online algorithm that archives
this.
3
3 Circuit Switch Scheduling problem
|A|×|B|
In the circuit switch scheduling problem, given a traffic demand matrix D ∈ R+ , Where A repre-
sents the set of senders and B represents the set of receivers. Dij represents the data which we want to
transmit from sender i to receiver j. Dij can be also represent as edge weight of complete bipartite graph
with vertex set A ∪ B. we have also given a particular time window W and switching delay δ > 0 that
is delay which occurs at the time of matching shift due to that no data can be transferred. For any time
algorithm must select a matching M for a duration of for which data sent along the edge of matching M
that still requires data to be transmitted. When the algorithm changes from one matching to another
matching let’s say M ′ for another duration of α′ , algorithm must carry a δ time for switching between
two matchings. The total time for which data P transmitted among the matchings and the switching time
which is used between two matching which αi + corresponding δ should be less than or equal to W .
In this algorithm we are using offline algorithm as a black box i.e we are considering β -approximation
for the offline version of the problem. Formally we can say that we have an algorithm of the form of
Algorithm 1. To reiterate, let’s say we have given G as a complete bipartite graph where A and B are
the senders and receivers, E is edge weight of complete bipartite graph, D is the traffic demand matrix,
switching delay is δ and a fixed size of time window W . The term scheduling the configuration (M, α)
means we will sending data only using matching M for the next α steps.
Algorithm 1
Algorithm 2
1: Input:
T δ, k and data matrices D1 , D2 , ..., DT on AB where Di revealed at beginning of step i. Let
l = kδ .
2: Output: S = S1 ∪ S2 ∪ ... ∪ S1
3: S ← ∅, R0 ← ∅
4: for i ← 1 to l P− 1 do
5: Rr′ ← Rr + rkδ≤j≤(r+1)kδ Dj
6: Sr ← Of f lineAlgorithm(G, Rr′ , δ, kδ)
′ ′
P
7: Rr+1 ← Rr − min(Rr , (α,M )∈Sr αM ), S ← S ∪ Sr
8: end for
9: return S =0
For a constant k ≥ 1, Step 1 of the algorithm is to wait for kδ steps so that data to accumulate and
than on accumulated data run the offline algorithm for a time window W = kδ. Let’s say for offline
algorithm S1 be output. FromP time t = kδ + 1 to t = 2kδ We will run this schedule. Meanwhile time we
collect the data matrix i.e kδ+1≤j≤2kδ Dj . For the next step we consider the newly arrived data in
previous kδ time denoted by Rr′ in algorithm 2 and those data which have not been scheduled so far from
the previous schedule(s). Then to obtain the schedule for the next kδ steps we run the offline algorithm
on these data matrix. We formally describe this algorithm using algorithm 2. As shown in below figure
the description is written as an enumeration over block of size kδ. Amount of data sent by any schedule
S is denoted by f (S).
4
Figure 2: illustration for the setting
References
[1] S chwartz, Roy, Mohit Singh, and Sina Yazdanbod. ”Online and offline greedy algorithms for routing
with switching costs.” arXiv preprint arXiv:1905.02800 (2019).
[2] Albers, Susanne. ”BRICS, Mini-Course on Competitive Online Algorithms.” Aarhus University 32
(1996).
[3] B oyar, Joan, Lene M. Favrholdt, Christian Kudahl, Kim S. Larsen, and Jesper W. Mikkelsen.
”Online algorithms with advice: a survey.” ACM Computing Surveys (CSUR) 50, no. 2 (2017):
1-34.
[4] Gupta, Himanshu, Max Curran, and Caitao Zhan. ”Near-optimal multihop scheduling in general
circuit-switched networks.” In Proceedings of the 16th International Conference on emerging Net-
working EXperiments and Technologies, pp. 31-45. 2020.
[5] C S369 - Online Algorithms Lecture notes for 2012-2013 ... (n.d.). Retrieved March 31, 2022, from
https://web.stanford.edu/class/cs369/files/cs369-notes.
[6] Online algorithms - Carnegie Mellon School of Computer Science. (n.d.). Retrieved March 31, 2022,
from https://www.cs.cmu.edu/ avrim/451f13/lectures/lect1107.pdf.
[7] W ikimedia Foundation. (2022, January 26). Online algorithm. Wikipedia. Retrieved March 31, 2022,
from https://en.wikipedia.org/wiki/Online algorithm