We say C is a subset of D and write C ⊆ D, or D ⊇ C, if every element of C is an elment of D.
图:A ⊆ B & C ⊆ B
If, in addition, D contains an elements that is not in C, then C is called a proper subset of D, and this is denoted by C ⊂ D or D ⊃ C.
∀x [x ∈ C => x ∈ D ]
For a given universe μ, the sets C and D (taken from μ) are said to be equal, and we write C = D, when C ⊆ D and D ⊆ C.
Let A, B, C ⊆ μ
If A ⊆ B and B ⊆ C, then A ⊆ C
Let x ∈ A;
Since A ⊆ B and x ∈ A => x ∈ B
Then x ∈ B
Since B ⊆ C and x ∈ B => x ∈ C
Then x ∈ C
If A ⊂ B and B ⊂ C, then A ⊂ C
If A ⊆ B and B ⊂ C, then A ⊂ C
If A ⊂ B and B ⊆ C, then A ⊂ C
The null set, or empty set, is the (unique) set containing no elements. It is denoted by ∅ or {}
For any universe μ, let A ⊆ μ. Then ∅ ⊆ A, and if A ≠ ∅, thn ∅ ⊂ A.
If A is a set from universe μ, the power set of A, denoted , is the collection (or set) of all subsets of A.
图:幂集的构建
| | = 2^ | A | = 4, || = {∅} = {{}},
For any finite set A with |A| = n >= 0, we find that A has 2n subsets and that |p(A)| = 2n. For any 0 <= k <= n, there are C(n,k) subsets of size k. Counting the subsets of A according to the number, k, of elements in a subset, we have the combinatorial identity:
For any finite set A with |A| = n >= 0, we find that A has 2n subsets and that |P(a)| = 2n. For any 0 <= k <=n, there are (n/k) subsets of size k.
For each Gray code in parts of the figure, as we go from one binary string (in a column) to the next binary string (in that column). There is exactly one bit that changes.
This technique, for constructing a Gray code for the strings of length 2 from those of length 1 and the strings of length 3 from those of length 2, is an example of a recursive construction.(递归).
(a subset is a selection from a colletion, then do composite on that collection)
Correspondence(通信) between the compositions and the subsets
任意组合元素
任取出元素=子集
Composition
SubSet
1
1+1+1+1+1+1+1
∅
2
1+2+1+1+1+1
{2}
3
1+1+3+1+1
{3,4}
4
2+3+2
{1,3,4,6}
5
4+3
{1,2,3,5,6}
6
7
{1,2,3,4,5,6}
打通计数组合与子集之间的桥梁:
将7个苹果分成七份1+1+1+1+1+1+1={1,2,3,4,5,6,7}=A 。任意一个子集可以映射为某个组合 S = {x|x ∈ A 的子集},C = {x | x ∈ A 的组合},则 f(S) = C。其中,f(x) = 将x位置的元素组合到前一个位置的元素。
Pascal’s triangle :
a correspondence between the compositions of a number n and the subsets of the set {1,2,3,…,n}
(使用子集思想验证组合):we build a set A ={x, a1,a2,a3,…,an}
C(n+1, r) = all subsets of size r of A; C(n, r)= all subsets of size r of A without element x; C(n, r-1)= all subsets of size r-1(minus x) of A with elment x.
(使用子集思想验证组合):make C(n+1, r) be the paths in the xy-plane from (0, 0) to (n + 1 - r, r); C(n, r), C(n, r-1) are the two points before arrive the end point(n + 1 – r, r).
Closed operation:there are two operands, namely, a and b. Hence the operation is called binary. And since a+b ∈Z+ when a, b ∈Z+, we say that the binary operation of addition(on Z+) is closed.
The addition and multiplication of ositive integers are said to be closed binary operations on Z+
For A, B, ⊆ U we define the following:
A∪B (the union of A and B) = {x | x∈ A ∨ x ∈ B}.
A∩B (the intersection of A and B) = {x | x∈ A ∧ x ∈ B}.
A△B (the symmetric difference of A and B) = {x | (x∈ A ∨ x ∈ B) ∧ x ∉ A∩B}.
Consequently, ∪, ∩, △ are closed binary operations.
Let S, T ⊆ U. The sets S and T are called disjoint, or mutually disjoint, when S∩T = {}.
If S, T ⊆ U. then S and T are disjoint, if and only if S∪T = S△T.
For a set A⊆ U, the complement of A, denoted U-A, or , is given by {x | x ∈U ∧ x ∉ A}.
For A, B, ⊆ U, the (relative) complement of A in B, denoted B – A, is given by {x | x∈B∧x ∉ A }.
For any universe U and any set A, B ⊆ U, the following statement are equivalent: a) A ⊆ B b) A∪B=B c) A∩B=A d)
The Laws of Set Theory
= A
Law of Double Complement 两次补集
DeMorgan’s Laws 德摩根律
A ∪ B = B ∪ A
A ∩ B = B ∩ A
Commutative Law 交换律
A ∪ ( B ∪ C ) = ( A ∪ B ) ∪ C
A ∩ ( B ∩ C ) = ( A ∩ B ) ∩ C
Associative Laws 结合律
A ∪ ( B ∩ C ) = ( A ∪ B ) ∩ ( A ∪ C )
A ∩ ( B ∪ C ) = ( A ∩ B ) ∪ ( A ∩ C )
Distributive Laws 分配律
A ∪ A = A
A ∩ A = A
Idempotent Laws 等幂律
A ∪ ∅ = A
A ∩ U = A
Identity Laws 恒等律
Inverse Laws 反转律
A ∪ U = U
A ∩ ∅ = ∅
Domination Laws 控制律
A ∪ ( A ∩ B ) = A
A ∩ ( A ∪ B ) = A
Absorption Laws 合并律(合并无关因素)
公理都是成对存在的:
The dual of S, Sd , is obtained from s by replacing (1) each occurrence of {} and U by U and {}, respectively; and (2) each occurrence of ∩ and ∪ by ∪ and ∩, respectively.
Let s denote a theorem dealing with equality of two set expressions. The it’s dual of s, is also a theorem. It is only true in general not particular.
Then Venn: U is depicted as the interior of a rectangle, while subsets of U are represented by the interiors of circles and other closed cruves.
One more technique for establishing set equalities is the membership table.
Let I be a nonempty set and U a universe. For each i ∈I let AI ⊆U. then I is called an index set(or set of indices), and each i∈I is called an index.
If A and B are finite sets, then |A∪B| = |A| + |B| - |A∩B |. Consequently, finite sets A and B are(mutually) disjoint if and only if | A∪B | = |A| + |B|.
In addition, when U is finite, from DeMorgan’s Law we have
If A ,B and C are finite sets, then |A∪B∪C| = |A| + |B| + |C| - |A∩B | -|A∩C |- |B∩C | + |A∩B∩C |…..
集合基本运算的栗子:
The dual of the statement A ⊆ B is the statement B ⊆ A
For sets A, B, C ⊆ μ ,[(A ∩ C = B ∩ C) ∧ (A ∪ C = B ∪ C)] ⇒ A = B
A set of all possible outcomes for each situation is called a sample space. Each of the six possible outcomes ha22s the same, or equal, likelihood of occurrence.
Analytic Theory of Probability:
Under the assumption of equal likelihood, let φ(fai Phi) be the sample space for an experiment ξ(克西). Each subset A of φ, including the empty subset, is called an event. Each element of φ determines an outcome, so if |φ|=n and a∈φ, A⊆φ, then
Pr({a}) = The probability that {a} (or , a) occurs = |{a}|/φ = 1/n, and
Pr(A)=The probability that A occurs = |A|/|φ| = |A|/n.
Eg: about φ : to take care of the class rabbit, she may make her selection in C(20, 2) = 190 ways. So |φ| = 190.
For sets A, B, the Cartesian product, or cross product, of A and B is denoted by A X B and equals {(a, b) | a∈A, b∈B}.
The sample space can be represented pictorially with a tree diagram that exhibits all the possible outcomes of experiment ξ.
Each element a∈φ is called an outcome or elementary event, we let Pr({a}) = Pr(a) denote the probability that this outcome occurs.
Let φ be the sample space for an experiment ξ. If A, B are any events---that is, {}⊆A,B⊆φ (so we now allow the empty set to be an event), then
Pr(A) >=0
Pr(φ) = 1
If A, B are disjoint( or, mutually disjoint) then Pr(A∪B) = Pr(A) + Pr(B).
The Rule of Complement. Let φ be the sample space for an experiment ξ. If A is an event(that is , A⊆φ), then
Pr(A(___)) = 1 – Pr(A).
Independent of the outcome .Such two-outcome occurrence is called a Bernoulli trial. If there are n such trials and each trial has probability p of success and probability q (=1-p) of failure, then the probability that there are (exactly) k successes among these n trials is
C(n, k) pkqn-k, 0<=k<=n.
The Additive Rule: If φ is the sample space for an experiment ξ, and A, B⊆φ, then Pr(A∪B) = Pr(A∩B(___)) + P(B) = Pr(A) + Pr(B) – Pr(A∩B).
If φ is the sample space for an experiment ξ and A, B ⊆φ, then the conditional probability of B given A = Pr(B|A) = Pr(B∩A)/Pr(A), so long as Pr(A) <> 0.
Law of Total Probability. Pr(B) = Pr(A)Pr(B|A) + Pr(A(___))Pr(B|A(___))
Given a sample space φ with events A,B ⊆φ, we call A, B independent when Pr(A∩B) = Pr(A)Pr(B).
Decide when A, B are independent:
Pr(A∩B) = Pr(A)Pr(B)
Pr(A|B) = Pr(A) or
Pr(B|A) = Pr(B)
Let A, B be events taken from a sample space φ, If A, B are independent, then A,B(___) are independent; A(___), B are independent; and A(___), B(___) are independent.
For a sample space φ and events A, B, C ⊆φ, we say that A, B, C are independent if
Pr(A∩B) = Pr(A)Pr(B);
Pr(A∩C) = Pr(A)Pr(C);
Pr(B∩C) = Pr(B)Pr(C);
Pr(A∩B∩C) = Pr(A)Pr(B)Pr(C);
We define the random variable X as X(x1x2x3x4) counts the number of ? that appear among the four components x1,, x2, x3, x4.
E(x) = ∑x·Pr(X=x)(期望)
Among n Bernoulli trials.
E(x) = ∑x(x=0,n)·Pr(X=x) = ∑x(x=0,n) C(n,x)pxqn-x = np.