Professional Documents
Culture Documents
02 Lesson+2+Set+Operations
02 Lesson+2+Set+Operations
CC-DISCRET21
Operations:
1. Union
2. Intersection
3. Difference
4. Complement
5. Cartesian Product
6. Symmetric Difference
Union
Let A and B be non-empty sets.
The union of the sets A and B, denoted by A È B, is the set that contains
those elements that either in A or in B, or in both sets.
A È B = { x | (x Î A) Ú (x Î B) }
A = { 2, 3, 5, 8, 19, 20, 23 }
B = { 8, 12, 25, 34, 23, 3, 37, 56 }
A È B = { x | (x Î A) Ú (x Î B) }
A Ç B = { x | (x Î A) Ù (x Î B) }
A = { 2, 3, 5, 8, 19, 20, 23 }
B = { 8, 12, 25, 34, 23, 3, 37, 56 }
A Ç B = { x | (x Î A) Ù (x Î B) }
A Ç B = {3, 8, 23}
Difference
Let A and B be non-empty sets.
A – B = { x | (x Î A) Ù (x Ï B) }
Read as ”A minus
Read as “and”
B” or the difference Read as “not an element of”
between A and B
Difference
Can we say that A – B = B – A?
No. 𝑨 − 𝑩 ≠ 𝑩 − 𝑨
Why?
Order matters in the difference between two sets.
Therefore,
A – B = { x | (x Î A) Ù (x Ï B) }
B – A = { x | (x Ï A) Ù (x Î B) }
Difference - Example
Let A and B be non-empty sets, such that A & B are subsets of U = N.
A = { 2, 3, 5, 8, 19, 20, 23 }
B = { 8, 12, 25, 34, 23, 3, 37, 56 }
A – B = { x | (x Î A) Ù (x Ï B) }
A – B = {2, 5, 19, 20}
B – A = { x | (x Ï A) Ù (x Î B) }
B – A = {12, 25, 34, 37, 56}
Complement
Let U be the universal set.
A’ = { x | x Ï A}
D’ = U – D
D’ = {‘b’, ‘c’, ‘d’, ‘f’, ‘g’, ‘h’, ‘j’, ‘k’, ’l’, ‘m’, ‘n’, ‘p’, ‘q’, ‘r’, ‘s’, ‘t’, ‘v’, ‘w’, ‘x’, ‘y’, ‘z’}
Cartesian Product
Let A and B be sets.
A X B = { (a,b) | (a Î A) ^ (b Î B)}
No. 𝑨 𝒙 𝑩 ≠ 𝑩 𝒙 𝑨
Why?
The elements in a cartesian product are ordered pairs.
Therefore,
A X B = { (a,b) | (a Î A) ^ (b Î B)}
B X A= { (b,a) | (b Î B) ^ (a Î A)}
Cartesian Product - Example
Let A and B be non-empty sets, such that A & B are subsets of U = N.
A = { 18, 24, 57, 9}
B = {28, 5, 34, 18, 29}
A X B = { (a,b) | (a Î A) ^ (b Î B)}
A X B = {(18, 28), (18, 5), (18, 34), (18, 18), (18, 29), (24, 28), (24, 5),
(24, 34), (24, 18), (24, 29), (57, 28), (57, 5), (57, 34),
(57, 18), (57, 29), (9, 28), (9, 5), (9, 34), (9, 18), (9, 29)}
Cartesian Product - Example
Let A and B be non-empty sets, such that A & B are subsets of U = N.
A = { 18, 24, 57, 9}
B = {28, 5, 34, 18, 29}
B X A = { (b,a) | (b Î B) ^ (a Î A)}
B X A ={ (28, 18), (28, 24), (28, 57), (28, 9), (5, 18), (5, 24),
(5, 57), (5, 9), (34, 18), (34, 24), (34, 57), (34, 9),
(18, 18), (18, 24), (18, 57), (18, 9), (29, 18), (29, 24),
(29, 57), (29, 9) }
Symmetric Difference
Let A and B be non-empty sets.
A Å B = { x | x Î [(A – B) È (B – A)] }
A = { 2, 3, 5, 8, 19, 20, 23 }
B = { 8, 12, 25, 34, 23, 3, 37, 56 }
Compute for A - B
A Å B = { x | x Î [(A – B) È (B – A)] }
B Ç C = {4, 5, 6}
Compute the intersection
between A and (B Ç C)
A Ç (B Ç C) ={4, 6}
Exercise # 2
Let A = {0, 2, 4, 6, 8, 10}
B = {0, 1, 2, 3, 4, 5, 6}
C = {4, 5, 6, 7, 8, 9, 10}
Where: A, B, C Í D = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}
Find: (A È B) Ç C
Compute the union of A and B
(A È B) = {0, 2, 4, 6, 8, 10, 1, 3, 5}
Compute the intersection
(A È B) Ç C = {4, 5, 6, 8, 10} between (A È B) and C
Exercise # 3
Let A = {0, 2, 4, 6, 8, 10}
B = {0, 1, 2, 3, 4, 5, 6}
C = {4, 5, 6, 7, 8, 9, 10}
Where: A, B, C Í D = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}
Find: (A – B) – C’
Compute for A - B
A – B = {8, 10}
Compute for C’
(A – B) – C’ = {8, 10}
Exercise # 4
Let A = {0, 2, 4, 6, 8, 10}
B = {0, 1, 2, 3, 4, 5, 6}
C = {4, 5, 6, 7, 8, 9, 10}
Where: A, B, C Í D = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}
Find: (A – B) Å (D – (A Ç B))
Step 1: A – B = {8, 10}
Step 2: A Ç B= {0, 2, 4, 6}
Step 3: D – (A Ç B) = {1, 3, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15}
Step 4: (A – B) - (D – (A Ç B)) = { }
Step 5: (D – (A Ç B)) – (A – B) = {1, 3, 5, 7, 9, 11, 12, 13, 14, 15}
Remember: (A Å B ) = (A – B) È (B – A)
Thus:
(A – B) Å (D – (A Ç B)) = [(A – B) - (D – (A Ç B))] È [(D – (A Ç B)) – (A – B) ]