A -Competitive Algorithm for Scheduling Packets with Deadlines - - PowerPoint PPT Presentation

a competitive algorithm for scheduling packets with
SMART_READER_LITE
LIVE PREVIEW

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)


slide-1
SLIDE 1

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) DIMAP Seminar, October 2 To appear in SODA ’19

slide-2
SLIDE 2

Outline

Introduction to competitive analysis Model & result Algorithm Analysis techniques Further research directions

Pavel Vesel´ y Online Packet Scheduling 2 / 26

slide-3
SLIDE 3

Introduction to competitive analysis

Pavel Vesel´ y Online Packet Scheduling 3 / 26

slide-4
SLIDE 4

An Example: Cabinetmaker

Each week you make one cabinet

Pavel Vesel´ y Online Packet Scheduling 4 / 26

slide-5
SLIDE 5

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

slide-6
SLIDE 6

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

slide-7
SLIDE 7

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

slide-8
SLIDE 8

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

slide-9
SLIDE 9

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

slide-10
SLIDE 10

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

slide-11
SLIDE 11

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

slide-12
SLIDE 12

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

slide-13
SLIDE 13

Online optimization & algorithms

Online computation Offline computation

Pavel Vesel´ y Online Packet Scheduling 5 / 26

slide-14
SLIDE 14

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

slide-15
SLIDE 15

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

slide-16
SLIDE 16

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

slide-17
SLIDE 17

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

slide-18
SLIDE 18

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

slide-19
SLIDE 19

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

slide-20
SLIDE 20

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

slide-21
SLIDE 21

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

slide-22
SLIDE 22

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

slide-23
SLIDE 23

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

slide-24
SLIDE 24

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

slide-25
SLIDE 25

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

slide-26
SLIDE 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

slide-27
SLIDE 27

Model & Result

Pavel Vesel´ y Online Packet Scheduling 7 / 26

slide-28
SLIDE 28

Online Packet Scheduling with Deadlines

Network switch:

Buffer Input port Output port

Pavel Vesel´ y Online Packet Scheduling 8 / 26

slide-29
SLIDE 29

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

slide-30
SLIDE 30

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

slide-31
SLIDE 31

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

slide-32
SLIDE 32

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

slide-33
SLIDE 33

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

slide-34
SLIDE 34

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

slide-35
SLIDE 35

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

slide-36
SLIDE 36

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

slide-37
SLIDE 37

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

slide-38
SLIDE 38

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

slide-39
SLIDE 39

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

slide-40
SLIDE 40

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

slide-41
SLIDE 41

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

slide-42
SLIDE 42

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

slide-43
SLIDE 43

Previous work

We focus on deterministic algorithms

Pavel Vesel´ y Online Packet Scheduling 9 / 26

slide-44
SLIDE 44

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

slide-45
SLIDE 45

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

slide-46
SLIDE 46

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

slide-47
SLIDE 47

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

slide-48
SLIDE 48

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

slide-49
SLIDE 49

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

slide-50
SLIDE 50

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

slide-51
SLIDE 51

New result

Theorem

There is a φ-competitive deterministic algorithm.

Pavel Vesel´ y Online Packet Scheduling 10 / 26

slide-52
SLIDE 52

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

slide-53
SLIDE 53

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

slide-54
SLIDE 54

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

slide-55
SLIDE 55

Algorithm

Pavel Vesel´ y Online Packet Scheduling 11 / 26

slide-56
SLIDE 56

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

slide-57
SLIDE 57

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

slide-58
SLIDE 58

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

slide-59
SLIDE 59

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

slide-60
SLIDE 60

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

slide-61
SLIDE 61

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

slide-62
SLIDE 62

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

slide-63
SLIDE 63

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

slide-64
SLIDE 64

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

slide-65
SLIDE 65

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

slide-66
SLIDE 66

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

slide-67
SLIDE 67

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

slide-68
SLIDE 68

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

slide-69
SLIDE 69

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

slide-70
SLIDE 70

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

slide-71
SLIDE 71

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

