Professional Documents
Culture Documents
Lecture Chapter 3
Lecture Chapter 3
SET THEORY
Set
• Definition: Well-defined collection of distinct
objects
• Members or Elements: part of the collection
• Roster Method: Description of a set by listing the
elements, enclosed with braces.
– Examples:
• A= {a,e,i,o,u}
• P= {red, blue, yellow}
• B= { x :x is an integer, x > 0}
• Membership examples
– “a belongs to the set of A” is written as: a A
– “j does not belong to the set of A” is written as: j
Vowels
Example:
1. 3 є {1, 3, 5}
2. a {b, c, d, e}
3. { } {1, 2, 3}
4. { } є {1, { }, 3}
5. 3 { 1, {2, 3} }
Set of Cardinality
• Definition: The number of elements in a set or size of the
set.
• Denoted as |S| or sometimes n(S).
• Example:
a) |{a, b, c}| =3
b) |{{a, b}, c}|= 2
c) l {☺,} l = 2
Finite Sets
• Definition: A set that contains finite element.
• Example: G ={2, 3, 4, 5, 7}
Infinite Set
• Definition: A set that contains infinite element.
• Example: Z = {x: x є Z, Z are integers}={,-2,-1, 0,1,2,….}
Ways to describe members of a set.
Subset
• Notation: A ⊂B
• There are 2 types of subsets: i) proper subset ⊂
ii) improper subset ⊆
• Definition:
i) proper subset
❖ Every member of A is also a member of B but not equal to B.
ℰ
A
A⊂ B
Union of Set
• Definition: Combination of all elements in A and B into a
single set.
• Example:
X = {1,2,5} and Y = {5,6,7,9}, then
X ∪ Y = {1,2,5,6,7,9}
Intersection of Sets
• Definition: Set of elements containing both of the
elements in X and Y.
• Denoted as X∩Y.
• Example:
X={2,4,6,8} and Y={2, 3, 5}
Then X∩Y={2}
Disjoint Sets
• Two sets X and Y are said to be disjoint set if X∩Y=Ф
• Example:
If X = {1,2,3,4,} and Y = {6,7,8,9}
then X ∩ Y =
Complement of a Set
1. All set under consideration are subset of a large set
called universal set.
2. Given a universal set ℰ , the complement of A, written
as A’ or Ā , is the set of all elements under
consideration that are not in A ( ¬ A in chapter 1:
LOGIC).
Formally, let A be a subset of universal set ℰ . The
complement of A in ℰ is
A' = ℰ - A OR A' = {x : x є ℰ and x is not in A}.
3. For any set A , we have the following laws:
i. A'' = A ; double negation
ii. A ∩ A' = Ø.
iii. A υ A' = ℰ
Difference of a Set
Example:
Given ℰ={1, 2,….,9,10}, A={1,2,3,4,5} and B = {3,4,5,6,7}
i. B – A = {6, 7}
ii. A – B = { 1,2 }
Power Set
For example,
1. Consider A={0, 1}. The power set of A is {{}, {0},
{1}, {0, 1}}.
2. If given that B = {1,2,3,4} , then
Cartesian Product or Cross Product
A\B x y z
1 (1,x) (1,y) (1,z)
2 (2,x) (2,y) (2,z)
• When A and B are finite sets, the cardinality of their
product is |A×B| = |A| . |B|
Example:
1. If X = {a,b}, Y = {c,d}
X × Y = {(a,c), (a,d), (b,c), (b,d)}
Y × X = {(c,a), (d,a), (c,b), (d,b)}
Try:
Given A={moon, sun}
B={water, air, light}.
Find A x B and B x A.
Principle of Inclusion-Exclusion
1. Is an extension of |A∪B|=|A|+|B|-|A∩B|
2. The number of elements in the union of two
sets is the number of elements in the first
set plus the number of elements in the
second set minus the number of elements
in the set of intersection. E.g. A={1,2,3,4,5}
and B={2,4,6,8}, then;
Example 1
• A survey on subjects being taken by 250 students at a
certain college of cavite revealed the following
information:
Solution: