Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

02 - 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) }

Union symbol Read as “or”


Read as “an element of”
Union - 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, 3, 5, 8, 19, 20, 23, 12, 25, 34 37, 56}


Intersection
Let A and B be non-empty sets.

The intersection of the sets A and B, denoted by A Ç B, is the set containing


those elements in both A and B.

A Ç B = { x | (x Î A) Ù (x Î B) }

intersection Read as “and”


symbol Read as “an element of”
Intersection - 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 = {3, 8, 23}
Difference
Let A and B be non-empty sets.

The difference of A and B, denoted by A – B, is the set containing those


elements that are in A but not in B. The difference of A and B is also called the
complement of B with respect to A.

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.

The complement of the set A, denoted by A’ or Ac, is the complement of A


with respect to U. In other words, the complement of set A is U – A.

A’ = { x | x Ï A}

Read as “complement of set A” Read as “not an element of”


Complement - Example
If we let D = { ‘a’, ‘e’, ‘i’, ’o’, ‘u’}, what is D’?

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.

The Cartesian product of A and B, denoted by A X B, is the set of all ordered


pairs (a,b) where a Î A and b Î B. Thus,

A X B = { (a,b) | (a Î A) ^ (b Î B)}

Read as “the cartesian product of A and B” or “A x B”


Cartesian Product
Can we say that A x B = B x A?

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.

The symmetric difference of sets A and B, denoted by A Å B, is the set


containing elements of the union of (A – B) and (B – A).

A Å B = { x | x Î [(A – B) È (B – A)] }

Read as “the symmetric difference of A and B”


Symmetric 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 }
Compute for A - B
A Å B = { x | x Î [(A – B) È (B – A)] }

A – B = {2, 5, 19, 20} Compute for B - A


B – A = {12, 25, 34, 37, 56}
Compute for the union of
(A – B) and (B – A) to get
A Å B = {2, 5, 19, 20, 12, 5, 34, 37, 56} the symmetric difference
difference
Set Identities
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}


Exercise # 1
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 intersection
between B and C

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’

C’ = {0, 1, 2, 3, 11, 12, 13, 14, 15}


Compute for (A– B) – 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) ]

(A – B) Å (D – (A Ç B)) = {1, 3, 5, 7, 9, 11, 12, 13, 14, 15}


Questions?
You can find me at sheryl.satorre@uc.edu.ph

You might also like