Week 10: Applications - Swarthmore College(B) a dense bipartite graph (C) a bipartite graph where...

13
The Probabilistic Method Joshua Brody CS49/Math59 Fall 2015 Week 10: Applications

Transcript of Week 10: Applications - Swarthmore College(B) a dense bipartite graph (C) a bipartite graph where...

Page 1: Week 10: Applications - Swarthmore College(B) a dense bipartite graph (C) a bipartite graph where any v ∈ L has d neighbors (D) a bipartite graph where any S ⊆ L has many neighbors

The Probabilistic Method

Joshua BrodyCS49/Math59

Fall 2015

Week 10: Applications

Page 2: Week 10: Applications - Swarthmore College(B) a dense bipartite graph (C) a bipartite graph where any v ∈ L has d neighbors (D) a bipartite graph where any S ⊆ L has many neighbors

Reading Quiz

(A) a sparse bipartite graph

(B) a dense bipartite graph

(C) a bipartite graph where any v ∈ L has d neighbors

(D) a bipartite graph where any S ⊆ L has many neighbors

(E) multiple answers correct

What is a magic graph G = (L ∪ R, E)?

Page 3: Week 10: Applications - Swarthmore College(B) a dense bipartite graph (C) a bipartite graph where any v ∈ L has d neighbors (D) a bipartite graph where any S ⊆ L has many neighbors

Reading Quiz

(A) a sparse bipartite graph

(B) a dense bipartite graph

(C) a bipartite graph where any v ∈ L has d neighbors

(D) a bipartite graph where any S ⊆ L has many neighbors

(E) multiple answers correct

What is a magic graph G = (L ∪ R, E)?

Page 4: Week 10: Applications - Swarthmore College(B) a dense bipartite graph (C) a bipartite graph where any v ∈ L has d neighbors (D) a bipartite graph where any S ⊆ L has many neighbors

Expander Graphs

•sparse graphs with high connectivity•d-regular: each vertex has d neighbors•graphs “look random”

ST

|E(S,T)| � (d/n)*|S|*|T|

Page 5: Week 10: Applications - Swarthmore College(B) a dense bipartite graph (C) a bipartite graph where any v ∈ L has d neighbors (D) a bipartite graph where any S ⊆ L has many neighbors

Why Expander Graphs?

Applications:• derandomization• coding theory• error de-amplification• cryptography• complexity theory

More on Expanders:• explicit constructions• random walks• spectral analysis

Page 6: Week 10: Applications - Swarthmore College(B) a dense bipartite graph (C) a bipartite graph where any v ∈ L has d neighbors (D) a bipartite graph where any S ⊆ L has many neighbors

Randomized Algorithms

Algorithm A(x):count = 0; if heads {count++;

} else {if rand(10)>5 {count += x;...

}...

Randomized Algorithm A:• input: x• random string r • output: YES, NO

One-sided error• YES input: must output YES• NO input: output NO w/prob

> 15/16

Goal: minimize runtime, space, amount of randomness, error, ...

Page 7: Week 10: Applications - Swarthmore College(B) a dense bipartite graph (C) a bipartite graph where any v ∈ L has d neighbors (D) a bipartite graph where any S ⊆ L has many neighbors

Clicker Question

(A) 1/3

(B) 1/4

(C) 1/10d

(D) 1/16

(E) none of the above

What is PrR[A(x,R) error]?

Page 8: Week 10: Applications - Swarthmore College(B) a dense bipartite graph (C) a bipartite graph where any v ∈ L has d neighbors (D) a bipartite graph where any S ⊆ L has many neighbors

Clicker Question

(A) 1/3

(B) 1/4

(C) 1/10d

(D) 1/16

(E) none of the above

What is PrR[A(x,R) error]?

Page 9: Week 10: Applications - Swarthmore College(B) a dense bipartite graph (C) a bipartite graph where any v ∈ L has d neighbors (D) a bipartite graph where any S ⊆ L has many neighbors

Clicker Question

(A) O(2d)

(B) O(d2)

(C) O(d)

(D) O(log d)

(E) none of the above

How many times should you repeat A(x,R) to achieve error < 1/d?

Page 10: Week 10: Applications - Swarthmore College(B) a dense bipartite graph (C) a bipartite graph where any v ∈ L has d neighbors (D) a bipartite graph where any S ⊆ L has many neighbors

Clicker Question

(A) O(2d)

(B) O(d2)

(C) O(d)

(D) O(log d)

(E) none of the above

How many times should you repeat A(x,R) to achieve error < 1/d?

Page 11: Week 10: Applications - Swarthmore College(B) a dense bipartite graph (C) a bipartite graph where any v ∈ L has d neighbors (D) a bipartite graph where any S ⊆ L has many neighbors

Clicker Question

(A) at most d

(B) at most n/2

(C) at most n/10d

(D) at most d/n

(E) none of the above

How many v ∈ L have all bad neighbors?

Page 12: Week 10: Applications - Swarthmore College(B) a dense bipartite graph (C) a bipartite graph where any v ∈ L has d neighbors (D) a bipartite graph where any S ⊆ L has many neighbors

Clicker Question

(A) at most d

(B) at most n/2

(C) at most n/10d

(D) at most d/n

(E) none of the above

How many v ∈ L have all bad neighbors?

Page 13: Week 10: Applications - Swarthmore College(B) a dense bipartite graph (C) a bipartite graph where any v ∈ L has d neighbors (D) a bipartite graph where any S ⊆ L has many neighbors

The Probabilistic Method