Streaming Algorithms for Bin Packing and Vector Scheduling Graham - - PowerPoint PPT Presentation

streaming algorithms for bin packing and vector scheduling
SMART_READER_LITE
LIVE PREVIEW

Streaming Algorithms for Bin Packing and Vector Scheduling Graham - - PowerPoint PPT Presentation

Streaming Algorithms for Bin Packing and Vector Scheduling Graham Cormode and Pavel Vesel y University of Warwick WAOA 2019, Munich Powered by Beamer i k Z First WAOA talk containing streaming . . . Pavel Vesel y Streaming Algs.


slide-1
SLIDE 1

Streaming Algorithms for Bin Packing and Vector Scheduling

Graham Cormode and Pavel Vesel´ y University of Warwick WAOA 2019, Munich

Powered by BeamerikZ

slide-2
SLIDE 2

First WAOA talk containing “streaming” . . .

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 1 / 13

slide-3
SLIDE 3

First WAOA talk containing “streaming” . . .

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 1 / 13

slide-4
SLIDE 4

First WAOA talk containing “streaming” . . . . . . but not the first one on “data streams”

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 1 / 13

slide-5
SLIDE 5

Overview

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 2 / 13

slide-6
SLIDE 6

Overview Connecting Big Data Algorithms Combinatorial Optimization

1 . . .

&

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 2 / 13

slide-7
SLIDE 7

Overview Connecting Big Data Algorithms Combinatorial Optimization

1 . . .

& This talk’s focus: streaming algorithms packing and scheduling

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 2 / 13

slide-8
SLIDE 8

Streaming Model of Computation

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 3 / 13

slide-9
SLIDE 9

Streaming Model of Computation

  • One pass over data w/ limited memory

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 3 / 13

slide-10
SLIDE 10

Streaming Model of Computation

  • One pass over data w/ limited memory

Streaming Algorithm

  • receives data in a stream, item by item
  • uses memory sublinear in N = stream length

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 3 / 13

slide-11
SLIDE 11

Streaming Model of Computation

  • One pass over data w/ limited memory

Streaming Algorithm

  • receives data in a stream, item by item
  • uses memory sublinear in N = stream length
  • at the end, computes approximate answer

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 3 / 13

slide-12
SLIDE 12

Streaming Model of Computation

  • One pass over data w/ limited memory

Streaming Algorithm

  • receives data in a stream, item by item
  • uses memory sublinear in N = stream length
  • at the end, computes approximate answer

Note: cannot output a packing / schedule ⇒ estimate optimal cost (+ output template of a solution)

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 3 / 13

slide-13
SLIDE 13

Streaming Model of Computation

  • One pass over data w/ limited memory

Streaming Algorithm

  • receives data in a stream, item by item
  • uses memory sublinear in N = stream length
  • at the end, computes approximate answer

Note: cannot output a packing / schedule ⇒ estimate optimal cost (+ output template of a solution) Challenges:

  • N very large
  • Stream ordered arbitrarily
  • No random access to data

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 3 / 13

slide-14
SLIDE 14

Streaming Model of Computation

  • One pass over data w/ limited memory

Streaming Algorithm

  • receives data in a stream, item by item
  • uses memory sublinear in N = stream length
  • at the end, computes approximate answer

Note: cannot output a packing / schedule ⇒ estimate optimal cost (+ output template of a solution) Challenges:

  • N very large
  • Stream ordered arbitrarily
  • No random access to data

Trade-off: space vs. accuracy of the estimate

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 3 / 13

slide-15
SLIDE 15

Streaming Model of Computation

  • One pass over data w/ limited memory

Streaming Algorithm

  • receives data in a stream, item by item
  • uses memory sublinear in N = stream length
  • at the end, computes approximate answer

Note: cannot output a packing / schedule ⇒ estimate optimal cost (+ output template of a solution) Challenges:

  • N very large
  • Stream ordered arbitrarily
  • No random access to data

Trade-off: space vs. accuracy of the estimate How to summarize the input?

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 3 / 13

slide-16
SLIDE 16

Streaming Model of Computation

  • One pass over data w/ limited memory

Streaming Algorithm

  • receives data in a stream, item by item
  • uses memory sublinear in N = stream length
  • at the end, computes approximate answer

Note: cannot output a packing / schedule ⇒ estimate optimal cost (+ output template of a solution) Challenges:

  • N very large
  • Stream ordered arbitrarily
  • No random access to data

Trade-off: space vs. accuracy of the estimate How to summarize the input?

no need to make online decisions about the solution = online

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 3 / 13

slide-17
SLIDE 17

Streaming Algorithms known for . . .

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 4 / 13

slide-18
SLIDE 18

Streaming Algorithms known for . . .

  • most frequent items,
  • # of distinct items,

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 4 / 13

