Quantcast
Channel: Algorithm Soup
Viewing all articles
Browse latest Browse all 10

My favorite example of: the probabilistic method

$
0
0

The “probabilistic method” is the art of applying probabilistic thinking to non-probabilistic problems. Applications of the probabilistic method often feel like magic. Here is my favorite example:

Theorem (Erdös, 1965). Call a set {X} sum-free if for all {a, b \in X}, we have {a + b \not\in X}. For any finite set {S} of positive integers, there is a sum-free subset {X \subseteq S} of size {|X| > |S| / 3}.

This theorem seems to have nothing to do with probability. Yet Erdös’s proof relies on a short and beautiful probabilistic argument.

Proof. Erdös’s first insight is to treat the set {S} as living in {\mathbb{Z}_p} for some large prime number {p}, rather than living in {\mathbb{Z}}. Living in {\mathbb{Z}_p} only makes the theorem harder to prove, since any set {X} that is sum-free in {\mathbb{Z}_p} is also sum-free in {\mathbb{Z}}. But, as we shall see, {\mathbb{Z}_p} has several structural properties that Erdös beautifully exploits.

Let {p = 3k + 2} be a prime number satisfying {p > s} for all {s \in S}. (The fact that such a prime exists is actually nontrivial, and uses the fact that there are infinitely many primes congruent to {2} mod {3}.) We’ll be using {p} and {k} throughout the rest of the proof.

Erdös begins his construction by defining a large sum-free set in {\mathbb{Z}_p} which is not necessarily a subset of {S}:

\displaystyle \text{MIDDLE-THIRD} = \{k + 1, k + 2, \ldots, 2k + 1\}.

As the name suggests, MIDDLE-THIRD consists of what is roughly the middle third of {\mathbb{Z}_p}. One can easily confirm that MIDDLE-THIRD is sum-free in {\mathbb{Z}_p}.

Next, Erdös selects a random value {r \in \{1, 2, \ldots, p - 1\}}, and examines the set

\displaystyle X_r = S \cap (r \cdot \text{MIDDLE-THIRD}),

In words, {X_r} is the set of {s \in S} that can be written as {rx \pmod p} for some {x \in \text{MIDDLE-THIRD}}. If we could show that {X_r} is a sum-free set of size greater than {|S| / 3}, then the proof would be complete.

The good news is that {X_r} is always sum-free, no matter the value of {r}. This is because, if we have {a + b = c} for some {a, b, c \in X_r}, then we also have {a / r + b / r = c / r}, violating the sum-freeness of MIDDLE-THIRD. (Here we are implicitly exploiting a nontrivial property of {\mathbb{Z}_p} , namely that it supports division!)

The bad news is that {|X_r|} could potentially be too small. To prove the theorem, we need to show that there is some option for {r} that results in {|X_r| > |S| / 3}.

Rather than directly finding a value of {r} for which {|X_r| > |S| / 3}, Erdös instead proves a probabilistic statement: the expected value of {|X_r|} for a randomly chosen {r} satisfies {\mathbb{E}[|X_r|] > |S| / 3}. Of course, if {\mathop{\mathbb E}[|X_r|] > |S| / 3}, then there must exist some {r} for which {|X_r| > |S| / 3}. What’s neat is that we don’t actually construct {r}, we just prove it exists.

Our new challenge is to prove that {\mathbb{E}[|X_r|] > |S| / 3}. One way to think of {|X_r|} is as the number of {x \in \{k + 1, k + 2, \ldots, 2k + 1\}} for which {rx \in S}. Thus we can expand {\mathbb{E}[|X_r|]} as

\displaystyle \mathbb{E}[|X_r|] = \sum_{x = k + 1}^{2k + 1} \Pr[rx \in S].

This is where Erdös really exploits the structure of {\mathbb{Z}_p}. In {\mathbb{Z}_p} , every non-zero element {x} is an additive generator, meaning that the multiples {x, 2x, 3x, \ldots, (p - 1)x} of {x} are just the numbers {1, 2, \ldots, p - 1} in some order. The result is that {rx} is just a random element of {\{1, 2, \ldots, p - 1\}}, and thus

\displaystyle \mathbb{E}[|X_r|] = \sum_{x = k + 1}^{2k + 1} \frac{|S|}{p - 1}

\displaystyle = (k + 1) \frac{|S|}{p - 1}

\displaystyle > |S| / 3.

Putting the pieces together, we have shown that {\mathbb{E}[|X_r|] > |S| / 3}, which implies that there is some {r} for which {|X_r| > |S| / 3}. Since {X_r} is sum-free, this completes the proof of the theorem.

Magic!


Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles



Latest Images