Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
20 views

Lecture 1-2

Uploaded by

umar
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Lecture 1-2

Uploaded by

umar
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 24

Set Theory

Discrete Structures
MUHAMMAD UMAR NASIR
LECTURER
FACULTY OF COMPUTING, RIPHAH INTERNATIONAL UNIVERSITY LAHORE
Set Theory

A well defined collection of distinct objects is called a set.


 The objects are called the elements or members of the set.
 Sets are denoted by capital letters A, B, C …, X, Y, Z.
 The elements of a set are represented by lower case letters a,
b, c, … , x, y, z.
 If an object x is a member of a set A, we write x ∈ A, which
reads “x belongs to A” or “x is in A”.
Tabular Form

List all the elements of a set, separated by commas and enclosed


within braces or curly brackets {}.
EXAMPLE:
In the following examples we write the sets in Tabular Form.
A = {1, 2, 3, 4, 5} is the set of first five Natural Numbers.
B = {2, 4, 6, 8, …, 50} is the set of Even numbers up to 50.

C = {1, 3, 5, 7, 9, …} is the set of positive odd numbers.


Descriptive Form

State the elements of a set in words.


EXAMPLE:
Now we will write the above examples in the Descriptive Form.
A = set of first five Natural Numbers.
B = set of positive even integers less or equal to fifty.

C = set of positive odd integers.


Set Builder

Write the common characteristics in symbolic form, shared by all


the elements of the set.
EXAMPLE:
Now we will write the same examples which we write in Tabular as
well as Descriptive Form ,in Set Builder Form .
A = {x ∈ N | x ≤ 5}
B = {x ∈ E | 0 < x ≤ 50}
C = {x ∈ O | 0 < x}
Sets of Numbers

1. Set of Natural Numbers N = {1, 2, 3, … }


2. Set of Whole Numbers W = {0, 1, 2, 3, … }
3. Set of Integers Z = {…, -3, -2, -1, 0, +1, +2, +3, …}
Z = {0, ±1, ±2, ±3, …}
4. Set of Even Integers E = {0, ± 2, ± 4, ± 6, …}
5. Set of Odd Integers O = { ± 1, ± 3, ± 5, …}
6. Set of Prime Numbers P = {2, 3, 5, 7, 11, 13, 17, 19, …}
7. Set of Rational Numbers (or Quotient of Integers) Q = {x | x =
p/q , p, q ∈ Z, q ≠ 0}
Singleton set

 A set with one element is called a singleton set. The set { } is a


singleton set not empty set.
Rational & Irrational Numbers

 A Rational Number can be written as a Ratio of two integers (ie a


simple fraction).
 Example 1:
1.5 is rational, because it can be
written as the ratio 3/2
 But some numbers cannot be written as a ratio of two
integers ......they are called Irrational Numbers. An Irrational
Number is a real number that cannot be written as a simple
fraction. Irrational means not Rational.
Real Numbers (R):

 All Rational and Irrational numbers. They can also be positive,


negative or zero. A simple way to think about the Real Numbers
is: any point anywhere on the number line (not just the whole
numbers).
Examples: 1.5, -12.3, 99, √2, π
Sets of Numbers

8. Set of Irrational Numbers


Q’={ x | x is not rational }
e-g e, π,
9. Set of Real Numbers
R = Q U Q’
10. Set of Complex Numbers
C = {z | z = x +iy ; x, y ∈ R }
Equal Sets

Two sets A and B are equal if and only if every element of A is in B


and every element of B is in A and is denoted A = B.
Symbolically:
A = B iff A ⊆ B and B ⊆ A
EXAMPLE:
Let A = {1, 2, 3, 6} B = the set of positive divisors
of 6 C = {3, 1, 6, 2} D = {1, 2, 2, 3, 6,
6, 6}
Then A, B, C, and D are all equal sets.
Null Set

A set which contains no element is called a null set, or an empty set


or a void set. It is denoted by the Greek letter ∅ (phi) or { }.
EXAMPLE:
A = {x | x is a person taller than 10 feet} = ∅
( Because there does not exist any human being which is taller then
10 feet )
B = {x | x^2 = 4, x is odd} = ∅
(Because we know that there does not exist any odd number whose
square is 4)
Universal Set

The set of all elements under consideration is called the Universal


Set.
The Universal Set is usually denoted by U.
EXAMPLE:
A = { 2, 4, 6 }
B = {1, 3, 5 }
Universal set = U = { 1, 2, 3, 4, 5, 6 }
Finite and Infinite Sets

