TITLE: Prove that cardinality of the symmetric difference of subsets less than 3
QUESTION [7 upvotes]: We given a set $B = \{0,1,2,3,4,5,6,7,8,9\}$.
Task is to prove, that amongst 100 arbitrary picked subsets of set B there are at least two subsets $S_x$ and $S_y$, such as $| S_x \Delta S_y | \le 2$
I started with determining possible cardinalities of the subsets.
Having that figured out I have realized that it isn't actually matter.
So I am out of my depth to find a right track to solve it.

REPLY [6 votes]: Each subset $S_x \subseteq \{0,1,\dots, 9\}$ can be mapped to a vector $\vec{x} \in \{0,1\}^{10}$ by defining $x_i = 0$ if $i \notin S_x$ and $x_i = 1$ otherwise, for $i = 0, \dots, 9$. In terms of such vectors, the condition $|S_x \Delta S_y| \leq 2$ then translates to a Hamming distance of at most $2$ between the vectors $\vec{x}$ and $\vec{y}$. So if $100$ subsets of $B$ exist with pairwise symmetric difference more than $2$, then there exist $100$ vectors in $\{0,1\}^{10}$ with pairwise Hamming distance of at least $3$. In other words: there then exists an error-correcting code of size $100$ in $\{0,1\}^{10}$ with minimum distance at least $3$. Or, if we let $A_q(n,d)$ denote the maximum number of $q$-ary code words of dimension $n$ with minimum distance $d$, this translates to 
$$A_2(10,3) \stackrel{?}{\geq} 100.$$
To prove that no such code exists, one can use various well-known bounds from coding theory. For instance, the Singleton bound tells you that 
$$A_q(n,d) \leq q^{n-d+1} \quad \Rightarrow \quad A_2(10,3) \leq 2^8 = 256.$$
Obviously, that doesn't help us prove $A_2(10,3) < 100$. A better bound is obtained via the Hamming bound:
$$A_q(n,d) \leq \frac{q^n}{\sum_{k=0}^{(d-1)/2} \binom{n}{k} (q - 1)^k} \quad \Rightarrow \quad A_2(10,3) \leq \frac{2^{10}}{1 + 10} < 94.$$
Since the upper bound on $A_2(10,3)$ is thus lower than $100$, it follows that no $100$ subsets of $B$ with pairwise symmetric difference at least $3$ can exist. Hence, given $100$ subsets, there must be two subsets with symmetric difference at most $2$.