Anda di halaman 1dari 21

Centre for Computer Technology

ICT114 Mathematics for Computing


Week 1

Introduction to Set Theory

Objectives
Set, Set Notation Subsets Basic Set Operations Venn Diagrams Some important sets

March 20, 2012

Copyright Box Hill Institute

A simple problem

In a survey of 100 college students, the following was reported regarding the number of students taking different course: Physics 50, Computers 40. Mathematics 30, Physics and Computers 22, Physics and Mathematics 18, Mathematics and Computers 15, 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 not Mathematics ?
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 or members 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

March 20, 2012

Copyright Box Hill Institute

Notation
Sets are usually denoted by capital letters A, B, P, X, .. The elements are usually represented by lowercase 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}
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
March 20, 2012

Copyright Box Hill Institute

Some more concepts


Set A and set B are said to be equal if both have the 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 is called the null set and is denoted by . It is also called void or empty
March 20, 2012

Copyright Box Hill Institute

Subsets
If every element in a set A is also a member of a set B, then A is called a subset of B In other words, if x A x B for all x, then A is a subset of B It is written as AB or BA A is called a proper subset of B, if A B and A is not equal to B.
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 called the universal set 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 not common element Example 3 : R={1,2,3,4} and S={3,4,5,6} are not disjoint as there are two common elements
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

U
A B

U
S R

March 20, 2012

Copyright Box Hill Institute

Basic set operations

The union of sets A and B is the set of all elements which belong to either A or B or both. It is represented as A U B The intersection of sets A and B is the set of elements which are common to both A and B. It is 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}
Copyright Box Hill Institute

March 20, 2012

Venn Diagram
The rectangle represents Universal Set. The shaded area is the union of two sets A and B i.e. A U B

A AUB
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

March 20, 2012

Copyright Box Hill Institute

Some more set operations


The difference of sets A and B is the set of elements which belong to A but not to B. It is denoted by A B and read as A minus B The complement of a set A is the set of elements which do not belong to A. This is the difference of the universal set U and A It is denoted as A/ or Ac

March 20, 2012

Copyright 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,} X Y = {1,3,5,.}, Y - X = Let U ={all english alphabets}, V = {a,e,i,o,u}, V/ = {all consonants} Note that V/ = U - V

March 20, 2012

Copyright Box Hill Institute

A few more definitions

The symmetric difference of two sets A and B consists of the elements which are either in A or in B but not in both. It is denoted as A B The cardinality of a set is the number of elements it contains. It is represented as #A
Copyright Box Hill Institute

March 20, 2012

Some more examples

Suppose A={1,2,3,4,5} and B={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 contain any element.


Copyright Box Hill Institute

March 20, 2012

Definitions again
Let A and B represent two sets. We have the 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
March 20, 2012

Copyright 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
March 20, 2012

Copyright Box Hill Institute

Summary
A set is a well-defined list, collection or class of objects. There are two forms for presentation of a set : 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 a subset of B. Venn diagrams are used to represent sets.

March 20, 2012

Copyright Box Hill Institute

References

S Lipschutz : Theory and Problems of Set Theory and Related Topics, Schaum's Outline Series, McGraw Hill. http://mathworld.wolfram.com

March 20, 2012

Copyright Box Hill Institute

Anda mungkin juga menyukai