# FC08 Assignment 1

Back to CS 8803FC - Foundations of Cryptography. Spring 2008.

### Problem 1: Discrete Probability.

(1) Read the following notes on discrete probability due to Luca Trevisan ps notes

We assume that the range of all the random variables below is contained in the reals.

(2) Let <math> X,Y</math> be finite random variables. Prove that <math>E[X+Y]=E[X]+E[Y]</math>. (This equality can be generalized to <math>n</math> random variables.)

(3) Let <math> X,Y</math> be **independent** finite random variables. Prove that <math>E[XY]=E[X]E[Y]</math>.
(This equality can be generalized to <math>n</math> mutually independent random variables.)

(4) **Optional:** Let <math> X</math> be a finite random variable, and let <math>a,b</math> be reals.
Prove that <math>Var[aX+b]=a^2 Var[X]</math>.

(5) **Optional:** Let <math> X_1,...,X_n</math> be **pairwise independent** finite random variables (i.e, <math>X_i,X_j</math> are independent for every <math>i\neq j</math>).

Prove that <math>Var[X_1+...+X_n]=Var[X_1]+...+Var[X_n]</math>

(6) Give an example for two random variables <math>X,Y</math> such that <math>E[XY] \neq E[X]E[Y]</math>.

(7) Give an example for two random variables <math>X,Y</math> such that <math>Var[X+Y] \neq Var[X]+Var[Y]</math>.

(8) Let <math> E_1, E_2</math> be two events. Prove that <math>Pr[E_1\cup E_2]\leq Pr[E_1]+ Pr[E_2]</math>. (This inequality can be generalized to <math>n</math> events, and is known as the union bound.)

### Problem 2.

Prove that Shannon secrecy implies perfect secrecy. (The other direction was proved in class. The proof for both direction appears in the lecture notes, though I strongly encourage the students to try to write the proof on their known. You can check the notes for assistance; however, avoid mere copying.)

### Problem 3.

Let <math>f:\{0,1\}^*\rightarrow\{0,1\}</math> be a boolean function, let <math>p(\cdot)</math> be a polynomial, and let <math>A</math> be a probabilistic polynomial time algorithm such that for every <math>x\in\{0,1\}^*</math>,

- <math>Pr[A(x)=f(x)]\geq\frac12+\frac{1}{p(|x|)}</math>.

Prove that there exists a probabilistic polynomial time algorithm <math>A'</math> such that for every <math>x\in\{0,1\}^*</math>,

- <math>Pr[A'(x)=f(x)]\geq 1-2^{-|x|}</math>.

Hint: Use Chernoff's Inequality, given in the appendix of the lecture notes.

### Problem 4.

Prove that there exists a collection of OWFs if and only if there exists a single strong OWF. (The highlevel idea of the proof was given in class, and appears in the lecture notes. Here the students are required to formalize this highlevel idea, and in particular, prove that the construction given in class works.)

### Problem 5.

Prove that for any integer n>0, and for every integers a,b>0,

1. <math> (a~mod~n) + (b~mod~n) = (a+b)~mod~n </math>

2. <math> (a~mod~n) \times (b~mod~n) = (a\times b)~mod~n </math>