Download Set Theory - stony brook cs

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Set Theory
1
Notations: ∈, {.. | ..}
Let S be a set (a collection of elements, with no duplicates)
—  a ∈ S means that a is an element of S
Example: 1 ∈ {1,2,3}, 3 ∈ {1,2,3}
—  a ∉ S means that a is not an element of S
Example: 4 ∉ {1,2,3}
—  A = {x ∈ S | P(x)} is the set of all elements x of S such that P(x)
2
Outline
—  Subsets
—  Venn Diagrams
—  Set Operations (Union, Intersection, …. )
—  Empty Set, Partitions, Power Set, Cartesian Product,
Cardinality.
—  Set Properties and Identities
—  Proofs of Set Properties.
—  Proofs involving Empty Sets
3
Subsets
—  Definition:
A ⊆ B ⇔ ∀x, if x ∈ A then x ∈ B
—  A ⊈ B ⇔ ∃x such that x ∈ A and x ∉ B
—  A is a proper subset of B (A⊂B) ⇔
(1) A⊆B AND
(2) there is at least one element in B that is not in A
Examples:
{1} ⊆ {1}
{1} ⊆ {1, {1}}
{1} ⊂ {1, 2}
{1} ⊂ {1, {1}}
4
Proving Subset
To prove that X ⊆ Y:
1.  Pick an element x.
2.  Assume, x is in X.
3.  Show that x is also in Y.
The above is called the “element argument”.
5
Subset Proof Example
A = {m ∈ Z|m = 6r + 12 for some r ∈ Z}
B = {n ∈ Z | n = 3s for some s ∈ Z}
Pick x.
Suppose x is in A.
We must show that x ∈ B.
6
Subset: Disproof Example
Prove B ⊈ A
A = {m ∈ Z|m = 6r + 12 for some r ∈ Z}
B = {n ∈ Z | n = 3s for some s ∈ Z}
We must find an element of B that is not an element of A.
Try 3.
7
Set Equality: Proof
A = B iff every element of A is in B and every element of B is in A.
Thus, A = B ⇔ A ⊆ B and B ⊆ A
Example:
A = {m ∈ Z | m = 2a for some integer a}
B = {n ∈ Z | n = 2b − 2 for some integer b}
8
Outline
—  Subsets
—  Venn Diagrams
—  Set Operations (Union, Intersection, …. )
—  Empty Set, Partitions, Power Set, Cartesian Product,
Cardinality.
—  Set Properties and Identities
—  Proofs of Set Properties.
—  Proofs involving Empty Sets
9
Venn Diagrams
— A ⊆ B
— A ⊈ B
10
Set of Integers, Rationals, Reals
—  Z, Q, and R denote the sets of integers, rational numbers,
and real numbers
—  Z ⊆ Q.
—  Z is a proper subset of Q
—  Q ⊆ R
—  Q is a proper subset of R
11
Operations on Sets
Let A and B be subsets of a universal set U.
1. The union of A and B: A ∪ B is the set of all elements that are in
at least one of A or B:
A ∪ B = {x ∈ U | x ∈ A or x ∈ B}
2. The intersection of A and B: A ∩ B is the set of all elements that
are common to both A and B.
A ∩ B = {x ∈ U | x ∈ A and x ∈ B}
3. The difference of B minus A (relative complement of A in B): B
−A (or B\A) is the set of all elements that are in B and not A.
B − A = {x ∈ U | x ∈ B and x ∉ A}
4. The complement of A: Ac is the set of all elements in U that are
not in A.
Ac = {x ∈ U | x ∉ A}
12
Example
Let U = {a, b, c, d, e, f, g}, A = {a, c, e, g}
and B = {d, e, f, g}.
A ∪ B = {a, c, d, e, f, g}
A ∩ B = {e, g}
B − A = {d, f }
Ac = {b, d, f }
13
Example: Sets of real numbers
—  Given real numbers a and b with a ≤ b:
—  (a, b) = {x ∈ R | a < x < b}
—  (a, b] = {x ∈ R | a < x ≤ b}
—  [a, b) = {x ∈ R | a ≤ x < b}
—  [a, b] = {x ∈ R | a ≤ x ≤ b}
—  The symbols ∞ and −∞ are used to indicate intervals that are
unbounded either on the right or on the left:
—  (a,∞)={x ∈ R | a < x}
—  [a,∞) ={x ∈ R | a ≤ x}
—  (−∞, b)={x ∈ R | x < b}
—  (−∞, b]={x ∈ R | x ≤ b}
14
Sets of real numbers
A = (−1, 0] = {x ∈ R|−1 < x ≤ 0}
B = [0, 1) = {x ∈ R| 0 ≤ x < 1}
A ∪ B = (−1, 1)
A ∩ B = {0}.
B = (0, 1)
Ac = (−∞, −1] ∪ (0, ∞)
15
Outline
—  Subsets
—  Venn Diagrams
—  Set Operations (Union, Intersection, …. )
—  Empty Set, Partitions, Power Set, Cartesian Product,
Cardinality.
—  Set Properties and Identities
—  Proofs of Set Properties.
—  Proofs involving Empty Sets
16
The Empty Set: ∅ or { }
∅ = {} a set that has no elements
Examples:
{1,2} ∩ {3,4}= ∅
{x ∈ R| 3 < x < 2} = ∅
17
Partitions of Sets
—  A and B are disjoint if they have no elements in common,
i.e., A ∩ B = ∅
—  Sets A1, A2, A3,... are mutually disjoint if all pairs of sets Ai,
Aj (i ≠ j) are disjoint, i.e.,
∀ i,j, if i ≠ j then Ai∩ Aj = ∅
—  A collection of non-empty sets{A1,A2, A3,...} is a partition
of a set A ó
1. A = Ai
2. A1,A2, A3,... are mutually disjoint
18
Partitions of Sets
Example 1
—  A = {1, 2, 3, 4, 5, 6}
A1 = {1, 2}, A2= {3, 4}, A3 = {5, 6}
Example 2
T1 = {n ∈ Z| n = 3k, for some integer k}
T2 = {n ∈ Z| n = 3k + 1, for some integer k}
T3 = {n ∈ Z| n = 3k + 2, for some integer k}
{T1,T2, T3}is a partition of Z
19
Power Set
Given a set A, the power set of A, P(A),
is the set of all subsets of A
Examples:
P({x, y}) = {∅, {x}, {y}, {x, y}}
P(∅) = {∅}
P({∅}) = {∅, {∅}}
20
Cartesian Product
—  An ordered n-tuple (x1,x2,...,xn) is an ordered list of elements
x1,x2,...,xn.
—  Equality: Two ordered n-tuples (x1,x2,...,xn) and (y1,y2,...,yn)
are equal if each of their corresponding elements are equal.
(x1,x2,...,xn)=(y1,y2,...,yn) ó x1=y1and x2=y2 and ... xn=yn
—  The cartesian product of A1,A2,...,An:
A1×A2×... ×An={(a1, a2,..., an) | a1∈A1, a2∈A2,..., an∈An}
Example: A={1,2}, B={3,4}
A×B ={(1,3), (1,4), (2,3), (2,4)}
21
Cartesian Product: Example
A = {x, y}, B = {1, 2, 3}, and C = {a, b}
A × B × C?
22
Cardinality of a set
— The cardinality of a set A: N(A) or|A| is a
measure of the "number of elements of the set"
— Example: |{2, 4, 6}| = 3
— For any sets A and B,
|A ∪ B| + |A ∩ B| = |A|+|B|
— If A and B are disjoint sets, then
|A ∪ B| = |A|+|B|
23
The Size of the Power Set
For all n ≥ 0, X has n elements à P(X) has 2n elements.
Proof (by mathematical induction):
24
Outline
—  Subsets
—  Venn Diagrams
—  Set Operations (Union, Intersection, …. )
—  Empty Set, Partitions, Power Set, Cartesian Product,
Cardinality.
—  Set Properties and Identities
—  Proofs of Set Properties.
—  Proofs involving Empty Sets
25
Set Properties
—  Inclusion of Intersection:
A ∩ B ⊆A
and A ∩ B ⊆ B
—  Inclusion in Union:
A ⊆ A ∪ B and B ⊆ A ∪ B
—  Transitive Property of Subsets:
A ⊆ B and B ⊆ C à A ⊆ C
—  x ∈ A ∪ B ⇔ x ∈ A or x ∈ B
—  x ∈ A ∩ B ⇔ x ∈ A and x ∈ B
—  x ∈ B − A ⇔ x ∈ B and x ∉ A
—  x ∈ Ac ⇔ x ∉ A
—  (x, y) ∈ A × B ⇔ x ∈ A and y ∈ B
26
Set Identities
—  Commutative Laws: A∪B = B∪A and A∩B = B∩A
—  Associative Laws: (A∪B)∪C=A∪(B∪C) and (A∩B)∩C=A∩(B∩C)
—  Distributive Laws: A∪(B∩C)=(A∪B)∩(A∪C),
— 
— 
— 
— 
— 
— 
— 
— 
— 
A∩(B∪C)=(A∩B)∪(A∩C)
Identity Laws: A∪∅ = A and A∩U = A
Complement Laws: A∪Ac = U and A∩Ac = ∅
Double Complement Law: (Ac)c = A
Idempotent Laws: A∪A = A and A∩A = A
Universal Bound Laws: A ∪ U = U and A∩∅ = ∅
De Morgan’s Laws: (A ∪ B)c = Ac∩Bc and (A∩B)c = Ac ∪ Bc
Absorption Laws: A ∪ (A ∩ B) = A and A ∩ (A ∪ B) = A
Complements of U and ∅: Uc = ∅ and ∅c = U
Set Difference Law: A − B = A ∩ Bc
27
28
Outline
—  Subsets
—  Venn Diagrams
—  Set Operations (Union, Intersection, …. )
—  Empty Set, Partitions, Power Set, Cartesian Product,
Cardinality.
—  Set Properties and Identities
—  Proofs of Set Properties.
—  Proofs involving Empty Sets
29
Proof of Inclusion Property
A ∩ B ⊆ A.
The statement to be proved is universal:
∀ sets A and B, A∩B ⊆ A
Proof: ?
30
Disproving a Set Property: Counterexample
Example: For all sets A,B, and C,
(A−B)∪(B−C)
=
A−C ?
31
Proof of a Set Identity
For all sets A, B, and C, A∪(B∩C)=(A∪B)∩(A∪C)
Proof?
32
Proof of De Morgan’s Law
For all sets A and B: (A∪B)c = Ac∩Bc
Proof?
33
Algebraic Proof of Set Identity – 1
Example:
For all sets A, B, and C,(A∪B)−C=(A−C)∪(B−C).
Algebraic proof:
(A ∪ B) − C = (A ∪ B) ∩ Cc by the set difference law
= Cc ∩ (A ∪ B)
by the commutative law for ∩
= (Cc ∩ A) ∪ (Cc ∩ B) by the distributive law
= (A ∩ Cc) ∪ (B ∩ Cc) by the commutative law for ∩
= (A − C) ∪ (B − C) by the set difference law.
34
Algebraic Proof of Set Identity – 2
Example: for all sets A and B, A − (A ∩ B) = A − B.
A − (A ∩ B) = A ∩ (A ∩ B)c by the set difference law
= A ∩ (Ac ∪ Bc) by De Morgan’s laws
= (A ∩ Ac) ∪ (A ∩ Bc) by the distributive law
= ∅∪(A ∩ Bc) by the complement law
= (A ∩ Bc) ∪ ∅ by the commutative law for ∪
= A ∩ Bc
by the identity law for ∪
=A − B
by the set difference law.
35
Outline
—  Subsets
—  Venn Diagrams
—  Set Operations (Union, Intersection, …. )
—  Empty Set, Partitions, Power Set, Cartesian Product,
Cardinality
—  Set Properties and Identities
—  Proofs of Set Properties
—  Proofs involving Empty Sets
36
Proofs involving Empty Sets
Prove:
1.  A set with no elements is a subset of every set.
2.  Uniqueness of the empty set.
Hint: Use contradiction.
37
Proving a set is empty
To prove X = ∅, use contradiction.
Example 1: For any set A, A ∩∅ = ∅.
Example 2: For all sets A, B, and C, if A ⊆ B and B ⊆
Cc, then A ∩ C = ∅.
38
Intersection and Union with a Subset
Prove:
For any sets A and B, if A ⊆ B, then A∩B=A and A∪B=B
Proof:
A∩B = A ó (1) A ∩ B ⊆ A and (2) A ⊆ A ∩ B
A∪B = B ó (3) A ∪ B ⊆ B and (4) B ⊆ A ∪ B
So, prove each of the above four properties.
39
Related documents