Post on 06-Apr-2018
8/2/2019 W1_Sets
1/21
Centre for Computer Technology
ICT114Mathematics for
Computing
Week 1
Introduction to Set Theory
8/2/2019 W1_Sets
2/21
March 20, 2012 Copyright Box Hill Institute
Objectives
Set, Set Notation
Subsets
Basic Set Operations Venn Diagrams
Some important sets
8/2/2019 W1_Sets
3/21
March 20, 2012 Copyright Box Hill Institute
A simple problem
In a survey of 100 college students, the following wasreported regarding the number of students takingdifferent course: Physics 50, Computers 40.Mathematics 30, Physics and Computers 22, Physics
and Mathematics 18, Mathematics and Computers15, Physics, Mathematics and Computers 10.
(1). How many students did not take any of Physics,
Mathematics, Computers?
(2). How many students opted for Computers but notMathematics ?
8/2/2019 W1_Sets
4/21
March 20, 2012 Copyright Box Hill Institute
Set : Introduction
A set is a well-defined list, collection or class of objects.
The objects could be anything : numbers, names,
people, cities. These objects are called the elements ormembers of the set.
Example 1: The numbers 1,3,5,7,9,11,13,
Example 2: The solutions of the equation x2 4x+3=0
Example 3: The list of IP addresses in a subnet
8/2/2019 W1_Sets
5/21
March 20, 2012 Copyright Box Hill Institute
Notation
Sets are usually denoted by capital letters
A, B, P, X, ..
The elements are usually represented bylowercase letters a, b, p, x, ..
There are two forms for presentation of a set :Tabular form , A = {1,3,5,7,9,11,}
Set builder form, A = {x | x is odd}
8/2/2019 W1_Sets
6/21
March 20, 2012 Copyright Box Hill Institute
If an object x is a member of set A,
we write xA, which is usually read as
x belongs to A; or x is in A
If an object x is not a member of set A,
we write x A.
Example : Let B={ y | y is a perfect square}
4 B, 9 B,
But, 12 B, 23 B
8/2/2019 W1_Sets
7/21
March 20, 2012 Copyright Box Hill Institute
Some more concepts
Set A and set B are said to be equalif both havethe same members, irrespective of the order.We write A = B
Example 1 : X={1,2,3,4} is equal to Y={4,2,3,1},so X = Y
Example 2 : R = {1,2,3,4,5} is equal to
S = {x | x is a positive integer less than 6}
A set which does not contain any element iscalled the null setand is denoted by . It isalso called voidor empty
8/2/2019 W1_Sets
8/21
March 20, 2012 Copyright Box Hill Institute
Subsets
If every element in a set A is also a member of aset B, then A is called a subsetof B
In other words,
if x A x B for all x,
then A is a subsetof B
It is written as AB or BA
A is called a proper subsetof B, if A B and Ais not equal to B.
8/2/2019 W1_Sets
9/21
March 20, 2012 Copyright Box Hill Institute
In any application of set theory, all the sets are
likely to be subsets of a fixed set. This set is calledthe universalset and is usually denoted by U
Example 1: In studies of rivers, the universal set consist of
all rivers in the world
If two sets have no common element, they are said to be
disjoint
Example 2 : X={1,3,5,7} and Y={2,4,6,8} are disjoint as there is notcommon element
Example 3 : R={1,2,3,4} and S={3,4,5,6} are notdisjoint as there are
two common elements
8/2/2019 W1_Sets
10/21
March 20, 2012 Copyright Box Hill Institute
Venn Diagram to represent sets
U is the universal set.
A and B are disjoint sets
R is a subset of S
UU
A
B
S
R
8/2/2019 W1_Sets
11/21
March 20, 2012 Copyright Box Hill Institute
Basic set operations
The unionof sets A and B is the set of allelements which belong to either A or B or both. Itis represented as A U B
The intersectionof sets A and B is the set ofelements which are common to both A and B. Itis represented as A B
Let A={1,2,3,4}, and B={3,4,5,6}then, A U B = {1,2,3,4,5,6},
and A B = {3,4}
8/2/2019 W1_Sets
12/21
March 20, 2012 Copyright Box Hill Institute
Venn Diagram
The rectangle represents Universal Set. The shadedarea is the union of two sets A and B i.e. A U B
A B
A U B
8/2/2019 W1_Sets
13/21
March 20, 2012 Copyright Box Hill Institute
Venn Diagram
The rectangle represents Universal Set. Two sets A and
B. The shaded area is their Intersection
8/2/2019 W1_Sets
14/21
March 20, 2012 Copyright Box Hill Institute
Some more set operations
The differenceof sets A and B is the set ofelements which belong to A but not to B. It
is denoted by A B and read as A minusB
The complementof a set A is the set ofelements which do not belong to A. This isthe difference of the universal set U and AIt is denoted as A/ or Ac
8/2/2019 W1_Sets
15/21
March 20, 2012Copyright Box Hill Institute
Some examples
Let R={a,b,c,d,e} and S={a,c,e,g,i}
R - S ={b,d}, S - R={g,i}
Let X={0,1,2,3,4,.} and Y={0,2,4,6,}XY = {1,3,5,.}, Y - X =
Let U ={all english alphabets},
V = {a,e,i,o,u},V/= {all consonants}
Note that V/ = U - V
8/2/2019 W1_Sets
16/21
March 20, 2012Copyright Box Hill Institute
A few more definitions
The symmetricdifference of two sets Aand B consists of the elements which are
either in A or in B but not in both. It isdenoted as A B
The cardinalityof a set is the number ofelements it contains. It is represented as#A
8/2/2019 W1_Sets
17/21
March 20, 2012Copyright Box Hill Institute
Some more examples
Suppose A={1,2,3,4,5} andB={4,5,6,7,8,9,10}
Then, A B = {1,2,3,6,7,8,9,10}
#A = 5, #B = 7, # A B = 8.
Note that # = 0, as it does not containany element.
8/2/2019 W1_Sets
18/21
March 20, 2012Copyright Box Hill Institute
Definitions again
Let A and B represent two sets. We havethe definitions in a compact manner
1. A U B ={ x | x A or x B or x both}
2. A B ={ x | x A and x B }
3. A B ={ x | x A and x B }
4. A/={ x | x A }
5. A B={ x | x A or x B but x both}
6. #A = Number of elements in set A
8/2/2019 W1_Sets
19/21
March 20, 2012Copyright Box Hill Institute
Some important sets
The set of natural numbers: N = {0,1,2,}
The set of integers: Z = {,2,1,0,1,2,}
The set of positive integers: Z+ = {1,2,3,}
The set of rational numbers Q ,Q = {a/b | a,b Z, b0}
The set of real numbers: R
8/2/2019 W1_Sets
20/21
March 20, 2012Copyright Box Hill Institute
Summary
A set is a well-defined list, collection orclass of objects.
There are two forms for presentation of aset : Tabular form and Set builder form.
If every element in a set A is also a
member of a set B, then A is called asubsetof B.
Venn diagrams are used to represent sets.
8/2/2019 W1_Sets
21/21
March 20, 2012Copyright Box Hill Institute
References
S Lipschutz : Theory and Problems ofSet Theory and Related Topics,
Schaum's Outline Series, McGraw Hill. http://mathworld.wolfram.com