Derandomization via smaller sample space
One way to turn the above randomized algorithm into a deterministic one is to go over all and check whether . Since we know that such exists, our algorithm would always find one. But such an algorithm would take exponential time, since the sample space size is .
Our goal is to define a different sample space of polynomial size and show that the expected cut size in this new sample space is still at least . This will immediately imply a polynomial time algorithm.
Consider the probability space in Example 39 where we have and there are pairwise independent events that are balanced ( for all ). Now, each atomic event corresponds to a cut so that:
if and only if
Therefore, we can define the random variable in the same way (since depends on ). We have that as before. Now let us consider, for ,
The point is that, the event is exactly the event and is . Therefore, using the fact that they are (pairwise) independent,
Repeating the previous calculation, we have . This implies the same result, but now we are using a much smaller probability space (of size )! Therefore, the algorithm could go over all atomic events in the sample space and check if it corresponds to a cut of size at least .
In a way, the key message is that the analysis of expectation only relies on pairwise independence, instead of (full) independence. This allows us to obtain a deterministic algorithm instead of the randomized algorithm since the probability space is much smaller. Such an example illustrates another intimate connection between computation and probability: Probabilistic analysis that only relies on a limited degree of independence (in particular, -wise independence) can almost always be turned into an efficient algorithm.