Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dan Boneh Introduction Discrete Probability (crash course) Online Cryptography Course Dan Boneh.

Similar presentations


Presentation on theme: "Dan Boneh Introduction Discrete Probability (crash course) Online Cryptography Course Dan Boneh."— Presentation transcript:

1 Dan Boneh Introduction Discrete Probability (crash course) Online Cryptography Course Dan Boneh

2 Dan Boneh U: finite set (e.g. U = {0,1} n ) Def: Probability distribution P over U is a function P: U [0,1] such that Σ P(x) = 1 Examples: 1.Uniform distribution: ∀ x ∈ U: P(x) = 1/|U| 2.Point distribution at x 0 :P(x 0 ) = 1, ∀ x≠x 0 : P(x) = 0 Distribution vector: ( P(000), P(001), P(010), …, P(111) ) X∈UX∈U

3 Dan Boneh Notation For a set A ⊆ U: Pr[A] = Σ P(x) ∈ [0,1] The set A is called an event Example: A = { all x in {0,1} n such that lsb 2 (x)=11 } for the uniform distribution on {0,1} n : Pr[A] = 1/4 x∈Ax∈A

4 Dan Boneh The union bound For events A 1 and A 2 Pr [ A 1 ∪ A 2 ] ≤ Pr[A 1 ] + Pr[A 2 ] Example: A 1 = { all x in {0,1} n s.t lsb 2 (x)=11 } ; A 2 = { all x in {0,1} n s.t. msb 2 (x)=11 } Pr [ lsb 2 (x)= 11 or msb 2 (x)= 11 ] = Pr [ A 1 ∪ A 2 ] ≤ ¼+¼ = ½ A 1 A2A2 A2A2

5 Dan Boneh Random Variables Def: a random variable X is a function X:UV Example: X: {0,1} n {0,1,…,n} ; X(y) = #1’s(y) Random variable X induces a distribution on V: Pr[ X=v ] := Pr [ X -1 (v) ] In the example, for v ∈ {0,1,…,n} : Pr[ X = v ] = (n choose v) / 2 n v X -1 (v)

6 Dan Boneh Randomized algorithms Deterministic algorithm: y A(x) Randomized algorithm y A( x ; r ) output is a random variable y A( x ) Example: A(x ; k) = E(k, x), y A( x ) A(x) x inputs outputs A(x) x R r Ω denotes uniform rand. var. over Ω R R

7 Dan Boneh Independence Def: events A and B are independent if Pr[ A and B ] = Pr[A] ∙ Pr[B] random variables X,Y : UV are independent if ∀ a,b ∈ V: Pr[ X=a and Y=b] = Pr[X=a] ∙ Pr[Y=b] Thm: A a rand. var. over {0,1} n, X an indep. uniform var. on {0,1} n Then Y := A ⊕ X is uniform var. on {0,1} n Proof: (for n=1) Pr[ Y=0 ] =


Download ppt "Dan Boneh Introduction Discrete Probability (crash course) Online Cryptography Course Dan Boneh."

Similar presentations


Ads by Google