slide-72
SLIDE 72

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

slide-73
SLIDE 73

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

slide-74
SLIDE 74

Problem of Plan(φ): Weight Decreases in the Plan

Pavel Vesel´ y Online Packet Scheduling 15 / 26

slide-75
SLIDE 75

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

slide-76
SLIDE 76

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

slide-77
SLIDE 77

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

slide-78
SLIDE 78

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

slide-79
SLIDE 79

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

slide-80
SLIDE 80

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

slide-81
SLIDE 81

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

slide-82
SLIDE 82

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

slide-83
SLIDE 83

Solution: Maintaining Slot-Monotonicity of minwt

Idea: modify Plan(φ) so that minwt(τ) never decreases for any τ

Pavel Vesel´ y Online Packet Scheduling 16 / 26

slide-84
SLIDE 84

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

slide-85
SLIDE 85

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

slide-86
SLIDE 86

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

slide-87
SLIDE 87

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

slide-88
SLIDE 88

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

slide-89
SLIDE 89

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

slide-90
SLIDE 90

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

slide-91
SLIDE 91

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

slide-92
SLIDE 92

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

slide-93
SLIDE 93

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

slide-94
SLIDE 94

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

slide-95
SLIDE 95

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

slide-96
SLIDE 96

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

slide-97
SLIDE 97

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

slide-98
SLIDE 98

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

slide-99
SLIDE 99

Analysis

Pavel Vesel´ y Online Packet Scheduling 18 / 26

slide-100
SLIDE 100

Analysis Overview

Competitive analysis

◮ Goal: w(OPT) ≤ φ · w(ALG) for any instance Pavel Vesel´ y Online Packet Scheduling 19 / 26

slide-101
SLIDE 101

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

slide-102
SLIDE 102

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

slide-103
SLIDE 103

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

slide-104
SLIDE 104

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

slide-105
SLIDE 105

Adversary Schedule ADV

Consists of already-released packets from OPT in future slots

Pavel Vesel´ y Online Packet Scheduling 20 / 26

slide-106
SLIDE 106

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

slide-107
SLIDE 107

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

slide-108
SLIDE 108

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

slide-109
SLIDE 109

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

slide-110
SLIDE 110

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

slide-111
SLIDE 111

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

slide-112
SLIDE 112

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

slide-113
SLIDE 113

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

slide-114
SLIDE 114

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

slide-115
SLIDE 115

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

slide-116
SLIDE 116

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

slide-117
SLIDE 117

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

slide-118
SLIDE 118

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

slide-119
SLIDE 119

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

slide-120
SLIDE 120

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

slide-121
SLIDE 121

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

slide-122
SLIDE 122

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

slide-123
SLIDE 123

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

slide-124
SLIDE 124

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

slide-125
SLIDE 125

Potential Function

Relative advantage of the algorithm over the adversary:

Pavel Vesel´ y Online Packet Scheduling 21 / 26

slide-126
SLIDE 126

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

slide-127
SLIDE 127

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

slide-128
SLIDE 128

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

slide-129
SLIDE 129

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

slide-130
SLIDE 130

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

slide-131
SLIDE 131

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

slide-132
SLIDE 132

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

slide-133
SLIDE 133

Overview of the Analysis

To prove

Packet arrival: ∆Ψ ≥ 0

Pavel Vesel´ y Online Packet Scheduling 23 / 26

slide-134
SLIDE 134

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

slide-135
SLIDE 135

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

slide-136
SLIDE 136

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

slide-137
SLIDE 137

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

slide-138
SLIDE 138

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

slide-139
SLIDE 139

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

slide-140
SLIDE 140

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

slide-141
SLIDE 141

Conclusions

Pavel Vesel´ y Online Packet Scheduling 24 / 26

slide-142
SLIDE 142

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

slide-143
SLIDE 143

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

slide-144
SLIDE 144

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

slide-145
SLIDE 145

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

slide-146
SLIDE 146

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

slide-147
SLIDE 147

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

slide-148
SLIDE 148

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

slide-149
SLIDE 149

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