# 高级算法 (Fall 2017)/Problem Set 1

每道题目的解答都要有完整的解题过程。中英文不限。

## Problem 1

Recall that in class we show by the probabilistic method how to deduce a upper bound on the number of distinct min-cuts in any multigraph with vertices from the lower bound for success probability of Karger's min-cut algorithm.

Also recall that the algorithm taught in class guarantees to return a min-cut with probability at least . Does this imply a much tighter upper bound on the number of distinct min-cuts in any multigraph with vertices? Prove your improved upper bound if your answer is "yes", and give a satisfactory explanation if your answer is "no".

## Problem 2

Two *rooted* trees and are said to be **isomorphic** if there exists a bijection that maps vertices of to those of satisfying the following condition: for each *internal* vertex of with children , the set of children of vertex in is precisely , no ordering among children assumed.

Give an efficient randomized algorithm with bounded one-sided error (false positive), for testing isomorphism between rooted trees with vertices. Analyze your algorithm.

## Problem 3

Suppose is an unsorted list of distinct numbers. We sample (with replacement) items uniformly at random from the list, and denote them as . Obviously .

Describe a strategy of choosing an from the sampled set such that is approximately . Here denotes the rank of in the original list : The rank of the largest number among is 1; the rank of the second largest number among is 2, and so on. Choose your as small as possible (in big-O notation) so that with probability at least , your strategy returns an such that .

## Problem 4

In Balls-and-Bins model, we throw balls independently and uniformly at random into bins. We know that the maximum load is with high probability when .
The two-choice paradigm is another way to throw balls into bins: each ball is thrown into the least loaded of two bins chosen independently and uniformly at random(it could be the case that the two chosen bins are exactly the same, and then the ball will be thrown into that bin), and breaks the tie arbitrarily. When , the maximum load of two-choice paradigm is known to be with high probability, which is exponentially less than the maxim load when there is only one random choice. This phenomenon is called * the power of two choices*.

Here are the questions:

- Consider the following paradigm: we throw balls into bins. The first balls are thrown into bins independently and uniformly at random. The remaining balls are thrown into bins using the two-choice paradigm. What is the maximum load with high probability? You need to give an asymptotically tight bound (in the form of ).

- Replace the above paradigm to the following: the first balls are thrown into bins using the two-choice paradigm while the remaining balls are thrown into bins independently and uniformly at random. What is the maximum load with high probability in this case? You need to give an asymptotically tight bound.

- Replace the above paradigm to the following: assume all balls are thrown in a sequence. For every , if is odd, we throw -th ball into bins independently and uniformly at random, otherwise, we throw it into bins using the two-choice paradigm. What is the maximum load with high probability in this case? You need to give an asymptotically tight bound.

## Problem 5

Let be a real-valued random variable with finite and finite for all . We define the **log-moment-generating function** as

- ,

and its *dual function*:

- .

Assume that is NOT almost surely constant. Then due to the convexity of with respect to , the function is *strictly* convex over .

- Prove the following Chernoff bound:

- .

- In particular if is continuously differentiable, prove that the supreme in is achieved at the unique satisfying
- where denotes the derivative of with respect to .

**Normal random variables.**Let be a Gaussian random variable with mean and standard deviation . What are the and ? And give a tail inequality to upper bound the probability .

**Poisson random variables.**Let be a Poisson random variable with parameter , that is, for all . What are the and ? And give a tail inequality to upper bound the probability .

**Bernoulli random variables.**Let be a single Bernoulli trial with probability of success , that is, . Show that for any , we have where is a Bernoulli random variable with parameter and is the**Kullback-Leibler divergence**between and .

**Sum of independent random variables.**Let be the sum of independently and identically distributed random variables . Show that and . Also for binomial random variable , give an upper bound to the tail inequality in terms of KL-divergence.

- Give an upper bound to when every follows the geometric distribution with a probability of success.

## Problem 6

A **boolean code** is a mapping . Each is called a **message** and is called a **codeword**. The **code rate** of a code is . A boolean code is a **linear code** if it is a linear transformation, i.e. there is a matrix such that for any , where the additions and multiplications are defined over the finite field of order two, .

The **distance** between two codeword and , denoted by , is defined as the Hamming distance between them. Formally, . The distance of a code is the minimum distance between any two codewords. Formally, .

Usually we want to make both the code rate and the code distance as large as possible, because a larger rate means that the amount of actual message per transmitted bit is high, and a larger distance allows for more error correction and detection.

- Use the probabilistic method to prove that there exists a boolean code of code rate and distance . Try to optimize the constant in .
- Prove a similar result for linear boolean codes.

## Bonus problem

Let be a *centralized* random variable () with finite for . We have the following two kinds of tail inequalities.

- Chernoff bound:
- .
- -th moment bound:
- .

- Use the probabilistic method to show that for any , there exists a choice of such that the -th moment bound is
*strictly*stronger than the Chernoff bound. - Why would we still prefer the Chernoff bound to the seemingly stronger -th moment method?