Balls-into-Bins Model and Chernoff Bounds Advanced Algorithms - - PowerPoint PPT Presentation

balls into bins model
SMART_READER_LITE
LIVE PREVIEW

Balls-into-Bins Model and Chernoff Bounds Advanced Algorithms - - PowerPoint PPT Presentation

Balls-into-Bins Model and Chernoff Bounds Advanced Algorithms Nanjing University, Fall 2018 Balls-into-Bins Model m balls Balls-into-Bins Model m balls n bins Balls-into-Bins Model m balls uniformly and independently thrown into n bins


slide-1
SLIDE 1

Balls-into-Bins Model and Chernoff Bounds

Advanced Algorithms Nanjing University, Fall 2018

slide-2
SLIDE 2

Balls-into-Bins Model

m balls

slide-3
SLIDE 3

Balls-into-Bins Model

m balls n bins

slide-4
SLIDE 4

Balls-into-Bins Model

m balls n bins uniformly and independently thrown into

slide-5
SLIDE 5

Balls-into-Bins Model

m balls n bins uniformly and independently thrown into uniformly at random choose h: [m]→[n]

slide-6
SLIDE 6

Balls-into-Bins Model

m balls n bins uniformly and independently thrown into uniformly at random choose h: [m]→[n] Question: probability that each ball lands in its own bin (h is 1-1)?

slide-7
SLIDE 7

Balls-into-Bins Model

m balls n bins uniformly and independently thrown into uniformly at random choose h: [m]→[n] Question: probability that each ball lands in its own bin (h is 1-1)? Question: probability that every bin is not empty (h is onto)?

slide-8
SLIDE 8

Balls-into-Bins Model

m balls n bins uniformly and independently thrown into uniformly at random choose h: [m]→[n] Question: probability that each ball lands in its own bin (h is 1-1)? Question: probability that every bin is not empty (h is onto)? Question: maximum number of balls in a bin (max{|h-1(i)|})?

slide-9
SLIDE 9

Question: probability that each ball lands in its own bin (h is 1-1)?

slide-10
SLIDE 10

Birthday Problem

Question: probability that each ball lands in its own bin (h is 1-1)?

slide-11
SLIDE 11

Birthday Problem

Question: probability that each ball lands in its own bin (h is 1-1)?

Jan 1st Jan 2nd Jan 3rd Jan 31st Feb 1st

… …

Dec 31st

slide-12
SLIDE 12

Birthday Problem

Question: probability that each ball lands in its own bin (h is 1-1)?

Jan 1st Jan 2nd Jan 3rd Jan 31st Feb 1st

… …

Dec 31st

slide-13
SLIDE 13

Birthday Problem

Question: probability that each ball lands in its own bin (h is 1-1)?

Jan 1st Jan 2nd Jan 3rd Jan 31st Feb 1st

… …

Dec 31st

This probability is some constant when

slide-14
SLIDE 14

Question: probability that every bin is not empty (h is onto)?

slide-15
SLIDE 15

Question: probability that every bin is not empty (h is onto)?

slide-16
SLIDE 16

Question: probability that every bin is not empty (h is onto)? Question: how many balls we need to throw to leave no empty bins?

slide-17
SLIDE 17

Coupon Collector

Question: probability that every bin is not empty (h is onto)? Question: how many balls we need to throw to leave no empty bins?

slide-18
SLIDE 18

Coupon Collector

Question: probability that every bin is not empty (h is onto)? Question: how many balls we need to throw to leave no empty bins?

slide-19
SLIDE 19

Coupon Collector

Question: probability that every bin is not empty (h is onto)? Question: how many balls we need to throw to leave no empty bins?

Let Xi be the number of balls thrown until i bins are non-empty, given i-1 bins are already non-empty.

slide-20
SLIDE 20

Coupon Collector

Question: probability that every bin is not empty (h is onto)? Question: how many balls we need to throw to leave no empty bins?

Let Xi be the number of balls thrown until i bins are non-empty, given i-1 bins are already non-empty. Xi is a geometric r.v. with parameter (n-i+1)/n.

slide-21
SLIDE 21

Coupon Collector

Question: probability that every bin is not empty (h is onto)? Question: how many balls we need to throw to leave no empty bins?

Let Xi be the number of balls thrown until i bins are non-empty, given i-1 bins are already non-empty. Xi is a geometric r.v. with parameter (n-i+1)/n.

