<<

Requirements

1. Formally define the two sets claimed to have equal .

2. Formally define a from one to the other.

3. Prove that the function is bijective by proving that it is both injective and surjective.

4. Conclude that since a bijection between the 2 sets exists, their are equal.

Example

Prove that the of bit strings of length n is the same as the number of of the set of {1, 2, ..., n}. Proof: The set of bit strings of length n can be expressed as {0, 1}n. In this representation, each string becomes an n-, generically (a1, a2, ..., an) The set of subsets of the set A = {1, 2, ..., n} is just the of A, or P(A). In to prove that the number of bit strings of length n is equal to the number of subsets of A, we will construct a bijection between these 2 sets.

n Define the function f : {0, 1} → P(A) as f((a1, a2, ...an)) = {i|ai = 1} This function maps the string to the set of all positions of 1’s in the string. For example, for n = 5, the bit string 10011, represented by (1,0,0,1,1), would map to {1, 4, 5}. We now show that f is both injective and surjective, and therefore bijective. Injective: Suppose that two bit strings x and y both map to a single S ∈ P(A). Since S is defined by the positions of 1’s in the bit string, if f(x) = f(y) = S, x and y must have 1’s in exactly the same positions. But since bit strings only contain 0’s and 1’s, and x and y are the same length n, x and y must be identical. Therefore, since at most 1 bit string can map to a single subset, f is injective. Surjective: Consider a subset S ∈ P(A). S contains only integers between 1 and n, inclusive. Then we can construct an n-tuple x = (x1, x2, ..., xn) such that all for all i ∈ S, xi = 1, and all others are 0. By the definition of our function, we have constructed exactly the n-tuple x that will map to S. Thus, since all subsets S are mapped to by some n-tuple x representing a bit string of length n, f is surjective.

Since f is both injective and surjective, f is bijective. We have therefore created a bijection between the set of bit strings of length n and the subsets of the set of integers {1, 2, ..., n}, so these 2 sets have equal cardinality. QED

1