这是台湾清华赵启超教授离散数学9A9B课程的笔记。
Enumeration 9A
Principles of Counting
加法原理和乘法原理
Addition Principle
If A and B are finite sets and A∩B=∅, that is A and B are disjoint, then ∣A∪B∣=∣A∣+∣B∣.
Multiplication Principle
If A and B are finite sets, then ∣A×B∣=∣A∣∣B∣.
Recall that A×B={(a,b):a∈A,b∈B}.
Ordered Selections with Repetition
The number of ordered selections, repetition allowed, of m things from a set of size n is nm
Example 1
∣A∣=m and ∣B∣=n. Let F donote the set of functions from A to B.
F=n⋅n⋅n⋅…n=nm
Example 2
∣S∣=n. Power set of S is P(S)=2⋅2⋅…2=2n
Ordered Selections without Repetition
The number of ordered selections, without repetition, of m things from a set of size n is n(n−1)(n−2)…(n−m+1)
Enumeration 9B
Example 3
∣A∣=m and ∣B∣=n
How many injective(one-to-one) functions from A to B are there?
Answer: n(n−1)(n−2)…(n−m+1)
Permutations
A permutation of a nonempty finite set A is a bijection from A to A.
(Frequently, we take A=Nn={1,2,…,n}).
Example 4
n=5 and α(1)=2,α(2)=4,α(3)=5,α(4)=1,α(5)=3,
that is
α=(1224354153)
α is a permutation.
Denote the set of all permutations of Nn by Sn
∣Sn∣=n(n−1)…1=n! (n! is read as n factorial)
n!=△n(n−1)! whenn>1
0!=△1
Example 5
Given 10 people p1,p2,…,p10.
- In how many ways can the people be lined up in a row?
Answer: 10!=3628800
- How may lineups are there if p2,p6,p9 want to stand together?
Answer: Let G={p2,p6,p9} of permutations in {p1,p3,p4,p5,p7,p8,p10,G} , G=3!
Total of desired permutations = 8!⋅3!=241920.
Unordered Selections with Repetition
In next Note