slide-22
SLIDE 22

Load Balancing

Question: maximum number of balls in a bin (max{|h-1(i)|})?

slide-23
SLIDE 23

Load Balancing

Question: maximum number of balls in a bin (max{|h-1(i)|})? Let Xi be the number of balls in bin i. That is, Xi = |h-1(i)|.

slide-24
SLIDE 24

Load Balancing

Question: maximum number of balls in a bin (max{|h-1(i)|})? Let Xi be the number of balls in bin i. That is, Xi = |h-1(i)|.

slide-25
SLIDE 25

Load Balancing

Question: maximum number of balls in a bin (max{|h-1(i)|})? Let Xi be the number of balls in bin i. That is, Xi = |h-1(i)|. Let Yij be i.r.v. taking value 1 iff ball j lands in bin i.

slide-26
SLIDE 26

Load Balancing

Question: maximum number of balls in a bin (max{|h-1(i)|})? Let Xi be the number of balls in bin i. That is, Xi = |h-1(i)|. Let Yij be i.r.v. taking value 1 iff ball j lands in bin i.

slide-27
SLIDE 27

Load Balancing

Question: maximum number of balls in a bin (max{|h-1(i)|})? Let Xi be the number of balls in bin i. That is, Xi = |h-1(i)|. Let Yij be i.r.v. taking value 1 iff ball j lands in bin i. Is max{𝔽(Xi)} what we want?

slide-28
SLIDE 28

Load Balancing

Question: maximum number of balls in a bin (max{|h-1(i)|})? Let Xi be the number of balls in bin i. That is, Xi = |h-1(i)|. Let Yij be i.r.v. taking value 1 iff ball j lands in bin i. Is max{𝔽(Xi)} what we want? For every i, 𝔽(Xi) is m/n, so max{𝔽(Xi)} is simply m/n.

slide-29
SLIDE 29

Load Balancing

Question: maximum number of balls in a bin?

slide-30
SLIDE 30

Load Balancing

Question: maximum number of balls in a bin?

slide-31
SLIDE 31

Load Balancing

Question: maximum number of balls in a bin? Something is not right…

slide-32
SLIDE 32

Load Balancing

Question: maximum number of balls in a bin?

slide-33
SLIDE 33

Load Balancing

with high probability (w.h.p.): We say an event happens with high probability (with respect to n) if it happens with probability at least 1-1/n.

Question: maximum number of balls in a bin?

slide-34
SLIDE 34

Load Balancing

slide-35
SLIDE 35

Load Balancing

slide-36
SLIDE 36

Load Balancing

slide-37
SLIDE 37

Load Balancing

slide-38
SLIDE 38

Load Balancing

slide-39
SLIDE 39

Load Balancing

let m=n

slide-40
SLIDE 40

Load Balancing

let t = 3ln(n)/lnln(n)

slide-41
SLIDE 41

Load Balancing

for sufficiently large n

slide-42
SLIDE 42

Load Balancing

slide-43
SLIDE 43

Load Balancing

slide-44
SLIDE 44

Load Balancing

slide-45
SLIDE 45

Load Balancing

slide-46
SLIDE 46

Load Balancing

let m=nlg(n)

slide-47
SLIDE 47

Load Balancing

let t = 4m/n = 4lg(n)

slide-48
SLIDE 48

Load Balancing

let t = 4m/n = 4lg(n)

slide-49
SLIDE 49

Load Balancing

Question: maximum number of balls in a bin (max{|h-1(i)|})? “m balls are thrown into n bins uniformly and independently at random” “uniformly at random choose h: [m]→[n]”

slide-50
SLIDE 50

Concentration

balls into bins coin flipping

slide-51
SLIDE 51

Concentration

balls into bins coin flipping Question: probability that X deviates more than 𝜀 from expectation?

slide-52
SLIDE 52

Chernoff Bounds

Herman Chernoff

slide-53
SLIDE 53

Chernoff Bounds

Herman Chernoff

slide-54
SLIDE 54

Chernoff Bounds

slide-55
SLIDE 55

(Convenient) Chernoff Bounds

slide-56
SLIDE 56

0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 p

Power of the Chernoff Bounds

slide-57
SLIDE 57

0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 p

Power of the Chernoff Bounds

slide-58
SLIDE 58

Chernoff Bounds in Action:

