3. Foundational Inequalities
The Inequalities
There are a number of different inequalities that are extremely useful in the study of randomized complexity classes. Three fundamental inequalities, however, really stand out for their ubiquity.
The first is so basic that it almost seems unnecessary to list it here. But it is called upon so often that it does deserve highlighting:
Union Bound. For any two events
and , More generally, for any finite or countable set of events
,
Proof. The first inequality follows from the identity
and the inequality
Both of these facts follow directly from the axioms of probability, and can be extended to taking the union of countably many events to obtain the second inequality.
Note that there are no conditions whatsoever on the events
The second main tool is Markov’s inequality.
Markov’s Inequality. For any non-negative random variable
and parameter ,
Proof. The expected value of
can be expressed as The conditional expectation
must be greater than since the expectation of a random variable is at least as large as its minimum value. And when is non-negative then always holds and so for the same reason. Therefore, Re-arranging the terms yields Markov’s inequality.
Markov’s inequality is also extremely useful because it only requires non-negativity of
So when
When we are considering the sum of independent random variables, another tool gives us much stronger concentration bounds. This tool has numerous variants and a few different names, including Hoeffding’s inequality and Chernoff bounds. Here is one standard variant of the inequality.
Hoeffding’s inequality. Let
be independent random variables that each take values in . Define and let denote the expected value of this sum. Then for any , and
Truncation
Let’s start to use our foundational inequalities to examine some basic questions in randomized complexity theory.
As a first step, let’s compare worst-case and average-case randomized complexity of Boolean functions.
We have already seen that there are randomized algorithms for which the worst-case cost of the algorithm is much larger than the average cost.
Can there be a similar separation for the complexity of functions?
In other words, does there exist a function
The answer, it turns out, is no for most natural models of computation. The only restriction on the result is that it applies only to models where at each step of algorithms in these models, we have a well-defined notion of the cost incurred by the algorithm so far. Let us call models of computation where this condition holds odometered.
Theorem. In any odometered model of computation, for every function
and all pairs of parameters ,
Proof. Let
be a randomized algorithm that has error at most and satisfies . Let be the randomized algorithm obtained by truncating whenever its cost exceeds : at any step where reaches this cost and has not yet halted, we abort the computation and guess the answer. By construction, has worst-case cost at most . It remains to show that it computes with error at most . Fix any input
. Let denote the event that aborts and guesses the value of . By the Union Bound, the probability that errs is at most And by Markov’s inequality, the probability that
aborts is
Success Amplification
With one-sided error, it’s easy to reduce error probability exponentially fast.
As an example, see the EQ function.
Theorem.
and .
Proof. Repeat the 1-sided error protocol
times. Output 1 if and only if all instances of the protocol output 1. This protocol still has 1-sided error: it can err only by incorrectly outputing 1 when . But since the protocols are independent, the probability that this occurs is .
This success amplification of algorithms with 1-sided error is also what is used in the analysis of Karger’s algorithm.
In that setting, the original error of
Theorem. For every
,
Proof. The probability of observing an error in each of the
instances of the algorithm is at most where we used the remarkably useful inequality
that holds for all .
What about the setting where algorithms have 2-sided error? We can obtain the same qualitative success amplification results, using Hoeffding’s inequality.
Theorem. For every
,
Proof. Let
be a randomized algorithm with error at most and cost . Consider the algorithm that runs independent instances of and outputs the majority answer, for some value of that we will fix later. Let be random variables where if the th instance of errs and otherwise. The variables are independent and all take values in the range . By linearity of expectation, the expected value of their sum is The algorithm
is wrong only if . By Hoeffding’s inequality, this occurs with probability When
, this error probability is at most .