slide-19
SLIDE 19

Streaming Algorithms known for . . .

  • most frequent items,
  • # of distinct items,
  • approximate median = .5-quantile,
  • or any φ-quantile for φ ∈ [0, 1],
  • = φ · N-th largest item,
  • approx. cumulative distribution function,

1 ε ≥{

cdfA(x) = {a ∈ A | a ≤ x} N

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 4 / 13

slide-20
SLIDE 20

Streaming Algorithms known for . . .

  • most frequent items,
  • # of distinct items,
  • approximate median = .5-quantile,
  • or any φ-quantile for φ ∈ [0, 1],
  • = φ · N-th largest item,
  • approx. cumulative distribution function,

1 ε ≥{

cdfA(x) = {a ∈ A | a ≤ x} N

  • some graph problems,
  • submodular maximization,
  • . . .

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 4 / 13

slide-21
SLIDE 21

Streaming Algorithms known for . . .

  • most frequent items,
  • # of distinct items,
  • approximate median = .5-quantile,
  • or any φ-quantile for φ ∈ [0, 1],
  • = φ · N-th largest item,
  • approx. cumulative distribution function,

1 ε ≥{

cdfA(x) = {a ∈ A | a ≤ x} N

  • some graph problems,
  • submodular maximization,
  • . . .

What about other basic problems in combinatorial optimization?

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 4 / 13

slide-22
SLIDE 22

Our Results: Streaming Algorithms for . . . Bin Packing:

1 . . .

  • Input: items of size in [0, 1]
  • Goal: pack into min. number of bins of capacity 1
  • Offline: OPT + O(log OPT) bins in poly-time [Hoberg, Rothvoss ’17]

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 5 / 13

slide-23
SLIDE 23

Our Results: Streaming Algorithms for . . . Bin Packing:

1 . . .

  • Input: items of size in [0, 1]
  • Goal: pack into min. number of bins of capacity 1
  • Offline: OPT + O(log OPT) bins in poly-time [Hoberg, Rothvoss ’17]

1 + ε-approximation in space O(1

ε)

Essentially best possible Streaming Algorithm

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 5 / 13

slide-24
SLIDE 24

Our Results: Streaming Algorithms for . . . Bin Packing:

1 . . .

  • Input: items of size in [0, 1]
  • Goal: pack into min. number of bins of capacity 1
  • Offline: OPT + O(log OPT) bins in poly-time [Hoberg, Rothvoss ’17]

1 + ε-approximation in space O(1

ε)

Essentially best possible Streaming Algorithm Makespan Scheduling

  • Input: jobs with processing time
  • Goal: assign jobs to machines to minimize makespan

= maximum load over all machines

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 5 / 13

slide-25
SLIDE 25

Our Results: Streaming Algorithms for . . . Bin Packing:

1 . . .

  • Input: items of size in [0, 1]
  • Goal: pack into min. number of bins of capacity 1
  • Offline: OPT + O(log OPT) bins in poly-time [Hoberg, Rothvoss ’17]

1 + ε-approximation in space O(1

ε)

Essentially best possible Streaming Algorithm Makespan Scheduling

  • Input: jobs with processing time
  • Goal: assign jobs to machines to minimize makespan

= maximum load over all machines

  • 1 + ε-approximation (rounding & DP)

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 5 / 13

slide-26
SLIDE 26

Our Results: Streaming Algorithms for . . . Bin Packing:

1 . . .

  • Input: items of size in [0, 1]
  • Goal: pack into min. number of bins of capacity 1
  • Offline: OPT + O(log OPT) bins in poly-time [Hoberg, Rothvoss ’17]

1 + ε-approximation in space O(1

ε)

Essentially best possible Streaming Algorithm Vector Scheduling:

  • Input: jobs characterized by d-dim. vectors
  • e.g.: processing time, memory or bandwidth requirements, etc.
  • Goal: assign jobs to m identical machines to minimize makespan

= maximum load over all machines and dimensions

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 5 / 13

slide-27
SLIDE 27

Our Results: Streaming Algorithms for . . . Bin Packing:

1 . . .

  • Input: items of size in [0, 1]
  • Goal: pack into min. number of bins of capacity 1
  • Offline: OPT + O(log OPT) bins in poly-time [Hoberg, Rothvoss ’17]

1 + ε-approximation in space O(1

ε)

Essentially best possible Streaming Algorithm Vector Scheduling:

  • Input: jobs characterized by d-dim. vectors
  • e.g.: processing time, memory or bandwidth requirements, etc.
  • Goal: assign jobs to m identical machines to minimize makespan

= maximum load over all machines and dimensions 2-approximation in space O(d2 · m3) Streaming Algorithm

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 5 / 13

slide-28
SLIDE 28

Bin Packing: Offline Approximation Scheme

1 .

  • Input: items of size in [0, 1]
  • Goal: pack into min. number of bins of capacity 1

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 6 / 13

slide-29
SLIDE 29

Bin Packing: Offline Approximation Scheme

1 .

  • Input: items of size in [0, 1]
  • Goal: pack into min. number of bins of capacity 1

Textbook 1 + ε-approximation from [Fernandez de la Vega, Lueker ’81]

  • = solution with at most (1 + ε) · OPT + Oε(1) bins

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 6 / 13

slide-30
SLIDE 30

Bin Packing: Offline Approximation Scheme

1 .

  • Input: items of size in [0, 1]
  • Goal: pack into min. number of bins of capacity 1

Textbook 1 + ε-approximation from [Fernandez de la Vega, Lueker ’81]

  • = solution with at most (1 + ε) · OPT + Oε(1) bins
  • Big items: size > ε: linear grouping

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 6 / 13

slide-31
SLIDE 31

Bin Packing: Offline Approximation Scheme

1 .

  • Input: items of size in [0, 1]
  • Goal: pack into min. number of bins of capacity 1

Textbook 1 + ε-approximation from [Fernandez de la Vega, Lueker ’81]

  • = solution with at most (1 + ε) · OPT + Oε(1) bins
  • Big items: size > ε: linear grouping

1 ε

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 6 / 13

slide-32
SLIDE 32

Bin Packing: Offline Approximation Scheme

1 .

  • Input: items of size in [0, 1]
  • Goal: pack into min. number of bins of capacity 1

Textbook 1 + ε-approximation from [Fernandez de la Vega, Lueker ’81]

  • = solution with at most (1 + ε) · OPT + Oε(1) bins
  • Big items: size > ε: linear grouping

1 ε

{ { { { {

{

⌈ε2 · Nbig⌉ = 4

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 6 / 13

slide-33
SLIDE 33

Bin Packing: Offline Approximation Scheme

1 .

  • Input: items of size in [0, 1]
  • Goal: pack into min. number of bins of capacity 1

Textbook 1 + ε-approximation from [Fernandez de la Vega, Lueker ’81]

  • = solution with at most (1 + ε) · OPT + Oε(1) bins
  • Big items: size > ε: linear grouping

1 ε

{ { { { {

{

⌈ε2 · Nbig⌉ = 4

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 6 / 13

slide-34
SLIDE 34

Bin Packing: Offline Approximation Scheme

1 .

  • Input: items of size in [0, 1]
  • Goal: pack into min. number of bins of capacity 1

Textbook 1 + ε-approximation from [Fernandez de la Vega, Lueker ’81]

  • = solution with at most (1 + ε) · OPT + Oε(1) bins
  • Big items: size > ε: linear grouping

1 ε

{ { { { {

{

⌈ε2 · Nbig⌉ = 4

  • → instance with

1

ε2

  • item sizes only → solve (nearly) optimally

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 6 / 13

slide-35
SLIDE 35

Bin Packing: Offline Approximation Scheme

1 .

  • Input: items of size in [0, 1]
  • Goal: pack into min. number of bins of capacity 1

Textbook 1 + ε-approximation from [Fernandez de la Vega, Lueker ’81]

  • = solution with at most (1 + ε) · OPT + Oε(1) bins
  • Big items: size > ε: linear grouping

1 ε

{ { { { {

{

⌈ε2 · Nbig⌉ = 4

  • → instance with

1

ε2

  • item sizes only → solve (nearly) optimally
  • Small items: size ≤ ε:
  • Fill in greedily

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 6 / 13

slide-36
SLIDE 36

Bin Packing: Offline Approximation Scheme

1 .

  • Input: items of size in [0, 1]
  • Goal: pack into min. number of bins of capacity 1

Textbook 1 + ε-approximation from [Fernandez de la Vega, Lueker ’81]

  • = solution with at most (1 + ε) · OPT + Oε(1) bins
  • Big items: size > ε: linear grouping

1 ε

{ { { { {

{

⌈ε2 · Nbig⌉ = 4

  • → instance with

1

ε2

  • item sizes only → solve (nearly) optimally
  • Small items: size ≤ ε:
  • Fill in greedily

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 6 / 13

slide-37
SLIDE 37

Bin Packing: Offline Approximation Scheme

1 .

  • Input: items of size in [0, 1]
  • Goal: pack into min. number of bins of capacity 1

Textbook 1 + ε-approximation from [Fernandez de la Vega, Lueker ’81]

  • = solution with at most (1 + ε) · OPT + Oε(1) bins
  • Big items: size > ε: linear grouping

1 ε

{ { { { {

{

⌈ε2 · Nbig⌉ = 4

  • → instance with

1

ε2

  • item sizes only → solve (nearly) optimally
  • Small items: size ≤ ε:
  • Fill in greedily

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 6 / 13

slide-38
SLIDE 38

Bin Packing: Offline Approximation Scheme

1 .

  • Input: items of size in [0, 1]
  • Goal: pack into min. number of bins of capacity 1

Textbook 1 + ε-approximation from [Fernandez de la Vega, Lueker ’81]

  • = solution with at most (1 + ε) · OPT + Oε(1) bins
  • Big items: size > ε: linear grouping

1 ε

{ { { { {

{

⌈ε2 · Nbig⌉ = 4

  • → instance with

1

ε2

  • item sizes only → solve (nearly) optimally
  • Small items: size ≤ ε:
  • Fill in greedily

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 6 / 13

slide-39
SLIDE 39

Bin Packing: Offline Approximation Scheme

1 .

  • Input: items of size in [0, 1]
  • Goal: pack into min. number of bins of capacity 1

Textbook 1 + ε-approximation from [Fernandez de la Vega, Lueker ’81]

  • = solution with at most (1 + ε) · OPT + Oε(1) bins
  • Big items: size > ε: linear grouping

1 ε

{ { { { {

{

⌈ε2 · Nbig⌉ = 4

  • → instance with

1

ε2

  • item sizes only → solve (nearly) optimally
  • Small items: size ≤ ε:
  • Fill in greedily

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 6 / 13

slide-40
SLIDE 40

Bin Packing: Offline Approximation Scheme

1 .

  • Input: items of size in [0, 1]
  • Goal: pack into min. number of bins of capacity 1

Textbook 1 + ε-approximation from [Fernandez de la Vega, Lueker ’81]

  • = solution with at most (1 + ε) · OPT + Oε(1) bins
  • Big items: size > ε: linear grouping

1 ε

{ { { { {

{

⌈ε2 · Nbig⌉ = 4

  • → instance with

1

ε2

  • item sizes only → solve (nearly) optimally
  • Small items: size ≤ ε:
  • Fill in greedily

How to do grouping with small memory? Cannot store them all!

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 6 / 13

slide-41
SLIDE 41

Streaming 1 + ε-Approx. for Bin Packing

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 7 / 13

slide-42
SLIDE 42

Streaming 1 + ε-Approx. for Bin Packing Big items: size > ε: approximate linear grouping

1 ε

{ { { { {

{

⌈ε2 · Nbig⌉ = 4

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 7 / 13

slide-43
SLIDE 43

Streaming 1 + ε-Approx. for Bin Packing Big items: size > ε: approximate linear grouping

1 ε

{ { { { {

{

ε2-quantile 2ε2-quant. 3ε2-quantile . . .

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 7 / 13

slide-44
SLIDE 44

Streaming 1 + ε-Approx. for Bin Packing Big items: size > ε: approximate linear grouping

1 ε

{ { { { {

{

ε2-quantile 2ε2-quant. 3ε2-quantile . . .

  • Sufficient to δ-approximate quantiles δ ≈ ε2
  • δ-approx. φ-quantile = (φ ± δ)N-th largest item

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 7 / 13

slide-45
SLIDE 45

Streaming 1 + ε-Approx. for Bin Packing Big items: size > ε: approximate linear grouping

1 ε

{ { { { {

{

ε2-quantile 2ε2-quant. 3ε2-quantile . . .

  • Sufficient to δ-approximate quantiles δ ≈ ε2
  • δ-approx. φ-quantile = (φ ± δ)N-th largest item
  • quantile summary w/ space O(1

δ · log δN) [Greenwald & Khanna ’01]

  • deterministic comparison-based

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 7 / 13

slide-46
SLIDE 46

Streaming 1 + ε-Approx. for Bin Packing Big items: size > ε: approximate linear grouping

  • Sufficient to δ-approximate quantiles δ ≈ ε2
  • δ-approx. φ-quantile = (φ ± δ)N-th largest item
  • quantile summary w/ space O(1

δ · log δN) [Greenwald & Khanna ’01]

  • deterministic comparison-based

1 ε

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 7 / 13

slide-47
SLIDE 47

Streaming 1 + ε-Approx. for Bin Packing Big items: size > ε: approximate linear grouping

  • Sufficient to δ-approximate quantiles δ ≈ ε2
  • δ-approx. φ-quantile = (φ ± δ)N-th largest item
  • quantile summary w/ space O(1

δ · log δN) [Greenwald & Khanna ’01]

  • deterministic comparison-based

1 ε

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 7 / 13

slide-48
SLIDE 48

Streaming 1 + ε-Approx. for Bin Packing Big items: size > ε: approximate linear grouping

  • Sufficient to δ-approximate quantiles δ ≈ ε2
  • δ-approx. φ-quantile = (φ ± δ)N-th largest item
  • quantile summary w/ space O(1

δ · log δN) [Greenwald & Khanna ’01]

  • deterministic comparison-based

1 ε

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 7 / 13

slide-49
SLIDE 49

Streaming 1 + ε-Approx. for Bin Packing Big items: size > ε: approximate linear grouping

  • Sufficient to δ-approximate quantiles δ ≈ ε2
  • δ-approx. φ-quantile = (φ ± δ)N-th largest item
  • quantile summary w/ space O(1

δ · log δN) [Greenwald & Khanna ’01]

  • deterministic comparison-based

1 ε

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 7 / 13

slide-50
SLIDE 50

Streaming 1 + ε-Approx. for Bin Packing Big items: size > ε: approximate linear grouping

  • Sufficient to δ-approximate quantiles δ ≈ ε2
  • δ-approx. φ-quantile = (φ ± δ)N-th largest item
  • quantile summary w/ space O(1

δ · log δN) [Greenwald & Khanna ’01]

  • deterministic comparison-based

1 ε Small items

  • sum their sizes
  • fill in fractionally

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 7 / 13

slide-51
SLIDE 51

Streaming 1 + ε-Approx. for Bin Packing Big items: size > ε: approximate linear grouping

  • Sufficient to δ-approximate quantiles δ ≈ ε2
  • δ-approx. φ-quantile = (φ ± δ)N-th largest item
  • quantile summary w/ space O(1

δ · log δN) [Greenwald & Khanna ’01]

  • deterministic comparison-based

1 ε Small items

  • sum their sizes
  • fill in fractionally

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 7 / 13

slide-52
SLIDE 52

Streaming 1 + ε-Approx. for Bin Packing Big items: size > ε: approximate linear grouping

  • Sufficient to δ-approximate quantiles δ ≈ ε2
  • δ-approx. φ-quantile = (φ ± δ)N-th largest item
  • quantile summary w/ space O(1

δ · log δN) [Greenwald & Khanna ’01]

  • deterministic comparison-based

1 ε Small items

  • sum their sizes
  • fill in fractionally

ε

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 7 / 13

slide-53
SLIDE 53

Streaming 1 + ε-Approx. for Bin Packing Big items: size > ε: approximate linear grouping

  • Sufficient to δ-approximate quantiles δ ≈ ε2
  • δ-approx. φ-quantile = (φ ± δ)N-th largest item
  • quantile summary w/ space O(1

δ · log δN) [Greenwald & Khanna ’01]

  • deterministic comparison-based

1 ε Small items

  • sum their sizes
  • fill in fractionally

ε

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 7 / 13

slide-54
SLIDE 54

Streaming 1 + ε-Approx. for Bin Packing Big items: size > ε: approximate linear grouping

  • Sufficient to δ-approximate quantiles δ ≈ ε2
  • δ-approx. φ-quantile = (φ ± δ)N-th largest item
  • quantile summary w/ space O(1

δ · log δN) [Greenwald & Khanna ’01]

  • deterministic comparison-based

1 ε Small items

  • sum their sizes
  • fill in fractionally

ε

⇒ 1 + ε-approx. for Bin Packing in space O( 1

ε2 · log εOPT)

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 7 / 13

slide-55
SLIDE 55

Streaming 1 + ε-Approx. for Bin Packing

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 8 / 13

slide-56
SLIDE 56

Streaming 1 + ε-Approx. for Bin Packing 1 + ε-approx. for Bin Packing in space O( 1

ε2 · log εOPT)

  • by quantiles with precision ≈ ε2

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 8 / 13

slide-57
SLIDE 57

Streaming 1 + ε-Approx. for Bin Packing 1 + ε-approx. for Bin Packing in space O( 1

ε2 · log εOPT)

  • by quantiles with precision ≈ ε2

1 ε

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 8 / 13

slide-58
SLIDE 58

Streaming 1 + ε-Approx. for Bin Packing 1 + ε-approx. for Bin Packing in space O( 1

ε2 · log εOPT)

  • by quantiles with precision ≈ ε2

1 ε

  • too much precision for small items

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 8 / 13

slide-59
SLIDE 59

Streaming 1 + ε-Approx. for Bin Packing 1 + ε-approx. for Bin Packing in space O( 1

ε2 · log εOPT)

  • by quantiles with precision ≈ ε2

1 ε

  • too much precision for small items

Geometric grouping [Karmarkar, Karp ’82]

  • Split big items into ⌈log2

1 ε⌉ size groups: (1 2, 1], (1 4, 1 2], . . .

  • Use quantile summary for each group with precision ≈ ε
  • ⇒ space O(1

ε · log 1 ε · log OPT)

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 8 / 13

slide-60
SLIDE 60

Streaming 1 + ε-Approx. for Bin Packing Can we do better than O(1

ε · log 1 ε · log OPT)?

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 9 / 13

slide-61
SLIDE 61

Streaming 1 + ε-Approx. for Bin Packing Can we do better than O(1

ε · log 1 ε · log OPT)?

Yes! If . . .

  • . . . items drawn from a bounded-size universe U
  • space O(1

ε · log 1 ε · log |U|) using a quantile summary from [Shrivastava et al. ’04]

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 9 / 13

slide-62
SLIDE 62

Streaming 1 + ε-Approx. for Bin Packing Can we do better than O(1

ε · log 1 ε · log OPT)?

Yes! If . . .

  • . . . items drawn from a bounded-size universe U
  • space O(1

ε · log 1 ε · log |U|) using a quantile summary from [Shrivastava et al. ’04]

  • . . . randomization allowed (wrong answer w/ probability γ)
  • space O(1

ε · log 1 ε · log log log 1

ε

γ ) using a quantile summary from [Karnin et al. ’16]

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 9 / 13

slide-63
SLIDE 63

Streaming 1 + ε-Approx. for Bin Packing Can we do better than O(1

ε · log 1 ε · log OPT)?

Yes! If . . .

  • . . . items drawn from a bounded-size universe U
  • space O(1

ε · log 1 ε · log |U|) using a quantile summary from [Shrivastava et al. ’04]

  • . . . randomization allowed (wrong answer w/ probability γ)
  • space O(1

ε · log 1 ε · log log log 1

ε

γ ) using a quantile summary from [Karnin et al. ’16]

No, not much by a deterministic comparison-based algo.

  • Streaming 1 + ε-approx. for Bin Packing in space S

⇒ estimating rank w/ accuracy ≈ ε in space S

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 9 / 13

slide-64
SLIDE 64

Streaming 1 + ε-Approx. for Bin Packing Can we do better than O(1

ε · log 1 ε · log OPT)?

Yes! If . . .

  • . . . items drawn from a bounded-size universe U
  • space O(1

ε · log 1 ε · log |U|) using a quantile summary from [Shrivastava et al. ’04]

  • . . . randomization allowed (wrong answer w/ probability γ)
  • space O(1

ε · log 1 ε · log log log 1

ε

γ ) using a quantile summary from [Karnin et al. ’16]

No, not much by a deterministic comparison-based algo.

  • Streaming 1 + ε-approx. for Bin Packing in space S

⇒ estimating rank w/ accuracy ≈ ε in space S

  • LB Ω(1

ε · log εN) for estimating rank / quantile summaries [Cormode & V. ’19+]

⇒ LB Ω(1

ε · log OPT) for Bin Packing

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 9 / 13

slide-65
SLIDE 65

Vector Scheduling: Rounding

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 10 / 13

slide-66
SLIDE 66

Vector Scheduling: Rounding

  • Input: jobs characterized by d-dimensional vectors
  • Goal: assign jobs to machines to minimize makespan

= maximum load over all machines and dimensions

  • 1 + ε-approximation (more involved rounding & MIP) [Bansal et al. ’16]

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 10 / 13

slide-67
SLIDE 67

Vector Scheduling: Rounding

  • Input: jobs characterized by d-dimensional vectors
  • Goal: assign jobs to machines to minimize makespan

= maximum load over all machines and dimensions

  • 1 + ε-approximation (more involved rounding & MIP) [Bansal et al. ’16]
  • Rescaling property: scaling every vector by α ⇒ scaling OPT by α

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 10 / 13

slide-68
SLIDE 68

Vector Scheduling: Rounding

  • Input: jobs characterized by d-dimensional vectors
  • Goal: assign jobs to machines to minimize makespan

= maximum load over all machines and dimensions

  • 1 + ε-approximation (more involved rounding & MIP) [Bansal et al. ’16]
  • Rescaling property: scaling every vector by α ⇒ scaling OPT by α

Makespan Scheduling: d = 1

  • Rounding currently big jobs to powers of 1 + ε
  • Big jobs = bigger than ε times currently largest job

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 10 / 13

slide-69
SLIDE 69

Vector Scheduling: Rounding

  • Input: jobs characterized by d-dimensional vectors
  • Goal: assign jobs to machines to minimize makespan

= maximum load over all machines and dimensions

  • 1 + ε-approximation (more involved rounding & MIP) [Bansal et al. ’16]
  • Rescaling property: scaling every vector by α ⇒ scaling OPT by α

Makespan Scheduling: d = 1

  • Rounding currently big jobs to powers of 1 + ε
  • Big jobs = bigger than ε times currently largest job
  • ⇒ streaming 1 + ε-approx. in space ≈ log1+ε

1 ε = O(1 ε · log 1 ε)

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 10 / 13

slide-70
SLIDE 70

Vector Scheduling: Rounding

  • Input: jobs characterized by d-dimensional vectors
  • Goal: assign jobs to machines to minimize makespan

= maximum load over all machines and dimensions

  • 1 + ε-approximation (more involved rounding & MIP) [Bansal et al. ’16]
  • Rescaling property: scaling every vector by α ⇒ scaling OPT by α

Makespan Scheduling: d = 1

  • Rounding currently big jobs to powers of 1 + ε
  • Big jobs = bigger than ε times currently largest job
  • ⇒ streaming 1 + ε-approx. in space ≈ log1+ε

1 ε = O(1 ε · log 1 ε)

Vector Scheduling: d > 1

  • More intricate rounding from [Bansal et al. ’16]:
  • Round to 0 coordinates small relatively to v∞
  • Big jobs: round each dimension to power of 1 + ε ⇒ space

O(1

ε)d

  • Small jobs: round relative to v∞

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 10 / 13

slide-71
SLIDE 71

Vector Scheduling: Aggregation Algorithm Job vector v big if v∞ > γ· (LB on OPT) for γ ≈ ε2/ log d

ε

  • ⇒ at most d · m/γ big vectors
  • Store them all

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 11 / 13

slide-72
SLIDE 72

Vector Scheduling: Aggregation Algorithm Job vector v big if v∞ > γ· (LB on OPT) for γ ≈ ε2/ log d

ε

  • ⇒ at most d · m/γ big vectors
  • Store them all

Small vectors:

  • combine into containers ≈ big vectors

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 11 / 13

slide-73
SLIDE 73

Vector Scheduling: Aggregation Algorithm Job vector v big if v∞ > γ· (LB on OPT) for γ ≈ ε2/ log d

ε

  • ⇒ at most d · m/γ big vectors
  • Store them all

Small vectors:

  • combine into containers ≈ big vectors
  • Maintain one open container
  • add incoming small vectors into it
  • close it once it becomes full & open a new one

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 11 / 13

slide-74
SLIDE 74

Vector Scheduling: Aggregation Algorithm Job vector v big if v∞ > γ· (LB on OPT) for γ ≈ ε2/ log d

ε

  • ⇒ at most d · m/γ big vectors
  • Store them all

Small vectors:

  • combine into containers ≈ big vectors
  • Maintain one open container
  • add incoming small vectors into it
  • close it once it becomes full & open a new one

Analysis:

  • Use the best schedule for big vectors: makespan ≤ OPT

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 11 / 13

slide-75
SLIDE 75

Vector Scheduling: Aggregation Algorithm Job vector v big if v∞ > γ· (LB on OPT) for γ ≈ ε2/ log d

ε

  • ⇒ at most d · m/γ big vectors
  • Store them all

Small vectors:

  • combine into containers ≈ big vectors
  • Maintain one open container
  • add incoming small vectors into it
  • close it once it becomes full & open a new one

Analysis:

  • Use the best schedule for big vectors: makespan ≤ OPT
  • Assign containers by an optimal online algorithm from [Im et al. ’15]
  • Randomized & greedy assignment
  • Containers small ⇒ nearly balanced assignment ⇒ makespan ≤ (1 + ε) · OPT

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 11 / 13

slide-76
SLIDE 76

Vector Scheduling: Aggregation Algorithm Job vector v big if v∞ > γ· (LB on OPT) for γ ≈ ε2/ log d

ε

  • ⇒ at most d · m/γ big vectors
  • Store them all

Small vectors:

  • combine into containers ≈ big vectors
  • Maintain one open container
  • add incoming small vectors into it
  • close it once it becomes full & open a new one

Analysis:

  • Use the best schedule for big vectors: makespan ≤ OPT
  • Assign containers by an optimal online algorithm from [Im et al. ’15]
  • Randomized & greedy assignment
  • Containers small ⇒ nearly balanced assignment ⇒ makespan ≤ (1 + ε) · OPT
  • Combine the two cases: makespan ≤ (2 − 1

m + ε) · OPT

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 11 / 13

slide-77
SLIDE 77

Vector Scheduling: Aggregation Algorithm Job vector v big if v∞ > γ· (LB on OPT) for γ ≈ ε2/ log d

ε

  • ⇒ at most d · m/γ big vectors
  • Store them all

Small vectors:

  • combine into containers ≈ big vectors
  • Maintain one open container
  • add incoming small vectors into it
  • close it once it becomes full & open a new one

Analysis:

  • Use the best schedule for big vectors: makespan ≤ OPT
  • Assign containers by an optimal online algorithm from [Im et al. ’15]
  • Randomized & greedy assignment
  • Containers small ⇒ nearly balanced assignment ⇒ makespan ≤ (1 + ε) · OPT
  • Combine the two cases: makespan ≤ (2 − 1

m + ε) · OPT

tight!

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 11 / 13

slide-78
SLIDE 78

Conclusions & Open Problems Bin Packing

  • Streaming 1 + ε-approximation in space

O(1

ε)

  • Tight up to O(log 1

ε) factor by connection to quantile summaries

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 12 / 13

slide-79
SLIDE 79

Conclusions & Open Problems Bin Packing

  • Streaming 1 + ε-approximation in space

O(1

ε)

  • Tight up to O(log 1

ε) factor by connection to quantile summaries

  • Streaming d + ε-approx. for Vector Bin Packing in space

O(d

ε)

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 12 / 13

slide-80
SLIDE 80

Conclusions & Open Problems Bin Packing

  • Streaming 1 + ε-approximation in space

O(1

ε)

  • Tight up to O(log 1

ε) factor by connection to quantile summaries

  • Streaming d + ε-approx. for Vector Bin Packing in space

O(d

ε)

Vector Scheduling

  • Rounding gives 1 + ε-approximation in space exceeding

1

ε

d [Bansal et al. ’16]

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 12 / 13

slide-81
SLIDE 81

Conclusions & Open Problems Bin Packing

  • Streaming 1 + ε-approximation in space

O(1

ε)

  • Tight up to O(log 1

ε) factor by connection to quantile summaries

  • Streaming d + ε-approx. for Vector Bin Packing in space

O(d

ε)

Vector Scheduling

  • Rounding gives 1 + ε-approximation in space exceeding

1

ε

d [Bansal et al. ’16]

  • Aggregation gives 2 − 1

m + ε-approximation in space O( 1 ε2 · d2 · m · log d ε)

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 12 / 13

slide-82
SLIDE 82

Conclusions & Open Problems Bin Packing

  • Streaming 1 + ε-approximation in space

O(1

ε)

  • Tight up to O(log 1

ε) factor by connection to quantile summaries

  • Streaming d + ε-approx. for Vector Bin Packing in space

O(d

ε)

Vector Scheduling

  • Rounding gives 1 + ε-approximation in space exceeding

1

ε

d [Bansal et al. ’16]

  • Aggregation gives 2 − 1

m + ε-approximation in space O( 1 ε2 · d2 · m · log d ε)

Better analysis of aggregation algorithm? O(1)-approx. in space poly(d)?

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 12 / 13

slide-83
SLIDE 83

Conclusions & Open Problems Bin Packing

  • Streaming 1 + ε-approximation in space

O(1

ε)

  • Tight up to O(log 1

ε) factor by connection to quantile summaries

  • Streaming d + ε-approx. for Vector Bin Packing in space

O(d

ε)

Vector Scheduling

  • Rounding gives 1 + ε-approximation in space exceeding

1

ε

d [Bansal et al. ’16]

  • Aggregation gives 2 − 1

m + ε-approximation in space O( 1 ε2 · d2 · m · log d ε)

Better analysis of aggregation algorithm? O(1)-approx. in space poly(d)? What about your favourite problem?

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 12 / 13

slide-84
SLIDE 84

Conclusions & Open Problems Bin Packing

  • Streaming 1 + ε-approximation in space

O(1

ε)

  • Tight up to O(log 1

ε) factor by connection to quantile summaries

  • Streaming d + ε-approx. for Vector Bin Packing in space

O(d

ε)

Vector Scheduling

  • Rounding gives 1 + ε-approximation in space exceeding

1

ε

d [Bansal et al. ’16]

  • Aggregation gives 2 − 1

m + ε-approximation in space O( 1 ε2 · d2 · m · log d ε)

Better analysis of aggregation algorithm? O(1)-approx. in space poly(d)? What about your favourite problem?

Thank You!

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 12 / 13

slide-85
SLIDE 85

Streaming vs. Online

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 13 / 13

slide-86
SLIDE 86

Streaming vs. Online

Problem Streaming apx. Competitive ratio LB Competitive ratio UB Bin Packing 1 + ε 1.542 [Balogh et al. ’19] 1.578 [Balogh et al. ’18] Vector Bin Packing d + ε Ω(d1−ε) [Azar et al. ’13] d + 0.7 [Garey et al. ’76] Makespan Scheduling 1 + ε 1.88 [Rudin ’01] 1.92 [Fleischer & Wahl ’00] Vector Scheduling 2 (1 + ε) Ω(log d/ log log d) [Im et al. ’15] O(log d/ log log d) [Im et al. ’15]

Pavel Vesel´ y Streaming Algs. for Bin Packing and Vector Scheduling 13 / 13