Load Balancing

“m balls are thrown into n bins uniformly and independently at random” Question: maximum number of balls in a bin?

slide-59
SLIDE 59

Chernoff Bounds in Action:

Load Balancing

“m balls are thrown into n bins uniformly and independently at random” Question: maximum number of balls in a bin?

Xi: load of bin i Yij: i.r.v. taking value 1 iff ball j lands in bin i

slide-60
SLIDE 60

Chernoff Bounds in Action:

Load Balancing

“m balls are thrown into n bins uniformly and independently at random” Question: maximum number of balls in a bin?

Xi: load of bin i Yij: i.r.v. taking value 1 iff ball j lands in bin i

slide-61
SLIDE 61

Chernoff Bounds in Action:

Load Balancing

“m balls are thrown into n bins uniformly and independently at random” Question: maximum number of balls in a bin?

Xi: load of bin i Yij: i.r.v. taking value 1 iff ball j lands in bin i For 𝑛 = 𝑜, 𝜈 = 1 implies

slide-62
SLIDE 62

Chernoff Bounds in Action:

Load Balancing

“m balls are thrown into n bins uniformly and independently at random” Question: maximum number of balls in a bin?

Xi: load of bin i Yij: i.r.v. taking value 1 iff ball j lands in bin i For 𝑛 = 𝑜, 𝜈 = 1 implies when 𝑢 ≥

𝑓 ln 𝑜 ln ln 𝑜 and 𝑜 sufficiently large

slide-63
SLIDE 63

Chernoff Bounds in Action:

Load Balancing

“m balls are thrown into n bins uniformly and independently at random” Question: maximum number of balls in a bin?

Xi: load of bin i Yij: i.r.v. taking value 1 iff ball j lands in bin i For 𝑛 = 𝑜, 𝜈 = 1 implies when 𝑢 ≥

𝑓 ln 𝑜 ln ln 𝑜 and 𝑜 sufficiently large

slide-64
SLIDE 64

Chernoff Bounds in Action:

Load Balancing

“m balls are thrown into n bins uniformly and independently at random” Question: maximum number of balls in a bin?

Xi: load of bin i Yij: i.r.v. taking value 1 iff ball j lands in bin i For 𝑛 = 𝑜, 𝜈 = 1 implies when 𝑢 ≥

𝑓 ln 𝑜 ln ln 𝑜 and 𝑜 sufficiently large

when 𝑛 = Θ(𝑜) max load is 𝑃

log 𝑜 log log 𝑜 w.h.p.

slide-65
SLIDE 65

Chernoff Bounds in Action:

Load Balancing

For 𝑛 ≥ 𝑜 ln 𝑜, 𝜈 ≥ ln 𝑜

“m balls are thrown into n bins uniformly and independently at random” Question: maximum number of balls in a bin?

slide-66
SLIDE 66

Chernoff Bounds in Action:

Load Balancing

For 𝑛 ≥ 𝑜 ln 𝑜, 𝜈 ≥ ln 𝑜

“m balls are thrown into n bins uniformly and independently at random” Question: maximum number of balls in a bin?

slide-67
SLIDE 67

Chernoff Bounds in Action:

Load Balancing

For 𝑛 ≥ 𝑜 ln 𝑜, 𝜈 ≥ ln 𝑜

“m balls are thrown into n bins uniformly and independently at random” Question: maximum number of balls in a bin?

slide-68
SLIDE 68

Chernoff Bounds in Action:

Load Balancing

For 𝑛 ≥ 𝑜 ln 𝑜, 𝜈 ≥ ln 𝑜

“m balls are thrown into n bins uniformly and independently at random” Question: maximum number of balls in a bin?

slide-69
SLIDE 69

Chernoff Bounds in Action:

Load Balancing

For 𝑛 ≥ 𝑜 ln 𝑜, 𝜈 ≥ ln 𝑜 when 𝑛 = Ω(𝑜 log 𝑜) max load is 𝑃

𝑛 𝑜

w.h.p.

“m balls are thrown into n bins uniformly and independently at random” Question: maximum number of balls in a bin?

slide-70
SLIDE 70

Chernoff Bounds in Action:

Load Balancing

For 𝑛 ≥ 𝑜 ln 𝑜, 𝜈 ≥ ln 𝑜 when 𝑛 = Ω(𝑜 log 𝑜) max load is 𝑃

