Skip to main content

Sampling without replacement

Let us revisit Benjawan's example. Let us say that she wants to buy different types of chocolates for the four best performing students in this class. Now the number of possibilities should be 1098710\cdot 9 \cdot 8 \cdot 7 instead of 10410^4. In the second scenario, if Amelia knows that she would never repeat the digits in her PIN, then she would only need to try 1098710\cdot 9 \cdot 8 \cdot 7 possibilities. Such calculations follow from the following general theorem.

Theorem 24 (Sampling without replacement)

There are m(m1)(mn+1)=i=0n1(mi)m(m-1)\ldots (m-n+1) = \prod_{i=0}^{n-1}(m-i) one-to-one mappings f:NMf: N \rightarrow M where N=n|N|=n and M=m|M|=m provided that nmn \le m (otherwise there are no such mappings by pigeonhole's principle).

Proof:

We do induction on nn. When n=1n=1 (the base case), there are mm one-to-one mappings from NN to MM. Now, consider any nn. Recall that mnm \geq n, fix aNa \in N and choose the value f(a)Mf(a) \in M in one of mm possibilities. By the induction hypothesis, there are (m1)((m1)(n1)+1)=(m1)(mn+1)(m-1)\ldots ((m-1)-(n-1)+1) = (m-1)\ldots (m-n+1) possible mappings from N{a}N \setminus \{a\} to M{f(a)}M \setminus \{f(a)\}. Note that we can use the induction hypothesis since M{f(a)}=m1n1=N{a}|M \setminus \{f(a)\}| = m-1 \ge n-1 = |N \setminus \{a\}|. Altogether, this implies the formula.

Example 22

Let XX be an nn-element set. The number of ordered pairs (A,B):ABX(A,B): A \subseteq B \subseteq X is 3n3^n.

Proof:

The intuition is that there are three possibilities for each aXa \in X: (i) aA,aBa \in A, a \in B, (ii) aB,a∉Aa \in B, a \not\in A, and (iii) a∉A,a∉Ba \not \in A, a \not\in B. So when we go over all such possibilities, we get 3n3^n. To turn this intuition into a formal proof, we want to define a bijection ff between {(A,B):ABX}\{(A,B): A \subseteq B \subseteq X\} and {1,2,3}n\{1,2,3\}^n (as the latter has 3n3^n elements). Define f((A,B))=(x1,,xn)f((A,B)) = (x_1,\ldots, x_n) where xix_i indicates which one of the three cases above corresponds to the ii-th element of XX (for some fixed arbitrary order of XX). It is easy to verify that this is one-to-one and onto.