Combinatorics (Fall 2010)/Basic enumeration
Counting Problems
Functions and Tuples
Sets and Multisets
Subsets
We want to count the number of subsets of a set.
Let
We give a combinatorial proof that
The map
We know that
Since there is a bijection between
There are two elements of this proof:
- Find a 1-1 correspondence between subsets of an
-set and -bit vectors.
- An application of this in Computer Science is that we can use bit-array as a data structure for sets: any set defined over a universe
can be represented by an array of bits.
- The rule of bijection: if there is a 1-1 correspondence between two sets, then their cardinalities are the same.
Many counting problems are solved by establishing a bijection between the set to be counted and some easy-to-count set. This kind of proofs are usually called (non-rigorously) combinatorial proofs.
We give an alternative proof that
Lemma .
Proof. Fix an element
, let be the set of subsets of that contain and let be the set of subsets of that do not contain . It is obvious that and are disjoint (i.e. ) and , because any subset of either contains or does not contain but not both.We apply "the rule of sum": for any disjoint finite sets
and , the cardinality of the union .Therefore,
.
The next observation is that
, because is exactly the , and is the set resulting from add to every member of . Therefore, .
The elementary case
Subsets of fixed size
We then count the number of subsets of fixed size of a set. Again, let
We denote that
Theorem .
Proof. The number of ordered
-subsets of an -set is . Every -subset has ways to order it.
- Some notations
, read " factorial". A convention is that . is usually denoted as , read " lower factorial ".
Proposition .
Proof 1 (numerical proof).
.
Proof 2 (combinatorial proof).
- Choosing
elements from an -set is equivalent to choosing the elements to leave out. Formally, every -subset is uniquely specified by its complement , and the same holds for -subsets, thus we have a bijection between and .
- Choosing
Permutations and Partitions
The twelvfold way
Elements of |
Elements of |
Any |
Injective (1-1) |
Surjective (on-to) |
---|---|---|---|---|
distinguishable | distinguishable | |||
indistinguishable | distinguishable | |||
distinguishable | indistinguishable | |||
indistinguishable | indistinguishable |