𝑛 𝑜

w.h.p.

“m balls are thrown into n bins uniformly and independently at random” Question: maximum number of balls in a bin?

slide-71
SLIDE 71

Chernoff Bounds in Action:

Load Balancing

For 𝑛 ≥ 𝑜 ln 𝑜, 𝜈 ≥ ln 𝑜 when 𝑛 = Ω(𝑜 log 𝑜) max load is 𝑃

𝑛 𝑜

w.h.p. when 𝑛 = Ω(𝑜 log 𝑜) min load is Ω

𝑛 𝑜

w.h.p.

“m balls are thrown into n bins uniformly and independently at random” Question: maximum number of balls in a bin?

slide-72
SLIDE 72

Load Balancing

“m balls are thrown into n bins uniformly and independently at random” Question: maximum number of balls in a bin?

slide-73
SLIDE 73

Load Balancing

“m balls are thrown into n bins uniformly and independently at random” Question: maximum number of balls in a bin?

slide-74
SLIDE 74

Chernoff Bounds

slide-75
SLIDE 75

Generalization of Markov’s Inequality

slide-76
SLIDE 76

Moment Generating Functions

slide-77
SLIDE 77

Moment Generating Functions

by Taylor’s expansion:

slide-78
SLIDE 78
slide-79
SLIDE 79

𝜇 > 0, and generalized Markov’s inequality

slide-80
SLIDE 80

𝜇 > 0, and generalized Markov’s inequality

slide-81
SLIDE 81

𝜇 > 0, and generalized Markov’s inequality independence of Xi not linearity of expectation

slide-82
SLIDE 82

𝜇 > 0, and generalized Markov’s inequality independence of Xi not linearity of expectation

slide-83
SLIDE 83

𝜇 > 0, and generalized Markov’s inequality independence of Xi not linearity of expectation

slide-84
SLIDE 84

𝜇 > 0, and generalized Markov’s inequality independence of Xi not linearity of expectation

slide-85
SLIDE 85

𝜇 > 0, and generalized Markov’s inequality independence of Xi not linearity of expectation 1 + 𝑧 ≤ 𝑓𝑧

slide-86
SLIDE 86

𝜇 > 0, and generalized Markov’s inequality independence of Xi not linearity of expectation 1 + 𝑧 ≤ 𝑓𝑧

slide-87
SLIDE 87

𝜇 > 0, and generalized Markov’s inequality independence of Xi not linearity of expectation 1 + 𝑧 ≤ 𝑓𝑧

slide-88
SLIDE 88

𝜇 > 0, and generalized Markov’s inequality independence of Xi not linearity of expectation 1 + 𝑧 ≤ 𝑓𝑧 minimized when 𝜇 = ln(1 + 𝜀)

slide-89
SLIDE 89

𝜇 > 0, and generalized Markov’s inequality independence of Xi not linearity of expectation 1 + 𝑧 ≤ 𝑓𝑧 minimized when 𝜇 = ln(1 + 𝜀)

(a) apply Markov’s inequality to moment generating function

slide-90
SLIDE 90

𝜇 > 0, and generalized Markov’s inequality independence of Xi not linearity of expectation 1 + 𝑧 ≤ 𝑓𝑧 minimized when 𝜇 = ln(1 + 𝜀)

(a) apply Markov’s inequality to moment generating function (b) bound the value of the moment generating function

slide-91
SLIDE 91

𝜇 > 0, and generalized Markov’s inequality independence of Xi not linearity of expectation 1 + 𝑧 ≤ 𝑓𝑧 minimized when 𝜇 = ln(1 + 𝜀)

(a) apply Markov’s inequality to moment generating function (b) bound the value of the moment generating function (c) optimize the bound of the moment generating function

slide-92
SLIDE 92

Chernoff Bounds

???

slide-93
SLIDE 93

Chernoff Bounds

???

slide-94
SLIDE 94

Hoeffding’s Inequality

slide-95
SLIDE 95

(Convenient) Hoeffding’s Inequality

slide-96
SLIDE 96

Hoeffding’s Lemma

slide-97
SLIDE 97
slide-98
SLIDE 98
slide-99
SLIDE 99
slide-100
SLIDE 100

𝜇 > 0, and generalized Markov’s inequality

slide-101
SLIDE 101

𝜇 > 0, and generalized Markov’s inequality independence of Yi