A set S is said to be finite if it contains exactly m distinct elements


where m denotes some non negative integer.
In such case we write |S| = m or n(S) = m
A set is said to be infinite if it is not finite.
EXAMPLE:
1. The set S of letters of English alphabets is finite and |S| = 26
2. The null set ∅ has no elements, is finite and |∅| = 0
3. The set of positive integers {1, 2, 3,…} is infinite.
Cardinality of a Set

The number of distinct elements in a set is called its cardinality.


A= {1, 2, 3, 4…….99, 100} is denoted by . |A|=100
B= {2, 4, 6}; |B|=3
C= {{1}}; |C|=1
D= {2, {21}}; |D|=2,
Here 2 and {21} are the two elements of set D.
Subset

If A & B are two sets, then A is called a subset of B.


It is written as A ⊆ B. The set A is subset of B if and only if any
element of A is also an element of B.
A ⊆ B ⇔ if x∈A, then x∈B
1. When A ⊆ B, then B is called a superset of A.
2. When A is not subset of B, then there exist at least one x ∈ A
such that x ∉ B.
3. Every set is a subset of itself.
Subset

EXAMPLE:
Let A = {1, 3, 5} B = {1, 2, 3, 4, 5} C = {1, 2, 3, 4} D = {3, 1,
5}
Then
A ⊆ B ( Because every element of A is in B )
C ⊆ B ( Because every element of C is also an element of
B)
A ⊆ D ( Because every element of A is also an element of D
and also note that every element of D is in A so D ⊆ A )
A is not subset of C . ( Because there is an element 5 of A
which is not in C )
Proper Subset

Let A and B be sets. A is a proper subset of B, if and only if, every


element of A is in B but there is at least one element of B that is
not in A, and is denoted as A ⊂ B.
EXAMPLE:
Let A = {1, 3, 5} B = {1, 2, 3, 5}
then A ⊂ B ( Because there is an element 2 of B which is not in A).
Power Set

 For a set ‘S’ a set which contains all possible subsets of ‘S’ is
called power set of S. It is denoted by P(S).
Example: Let S= {a, b, c}
Then P(S) = {∅, {a}, {b}, {c}, {a, b}, {a, c},
{b, c}, {a, b, c}}
ORDERED PAIR:

An ordered pair (a, b) consists of two elements “a” and “b” in which
“a” is the first element and “b” is the second element. The ordered
pairs (a, b) and (c, d) are equal if, and only if, a= c and b = d. Note
that (a, b) and (b, a) are not equal unless a = b.
EXERCISE: Find x and y given (2x, x + y) = (6,2)
SOLUTION: Two ordered pairs are equal if and only if the
corresponding components are equal. Hence, we obtain the
equations: 2x = 6 ………………(1)
and x + y = 2 ……………..(2)
Solving equation (1) we get x = 3 and when substituted in (2) we
get y = -1.
ORDERED n-TUPLE:

 The ordered n-tuple (a1, a2, …, an) consists of elements a1, a2,
…, an together with the ordering: first a1, second a2, and so
forth up to an. In particular, an ordered 2 tuple is called an
ordered pair, and an ordered 3-tuple is called an ordered triple.
Two ordered n-tuples (a1, a2, …, an) and (b1, b2, …, bn) are
equal if and only if each corresponding pair of their elements is
equal,
i.e., ai = bj, for all i, j = 1, 2, …, n.
Cartesian Product:

The Cartesian Product of two sets ‘A’ and ‘B’ in the order A x B is a
set of all possible 2-tuples where first element of each tuple is from
set ‘A’ and 2nd element of each tuple is from set ‘B’. The notation A2
denote A × A, the Cartesian product of the set A with itself.
Similarly, A3 = A × A × A, A4 = A × A × A × A, and so on.
 Example: A= {1, 2}, B= {a, b}
A x B= {(1, a), (1, b), (2, a), (2, b)}
B x A= {(a, 1), (a, 2), (b, 1), (b, 2)}
Venn diagram

 Sets can be represented graphically using Venn diagrams. In


Venn diagrams the universal set U, which contains all the
objects under consideration, is represented by a rectangle. Inside
this rectangle, circles represent sets and points are used to
represent the particular elements of the set. It is a method to
represent one or more than one sets pictorially. It is used to
describe relationship between the sets.
Venn diagram

Venn diagram to illustrate the relationship A ⊆ B and B ⊆ C

You might also like