Nitin`s slides on sets, standard number sets, cardinality, special sets

advertisement
The Mathematics Driving License for
Computer Science- CS10410
Sets, Standard Number Sets, Cardinality and
Special Sets
Nitin Naik
Department of Computer Science
What is Set?
What is Set?..
• Set is a collection of similar (well defined) objects.
• These objects are called Elements or Members of
the set.
• Set Examples:
Sofa Set
Tea Set
Crockery Set
Pen Set
What is Set?..
• The most important thing about a set is being
in the set, or not in the set.
• If we consider the sofa set then any sofa is in
the set but any chair is not in the set.
• A set can be represented in different ways:
As a List of Elements
Graphically
Using a Membership Function/Condition
Set Representation
• Normally a set is represented by capital letters
like- A, B, C, X, Y, Z etc.
• Any set is determined by its elements, which
means that a set A is fully described by
describing all the elements of set A.
• Set elements can be listed in any order.
Set Representation..
•
Suppose the set name is A and its elements are2,3,4,5,6,7 then it is represented in the following
ways:
1. List of Elements:
A = {2,3,4,5,6,7}
2. Graphically:
3. Using Member Function:
A = {x| x is a whole number and 1< x < 8}
Set Representation..
• How to read membership function/condition:
A = {x| x is a whole number and 1< x <8}
(A is the set of all x such that (|) x is a whole
number and greater than 1 and less than 8.)
• The same elements are arranged in different
order but all represent the same set:
 {2,3,4,5,6,7}
 {3,4,2,5,6,7}
 {7,6,4,3,5,2}
 {5,3,4,2,6,7}
Set Example
• How to represent set of even number up to 8:
1. List of Elements: Suppose the set name is X then
X = {2,4,6,8}
2. Graphically:
3. Using Member Function:
X = {x| x is an even number and 1< x < 9} or
X = {x| x is an even number and 1< x ≤ 8}
Set Membership
• To tell about an element or not an element of
a set.
• Example: Let Fruit is a set and Tomato, Apple,
Orange, Pear and Banana are the members of
this Fruit set.
• Fruit = {Tomato, Apple, Orange, Pear, Banana}
Set Membership..
• Member of Fruit set (∈ - belongs to / in):
Apple ∈ Fruit (Apple belongs to Fruit Set)
Orange ∈ Fruit
Banana ∈ Fruit
• Not a member of Fruit set (∉ - does not belong to
/ not in):
Kiwi ∉ Fruit (Kiwi does not belong to Fruit Set)
Grapes ∉ Fruit
Mango ∉ Fruit
Set Membership Examples
• A = {x| x is a whole number and 1< x < 8} can
also be written as
A = {x| x ∈ N, 1< x < 8}
• X = {x| x is a natural number and 1< x < 9} can
also be written as
X = {x| x ∈ N, 1< x < 9}
• Here set N = {0,1,2,3,4,5,6,7,8,...}, is called the
Set of Natural / Whole Numbers.
Some Standard Number Sets
• The following type of standard number sets
which are commonly used in mathematics:
1. Set of Booleans (B)
2. Set of Natural / Whole Numbers (ℕ)
3. Set of Integers (ℤ)
4. Set of Rational Numbers (ℚ)
5. Set of Irrational Numbers ( )
6. Set of Real Numbers (ℝ)
7. Set of Imaginary Numbers (I)
8. Set of Complex Numbers (C)
1. Set of Booleans (B)
• Set of Booleans contains exactly two
elements i.e. True and False.
B= {True, False} or
B= {x| x ∈ True OR x ∈ False } or
B= {x| x is a Boolean}
(B is the set of all x such that (|) x is a Boolean.)
2. Set of Natural / Whole Numbers (ℕ)
• Set of natural / whole numbers are the
counting numbers either starts from 0 or 1.
ℕ = {0,1,2,3,.....} or ℕ = {1,2,3,.....} or
ℕ = {x| x is a natural number}
(ℕ is the set of all x such that (|) x is a natural /
whole number.)
3. Set of Integers (ℤ)
• Set of integers are the natural numbers and
their negative. Thus it includes negative,
nonnegative (0) and positive integers.
ℤ = {...,-3,-2,-1,0,1,2,3,.....} or
ℤ = {x| x is an integer}
(ℤ is the set of all x such that (|) x is an integer.)
4. Set of Rational Numbers (ℚ)
•
Set of rational numbers are the numbers that are the
fraction (ratio) of two integers. They are represented
as fraction p/q where p and q are integers and q≠0.
ℚ = {...,1/4,..,1/2,..,3/4,.....} or
ℚ = {...,0.25,..,0.5,..,0.75,.....} or
ℚ = {x| x is a rational number}
(ℚ is the set of all x such that (|) x is a rational number.)
• Rational numbers in their decimal form either
terminate or begin to repeat the same.
5. Set of Irrational Numbers( )
•
Set of irrational numbers are the numbers that
are not rational (numbers cannot be written as a
ratio of two integers ).
• Their decimal representation is non-terminating
and non-repeating.
= {...,√2,.., √3,..,∏,..,℮,...} or
= {...,1.414,..,1.732,..,3.141,..,2.718,...} or
= {x| x is an irrational number}
( is the set of all x such that (|) x is an irrational
number.)
6. Set of Real Numbers (ℝ)
•
Set of real numbers are the combination of set
of rational and irrational numbers.
• They can also be positive, negative or zero.
ℝ = {...,1/4,..,1/2,..,√2,..,√3,..,∏,..,℮,...} or
ℝ = {..,0.25,..,0.5,..,1.414,..,1.732,..,3.141,..,2.718,..}
or
ℝ = {x| x is a real number}
(ℝ is the set of all x such that (|) x is a real number.)
7. Set of Imaginary Numbers (I)
•
Set of imaginary numbers are the numbers
whose squares are negative.
• It is represented by the symbol ⅈ.
• The unit imaginary number is √(-1), called
square root of minus one.
I = {...,-i,..,i,..,0.5i,..,3i/4,..,7i,...} or
I = {x| x is an imaginary number}
(I is the set of all x such that (|) x is an imaginary
number.)
8. Set of Complex Numbers (C)
• Set of complex numbers are the combination
of real and an imaginary numbers in the form
a+bi , where a and b are real numbers and i
is imaginary number.
C = {...,2+7i,..,3-6i,..,8,..,5i,...} or
C = {x| x is a complex number}
(C is the set of all x such that (|) x is a complex
number.)
Cardinality - |Size of / Order of|
• Cardinality is the numerical counting of total
elements in the sets.
• However it does not rely on the nature of
elements.
• A finite set has a countable number of elements.
• An infinite set has at least as many elements as
the set of natural numbers ℕ.
• Cardinality of a set A is represented by symbol
|A|.
Cardinality Examples
• |{red, blue, yellow, green}| = 4
• |Fruit| = |{Tomato, Apple, Orange, Pear,
Banana}| = 5
• |A| = |{x| x is a whole number and 1< x < 8}|=
|{2,3,4,5,6,7}| = 6
• |{x| x ∈ N and -1 ≤ x ≤ 1}|= 3
• |{ a, b, c,....,z}| = 26
• |{ Vowels}| = 5
Cardinality Examples..
• Any set with cardinality 0 is called empty set
and with cardinality 1 is called singleton set.
• The set of natural numbers ℕ has infinite
cardinality.
• The cardinality of set of natural numbers ℕ is
represented by symbol ℵ0 (aleph-null or alephzero).
• Thus ℕ = {0,1,2,3,4....} and |ℕ| = ℵ0
Cardinality Examples..
• Similarly the cardinality of another infinite set
i.e. set of integers ℤ isℤ = {...,-3,-2,1,0,1,2,3,.....} and |ℤ| = ℵ0
• Remember not all infinite sets have
cardinality ℵ0.
Some Special Sets
• There are many special sets which often come
across in the set theory. Few of them are:
• Universal Set
• Empty Set
• Singleton Set
• Finite Set
• Infinite Set
• Countable Set
• Uncountable Set
Universal Set
• A set which in certain context, contains
everything of interest.
• In other words, it has all the elements in the
universe of discourse including itself.
• It is denoted by the capital letter symbol U.
• In Venn diagrams, the universal set is usually
represented by a rectangle shape.
Universal Set Example
• Universal Set U =
{All the students of computer science}
• Some subsets from universal set:
• StudJAVA = {Students who like JAVA}
• StudNET = {Students who like DOT NET}
• StudWEB = {Students who like Web
Programming}
Empty Set
• A set which has no elements is called an
empty set.
• An empty set is a subset of every other set.
• It is denoted by ∅ or { } or 0.
• Examples:
{even number between 2 and 4}
{multiple of 10 but less than 10}
• Cardinality of empty set |∅| = |{ }| = 0
Singleton Set
• A set which has only one element.
• Examples:
{odd number between 2 and 4} = {3}
{multiple of 10 but less than 20} = {10}
• Cardinality of singleton set |S| = 1
Finite Set
• Finite sets are sets that have a finite number
of elements.
• In this set, you can go through the elements,
count them, "1, 2, 3, ...", and eventually reach
a last element.
• Examples:
A = {0, 2, 4, 6, 8, …, 100}
X = {x : x is an integer, 1 < x < 10}
Finite Set..
• A set S is finite if it has the same cardinality as
some natural number n ∈ ℕ. We then define
|S| = n and say that S has n elements.
• The number of elements in a finite set S is
denoted by n(S).
• Example: If A is the set of positive integers less
than 12 then A = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11} and n(A) = 11
Infinite Set
• An infinite set is a set which is not finite.
• It is not possible to explicitly list out all the
elements of an infinite set.
• An infinite set has no last element, no matter in
what order you count.
• Examples:
1. If A is the set of numbers which are also
multiples of 3 then set A = {3, 6, 9, …} and A is an
infinite set
2. ℕ is the set of natural numbers
Countable /Countably
Infinite/Denumerable Set
• A set whose cardinality or number of
elements is equal to the set of natural
numbers ℕ (or some subset of ℕ).
• The elements of a countable set can be
counted one at a time.
• Although the counting may never finish, every
element of the set will eventually be
associated with a natural number.
Countable /Countably
Infinite/Denumerable Set..
• Countably Finite: A set S is countable if it is
finite, or it can be placed in 1-1
correspondence with the positive integers i.e.
|S| ≤ |ℕ|.
• Countably Infinite: A set S is countably infinite
if it is countable and infinite, just like the
positive integers i.e. |S| = |ℕ|.
Countable /Countably
Infinite/Denumerable Set..
• The term countable includes finite and countably
infinite sets too, but as a convention it is used for
countably infinite sets.
• The cardinality of countable set is either finite or
equal to ℵ0 (aleph-null, the cardinality of the
natural numbers ℕ).
• Examples:
• Set of Natural Numbers ℕ
• Set of Integers ℤ
• Set of Rational Numbers ℝ
Uncountable Set
• A set is uncountable if it is not countable.
• An uncountable set is an infinite set that
contains too many elements to be countable.
• The uncountability of a set is closely related to
its cardinal number.
Uncountable Set..
• A set is uncountable if its cardinal number is
larger than that of the set of all natural
numbers ℕ.
• All uncountable sets are infinite. However, the
converse is not true, as ℕ is both infinite and
countable.
Uncountable Set..
• The cardinality of uncountable set is neither finite
nor equal to ℵ0 (aleph-null, the cardinality of the
natural numbers ℕ).
• Uncountable set has cardinality strictly greater
than ℵ0.
• Examples:
• Set of Real Numbers ℝ
• Set of Irrational Numbers I
• Set of Complex Numbers C
References
• http://www.onlinemathlearning.com/finite-sets.html
• http://plato.stanford.edu/entries/settheory/primer.html
• http://www.mathreference.com/set-card,cable.html
• http://planetmath.org/encyclopedia/UncountableSet.h
tml
• http://www.mathematicsgre.com/viewtopic.php?f=1&
t=185
• http://www.sccs.swarthmore.edu/users/08/ajb/tmve/
wiki100k/docs/Uncountable_set.html
Thank You
Download