slide-102
SLIDE 102

𝜇 > 0, and generalized Markov’s inequality independence of Yi Hoeffding’s lemma

slide-103
SLIDE 103

𝜇 > 0, and generalized Markov’s inequality independence of Yi Hoeffding’s lemma

slide-104
SLIDE 104

𝜇 > 0, and generalized Markov’s inequality independence of Yi Hoeffding’s lemma minimized when 𝜇 =

4𝑢 σ𝑗=1

𝑜

𝑐𝑗−𝑏𝑗 2

slide-105
SLIDE 105

Hoeffding’s Inequality

???

slide-106
SLIDE 106

Hoeffding’s Inequality

???

slide-107
SLIDE 107

Hoeffding’s Inequality in Action:

Randomized Quicksort

1 7 2 3 B 5 9 C 4 8 A 6 B 9 C 8 A 1 2 3 4 5 6 1 2 4 5 6 9 8 B C 4 6 1 9 C

sort n distinct elements using QuickSort choose pivot uniformly at random in each recursive call of QuickSort

slide-108
SLIDE 108

Hoeffding’s Inequality in Action:

Randomized Quicksort

1 7 2 3 B 5 9 C 4 8 A 6 B 9 C 8 A 1 2 3 4 5 6 1 2 4 5 6 9 8 B C 4 6 1 9 C

sort n distinct elements using QuickSort choose pivot uniformly at random in each recursive call of QuickSort expected cost under adversarial input: Θ(𝑜 log 𝑜)

slide-109
SLIDE 109

Hoeffding’s Inequality in Action:

Randomized Quicksort

1 7 2 3 B 5 9 C 4 8 A 6 B 9 C 8 A 1 2 3 4 5 6 1 2 4 5 6 9 8 B C 4 6 1 9 C

sort n distinct elements using QuickSort choose pivot uniformly at random in each recursive call of QuickSort expected cost under adversarial input: Θ(𝑜 log 𝑜) worst case cost under any input: Θ(𝑜2)

slide-110
SLIDE 110

Hoeffding’s Inequality in Action:

Randomized Quicksort

1 7 2 3 B 5 9 C 4 8 A 6 B 9 C 8 A 1 2 3 4 5 6 1 2 4 5 6 9 8 B C 4 6 1 9 C

sort n distinct elements using QuickSort choose pivot uniformly at random in each recursive call of QuickSort expected cost under adversarial input: Θ(𝑜 log 𝑜) worst case cost under any input: Θ(𝑜2)

Question: probability that cost is 𝜕(𝑜 log 𝑜)?

slide-111
SLIDE 111

Hoeffding’s Inequality in Action:

Randomized Quicksort

1 7 2 3 B 5 9 C 4 8 A 6 B 9 C 8 A 1 2 3 4 5 6 1 2 4 5 6 9 8 B C 4 6 1 9 C

Question: probability that cost is 𝜕(𝑜 log 𝑜)? The cost will be at most 30𝑜 lg 𝑜 with high probability.

slide-112
SLIDE 112

Hoeffding’s Inequality in Action:

Randomized Quicksort

1 7 2 3 B 5 9 C 4 8 A 6 B 9 C 8 A 1 2 3 4 5 6 1 2 4 5 6 9 8 B C 4 6 1 9 C

Question: probability that cost is 𝜕(𝑜 log 𝑜)? The cost will be at most 30𝑜 lg 𝑜 with high probability.

slide-113
SLIDE 113

Hoeffding’s Inequality in Action:

Randomized Quicksort

1 7 2 3 B 5 9 C 4 8 A 6 B 9 C 8 A 1 2 3 4 5 6 1 2 4 5 6 9 8 B C 4 6 1 9 C

Question: probability that cost is 𝜕(𝑜 log 𝑜)? The cost will be at most 30𝑜 lg 𝑜 with high probability.

slide-114
SLIDE 114

Hoeffding’s Inequality in Action:

Randomized Quicksort

1 7 2 3 B 5 9 C 4 8 A 6 B 9 C 8 A 1 2 3 4 5 6 1 2 4 5 6 9 8 B C 4 6 1 9 C

Question: probability that cost is 𝜕(𝑜 log 𝑜)? The cost will be at most 30𝑜 lg 𝑜 with high probability.

slide-115
SLIDE 115

Hoeffding’s Inequality in Action:

Randomized Quicksort

