You are on page 1of 20

Online Switching Problem

Guided By :
Prof. Swagato Sanyal

Presented by:
Rahul Kumar (21CS60R24)
Online Algortihms
• The input of an online algorithm is a sequence of requests σ =
σ(1),σ(2),...,σ(n) The algorithm needs to serve these requests in order.
• When serving σ(t), the algorithm does not know the future requests
σ(t′) for t′ > t
• Decisions for each part must be taken without the knowledge of
future input.
• Decisions are immediate and irrevocable.
• In contrast, an offline algorithm can make decisions after knowing the
complete sequence of requests.
Online Algortihms: Competitive Ratio
• The goal of the online algorithm is usually to minimize a cost function.
• The cost of an online algorithm’s output is often compares with the
optimal cost of the best possible offline algorithm.
• For a sequence of request σ , The competitive ratio of an online
algorithm ALG is defined as

• Where OPT(σ) denote the cost incurred by the best possible offline
algorithm OPT, and ALG(σ) denote the cost incurred by the best possible
the online algorithm ALG.
Online Load Balancing Problem
• Problem Statement

Given m identical machines, jobs arrive online, job j has processing time pj, each
job is assigned to a machine on arrival. The objective is to make the load on
each machine as balanced as possible
• Input: m identical machines, n jobs, and processing times t1, t2, ..., tm , where
job j has processing time tj (on any machine)
• Job j must run contiguously on one machine
• A machine can process at most one job at a time.
• Let S[i] be the subset of jobs assigned to machine i.
• The load of machine i is total processing time.

• The makespan is the maximum load on any machine L= maxi L[i].


• The goal of Load balancing Problem is to assign jobs to machines so as to
minimize makespan.
Loads of machine 1 and machine 2 respectively
Circuit Switch Scheduling Problem
• Problem Statement

At any time, the algorithm must pick a matching M and duration α for which the
data is transmitted along the edges of the matching M that still require data to
be sent.

When the algorithm changes to other matching M′ for having duration α′, the
algorithm must hold δ time for switching between the two matchings.

The total time for which data is sent along matchings as well as switching time
must be less than or equal to W.
Circuit Switch Scheduling Problem
• we are given a traffic demand matrix D ∈ R|A|×|B|
• A is the set of senders and B is the set of receivers.
• Dij denotes the amount of data that needs to be sent from sender i to
receiver j.
• The Dij’s can also be seen as weights on the edges of a complete
bipartite graph with vertex set A ∪ B.
• We are also given a time window W and a switching time δ > 0
• The objective is to maximize the total demand that is satisfied.
• The Authors have shown the competitive ratio of online circuit switch
scheduling algorithm without considering delay to be 1/2.
Offline Circuit Switch Scheduling Problem
• Input: G = (A,B,E),D,δ,W
• Output: {(M1,α1),...,(Mr,αr)}
Online Greedy Algorithm
• Without Configuration Delay
δ = 0 (no delay while switching matchings )
• The objective of Algorithm is
• Theorem: Online Greedy Algorithm without Delay is 1/2 -competitive
for the online circuit switch scheduling problem without delays.

Proof:
To prove this theorem we will use a lemma

Where {Ot′}Tt=2 the optimum matchings


Using the induction hypothesis and the lemma we can write

Adding the inequality |M1| ≥ |O1| to both sides, we obtain


• Ri is the remaining data demand in the graph after i configurations
were already chosen
• The algorithm will chose next configuration as

• The algorithm continues to pick configurations until the time


constraint is violated.
• Let r denote this number of steps and Sr the schedule created after r
steps of this algorithm.
Online Greedy with Delay
• we assume switching between the configurations causes a delay of δ
during which no data is sent.
• We also assume that we have access to a β-approximation for the
offline version of the problem
• we view the offline algorithm as a black-box
• G is the given complete bipartite graph, D is the traffic demand
matrix, δ is the switching delay and W is the size of the time window.

• (M, α) means for next α steps we will only send data using matching
M.
Online Greedy with Delay
• first step of the algorithm is to wait kδ steps for data to accumulate
and then run the offline algorithm on the accumulated data for time
window W = kδ.
• S1 be the output of the offline algorithm
• We run this schedule from time t = kδ + 1 to t = 2kδ.
• And we collect the incoming data matrices in these times.
• Figure 1 shows one step of the algorithm.
• At the next step, we consider the total remaining data that includes
data that has not been scheduled so far from previous schedule(s)
and newly arrived data in previous kδ steps.

• kδ steps. We then run the offline algorithm on this data matrix to


obtain a schedule for the next kδ steps.
• we continue this process for every block of kδ time steps.

You might also like