Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.
-
Upload
christiana-harper -
Category
Documents
-
view
214 -
download
0
Transcript of Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.
![Page 1: Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.](https://reader034.fdocuments.us/reader034/viewer/2022051517/5697c0081a28abf838cc6eda/html5/thumbnails/1.jpg)
Basic Definitions of Set Theory
Lecture 23
Section 5.1
Wed, Mar 8, 2006
![Page 2: Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.](https://reader034.fdocuments.us/reader034/viewer/2022051517/5697c0081a28abf838cc6eda/html5/thumbnails/2.jpg)
The Universal Set
Whenever we use sets, there must be a universal set U which contains all elements under consideration.
Typical examples are U = R and U = N. Without a universal set, taking
complements of set is problematic.
![Page 3: Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.](https://reader034.fdocuments.us/reader034/viewer/2022051517/5697c0081a28abf838cc6eda/html5/thumbnails/3.jpg)
Set Operations
Let A and B be set. Define the intersection of A and B to be
A B = {x U | x A and x B}. Define the union of A and B to be
A B = {x U | x A or x B}. Define the complement of A to be
Ac = {x U | x A}.
![Page 4: Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.](https://reader034.fdocuments.us/reader034/viewer/2022051517/5697c0081a28abf838cc6eda/html5/thumbnails/4.jpg)
Set Operations
Notice that the set operations of intersection, union, and complement correspond to the boolean operations of and, or, and not.
![Page 5: Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.](https://reader034.fdocuments.us/reader034/viewer/2022051517/5697c0081a28abf838cc6eda/html5/thumbnails/5.jpg)
Set Differences
Define the difference A minus B to be
A – B = {x U | x A and x B}. Define the symmetric difference of A and B
to be
A B = (A – B) (B – A).
![Page 6: Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.](https://reader034.fdocuments.us/reader034/viewer/2022051517/5697c0081a28abf838cc6eda/html5/thumbnails/6.jpg)
Set Differences
Do the operations of difference and symmetric difference correspond to boolean operations?
![Page 7: Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.](https://reader034.fdocuments.us/reader034/viewer/2022051517/5697c0081a28abf838cc6eda/html5/thumbnails/7.jpg)
Subsets
A is a subset of B, written A B, if
x A, x B. A equals B, written A = B, if
x A, x B and x B, x A. A is a proper subset of B, written A B, if
x A, x B and x B, x A.
![Page 8: Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.](https://reader034.fdocuments.us/reader034/viewer/2022051517/5697c0081a28abf838cc6eda/html5/thumbnails/8.jpg)
Sets Defined by a Predicate
Let P(x) be a predicate. Define a set A = {x U | P(x)}. For any x U,
If P(x) is true, then x A.If P(x) is false, then x A.
A is the truth set of P(x).
![Page 9: Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.](https://reader034.fdocuments.us/reader034/viewer/2022051517/5697c0081a28abf838cc6eda/html5/thumbnails/9.jpg)
Sets Defined by a Predicate
Two special cases.What predicate defines the universal set?What predicate defines the empty set?
![Page 10: Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.](https://reader034.fdocuments.us/reader034/viewer/2022051517/5697c0081a28abf838cc6eda/html5/thumbnails/10.jpg)
Intersection and Union
Let P(x) and Q(x) be predicates and defineA = {x U | P(x)}.B = {x U | Q(x)}.
Then the intersection of A and B is
A B = {x U | P(x) Q(x)}. The union of A and B is
A B = {x U | P(x) Q(x)}.
![Page 11: Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.](https://reader034.fdocuments.us/reader034/viewer/2022051517/5697c0081a28abf838cc6eda/html5/thumbnails/11.jpg)
Complements and Differences
The complement of A is
Ac = {x U | P(x)}. The difference A minus B is
A – B = {x U | P(x) Q(x)}. The symmetric difference of A and B is
A B = {x U | P(x) Q(x)}.
![Page 12: Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.](https://reader034.fdocuments.us/reader034/viewer/2022051517/5697c0081a28abf838cc6eda/html5/thumbnails/12.jpg)
Subsets
A is a subset of B if x U, P(x) Q(x), orx A, Q(x).
A equals B if x U, P(x) Q(x), orx A, Q(x) and x B, P(x).
A is a proper subset of B if x A, Q(x) and x B, P(x).
![Page 13: Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.](https://reader034.fdocuments.us/reader034/viewer/2022051517/5697c0081a28abf838cc6eda/html5/thumbnails/13.jpg)
Disjoint Sets
Sets A and B are disjoint if A B = . A collection of sets A1, A2, …, An are
mutually disjoint, or pairwise disjoint, if Ai Aj = for all i and j, with i j.
![Page 14: Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.](https://reader034.fdocuments.us/reader034/viewer/2022051517/5697c0081a28abf838cc6eda/html5/thumbnails/14.jpg)
Examples
The following sets are mutually disjoint.{0}{1, 2, 3, …} = N+
{-1, -2, -3, …} = N-
The following sets are mutually disjoint.{…, -3, 0, 3, 6, 9, …} = {3k | k Z}{…, -2, 1, 4, 7, 10, …} = {3k + 1 | k Z}{…, -1, 2, 5, 8, 11, …} = {3k + 2 | k Z}
![Page 15: Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.](https://reader034.fdocuments.us/reader034/viewer/2022051517/5697c0081a28abf838cc6eda/html5/thumbnails/15.jpg)
Partitions
A collection of sets {A1, A2, …, An} is a partition of a set A ifA1, A2, …, An are mutually disjoint, and
A1 A2 … An = A.
![Page 16: Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.](https://reader034.fdocuments.us/reader034/viewer/2022051517/5697c0081a28abf838cc6eda/html5/thumbnails/16.jpg)
Examples
{{0}, {1, 2, 3, …}, {-1, -2, -3, …}} is a partition of Z.
{{…, -3, 0, 3, 6, …}, {…, -2, 1, 4, 7, …}, {…, -1, 2, 5, 11, …}} is a partition of Z.
![Page 17: Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.](https://reader034.fdocuments.us/reader034/viewer/2022051517/5697c0081a28abf838cc6eda/html5/thumbnails/17.jpg)
Example
For each positive integer n N, define f(n) to be the number of distinct prime divisors of n.
For example,f(1) = 0.f(2) = 1.f(4) = 1.f(6) = 2.
![Page 18: Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.](https://reader034.fdocuments.us/reader034/viewer/2022051517/5697c0081a28abf838cc6eda/html5/thumbnails/18.jpg)
Example
Define Ai = {n N | f(n) = i}.
Then A0, A1, A2, … is a partition of N (except that it is infinite).
Verify that Ai Aj = for all i, j, with i j.
A0 A1 A2 … = N.
![Page 19: Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.](https://reader034.fdocuments.us/reader034/viewer/2022051517/5697c0081a28abf838cc6eda/html5/thumbnails/19.jpg)
Power Sets
Let A be a set. The power set of A, denoted P(A), is the set of all subsets of A.
If A = {a, b, c}, then P(A) = {, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}.
What is P()? What is P(P())? If A contains n elements, how many elements are
in P(A)? Prove it.
![Page 20: Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.](https://reader034.fdocuments.us/reader034/viewer/2022051517/5697c0081a28abf838cc6eda/html5/thumbnails/20.jpg)
Cartesian Products
Let A and B be sets. Define the Cartesian product of A and B to be
A B = {(a, b) | a A and b B}. R R = set of points in the plane. R R R = set of points in space. What is A ? How many elements are in
{1, 2} {3, 4, 5} {6, 7, 8}?
![Page 21: Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.](https://reader034.fdocuments.us/reader034/viewer/2022051517/5697c0081a28abf838cc6eda/html5/thumbnails/21.jpg)
Representing Sets in Software
Given a universal set U of size n, there are 2n subsets of U.
Given an register of n bits, there are 2n possible values that can be stored.
This suggests a method of representing sets in memory.
![Page 22: Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.](https://reader034.fdocuments.us/reader034/viewer/2022051517/5697c0081a28abf838cc6eda/html5/thumbnails/22.jpg)
Representing Sets in Software
For simplicity, we will assume that |U| 32. Let U = {a0, a1, a2, …, an – 1}. Using a 32-bit integer to represent a set S,
let bit i represent the element ai.If i = 0, then ai S.If i = 1, then ai S.
For example, 10011101 represents the set S = {a0, a2, a3, a4, a7}.
![Page 23: Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.](https://reader034.fdocuments.us/reader034/viewer/2022051517/5697c0081a28abf838cc6eda/html5/thumbnails/23.jpg)
Example: SetDemo.cpp