Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Republic of the Philippines

CAVITE STATE UNIVERSITY


Silang Campus
Biga I, Silang, Cavite
 046 513-5706  046 513-3965
✉ cvsusilang@cvsu.edu.ph

DEPARTMENT OF INFORMATION TECHNOLGY

COSC 50- Discrete Structure

Module 4- Week 5
Set Operations and Venn Diagram
Overview
This module discusses the underlying reasons for the importance of set operations and
venn diagram and computation of cardinality
The module includes exercises that will allow you to reflect on previous understandings
of set operations and venn diagram and construct an informed appreciation of its
significance in the field information technology and computer science.

Objectives
After working on this module, you will be able to:
 Discuss the intersection, union and difference
-
Set Operations and Venn Diagram
Sets are treated as mathematical objects. Similarly, to numbers, we can perform
certain mathematical operations on sets. Below we consider the principal operations
involving the intersection, union, difference, and the complement of sets.

COSC 50 DISCRETE STRUCTURE – BSCS/BSIT P. MAGNO- FIRST SEMESTER AY2020-2021


To visualize set operations, we will use Venn diagrams. In a Venn diagram, a
rectangle shows the universal set, and all other sets are usually represented by circles
within the rectangle. The shaded region represents the result of the operation.

INTERSECTION OF SETS
The intersection of two sets A and B is the set of elements which are in both
sets A and B. The intersection of the two sets is written as A∩B.

Figure 1.

Examples:

1. A={a,b,c}, B={k,ℓ,m}. These two sets are disjoint as they have no common


elements. Their intersection is the empty set.
A∩B={a,b,c}∩{k,l,m}=∅.

2. C={1,2,3,4}, D={2,4,6,7}. The intersection of these sets is


C∩D={1,2,3,4}∩{2,4,6,7}={2,4}.

COSC 50 DISCRETE STRUCTURE – BSCS/BSIT P. MAGNO- FIRST SEMESTER AY2020-2021


UNION OF SETS
The union of two sets A and B is defined as the set of elements which are either
in set A or set B or in both A and B. This operation is denoted by the ∪ symbol.

Figure 2.
Examples:

1. A={a,b,c}, B={k,ℓ,m}. The union of the two sets is given by


A∪B={a,b,c}∪{k,l,m}={a,b,c,k,l,m}.
2. C={1,2,3,4}, D={2,4,6,7}. The union of the sets is given by
C∪D={1,2,3,4}∪{2,4,6,7}={1,2,3,4,6,7}.

DIFFERENCE OF TWO SETS


The difference of two sets A and B is the set that contains exactly all elements
in A but not in B. The difference of two sets A and B is denoted by A∖B or A−B.

COSC 50 DISCRETE STRUCTURE – BSCS/BSIT P. MAGNO- FIRST SEMESTER AY2020-2021


Figure 3.
Examples:

1. C={1,2,3,4}, D={2,4,6,7}. The difference of two sets C and D is given by


C∖D={1,2,3,4}−{2,4,6,7}={1,3}.

Summary
 ∪ is Union: is in either set or both sets
 ∩ is Intersection: only in both sets
 - is Difference: in one set but not the other

Activity 5
Answer the following questions showing your complete and comprehensive solution:
Given A={2,3,4,5,6,7} and B={0,1,5,6}. List the elements of the following sets:
1. 1. A∪B=
2. 2. A∩B
3. 3. A∖B
4. 4. B∖A

Supplementary Materials
Worksheet: Set operations and venn diagram

COSC 50 DISCRETE STRUCTURE – BSCS/BSIT P. MAGNO- FIRST SEMESTER AY2020-2021


https://www.math24.net/set-operations-venn-diagrams/#example1

COSC 50 DISCRETE STRUCTURE – BSCS/BSIT P. MAGNO- FIRST SEMESTER AY2020-2021

You might also like