1 7 2 3 B 5 9 C 4 8 A 6 B 9 C 8 A 1 2 3 4 5 6 1 2 4 5 6 9 8 B C 4 6 1 9 C

Question: probability that cost is 𝜕(𝑜 log 𝑜)? The cost will be at most 30𝑜 lg 𝑜 with high probability.

slide-116
SLIDE 116

Hoeffding’s Inequality in Action:

Randomized Quicksort

1 7 2 3 B 5 9 C 4 8 A 6 B 9 C 8 A 1 2 3 4 5 6 1 2 4 5 6 9 8 B C 4 6 1 9 C

Question: probability that cost is 𝜕(𝑜 log 𝑜)? The cost will be at most 30𝑜 lg 𝑜 with high probability.

slide-117
SLIDE 117

Hoeffding’s Inequality in Action:

Randomized Quicksort

1 7 2 3 B 5 9 C 4 8 A 6 B 9 C 8 A 1 2 3 4 5 6 1 2 4 5 6 9 8 B C 4 6 1 9 C

Question: probability that cost is 𝜕(𝑜 log 𝑜)? The cost will be at most 30𝑜 lg 𝑜 with high probability.

slide-118
SLIDE 118

Hoeffding’s Inequality in Action:

Randomized Quicksort

1 7 2 3 B 5 9 C 4 8 A 6 B 9 C 8 A 1 2 3 4 5 6 1 2 4 5 6 9 8 B C 4 6 1 9 C

Question: probability that cost is 𝜕(𝑜 log 𝑜)? The cost will be at most 30𝑜 lg 𝑜 with high probability.

???

slide-119
SLIDE 119

Hoeffding’s Inequality in Action:

Randomized Quicksort

1 7 2 3 B 5 9 C 4 8 A 6 B 9 C 8 A 1 2 3 4 5 6 1 2 4 5 6 9 8 B C 4 6 1 9 C

Question: probability that cost is 𝜕(𝑜 log 𝑜)? The cost will be at most 30𝑜 lg 𝑜 with high probability.

slide-120
SLIDE 120

Hoeffding’s Inequality in Action:

Randomized Quicksort

1 7 2 3 B 5 9 C 4 8 A 6 B 9 C 8 A 1 2 3 4 5 6 1 2 4 5 6 9 8 B C 4 6 1 9 C

Question: probability that cost is 𝜕(𝑜 log 𝑜)? The cost will be at most 30𝑜 lg 𝑜 with high probability.

slide-121
SLIDE 121

Hoeffding’s Inequality in Action:

Randomized Quicksort

1 7 2 3 B 5 9 C 4 8 A 6 B 9 C 8 A 1 2 3 4 5 6 1 2 4 5 6 9 8 B C 4 6 1 9 C

Question: probability that cost is 𝜕(𝑜 log 𝑜)? The cost will be at most 30𝑜 lg 𝑜 with high probability.

slide-122
SLIDE 122

Hoeffding’s Inequality in Action:

Randomized Quicksort

1 7 2 3 B 5 9 C 4 8 A 6 B 9 C 8 A 1 2 3 4 5 6 1 2 4 5 6 9 8 B C 4 6 1 9 C

Question: probability that cost is 𝜕(𝑜 log 𝑜)? The cost will be at most 30𝑜 lg 𝑜 with high probability.

slide-123
SLIDE 123

(Some) Concentration Inequalities

Question: probability that X deviates more than 𝜀 from expectation?

slide-124
SLIDE 124

(Some) Concentration Inequalities

Question: probability that X deviates more than 𝜀 from expectation?

slide-125
SLIDE 125

(More) Load Balancing

Question: maximum number of balls in a bin? “m balls are thrown into n bins uniformly and independently at random”

slide-126
SLIDE 126

200 Balls into 200 Bins

previous strategy new strategy

slide-127
SLIDE 127

Power of Two Choices

“m balls are thrown into n bins in the following manner: for each ball, choose two bins uniformly and independently at random, then place the ball in the less loaded bin”

slide-128
SLIDE 128

Power of Two Choices

Question: maximum number of balls in a bin? “m balls are thrown into n bins in the following manner: for each ball, choose two bins uniformly and independently at random, then place the ball in the less loaded bin”

slide-129
SLIDE 129

Power of Two Choices

