Chapter 2 (_sets) 15 11 2022 Water Marked
Chapter 2 (_sets) 15 11 2022 Water Marked
1 Sets
• Definition 1: A set is an unordered collection of objects
A = {1,2 ,4 ,7}, B = {A, G, Y}, …
• Definition 2: The object in a set are also called the elements or members
• Definition 3:
Universal Sets:
N = {0,1,2,3 ...} the set of natural numbers
Z= {... , -2 , -1 , 0 , 1 ,2 , ...} the set of integers.
Z+ = {1, 2 ,3 ...} the set of positive integers
Q = {p/q , where pZ, qZ , q 0} set of rational numbers
R, the set of real numbers
• Definition 4: Two sets are equal if and only if they have the same distinct elements.
Ex: { 1,3,5} and { 5, 1,3} are equal .
{5,1,3} and {5,5,5,5,1,1,3,3} are equal
Ex: describe the above set of odd numbers less than 10 using set builder notation.
C. Venn diagram
Definition: universal set U is the set that contains all objects under consideration.
Ex1: describe the above set of odd numbers less than 10 using Venn Diagram. U: Z
O = {1, 3, 5, 7, 9}
U: Z
O 1 3
0 -1 10 100 11
5 7
9
U: English Letters
a e
V b d f
o u
i
❖ Subsets ( A B)
• The set A is a subset of the set B if and only if every element of A is also an element of B. ( A B)
• ( A B) is true, if and only if the quantification x( xA → xB) is true
❖ Proper subset (A B)
• The set A is a proper subset of the set B if and only if every element of A is also an element of B, but
A B. ( A B)
• ( A B) is true, if and only if the quantification x( (xA → xB) ˄ A B) is true
Ex: S= { , 1, 2, 3, 4, 5, {1} }
|S|=7
1S 6S {1} S {1} S
SS SS S S
{} S {1} S {{1}} S {1,2,3} S
{{1}} {{1}} {1,2,3} S
• Given a set S, the power set of S is the set of all subsets of the set S. the power set is denoted by P(S)
❖ Cartesian Products
• A B = { (a, b) | a A b B} it is the set of all ordered pair from A to B.
Ex: Let A = {1, 2} B= {a, b, c}
A B = { (1,a), (1,b) ,(1,c) , (2,a), (2,b) ,(2,c)}
B A = { (a,1), (a,2), (b,1), (b,2), (c,1), (c,2)}
• A B B A iff A ≠ B
• A=
• Relation from the set A to the set B is a subset from A B
• | A B | = |A| x |B|
2 Set Operations
1. Union (A B): { x| x A xB}
3. Difference ( A – B) : { x| x A xB}
4. Complement A : { x| xU x A }
Example:
A B = {1, 2, 3, 4, 5}
A B = {3}
A – B = {4, 5}
B – A = {1, 2}
__
A = { 1, 2, 6,7, 8, 9, 10}
__
B = { 4, 5, 6, 7, 8, 9, 10}
A Δ B = {1, 2, 4, 5}
Definitions:
b. | A B| = |A| + |B| - | A B|
Example:
A = {3, 4, 5} B={1, 2, 3} A B = { 1, 2, 3,4, 5} A B = {3}
|AB|=3+3–1=5
Sol:
U: 1 2 3 4 5 6 7 8 9 10
S: 1 3 5 7 9
1 0 1 0 1 0 1 0 1 0
A (A B) A Absorption
A (A B) A
A A Complement law
A A U
A (B C) A (B C)
(B C) A
(C B) A
B. Set builder notation
Ex: use set builder notation and logical equivalence to show that
AB AB
Sol:
A B { x| x A B}
{ x| (x A B)}
= { x| (x A xB)}
= { x| x A xB}
= { x| x A xB}
= { x| x (A B)} = (A B )
C. Membership table
Ex: prove that A (B C) (A B) (A C) for all sets A, B, and C
Any element x in the domain has 2 possibilities:
x the set → 1
x the set → 0
A B C BC A (B C) A B A C (A B) (A C)
0 0 0 0 0 0 0 0
0 0 1 1 0 0 0 0
0 1 0 1 0 0 0 0
0 1 1 1 0 0 0 0
1 0 0 0 0 0 0 0
1 0 1 1 1 0 1 1
1 1 0 1 1 1 0 1
1 1 1 1 1 1 1 1
D. Venn Diagrams
B (A C) (B A) (B C)