A -Competitive Algorithm for Scheduling Packets with Deadlines - - PowerPoint PPT Presentation
A -Competitive Algorithm for Scheduling Packets with Deadlines - - PowerPoint PPT Presentation
A -Competitive Algorithm for Scheduling Packets with Deadlines Pavel Vesel y University of Warwick Joint work with Marek Chrobak (UC Riverside), Lukasz Je z (Wroc law), and Ji r Sgall (Charles University, Prague)
Outline
Introduction to competitive analysis Model & result Algorithm Analysis techniques Further research directions
Pavel Vesel´ y Online Packet Scheduling 2 / 26
Introduction to competitive analysis
Pavel Vesel´ y Online Packet Scheduling 3 / 26
An Example: Cabinetmaker
Each week you make one cabinet
Pavel Vesel´ y Online Packet Scheduling 4 / 26
An Example: Cabinetmaker
Each week you make one cabinet Customers order cabinets, each order has
◮ a deadline ◮ a reward Pavel Vesel´ y Online Packet Scheduling 4 / 26
An Example: Cabinetmaker
Each week you make one cabinet Customers order cabinets, each order has
◮ a deadline ◮ a reward
You have two orders on the table:
◮ u: deadline this week, reward 10 000 CZK ◮ v: deadline next week, reward 16 180 CZK Pavel Vesel´ y Online Packet Scheduling 4 / 26
An Example: Cabinetmaker
Each week you make one cabinet Customers order cabinets, each order has
◮ a deadline ◮ a reward
You have two orders on the table:
◮ u: deadline this week, reward 10 000 CZK ◮ v: deadline next week, reward 16 180 CZK
1) If you select u, then:
Pavel Vesel´ y Online Packet Scheduling 4 / 26
An Example: Cabinetmaker
Each week you make one cabinet Customers order cabinets, each order has
◮ a deadline ◮ a reward
You have two orders on the table:
◮ u: deadline this week, reward 10 000 CZK ◮ v: deadline next week, reward 16 180 CZK
1) If you select u, then: new order v′ arrives
◮ deadline next week, reward
16 180 CZK
Pavel Vesel´ y Online Packet Scheduling 4 / 26
An Example: Cabinetmaker
Each week you make one cabinet Customers order cabinets, each order has
◮ a deadline ◮ a reward
You have two orders on the table:
◮ u: deadline this week, reward 10 000 CZK ◮ v: deadline next week, reward 16 180 CZK
1) If you select u, then: new order v′ arrives
◮ deadline next week, reward
16 180 CZK
- nly one of v and v′ served
Pavel Vesel´ y Online Packet Scheduling 4 / 26
An Example: Cabinetmaker
Each week you make one cabinet Customers order cabinets, each order has
◮ a deadline ◮ a reward
You have two orders on the table:
◮ u: deadline this week, reward 10 000 CZK ◮ v: deadline next week, reward 16 180 CZK
1) If you select u, then: new order v′ arrives
◮ deadline next week, reward
16 180 CZK
- nly one of v and v′ served
2) If you select v, then:
Pavel Vesel´ y Online Packet Scheduling 4 / 26
An Example: Cabinetmaker
Each week you make one cabinet Customers order cabinets, each order has
◮ a deadline ◮ a reward
You have two orders on the table:
◮ u: deadline this week, reward 10 000 CZK ◮ v: deadline next week, reward 16 180 CZK
1) If you select u, then: new order v′ arrives
◮ deadline next week, reward
16 180 CZK
- nly one of v and v′ served
2) If you select v, then: no order arrives for next week u expires unserved
Pavel Vesel´ y Online Packet Scheduling 4 / 26
An Example: Cabinetmaker
Each week you make one cabinet Customers order cabinets, each order has
◮ a deadline ◮ a reward
You have two orders on the table:
◮ u: deadline this week, reward 10 000 CZK ◮ v: deadline next week, reward 16 180 CZK
1) If you select u, then: new order v′ arrives
◮ deadline next week, reward
16 180 CZK
- nly one of v and v′ served
2) If you select v, then: no order arrives for next week u expires unserved These are worst-case scenarios
Pavel Vesel´ y Online Packet Scheduling 4 / 26
Online optimization & algorithms
Online computation Offline computation
Pavel Vesel´ y Online Packet Scheduling 5 / 26
Online optimization & algorithms
Online computation
Input arriving piece by piece
Offline computation
Whole input available at the beginning
Pavel Vesel´ y Online Packet Scheduling 5 / 26
Online optimization & algorithms
Online computation
Input arriving piece by piece Making decisions without knowing future
Offline computation
Whole input available at the beginning All decisions made at once
Pavel Vesel´ y Online Packet Scheduling 5 / 26
Online optimization & algorithms
Online computation
Input arriving piece by piece Making decisions without knowing future Decisions irrevocable
Offline computation
Whole input available at the beginning All decisions made at once
Pavel Vesel´ y Online Packet Scheduling 5 / 26
Online optimization & algorithms
Online computation
Input arriving piece by piece Making decisions without knowing future Decisions irrevocable Cannot be optimal (usually)
Offline computation
Whole input available at the beginning All decisions made at once Find an optimal solution
Pavel Vesel´ y Online Packet Scheduling 5 / 26
Online optimization & algorithms
Online computation
Input arriving piece by piece Making decisions without knowing future Decisions irrevocable Cannot be optimal (usually)
Offline computation
Whole input available at the beginning All decisions made at once Find an optimal solution Time/memory efficient algorithms
Pavel Vesel´ y Online Packet Scheduling 5 / 26
Online optimization & algorithms
Online computation
Input arriving piece by piece Making decisions without knowing future Decisions irrevocable Cannot be optimal (usually)
Offline computation
Whole input available at the beginning All decisions made at once Find an optimal solution Time/memory efficient algorithms
Pavel Vesel´ y Online Packet Scheduling 5 / 26
Online optimization & algorithms
Online computation
Input arriving piece by piece Making decisions without knowing future Decisions irrevocable Cannot be optimal (usually)
Offline computation
Whole input available at the beginning All decisions made at once Find an optimal solution Time/memory efficient algorithms
Online model
Sequence of events (orders), arrive over time
Pavel Vesel´ y Online Packet Scheduling 5 / 26
Online optimization & algorithms
Online computation
Input arriving piece by piece Making decisions without knowing future Decisions irrevocable Cannot be optimal (usually)
Offline computation
Whole input available at the beginning All decisions made at once Find an optimal solution Time/memory efficient algorithms
Online model
Sequence of events (orders), arrive over time Algorithm knows only events that arrived so far
Pavel Vesel´ y Online Packet Scheduling 5 / 26
Online optimization & algorithms
Online computation
Input arriving piece by piece Making decisions without knowing future Decisions irrevocable Cannot be optimal (usually)
Offline computation
Whole input available at the beginning All decisions made at once Find an optimal solution Time/memory efficient algorithms
Online model
Sequence of events (orders), arrive over time Algorithm knows only events that arrived so far Some events ask to make decisions (Monday mornings)
Pavel Vesel´ y Online Packet Scheduling 5 / 26
Online optimization & algorithms
Online computation
Input arriving piece by piece Making decisions without knowing future Decisions irrevocable Cannot be optimal (usually)
Offline computation
Whole input available at the beginning All decisions made at once Find an optimal solution Time/memory efficient algorithms
Online model
Sequence of events (orders), arrive over time Algorithm knows only events that arrived so far Some events ask to make decisions (Monday mornings) Decisions influence the objective function (rewards served orders)
Pavel Vesel´ y Online Packet Scheduling 5 / 26
Competitive ratio of online algorithms
Worst-case ratio between
◮ value of the optimum solution OPT and ◮ value of the algorithm’s solution ALG Pavel Vesel´ y Online Packet Scheduling 6 / 26
Competitive ratio of online algorithms
Worst-case ratio between
◮ value of the optimum solution OPT and ◮ value of the algorithm’s solution ALG
Algorithm is R-competitive if for any instance I OPT(I) ≤ R · ALG(I) (assuming maximization)
Pavel Vesel´ y Online Packet Scheduling 6 / 26
Competitive ratio of online algorithms
Worst-case ratio between
◮ value of the optimum solution OPT and ◮ value of the algorithm’s solution ALG
Algorithm is R-competitive if for any instance I OPT(I) ≤ R · ALG(I) (assuming maximization) Game: the algorithm vs. an adversary
◮ The adversary decides on further input to maximize OPT/ALG Pavel Vesel´ y Online Packet Scheduling 6 / 26
Model & Result
Pavel Vesel´ y Online Packet Scheduling 7 / 26
Online Packet Scheduling with Deadlines
Network switch:
Buffer Input port Output port
Pavel Vesel´ y Online Packet Scheduling 8 / 26
Online Packet Scheduling with Deadlines
Network switch:
Buffer Input port Output port
Packets arrive over time Each has a deadline and a weight
wp = 2 rp = 1 dp = 3 1 2 3
Pavel Vesel´ y Online Packet Scheduling 8 / 26
Online Packet Scheduling with Deadlines
Network switch:
Buffer Input port Output port
Packets arrive over time Each has a deadline and a weight Time discrete, consisting of slots or steps One packet transmitted in each step
wp = 2 rp = 1 dp = 3 1 2 3
Pavel Vesel´ y Online Packet Scheduling 8 / 26
Online Packet Scheduling with Deadlines
Network switch:
Buffer Input port Output port
Packets arrive over time Each has a deadline and a weight Time discrete, consisting of slots or steps One packet transmitted in each step
wp = 2 rp = 1 dp = 3 1 2 3
Goal: maximize total weight of scheduled packets
Pavel Vesel´ y Online Packet Scheduling 8 / 26
Online Packet Scheduling with Deadlines
Network switch:
Buffer Input port Output port
Packets arrive over time (orders) Each has a deadline and a weight (reward) Time discrete, consisting of slots or steps One packet transmitted in each step (weeks)
wp = 2 rp = 1 dp = 3 1 2 3
Goal: maximize total weight of scheduled packets
Pavel Vesel´ y Online Packet Scheduling 8 / 26
Online Packet Scheduling with Deadlines
Network switch:
Buffer Input port Output port
Packets arrive over time (orders) Each has a deadline and a weight (reward) Time discrete, consisting of slots or steps One packet transmitted in each step (weeks)
ALG OPT wp = 2 rp = 1 dp = 3 1 2 3
Goal: maximize total weight of scheduled packets 1 1.7 1 2 3 4
Pavel Vesel´ y Online Packet Scheduling 8 / 26
Online Packet Scheduling with Deadlines
Network switch:
Buffer Input port Output port
Packets arrive over time (orders) Each has a deadline and a weight (reward) Time discrete, consisting of slots or steps One packet transmitted in each step (weeks)
ALG OPT wp = 2 rp = 1 dp = 3 1 2 3
Goal: maximize total weight of scheduled packets 1 1.7 1 2 3 4
Pavel Vesel´ y Online Packet Scheduling 8 / 26
Online Packet Scheduling with Deadlines
Network switch:
Buffer Input port Output port
Packets arrive over time (orders) Each has a deadline and a weight (reward) Time discrete, consisting of slots or steps One packet transmitted in each step (weeks)
ALG OPT wp = 2 rp = 1 dp = 3 1 2 3
Goal: maximize total weight of scheduled packets 1 1.7
OP T ALG = 1.7+1 1.7
≈ 1.59 1 2 3 4
Pavel Vesel´ y Online Packet Scheduling 8 / 26
Online Packet Scheduling with Deadlines
Network switch:
Buffer Input port Output port
Packets arrive over time (orders) Each has a deadline and a weight (reward) Time discrete, consisting of slots or steps One packet transmitted in each step (weeks)
ALG OPT wp = 2 rp = 1 dp = 3 1 2 3
Goal: maximize total weight of scheduled packets 1 1.7 1 2 3 4
Pavel Vesel´ y Online Packet Scheduling 8 / 26
Online Packet Scheduling with Deadlines
Network switch:
Buffer Input port Output port
Packets arrive over time (orders) Each has a deadline and a weight (reward) Time discrete, consisting of slots or steps One packet transmitted in each step (weeks)
ALG OPT wp = 2 rp = 1 dp = 3 1 2 3
Goal: maximize total weight of scheduled packets 1 1.7 1.7 2.7 1 2 3 4
Pavel Vesel´ y Online Packet Scheduling 8 / 26
Online Packet Scheduling with Deadlines
Network switch:
Buffer Input port Output port
Packets arrive over time (orders) Each has a deadline and a weight (reward) Time discrete, consisting of slots or steps One packet transmitted in each step (weeks)
ALG OPT wp = 2 rp = 1 dp = 3 1 2 3
Goal: maximize total weight of scheduled packets 1 1.7 1.7 2.7 1 2 3 4
Pavel Vesel´ y Online Packet Scheduling 8 / 26
Online Packet Scheduling with Deadlines
Network switch:
Buffer Input port Output port
Packets arrive over time (orders) Each has a deadline and a weight (reward) Time discrete, consisting of slots or steps One packet transmitted in each step (weeks)
ALG OPT wp = 2 rp = 1 dp = 3 1 2 3
Goal: maximize total weight of scheduled packets 1 1.7 1.7 2.7
OP T ALG = 2·1.7+2.7 1.7+2.7 ≈ 1.39
1 2 3 4
Pavel Vesel´ y Online Packet Scheduling 8 / 26
Online Packet Scheduling with Deadlines
Network switch:
Buffer Input port Output port
Packets arrive over time (orders) Each has a deadline and a weight (reward) Time discrete, consisting of slots or steps One packet transmitted in each step (weeks)
ALG OPT wp = 2 rp = 1 dp = 3 1 2 3
Goal: maximize total weight of scheduled packets 1 1.7 1.7 2.7 2.7 4.3 1 2 3 4
Pavel Vesel´ y Online Packet Scheduling 8 / 26
Online Packet Scheduling with Deadlines
Network switch:
Buffer Input port Output port
Packets arrive over time (orders) Each has a deadline and a weight (reward) Time discrete, consisting of slots or steps One packet transmitted in each step (weeks)
ALG OPT wp = 2 rp = 1 dp = 3 1 2 3
Goal: maximize total weight of scheduled packets Scheduling problem 1|online, rj, pj = 1| wj(1 − Uj)
Pavel Vesel´ y Online Packet Scheduling 8 / 26
Online Packet Scheduling with Deadlines
Network switch:
Buffer Input port Output port
Packets arrive over time (orders) Each has a deadline and a weight (reward) Time discrete, consisting of slots or steps One packet transmitted in each step (weeks)
ALG OPT wp = 2 rp = 1 dp = 3 1 2 3
Goal: maximize total weight of scheduled packets Scheduling problem 1|online, rj, pj = 1| wj(1 − Uj) A.k.a. Buffer Management in Quality of Service Switches
Pavel Vesel´ y Online Packet Scheduling 8 / 26
Previous work
We focus on deterministic algorithms
Pavel Vesel´ y Online Packet Scheduling 9 / 26
Previous work
We focus on deterministic algorithms Greedy algorithm 2-competitive
◮ Schedules always the heaviest pending packet Pavel Vesel´ y Online Packet Scheduling 9 / 26
Previous work
We focus on deterministic algorithms Greedy algorithm 2-competitive
◮ Schedules always the heaviest pending packet
Lower bound of the golden ratio φ = 1
2(
√ 5 + 1) ≈ 1.618 [H´
ajek ’01, Andelman et al. ’03, Chin & Fung ’03]
1 + 1 φ = φ 1 φ φ φ2 φ2 φ3 . . .
Pavel Vesel´ y Online Packet Scheduling 9 / 26
Previous work
We focus on deterministic algorithms Greedy algorithm 2-competitive
◮ Schedules always the heaviest pending packet
Lower bound of the golden ratio φ = 1
2(
√ 5 + 1) ≈ 1.618 [H´
ajek ’01, Andelman et al. ’03, Chin & Fung ’03]
1 + 1 φ = φ
2
3
5
8 13 21 34
1 φ φ φ2 φ2 φ3 . . .
Pavel Vesel´ y Online Packet Scheduling 9 / 26
Previous work
We focus on deterministic algorithms Greedy algorithm 2-competitive
◮ Schedules always the heaviest pending packet
Lower bound of the golden ratio φ = 1
2(
√ 5 + 1) ≈ 1.618 [H´
ajek ’01, Andelman et al. ’03, Chin & Fung ’03]
1 + 1 φ = φ 1 φ φ φ2 φ2 φ3 . . . 2 √ 2 − 1 ≈ 1.828-competitive algorithm [Englert & Westermann ’07]
Pavel Vesel´ y Online Packet Scheduling 9 / 26
Previous work
We focus on deterministic algorithms Greedy algorithm 2-competitive
◮ Schedules always the heaviest pending packet
Lower bound of the golden ratio φ = 1
2(
√ 5 + 1) ≈ 1.618 [H´
ajek ’01, Andelman et al. ’03, Chin & Fung ’03]
1 + 1 φ = φ 1 φ φ φ2 φ2 φ3 . . . 2 √ 2 − 1 ≈ 1.828-competitive algorithm [Englert & Westermann ’07] φ-competitive algorithms for some special instances [Kesselman et al. ’01,
Chin et al. ’04, Li et al. ’05, Bienkowski et al. ’13, B¨
- hm et al. ’16]
Pavel Vesel´ y Online Packet Scheduling 9 / 26
Previous work
We focus on deterministic algorithms Greedy algorithm 2-competitive
◮ Schedules always the heaviest pending packet
Lower bound of the golden ratio φ = 1
2(
√ 5 + 1) ≈ 1.618 [H´
ajek ’01, Andelman et al. ’03, Chin & Fung ’03]
1 + 1 φ = φ 1 φ φ φ2 φ2 φ3 . . . 2 √ 2 − 1 ≈ 1.828-competitive algorithm [Englert & Westermann ’07] φ-competitive algorithms for some special instances [Kesselman et al. ’01,
Chin et al. ’04, Li et al. ’05, Bienkowski et al. ’13, B¨
- hm et al. ’16]
Is there a φ-competitive algorithm?
Pavel Vesel´ y Online Packet Scheduling 9 / 26
Previous work
We focus on deterministic algorithms Greedy algorithm 2-competitive
◮ Schedules always the heaviest pending packet
Lower bound of the golden ratio φ = 1
2(
√ 5 + 1) ≈ 1.618 [H´
ajek ’01, Andelman et al. ’03, Chin & Fung ’03]
1 + 1 φ = φ 1 φ φ φ2 φ2 φ3 . . . 2 √ 2 − 1 ≈ 1.828-competitive algorithm [Englert & Westermann ’07] φ-competitive algorithms for some special instances [Kesselman et al. ’01,
Chin et al. ’04, Li et al. ’05, Bienkowski et al. ’13, B¨
- hm et al. ’16]
Is there a φ-competitive algorithm? Yes!
Pavel Vesel´ y Online Packet Scheduling 9 / 26
New result
Theorem
There is a φ-competitive deterministic algorithm.
Pavel Vesel´ y Online Packet Scheduling 10 / 26
New result
Theorem
There is a φ-competitive deterministic algorithm.
Key technique: Plan
Max-weight feasible subset of pending packets in step t
◮ feasible = can be scheduled in slots t, t + 1, . . . Pavel Vesel´ y Online Packet Scheduling 10 / 26
New result
Theorem
There is a φ-competitive deterministic algorithm.
Key technique: Plan
Max-weight feasible subset of pending packets in step t
◮ feasible = can be scheduled in slots t, t + 1, . . .
Optimal future profit unless new packets arrive
Pavel Vesel´ y Online Packet Scheduling 10 / 26
New result
Theorem
There is a φ-competitive deterministic algorithm.
Key technique: Plan
Max-weight feasible subset of pending packets in step t
◮ feasible = can be scheduled in slots t, t + 1, . . .
Optimal future profit unless new packets arrive Scheduled plans (a.k.a. provisional schedules) used already by
[Li et al. ’05, Li et al. ’07, Englert & Westermann ’07]
Pavel Vesel´ y Online Packet Scheduling 10 / 26
Algorithm
Pavel Vesel´ y Online Packet Scheduling 11 / 26
Algorithm Plan(φ)
Plan P
Max-weight feasible subset of pending packets in step t
◮ feasible = can be scheduled in slots t, t + 1, . . . Pavel Vesel´ y Online Packet Scheduling 12 / 26
Algorithm Plan(φ)
Plan P
Max-weight feasible subset of pending packets in step t
◮ feasible = can be scheduled in slots t, t + 1, . . .
Algorithm Plan(φ)
Schedule packet p ∈ P maximizing φ · wp + w(Qp)
Pavel Vesel´ y Online Packet Scheduling 12 / 26
Algorithm Plan(φ)
Plan P
Max-weight feasible subset of pending packets in step t
◮ feasible = can be scheduled in slots t, t + 1, . . .
Algorithm Plan(φ)
Schedule packet p ∈ P maximizing φ · wp + w(Qp)
◮ Qp is the plan after p is scheduled and time is incremented (p ∈ Qp)
P t p t + 1 Qp
Pavel Vesel´ y Online Packet Scheduling 12 / 26
Algorithm Plan(φ)
Plan P
Max-weight feasible subset of pending packets in step t
◮ feasible = can be scheduled in slots t, t + 1, . . .
Algorithm Plan(φ)
Schedule packet p ∈ P maximizing φ · wp + w(Qp)
◮ Qp is the plan after p is scheduled and time is incremented (p ∈ Qp)
P t p t + 1 Qp
◮ wp is the gain in this step ◮ w(Qp) is the optimal future profit unless new packets arrive Pavel Vesel´ y Online Packet Scheduling 12 / 26
Algorithm Plan(φ)
Plan P
Max-weight feasible subset of pending packets in step t
◮ feasible = can be scheduled in slots t, t + 1, . . .
Algorithm Plan(φ)
Schedule packet p ∈ P maximizing φ · wp + w(Qp)
◮ Qp is the plan after p is scheduled and time is incremented (p ∈ Qp)
P t p t + 1 Qp
◮ wp is the gain in this step ◮ w(Qp) is the optimal future profit unless new packets arrive
Very elegant algorithm . . .
Pavel Vesel´ y Online Packet Scheduling 12 / 26
Algorithm Plan(φ)
Plan P
Max-weight feasible subset of pending packets in step t
◮ feasible = can be scheduled in slots t, t + 1, . . .
Algorithm Plan(φ)
Schedule packet p ∈ P maximizing φ · wp + w(Qp)
◮ Qp is the plan after p is scheduled and time is incremented (p ∈ Qp)
P t p t + 1 Qp
◮ wp is the gain in this step ◮ w(Qp) is the optimal future profit unless new packets arrive
Very elegant algorithm . . . . . . but not φ-competitive
Pavel Vesel´ y Online Packet Scheduling 12 / 26
Plan and its Structure
Plan P
Max-weight feasible subset of pending packets in step t
◮ feasible = can be scheduled in slots t, t + 1, . . . Pavel Vesel´ y Online Packet Scheduling 13 / 26
Plan and its Structure
Plan P
Max-weight feasible subset of pending packets in step t
◮ feasible = can be scheduled in slots t, t + 1, . . .
1 2 3 4 5 0.1 0.6 0.5 1.6 1 0.4
Pavel Vesel´ y Online Packet Scheduling 13 / 26
Plan and its Structure
Plan P
Max-weight feasible subset of pending packets in step t
◮ feasible = can be scheduled in slots t, t + 1, . . .
1 2 3 4 5 0.1 0.6 0.5 1.6 1 0.4 Plan:
∈ plan
1 0.5 1.6 0.6 0.1
Pavel Vesel´ y Online Packet Scheduling 13 / 26
Plan and its Structure
Plan P
Max-weight feasible subset of pending packets in step t
◮ feasible = can be scheduled in slots t, t + 1, . . .
1 2 3 4 5 0.1 0.6 0.5 1.6 1 0.4 Plan:
∈ plan
Plan:
1 0.5 1.6 0.6 0.1
Pavel Vesel´ y Online Packet Scheduling 13 / 26
Plan and its Structure
Plan P
Max-weight feasible subset of pending packets in step t
◮ feasible = can be scheduled in slots t, t + 1, . . .
1 2 3 4 5 0.1 0.6 0.5 1.6 1 0.4 Plan:
∈ plan
Plan:
1 0.5 1.6 0.6 0.1
Pavel Vesel´ y Online Packet Scheduling 13 / 26
Plan and its Structure
Plan P
Max-weight feasible subset of pending packets in step t
◮ feasible = can be scheduled in slots t, t + 1, . . .
1 2 3 4 5 0.1 0.6 0.5 1.6 1 0.4 Plan:
∈ plan
Plan: tight
1 0.5 1.6 0.6 0.1
Definition
Slot τ is tight w.r.t. plan P iff # of slots till τ = # of packets j ∈ P : dj ≤ τ
Pavel Vesel´ y Online Packet Scheduling 13 / 26
Plan and its Structure
Plan P
Max-weight feasible subset of pending packets in step t
◮ feasible = can be scheduled in slots t, t + 1, . . .
1 2 3 4 5 0.1 0.6 0.5 1.6 1 0.4 Plan:
∈ plan
Plan: Segments:
1 0.5 1.6 0.6 0.1
Definition
Slot τ is tight w.r.t. plan P iff # of slots till τ = # of packets j ∈ P : dj ≤ τ
Definition
Segment = interval between tight slots
Pavel Vesel´ y Online Packet Scheduling 13 / 26
Plan and its Structure
Plan P
Max-weight feasible subset of pending packets in step t
◮ feasible = can be scheduled in slots t, t + 1, . . .
1 2 3 4 5 0.1 0.6 0.5 1.6 1 0.4 Plan:
∈ plan
Plan: Segments:
1 0.5 1.6 0.6 0.1
Definition
Slot τ is tight w.r.t. plan P iff # of slots till τ = # of packets j ∈ P : dj ≤ τ
Definition
Segment = interval between tight slots
P
Pavel Vesel´ y Online Packet Scheduling 13 / 26
Plan Updates After Packet p is Scheduled
p in the 1st segment (“greedy step”)
dp p dp P Qp
Pavel Vesel´ y Online Packet Scheduling 14 / 26
Plan Updates After Packet p is Scheduled
p in the 1st segment (“greedy step”)
dp p dp P Qp
p in a later segment (“leap step”)
dp p P
Pavel Vesel´ y Online Packet Scheduling 14 / 26
Plan Updates After Packet p is Scheduled
p in the 1st segment (“greedy step”)
dp p dp P Qp
p in a later segment (“leap step”)
dp p dp ℓ P Qp
ℓ = lightest in the 1st segment
Pavel Vesel´ y Online Packet Scheduling 14 / 26
Plan Updates After Packet p is Scheduled
p in the 1st segment (“greedy step”)
dp p dp P Qp
p in a later segment (“leap step”)
dp p dp d̺ d̺ ̺ ℓ P Qp
ℓ = lightest in the 1st segment ̺ = heaviest not in P which can replace p
◮ replacement packet for p Pavel Vesel´ y Online Packet Scheduling 14 / 26
Problem of Plan(φ): Weight Decreases in the Plan
Pavel Vesel´ y Online Packet Scheduling 15 / 26
Problem of Plan(φ): Weight Decreases in the Plan
minwt(τ) = min-weight in P till the next tight slot after τ
Pavel Vesel´ y Online Packet Scheduling 15 / 26
Problem of Plan(φ): Weight Decreases in the Plan
minwt(τ) = min-weight in P till the next tight slot after τ
◮ In a schedule of P, any packet can be in the 1st slot of a segment
τ
Pavel Vesel´ y Online Packet Scheduling 15 / 26
Problem of Plan(φ): Weight Decreases in the Plan
minwt(τ) = min-weight in P till the next tight slot after τ
◮ In a schedule of P, any packet can be in the 1st slot of a segment
τ ℓ dℓ
Pavel Vesel´ y Online Packet Scheduling 15 / 26
Problem of Plan(φ): Weight Decreases in the Plan
minwt(τ) = min-weight in P till the next tight slot after τ
◮ In a schedule of P, any packet can be in the 1st slot of a segment
τ ℓ dℓ
Pavel Vesel´ y Online Packet Scheduling 15 / 26
Problem of Plan(φ): Weight Decreases in the Plan
minwt(τ) = min-weight in P till the next tight slot after τ
◮ In a schedule of P, any packet can be in the 1st slot of a segment
t τ minwt(τ)
Pavel Vesel´ y Online Packet Scheduling 15 / 26
Problem of Plan(φ): Weight Decreases in the Plan
minwt(τ) = min-weight in P till the next tight slot after τ
◮ In a schedule of P, any packet can be in the 1st slot of a segment
t τ minwt(τ)
minwt after plan updates
minwt(τ) does not decrease for any τ:
◮ after arrival of a new packet ◮ after scheduling a packet from the 1st segment (greedy step) Pavel Vesel´ y Online Packet Scheduling 15 / 26
Problem of Plan(φ): Weight Decreases in the Plan
minwt(τ) = min-weight in P till the next tight slot after τ
◮ In a schedule of P, any packet can be in the 1st slot of a segment
t τ minwt(τ)
minwt after plan updates
minwt(τ) does not decrease for any τ:
◮ after arrival of a new packet ◮ after scheduling a packet from the 1st segment (greedy step)
minwt(τ) decreases for some τ after sch. a packet from later segment
Pavel Vesel´ y Online Packet Scheduling 15 / 26
Problem of Plan(φ): Weight Decreases in the Plan
minwt(τ) = min-weight in P till the next tight slot after τ
◮ In a schedule of P, any packet can be in the 1st slot of a segment
t τ minwt(τ)
minwt after plan updates
minwt(τ) does not decrease for any τ:
◮ after arrival of a new packet ◮ after scheduling a packet from the 1st segment (greedy step)
minwt(τ) decreases for some τ after sch. a packet from later segment
dp p dp d̺ d̺ ̺ ℓ P Qp
The problem: ̺ ∈ P ⇒ w̺ < minwt(d̺)
Pavel Vesel´ y Online Packet Scheduling 15 / 26
Solution: Maintaining Slot-Monotonicity of minwt
Idea: modify Plan(φ) so that minwt(τ) never decreases for any τ
Pavel Vesel´ y Online Packet Scheduling 16 / 26
Solution: Maintaining Slot-Monotonicity of minwt
Idea: modify Plan(φ) so that minwt(τ) never decreases for any τ
dp p dp d̺ d̺ ̺ ℓ P Qp
The problem: ̺ ∈ P ⇒ w̺ < minwt(d̺)
Pavel Vesel´ y Online Packet Scheduling 16 / 26
Solution: Maintaining Slot-Monotonicity of minwt
Idea: modify Plan(φ) so that minwt(τ) never decreases for any τ
dp p dp d̺ d̺ ̺ ℓ P Qp
The problem: ̺ ∈ P ⇒ w̺ < minwt(d̺) ⇒ increase the weight of ̺ to minwt(d̺)
Pavel Vesel´ y Online Packet Scheduling 16 / 26
Solution: Maintaining Slot-Monotonicity of minwt
Idea: modify Plan(φ) so that minwt(τ) never decreases for any τ
dp p dp d̺ d̺ ̺ ℓ P Qp
The problem: ̺ ∈ P ⇒ w̺ < minwt(d̺) ⇒ increase the weight of ̺ to minwt(d̺) Not enough if segments merge:
Pavel Vesel´ y Online Packet Scheduling 16 / 26
Solution: Maintaining Slot-Monotonicity of minwt
Idea: modify Plan(φ) so that minwt(τ) never decreases for any τ
dp p dp d̺ d̺ ̺ ℓ P Qp
The problem: ̺ ∈ P ⇒ w̺ < minwt(d̺) ⇒ increase the weight of ̺ to minwt(d̺) Not enough if segments merge:
t τ minwt(τ) t + 1 τ dp d̺ dp d̺
Pavel Vesel´ y Online Packet Scheduling 16 / 26
Solution: Maintaining Slot-Monotonicity of minwt
Idea: modify Plan(φ) so that minwt(τ) never decreases for any τ
dp p dp d̺ d̺ ̺ ℓ P Qp
The problem: ̺ ∈ P ⇒ w̺ < minwt(d̺) ⇒ increase the weight of ̺ to minwt(d̺) Not enough if segments merge:
t τ minwt(τ) t + 1 τ dp d̺ dp d̺
⇒ avoid merging segments
Pavel Vesel´ y Online Packet Scheduling 16 / 26
Algorithm PlanM(φ) Maintaining Slot-Monotonicity
Schedule packet p ∈ P maximizing φ · wp + w(Qp)
◮ Qp is the plan after p is scheduled and time is incremented (p ∈ Qp) Pavel Vesel´ y Online Packet Scheduling 17 / 26
Algorithm PlanM(φ) Maintaining Slot-Monotonicity
Schedule packet p ∈ P maximizing φ · wp + w(Qp)
◮ Qp is the plan after p is scheduled and time is incremented (p ∈ Qp)
If p is not in the 1st segment of P (leap step):
◮ Increase the weight of ̺ to minwt(d̺) Pavel Vesel´ y Online Packet Scheduling 17 / 26
Algorithm PlanM(φ) Maintaining Slot-Monotonicity
Schedule packet p ∈ P maximizing φ · wp + w(Qp)
◮ Qp is the plan after p is scheduled and time is incremented (p ∈ Qp)
If p is not in the 1st segment of P (leap step):
◮ Increase the weight of ̺ to minwt(d̺) ◮ Avoid merging segments:
. . . . . . p ̺ . . . . . . d̺ dp P Qp
Pavel Vesel´ y Online Packet Scheduling 17 / 26
Algorithm PlanM(φ) Maintaining Slot-Monotonicity
Schedule packet p ∈ P maximizing φ · wp + w(Qp)
◮ Qp is the plan after p is scheduled and time is incremented (p ∈ Qp)
If p is not in the 1st segment of P (leap step):
◮ Increase the weight of ̺ to minwt(d̺) ◮ Avoid merging segments:
. . . . . . p ̺ . . . . . . h1 τ0 γ d̺ dp P Qp
◮ h1 = heaviest packet in (τ0, γ], Pavel Vesel´ y Online Packet Scheduling 17 / 26
Algorithm PlanM(φ) Maintaining Slot-Monotonicity
Schedule packet p ∈ P maximizing φ · wp + w(Qp)
◮ Qp is the plan after p is scheduled and time is incremented (p ∈ Qp)
If p is not in the 1st segment of P (leap step):
◮ Increase the weight of ̺ to minwt(d̺) ◮ Avoid merging segments:
. . . . . . p ̺ . . . . . . h1 h1 τ0 τ1 γ d̺ dp P Qp
◮ h1 = heaviest packet in (τ0, γ], ◮ decrease deadline of h1 to τ0 Pavel Vesel´ y Online Packet Scheduling 17 / 26
Algorithm PlanM(φ) Maintaining Slot-Monotonicity
Schedule packet p ∈ P maximizing φ · wp + w(Qp)
◮ Qp is the plan after p is scheduled and time is incremented (p ∈ Qp)
If p is not in the 1st segment of P (leap step):
◮ Increase the weight of ̺ to minwt(d̺) ◮ Avoid merging segments:
. . . . . . p ̺ . . . . . . h1 h1 h2 h2 τ0 τ1 τ2 γ d̺ dp P Qp h1 h1
◮ h2 = heaviest packet in (τ1, γ], ◮ decrease deadline of h2 to τ1 Pavel Vesel´ y Online Packet Scheduling 17 / 26
Algorithm PlanM(φ) Maintaining Slot-Monotonicity
Schedule packet p ∈ P maximizing φ · wp + w(Qp)
◮ Qp is the plan after p is scheduled and time is incremented (p ∈ Qp)
If p is not in the 1st segment of P (leap step):
◮ Increase the weight of ̺ to minwt(d̺) ◮ Avoid merging segments:
. . . . . . p ̺ . . . . . . h1 h1 h2 h2 h3 h3 τ0 τ1 τ2 τ3 γ d̺ dp P Qp h1 h1 h2 h2
◮ h3 = heaviest packet in (τ2, γ], ◮ decrease deadline of h3 to τ2 Pavel Vesel´ y Online Packet Scheduling 17 / 26
Algorithm PlanM(φ) Maintaining Slot-Monotonicity
Schedule packet p ∈ P maximizing φ · wp + w(Qp)
◮ Qp is the plan after p is scheduled and time is incremented (p ∈ Qp)
If p is not in the 1st segment of P (leap step):
◮ Increase the weight of ̺ to minwt(d̺) ◮ Avoid merging segments:
. . . . . . p ̺ . . . . . . hk hk hk−1 . . . . . . h1 h1 h2 h2 h3 h3 h4 τ0 τ1 τ2 τ3 τk−1 γ = τk d̺ dp P Qp h1 h1 h2 h2 h3 h3
◮ for i = 1, 2, . . . : hi = heaviest packet in (τi−1, γ], ◮ decrease deadline of hi to τi−1 ◮ stop when τi = γ Pavel Vesel´ y Online Packet Scheduling 17 / 26
Algorithm PlanM(φ) Maintaining Slot-Monotonicity
Schedule packet p ∈ P maximizing φ · wp + w(Qp)
◮ Qp is the plan after p is scheduled and time is incremented (p ∈ Qp)
If p is not in the 1st segment of P (leap step):
◮ Increase the weight of ̺ to minwt(d̺) ◮ Avoid merging segments:
. . . . . . p ̺ . . . . . . hk hk hk−1 . . . . . . h1 h1 h2 h2 h3 h3 h4 τ0 τ1 τ2 τ3 τk−1 γ = τk d̺ dp P Qp h1 h1 h2 h2 h3 h3
◮ for i = 1, 2, . . . : hi = heaviest packet in (τi−1, γ], ◮ decrease deadline of hi to τi−1 ◮ stop when τi = γ ◮ ensure: whi ≥ minwt(τi−1) ⋆ if whi < minwt(τi−1), then set new weight of hi to minwt(τi−1) Pavel Vesel´ y Online Packet Scheduling 17 / 26
Algorithm PlanM(φ) Maintaining Slot-Monotonicity
Schedule packet p ∈ P maximizing φ · wp + w(Qp)
◮ Qp is the plan after p is scheduled and time is incremented (p ∈ Qp)
If p is not in the 1st segment of P (leap step):
◮ Increase the weight of ̺ to minwt(d̺) ◮ Avoid merging segments:
. . . . . . p ̺ . . . . . . hk hk hk−1 . . . . . . h1 h1 h2 h2 h3 h3 h4 τ0 τ1 τ2 τ3 τk−1 γ = τk d̺ dp P Qp h1 h1 h2 h2 h3 h3
◮ for i = 1, 2, . . . : hi = heaviest packet in (τi−1, γ], ◮ decrease deadline of hi to τi−1 ◮ stop when τi = γ ◮ ensure: whi ≥ minwt(τi−1) ⋆ if whi < minwt(τi−1), then set new weight of hi to minwt(τi−1)
In a nutshell
Avoid merging segments and minwt decreases in a right way
⋆ Done by decreasing deadlines and increasing weights of certain packets Pavel Vesel´ y Online Packet Scheduling 17 / 26
Analysis
Pavel Vesel´ y Online Packet Scheduling 18 / 26
Analysis Overview
Competitive analysis
◮ Goal: w(OPT) ≤ φ · w(ALG) for any instance Pavel Vesel´ y Online Packet Scheduling 19 / 26
Analysis Overview
Competitive analysis
◮ Goal: w(OPT) ≤ φ · w(ALG) for any instance ◮ Game between algorithm and adversary ⋆ Adversary schedules packets from OPT Pavel Vesel´ y Online Packet Scheduling 19 / 26
Analysis Overview
Competitive analysis
◮ Goal: w(OPT) ≤ φ · w(ALG) for any instance ◮ Game between algorithm and adversary ⋆ Adversary schedules packets from OPT
Amortization Techniques
1 Increasing weights ◮ Algorithm’s future profit may get higher Pavel Vesel´ y Online Packet Scheduling 19 / 26
Analysis Overview
Competitive analysis
◮ Goal: w(OPT) ≤ φ · w(ALG) for any instance ◮ Game between algorithm and adversary ⋆ Adversary schedules packets from OPT
Amortization Techniques
1 Increasing weights ◮ Algorithm’s future profit may get higher ⋆ Decrease algorithm’s current profit by weight increase Pavel Vesel´ y Online Packet Scheduling 19 / 26
Analysis Overview
Competitive analysis
◮ Goal: w(OPT) ≤ φ · w(ALG) for any instance ◮ Game between algorithm and adversary ⋆ Adversary schedules packets from OPT
Amortization Techniques
1 Increasing weights ◮ Algorithm’s future profit may get higher ⋆ Decrease algorithm’s current profit by weight increase 2 Potential function 3 Modifications of the adversary (optimal) schedule ADV Pavel Vesel´ y Online Packet Scheduling 19 / 26
Adversary Schedule ADV
Consists of already-released packets from OPT in future slots
Pavel Vesel´ y Online Packet Scheduling 20 / 26
Adversary Schedule ADV
Consists of already-released packets from OPT in future slots ADV OPT 1 2 3 4 5 a b c d e Adversary’s gain:
Pavel Vesel´ y Online Packet Scheduling 20 / 26
Adversary Schedule ADV
Consists of already-released packets from OPT in future slots ADV OPT 1 2 3 4 5 a b c d e Adversary’s gain: b
Pavel Vesel´ y Online Packet Scheduling 20 / 26
Adversary Schedule ADV
Consists of already-released packets from OPT in future slots ADV OPT 1 2 3 4 5 a b c d e Adversary’s gain: b d
Pavel Vesel´ y Online Packet Scheduling 20 / 26
Adversary Schedule ADV
Consists of already-released packets from OPT in future slots ADV OPT 1 2 3 4 5 a b c d e Adversary’s gain: b d a
Pavel Vesel´ y Online Packet Scheduling 20 / 26
Adversary Schedule ADV
Consists of already-released packets from OPT in future slots ADV OPT 1 2 3 4 5 a b c d e Adversary’s gain: b d a wa
Pavel Vesel´ y Online Packet Scheduling 20 / 26
Adversary Schedule ADV
Consists of already-released packets from OPT in future slots ADV OPT 1 2 3 4 5 a b c d e Adversary’s gain: b d a wa c e
Pavel Vesel´ y Online Packet Scheduling 20 / 26
Adversary Schedule ADV
Consists of already-released packets from OPT in future slots ADV OPT 1 2 3 4 5 a b c d e Adversary’s gain: b d a wa c e +wb
Pavel Vesel´ y Online Packet Scheduling 20 / 26
Adversary Schedule ADV
Consists of already-released packets from OPT in future slots ADV OPT 1 2 3 4 5 a b c d e Adversary’s gain: b d a wa c e +wb Packet in ADV can be replaced by
- another lighter packet,
Pavel Vesel´ y Online Packet Scheduling 20 / 26
Adversary Schedule ADV
Consists of already-released packets from OPT in future slots ADV OPT 1 2 3 4 5 a b c d e Adversary’s gain: b d a wa c e +wb Packet in ADV can be replaced by
- another lighter packet,
fictitious “treasure packets”
Pavel Vesel´ y Online Packet Scheduling 20 / 26
Adversary Schedule ADV
Consists of already-released packets from OPT in future slots ADV OPT 1 2 3 4 5 a b c d e Adversary’s gain: b d a wa c e +wb Packet in ADV can be replaced by
- another lighter packet,
fictitious “treasure packets” Adversary’s gain increased by total weight decrease in ADV
Pavel Vesel´ y Online Packet Scheduling 20 / 26
Adversary Schedule ADV
Consists of already-released packets from OPT in future slots ADV OPT 1 2 3 4 5 a b c d e Adversary’s gain: b d a wa c e +wb f +(wd − wf) Packet in ADV can be replaced by
- another lighter packet,
fictitious “treasure packets” Adversary’s gain increased by total weight decrease in ADV
Pavel Vesel´ y Online Packet Scheduling 20 / 26
Adversary Schedule ADV
Consists of already-released packets from OPT in future slots ADV OPT 1 2 3 4 5 a b c d e Adversary’s gain: b d a wa c e +wb f tc +(wd − wf)+(wc − wtc) Packet in ADV can be replaced by
- another lighter packet,
fictitious “treasure packets” Adversary’s gain increased by total weight decrease in ADV
Pavel Vesel´ y Online Packet Scheduling 20 / 26
Adversary Schedule ADV
Consists of already-released packets from OPT in future slots ADV OPT 1 2 3 4 5 a b c d e Adversary’s gain: b d a wa c e +wb f tc +(wd − wf)+(wc − wtc) +wtc Packet in ADV can be replaced by
- another lighter packet,
fictitious “treasure packets” Adversary’s gain increased by total weight decrease in ADV
Pavel Vesel´ y Online Packet Scheduling 20 / 26
Adversary Schedule ADV
Consists of already-released packets from OPT in future slots ADV OPT 1 2 3 4 5 a b c d e Adversary’s gain: b d a wa c e +wb f tc +(wd − wf)+(wc − wtc) +wtc Packet in ADV can be replaced by
- another lighter packet,
fictitious “treasure packets” Adversary’s gain increased by total weight decrease in ADV
Fictitious “treasure packet”
Not pending for the algorithm
Pavel Vesel´ y Online Packet Scheduling 20 / 26
Adversary Schedule ADV
Consists of already-released packets from OPT in future slots ADV OPT 1 2 3 4 5 a b c d e Adversary’s gain: b d a wa c e +wb f tc +(wd − wf)+(wc − wtc) +wtc Packet in ADV can be replaced by
- another lighter packet,
fictitious “treasure packets” Adversary’s gain increased by total weight decrease in ADV
Fictitious “treasure packet”
Not pending for the algorithm Tied to a slot τ in ADV, no release time or deadline, never changes in future
Pavel Vesel´ y Online Packet Scheduling 20 / 26
Adversary Schedule ADV
Consists of already-released packets from OPT in future slots ADV OPT 1 2 3 4 5 a b c d e Adversary’s gain: b d a wa c e +wb f tc +(wd − wf)+(wc − wtc) +wtc Packet in ADV can be replaced by
- another lighter packet,
fictitious “treasure packets” Adversary’s gain increased by total weight decrease in ADV
Fictitious “treasure packet”
Not pending for the algorithm Tied to a slot τ in ADV, no release time or deadline, never changes in future Deposit of profit to be collected by the adversary
Pavel Vesel´ y Online Packet Scheduling 20 / 26
Adversary Schedule ADV
Consists of already-released packets from OPT in future slots ADV OPT 1 2 3 4 5 a b c d e Adversary’s gain: b d a wa c e +wb f tc +(wd − wf)+(wc − wtc) +wtc Packet in ADV can be replaced by
- another lighter packet,
fictitious “treasure packets” Adversary’s gain increased by total weight decrease in ADV
Fictitious “treasure packet”
Not pending for the algorithm Tied to a slot τ in ADV, no release time or deadline, never changes in future Deposit of profit to be collected by the adversary Weight bounded by minwt(τ)
Pavel Vesel´ y Online Packet Scheduling 20 / 26
Adversary Schedule ADV
Consists of already-released packets from OPT in future slots ADV OPT 1 2 3 4 5 a b c d e Adversary’s gain: b d a wa c e +wb f tc +(wd − wf)+(wc − wtc) +wtc Packet in ADV can be replaced by
- another lighter packet,
fictitious “treasure packets” Adversary’s gain increased by total weight decrease in ADV
Fictitious “treasure packet”
Not pending for the algorithm Tied to a slot τ in ADV, no release time or deadline, never changes in future Deposit of profit to be collected by the adversary Weight bounded by minwt(τ) Slot-monotonicity: minwt(τ) never decrease
Pavel Vesel´ y Online Packet Scheduling 20 / 26
Adversary Schedule ADV
Consists of already-released packets from OPT in future slots Packet in ADV can be replaced by
- another lighter packet,
fictitious “treasure packets” Adversary’s gain increased by total weight decrease in ADV
Fictitious “treasure packet”
Not pending for the algorithm Tied to a slot τ in ADV, no release time or deadline, never changes in future Deposit of profit to be collected by the adversary Weight bounded by minwt(τ) Slot-monotonicity: minwt(τ) never decrease
Invariant (A)
ADV consists of two types of packets:
- (real) packets in plan P
all other packets are treasures
Pavel Vesel´ y Online Packet Scheduling 20 / 26
Potential Function
Relative advantage of the algorithm over the adversary:
Pavel Vesel´ y Online Packet Scheduling 21 / 26
Potential Function
Relative advantage of the algorithm over the adversary: P \ ADV = packets in the plan that the adversary will not schedule
Pavel Vesel´ y Online Packet Scheduling 21 / 26
Potential Function
Relative advantage of the algorithm over the adversary: P \ ADV = packets in the plan that the adversary will not schedule Set F
◮ Pending packets forced out of the plan Pavel Vesel´ y Online Packet Scheduling 21 / 26
Potential Function
Relative advantage of the algorithm over the adversary: P \ ADV = packets in the plan that the adversary will not schedule Set F
◮ Pending packets forced out of the plan ◮ Can be used as replacement packets in a leap step Pavel Vesel´ y Online Packet Scheduling 21 / 26
Potential Function
Relative advantage of the algorithm over the adversary: P \ ADV = packets in the plan that the adversary will not schedule Set F
◮ Pending packets forced out of the plan ◮ Can be used as replacement packets in a leap step
“Backup plan” R = P \ ADV ∪ R
Pavel Vesel´ y Online Packet Scheduling 21 / 26
Potential Function
Relative advantage of the algorithm over the adversary: P \ ADV = packets in the plan that the adversary will not schedule Set F
◮ Pending packets forced out of the plan ◮ Can be used as replacement packets in a leap step
“Backup plan” R = P \ ADV ∪ R
Invariant
Backup plan R is feasible
R feasible = packets in R can be scheduled in future slots t, t + 1, . . .
Pavel Vesel´ y Online Packet Scheduling 21 / 26
Potential Function
Relative advantage of the algorithm over the adversary: P \ ADV = packets in the plan that the adversary will not schedule Set F
◮ Pending packets forced out of the plan ◮ Can be used as replacement packets in a leap step
“Backup plan” R = P \ ADV ∪ R
Invariant
Backup plan R is feasible
R feasible = packets in R can be scheduled in future slots t, t + 1, . . .
Potential
Ψ := 1 φ w(R)
Pavel Vesel´ y Online Packet Scheduling 21 / 26
Packet Types in the Analysis
pending for PlanM not in plan P F plan P ADV fictitious P ∩ ADV P \ ADV “backup plan” R (potential)
Pavel Vesel´ y Online Packet Scheduling 22 / 26
Overview of the Analysis
To prove
Packet arrival: ∆Ψ ≥ 0
Pavel Vesel´ y Online Packet Scheduling 23 / 26
Overview of the Analysis
To prove
Packet arrival: ∆Ψ ≥ 0 Scheduling step t
◮ j = ADV[t] scheduled by the adversary (possibly j = OPT[t]) ◮ p = ALG[t] scheduled by the algorithm Pavel Vesel´ y Online Packet Scheduling 23 / 26
Overview of the Analysis
To prove
Packet arrival: ∆Ψ ≥ 0 Scheduling step t
◮ j = ADV[t] scheduled by the adversary (possibly j = OPT[t]) ◮ p = ALG[t] scheduled by the algorithm ◮ Adversary gain advgaint = w t
j + credit for replacing packets
Pavel Vesel´ y Online Packet Scheduling 23 / 26
Overview of the Analysis
To prove
Packet arrival: ∆Ψ ≥ 0 Scheduling step t
◮ j = ADV[t] scheduled by the adversary (possibly j = OPT[t]) ◮ p = ALG[t] scheduled by the algorithm ◮ Adversary gain advgaint = w t
j + credit for replacing packets
◮ ∆tWeights = amount by which the weights are increased in step t
advgaint ≤ φ · (wt
p − ∆tWeights) + ∆Ψ
Pavel Vesel´ y Online Packet Scheduling 23 / 26
Overview of the Analysis
To prove
Packet arrival: ∆Ψ ≥ 0 Scheduling step t
◮ j = ADV[t] scheduled by the adversary (possibly j = OPT[t]) ◮ p = ALG[t] scheduled by the algorithm ◮ Adversary gain advgaint = w t
j + credit for replacing packets
◮ ∆tWeights = amount by which the weights are increased in step t
advgaint ≤ φ · (wt
p − ∆tWeights) + ∆Ψ
Proof of φ-competitiveness
Potential equal to 0 at the beginning and at the end
Pavel Vesel´ y Online Packet Scheduling 23 / 26
Overview of the Analysis
To prove
Packet arrival: ∆Ψ ≥ 0 Scheduling step t
◮ j = ADV[t] scheduled by the adversary (possibly j = OPT[t]) ◮ p = ALG[t] scheduled by the algorithm ◮ Adversary gain advgaint = w t
j + credit for replacing packets
◮ ∆tWeights = amount by which the weights are increased in step t
advgaint ≤ φ · (wt
p − ∆tWeights) + ∆Ψ
Proof of φ-competitiveness
Potential equal to 0 at the beginning and at the end w 0(OPT) =
- t
advgaint
Pavel Vesel´ y Online Packet Scheduling 23 / 26
Overview of the Analysis
To prove
Packet arrival: ∆Ψ ≥ 0 Scheduling step t
◮ j = ADV[t] scheduled by the adversary (possibly j = OPT[t]) ◮ p = ALG[t] scheduled by the algorithm ◮ Adversary gain advgaint = w t
j + credit for replacing packets
◮ ∆tWeights = amount by which the weights are increased in step t
advgaint ≤ φ · (wt
p − ∆tWeights) + ∆Ψ
Proof of φ-competitiveness
Potential equal to 0 at the beginning and at the end w 0(OPT) =
- t
advgaint ≤
- t
- φ · (w t(ALG[t]) − ∆tWeights)
- Pavel Vesel´
y Online Packet Scheduling 23 / 26
Overview of the Analysis
To prove
Packet arrival: ∆Ψ ≥ 0 Scheduling step t
◮ j = ADV[t] scheduled by the adversary (possibly j = OPT[t]) ◮ p = ALG[t] scheduled by the algorithm ◮ Adversary gain advgaint = w t
j + credit for replacing packets
◮ ∆tWeights = amount by which the weights are increased in step t
advgaint ≤ φ · (wt
p − ∆tWeights) + ∆Ψ
Proof of φ-competitiveness
Potential equal to 0 at the beginning and at the end w 0(OPT) =
- t
advgaint ≤
- t
- φ · (w t(ALG[t]) − ∆tWeights)
- ≤ φ · w 0(ALG)
Pavel Vesel´ y Online Packet Scheduling 23 / 26
Conclusions
Pavel Vesel´ y Online Packet Scheduling 24 / 26
Summary
φ ≈ 1.618-competitive deterministic algorithm
Schedule packet p ∈ P maximizing φ · wp + w(Qp)
◮ Qp is the plan after p is scheduled and time is incremented (p ∈ Qp) Pavel Vesel´ y Online Packet Scheduling 25 / 26
Summary
φ ≈ 1.618-competitive deterministic algorithm
Schedule packet p ∈ P maximizing φ · wp + w(Qp)
◮ Qp is the plan after p is scheduled and time is incremented (p ∈ Qp)
Maintain slot-monotonicity of minwt
◮ Done by increasing weights and decreasing deadlines of certain packets Pavel Vesel´ y Online Packet Scheduling 25 / 26
Summary
φ ≈ 1.618-competitive deterministic algorithm
Schedule packet p ∈ P maximizing φ · wp + w(Qp)
◮ Qp is the plan after p is scheduled and time is incremented (p ∈ Qp)
Maintain slot-monotonicity of minwt
◮ Done by increasing weights and decreasing deadlines of certain packets
Analysis
Potential function
◮ Advantage of the algorithm over the adversary in future steps ◮ Invariant ensures that this advantage is feasible Pavel Vesel´ y Online Packet Scheduling 25 / 26
Summary
φ ≈ 1.618-competitive deterministic algorithm
Schedule packet p ∈ P maximizing φ · wp + w(Qp)
◮ Qp is the plan after p is scheduled and time is incremented (p ∈ Qp)
Maintain slot-monotonicity of minwt
◮ Done by increasing weights and decreasing deadlines of certain packets
Analysis
Potential function
◮ Advantage of the algorithm over the adversary in future steps ◮ Invariant ensures that this advantage is feasible
Modifications of adversary schedule to maintain certain invariants
pending for PlanM not in plan P F plan P ADV fictitious P ∩ ADV P \ ADV “backup plan” R (potential) Pavel Vesel´ y Online Packet Scheduling 25 / 26
Further Research Directions
m ≥ 1 packets are sent in each step
Our algorithm is φ ≈ 1.618-competitive for any m ≥ 1 The best algorithm has ratio
1 1−(
m m+1) m →
e e−1 ≈ 1.58 [Chin et al. ’04]
Can our algorithm be modified to give a better ratio for m > 1?
Pavel Vesel´ y Online Packet Scheduling 26 / 26
Further Research Directions
m ≥ 1 packets are sent in each step
Our algorithm is φ ≈ 1.618-competitive for any m ≥ 1 The best algorithm has ratio
1 1−(
m m+1) m →
e e−1 ≈ 1.58 [Chin et al. ’04]
Can our algorithm be modified to give a better ratio for m > 1?
Randomized algorithms
Improve randomized algorithms using plans Gap between 1.25 [Chin & Fung ’04] and
e e−1 ≈ 1.58 [Chin et al. ’04] Pavel Vesel´ y Online Packet Scheduling 26 / 26
Further Research Directions
m ≥ 1 packets are sent in each step
Our algorithm is φ ≈ 1.618-competitive for any m ≥ 1 The best algorithm has ratio
1 1−(
m m+1) m →
e e−1 ≈ 1.58 [Chin et al. ’04]
Can our algorithm be modified to give a better ratio for m > 1?
Randomized algorithms
Improve randomized algorithms using plans Gap between 1.25 [Chin & Fung ’04] and
e e−1 ≈ 1.58 [Chin et al. ’04]
Memoryless algorithms
Is there a lower bound > φ for memoryless algorithms? What is the ratio of Plan(α)? (Schedule p ∈ P max. α · wp + w(Qp))
Pavel Vesel´ y Online Packet Scheduling 26 / 26
Further Research Directions
m ≥ 1 packets are sent in each step
Our algorithm is φ ≈ 1.618-competitive for any m ≥ 1 The best algorithm has ratio
1 1−(
m m+1) m →
e e−1 ≈ 1.58 [Chin et al. ’04]
Can our algorithm be modified to give a better ratio for m > 1?
Randomized algorithms
Improve randomized algorithms using plans Gap between 1.25 [Chin & Fung ’04] and
e e−1 ≈ 1.58 [Chin et al. ’04]
Memoryless algorithms
Is there a lower bound > φ for memoryless algorithms? What is the ratio of Plan(α)? (Schedule p ∈ P max. α · wp + w(Qp))
Thank you!
Pavel Vesel´ y Online Packet Scheduling 26 / 26