Question: maximum number of balls in a bin? “m balls are thrown into n bins in the following manner: for each ball, choose two bins uniformly and independently at random, then place the ball in the less loaded bin” Ο

log 𝑜 log log 𝑜 versus Ο log log 𝑜 , exponential gap

slide-130
SLIDE 130

Power of Two Choices

“m balls are thrown into n bins in the following manner: for each ball, choose two bins uniformly and independently at random, then place the ball in the less loaded bin” the max loaded bin has Ο(log log 𝑜) balls, w.h.p.

slide-131
SLIDE 131

Power of Two Choices

“m balls are thrown into n bins in the following manner: for each ball, choose two bins uniformly and independently at random, then place the ball in the less loaded bin” the max loaded bin has Ο(log log 𝑜) balls, w.h.p.

slide-132
SLIDE 132

Power of Two Choices

“m balls are thrown into n bins in the following manner: for each ball, choose two bins uniformly and independently at random, then place the ball in the less loaded bin” the max loaded bin has Ο(log log 𝑜) balls, w.h.p.

slide-133
SLIDE 133

Power of Two Choices

“m balls are thrown into n bins in the following manner: for each ball, choose two bins uniformly and independently at random, then place the ball in the less loaded bin” the max loaded bin has Ο(log log 𝑜) balls, w.h.p.

slide-134
SLIDE 134

Power of Two Choices

“m balls are thrown into n bins in the following manner: for each ball, choose two bins uniformly and independently at random, then place the ball in the less loaded bin” the max loaded bin has Ο(log log 𝑜) balls, w.h.p.

slide-135
SLIDE 135

Power of Two Choices

“m balls are thrown into n bins in the following manner: for each ball, choose two bins uniformly and independently at random, then place the ball in the less loaded bin” the max loaded bin has Ο(log log 𝑜) balls, w.h.p.

slide-136
SLIDE 136

Power of Two Choices

“m balls are thrown into n bins in the following manner: for each ball, choose two bins uniformly and independently at random, then place the ball in the less loaded bin” the max loaded bin has Ο(log log 𝑜) balls, w.h.p.

slide-137
SLIDE 137

Power of Two Choices

“m balls are thrown into n bins in the following manner: for each ball, choose two bins uniformly and independently at random, then place the ball in the less loaded bin” the max loaded bin has Ο(log log 𝑜) balls, w.h.p.

slide-138
SLIDE 138

Power of Two Choices

“m balls are thrown into n bins in the following manner: for each ball, choose two bins uniformly and independently at random, then place the ball in the less loaded bin” the max loaded bin has Ο(log log 𝑜) balls, w.h.p.

slide-139
SLIDE 139

Power of Two Choices

“m balls are thrown into n bins in the following manner: for each ball, choose two bins uniformly and independently at random, then place the ball in the less loaded bin” the max loaded bin has Ο(log log 𝑜) balls, w.h.p.

slide-140
SLIDE 140

Power of Two Choices

“m balls are thrown into n bins in the following manner: for each ball, choose two bins uniformly and independently at random, then place the ball in the less loaded bin” the max loaded bin has Ο(log log 𝑜) balls, w.h.p.

slide-141
SLIDE 141

Power of 𝑒 Choices

“m balls are thrown into n bins in the following manner: for each ball, choose 𝑒 ≥ 2 bins uniformly and independently at random, then place the ball in the least loaded bin”

slide-142
SLIDE 142

Power of 𝑒 Choices

“m balls are thrown into n bins in the following manner: for each ball, choose 𝑒 ≥ 2 bins uniformly and independently at random, then place the ball in the least loaded bin” the max loaded bin has Ο(log(𝑒) 𝑜) balls, w.h.p.

slide-143
SLIDE 143

Power of 𝑒 Choices

“m balls are thrown into n bins in the following manner: for each ball, choose 𝑒 ≥ 2 bins uniformly and independently at random, then place the ball in the least loaded bin” the max loaded bin has Ο(log(𝑒) 𝑜) balls, w.h.p.

slide-144
SLIDE 144

Power of 𝑒 Choices

“m balls are thrown into n bins in the following manner: for each ball, choose 𝑒 ≥ 2 bins uniformly and independently at random, then place the ball in the least loaded bin” the max loaded bin has Ο(log(𝑒) 𝑜) balls, w.h.p. the max loaded bin has Ο

log log 𝑜 log 𝑒

balls, w.h.p.