CSC 205 Lecture Notes
CSC 205 Lecture Notes
CSC 205 Lecture Notes
DAYS – Wednesdays
VENUE: MP03/04
TIME: 11-1 PM
LECTURE TYPE – Theory
1 SETS
A “set” is a collection of objects. For example, the collection of four letters a, b, c and d is a set,
which is written as L = {a, b, c, d}
That is, the union of sets A and B, written A ∪ B, is a set that contains everything in A, or in B,
or in both.
A ∪ B = x {:x ∈ A or x ∈ B}
Example: A = {1, 3, 9} B = {3, 5}
Therefore, A ∪ B = {1 ,3 ,5, 9}
b) Intersection
The “intersection” of sets A and B, written A ∩ B, is a set that contains exactly those
elements that are in both A and B.
A ∩ B = x {: x ∈ A and x ∈ B}
Example: Given A = {1, 3, 9}, B = {3, 5}, C = {a, b, c}
A ∩ B = {3}
A ∩ C = {}
(c) Set Difference
The “set difference” of set A and set B, written as A–B, is the set that contains everything that is
in A but not in B.
A − B = x {: x ∈ A and x ∉ B}
Given A = {1 ,3, 9}, B = {3, 5}
A − B = {1, 9}
(d) Complement
The “complement” of set A, written as A is the set containing everything that is not in A.
Properties of set operations
Some of the properties of the set operations follow from their definitions. The following laws
hold for the three given sets A, B and C.
Idempotency
A∪A=A
A∩A=A
Commutativity
A∪B=B∪A
A∩B=B∩A