100% found this document useful (3 votes)
19K views67 pages

1st BCA

Sets can be represented in roster or set-builder form and are comprised of elements. Common set operations include union, intersection, complement, and Cartesian product. The cardinality of a set refers to the number of elements it contains. De Morgan's laws describe the relationships between unions, intersections, and complements of sets.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (3 votes)
19K views67 pages

1st BCA

Sets can be represented in roster or set-builder form and are comprised of elements. Common set operations include union, intersection, complement, and Cartesian product. The cardinality of a set refers to the number of elements it contains. De Morgan's laws describe the relationships between unions, intersections, and complements of sets.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 67

1 stBCA

Discrete Mathematics
History of sets
• The theory of sets was developed by German mathematician Georg
Cantor (1845-1918).
• He first encountered sets while working on “Problems on
Trigonometric Series” .
• SETS are being used in mathematics problem since they were
discovered.
Sets
• Collection of ordered or unordered objects is called a set
• In mathematics natural number, prime numbers etc will form set
• Examples: a pack of cards, a crowd of people, a cricket team etc
• The objects in a set are called the elements or members of sets
• Capital letters are used to represent set where as lowercase letters are
used to represent elements of sets
• Example: A={a, b, c, d}, B={g, w, u, o, p, d} etc….
Representation of Sets
There are two ways to represent sets
• Roster or tabular form
• all the elements of set are listed, the elements are being separated by commas
and are enclosed within braces { }
• Example: {1,2,3,4,5,6,7,8,9,10}, {a,b,c,j,o,k}

• Set-builder form
• In set-builder form, all the elements of a set possess a single common
property which is not possessed by an element outside the set.
• e.g. : set of natural numbers k or k= {x : x is a natural number}
Standard notations of set
• Ø = empty set or null set
• U = universal set
• N = set of all natural numbers
• I = set of all integers
• Z, Z-, Z+ = set of integers, negative, positive integers
• Q, Q-,Q+ = set of rational numbers, positive, negative numbers
Types of sets
• Finite set
• Infinite set
• Null set
• Singleton set
• Universal set
• Subset
• Equality of set
• Empty or null or void set : It contains no elements
For e.g A={}

• Finite set : It contains countable number of elements


For e.g A={1,4,9,16}

• Infinite set : It contains uncountable number of elements


For e.g A={1,4,9,16,.....}

• Equality of sets : Two sets X and Y have same elements , represented as X=Y
For e.g. A={1,2,3,4,5}, B={1,2,3,4,5} then A=B
• Singleton set: It contains only one element
For e.g. A={0}, B={i}

• Universal set: Set of all elements in a particular context


For e.g. A={ x: x is a real number}

• Subset: If a set A contains elements which are all the elements of set B as
well, then A is known as the subset of B
For e.g. if A={-9,13,6}, then,
Subsets of A= ϕ, {-9}, {13}, {6}, {-9,13}, {13,6}, {6,-9}, {-9,13,6}
Operation on sets
• Union of sets
• Intersection of sets
• Complement of sets
• Cartesian product
• Cardinality of set
• De-morgan’s law
Union of sets
• Union of two given sets is the smallest set which contains all the
elements of both the sets.

• To find the union of two given sets A and B is a set which consists of
all the elements of A and all the elements of B such that no element is
repeated.

• The symbol for denoting union of sets is ‘∪’

• Therefore, A ∪ B = {x : x ∈ A or x ∈ B}
Example
Let set A = {2, 4, 5, 6} and set B = {4, 6, 7, 8}

Taking every element of both the sets A and B, without repeating any
element, we get a new set = {2, 4, 5, 6, 7, 8}

Therefore AUB = {2,4,5,6,7,8},this new set contains all the elements of


set A and all the elements of set B with no repetition of elements and is
named as union of set A and B
Questions
1. If A = {1, 3, 7, 5} and B = {3, 7, 8, 9}. Find union of two set A and B
2. Let X = {a, e, i, o, u} and Y = {ф}. Find union of two given sets X
and Y
3. If set P = {2, 3, 4, 5, 6, 7}, set Q = {0, 3, 6, 9, 12} and set
R = {2, 4, 6, 8}
(i) Find the union of sets P and Q
(ii) Find the union of two set P and R
(iii) Find the union of the given sets Q and R
Intersection of Sets
• Intersection of two given sets is the largest set which contains all the
elements that are common to both the sets.

• To find the intersection of two given sets A and B is a set which


consists of all the elements which are common to both A and B.

• The symbol for denoting intersection of sets is ‘∩‘

• The intersection of two sets A and B is represented as A ∩ B = {x : x ∈


A and x ∈ B}
Example
Let set A = {2, 3, 4, 5, 6} and set B = {3, 5, 7, 9}

In this two sets, the elements 3 and 5 are common. The set containing
these common elements i.e., {3, 5} is the intersection of set A and B.

The symbol used for the intersection of two sets is ‘∩‘


Questions
1. If A = {2, 4, 6, 8, 10} and B = {1, 3, 8, 4, 6}. Find intersection of
two set A and B
2. If X = {a, b, c} and Y = {ф}. Find intersection of two given sets X
and Y
3. If set A = {4, 6, 8, 10, 12}, set B = {3, 6, 9, 12, 15, 18} and set C =
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
(i) Find the intersection of sets A and B.
(ii) Find the intersection of two set B and C.
(iii) Find the intersection of the given sets A and C.
Complement of set
• In complement of a set if U be the universal set and A is subset of U, then the
complement of A is the set of all elements of U which are not the elements of A

• Symbolically, we denote the complement of A with respect to U as A’

• Example: If U = {1, 2, 3, 4, 5, 6, 7} A = {1, 3, 7} find A’


We observe that 2, 4, 5, 6 are the only elements of U which do not belong to A

Therefore, A' = {2, 4, 5, 6}


Questions
1. Let the set of natural numbers be the universal set and A is a set of
even natural numbers
2. Let U = The set of letters in the English alphabet A = The set of
consonants in the English alphabet. What will be A`
Cardinality of set
• The number of distinct elements in a finite set is called its cardinal
number. It is denoted as n(A) and read as ‘the number of elements of the
set’

• For example:
(i) Set A = {2, 4, 5, 9, 15} has 5 elements. Therefore, the cardinal
number of set A = 5. So, it is denoted as n(A) = 5.
(ii) Set B = {w, x, y, z} has 4 elements . Therefore, the cardinal number of
set B = 4. So, it is denoted as n(B) = 4.
(iii) Set C = {Florida, New York, California} has 3 elements ..n(C)=3
Questions
1. Write the cardinal number of each of the following sets:
(i) X = {letters in the word MALAYALAM}
(ii) Y = {5, 6, 6, 7, 11, 6, 13, 11, 8}
(iii) Z = {natural numbers between 20 and 50, which are divisible by 7}
2. Find the cardinal number of a set from each of the following:
(i) P = {x | x ∈ N and x2 < 30}
(ii) Q = {x | x is a factor of 20}
Cartesian product
• If A and B are two non-empty sets, then their Cartesian product A × B is the
set of all ordered pair of elements from A and B.
A × B = {(x, y) : x ∈ A, y ∈ B}

• Suppose, if A and B are two non-empty sets, then the Cartesian product of
two sets, A and set B is the set of all ordered pairs (a, b) such that a ∈A and
b∈B which is denoted as A × B

• Example: If A = {7, 8} and B = {2, 4, 6}, find A × B


A × B = {(7, 2), (7, 4), (7, 6),(8, 2),(8, 4),(8, 6)}
The 6 ordered pairs thus formed can represent the position of points in a
plane, if a and B are subsets of a set of real numbers
Questions
1. If X = {6, 2} and B = {1, 7, 9}, find A × B
2. If A × B = {(p, x); (p, y); (q, x); (q, y)}, find A and B
3. If A and B are two sets, and A × B consists of 6 elements: If three
elements of A × B are (2, 5) (3, 7) (4, 7) find A × B
4. If A = { 1, 3, 5} and B = {2, 3}, then
Find: (i) A × B (ii) B × A (iii) A × A (iv) (B × B)
De- morgan’s law
• The complement of the union of two sets is equal to the intersection of
their complements and the complement of the intersection of two sets
is equal to the union of their complements. These are called De
Morgan’s laws.
• For any two finite sets A and B;
• (i) (A U B)' = A' ∩ B' (which is a De Morgan's law of union).
• (ii) (A ∩ B)' = A' U B' (which is a De Morgan's law of intersection).
Questions
1. If U = {j, k, l, m, n}, X = {j, k, m} and Y = {k, m, n}.show that
(X∩Y)`= X` U Y`
2. Let U = {1, 2, 3, 4, 5, 6, 7, 8}, P = {4, 5, 6} and Q = {5, 6, 8}. Show
that (P ∪ Q)' = P' ∩ Q’
Exercise
1. If U={1,2,3,4,5,6,7,8,9}, A={1,2,4,6,8} and B= {2,4,5,9} find
a) A`
b) B`
c) (AUB)`
d) A`U B`
e) (A ∩ B)`
f) A` ∩ B`
g) A-B
h) B-A
Exercise
2. If U={0,1,2,3,4,5,6,7,8,9}, A={1,2,6,8} and B= {0,2,4,5,9} find
a) A`
b) B`
c) (AUB)`
d) A`U B`
e) (A ∩ B)`
f) A` ∩ B`
g) A-B
h) B-A
Some Formulas
1. n(A ∪ B) = n(A) + n(B) - n(A ∩ B)
2. n(A∪B) = n(A - B) + n(A ∩ B) + n(B - A)
3. n(B) = n(A ∩ B) + n(B - A)
4. n(A ∩ B) = n(A) + n(B) - n(A ∪ B)
5. (A U B)' = A' ∩ B' (which is a De Morgan's law of union).
6. (A ∩ B)' = A' U B' (which is a De Morgan's law of intersection).
Word Problems
1. Let A and B be two finite sets such that n(A) = 20, n(B) = 28 and
n(A ∪ B) = 36, find n(A ∩ B)
Soln: n(A ∩ B) = n(A) + n(B) - n(A ∪ B)
= 20 + 28 - 36
= 48 - 36
= 12
Word Problems
1. If n(A - B) = 18, n(A ∪ B) = 70 and n(A ∩ B) = 25, then find n(B)
2. Let A and B be two finite sets such that n(A) = 80, n(B) = 88 and
n(A ∪ B) = 48, find n(A ∩ B)
3. In a group of 60 people, 27 like cold drinks and 42 like hot drinks
and each person likes at least one of the two drinks. How many like
both coffee and tea?
4. In a group of 100 persons, 72 people can speak English and 43 can
speak French. How many can speak English only? How many can
speak French only and how many can speak both English and
French?
Relations
• The concept of relation in math refers to an association of two objects
or two variables based some property possessed by them
• Definition: Let A and B be sets. A binary relation from A to B is a
subset of AB
• In other words, for a binary relation R we have
R  AB. We use the notation aRb to denote that (a, b)R and aRb to
denote that (a, b)R
Example
• Rachel is the daughter of Noah.
This statement shows the relation between two persons. The relation
(R) being ‘is daughter of’

• 5 less than 9
This statement shows the relation between two numbers. The relation
(R) being ‘is less than’.
If A and B are two non-empty sets, then the relation R from A to B is a
subset of A x B, i.e., R ⊆ A x B.
If (a, b) ∈ R, then we write a R b and is read as 'a' related to 'b'
Domain and range of relation
• The domain of a relation R is the set of all first entries or coordinates of
the ordered pairs in R and it is denoted by DOM(R)
• The range of a relation R is the set of all second entries or coordinates of
the ordered pairs in R which is denoted by RAN(R)
• Ex: Let A={1,2,3,4} and the relation given by (x,y)€R if x<y defined on
A, then the relation is given by R= {(1,2),(1,3),(1,4),(2,3),(2,4),(3,4)}
Therefore, DOM(R) = {1,2,3} and RAN(R) = {2,3,4}
Representation of Relations

1. By language
2. By ordered pairs
3. By arrow form
4. By matrix form
5. By co-ordinates
6. By graph form
Example
Consider the set A={1,2,3}.Let R be the relation’>’ on A. Then the
different ways of representation of relation are as follows:
1. By Language : R = {(a, b) | a>b and ¥ a, b € A}
2. By Ordered pairs: R = {(2,1),(3,1),(3,2)}
3. By arrow form :
1. 1.
2. 2.
3. 3.
4. By matrix form:
1 2 3
0 0 0
1 0 0 0
1 0 0
2 1 0 0
MR 3 1 1 0
1 1 0

5. By co ordinates:
3

1 2 3
6. By graph form

2
Kinds of Relations
1. One to One
2. One to many
3. Many to one
4. Many to Many
1. One to one function
• The relation R from the set A to set B is said to be one to one relation
if(x1, y1) € R , (x2, y2) € R then y1=y2 x1=x2
2. One to Many
• The relation R from the set A to set B is said to be one to many relation
if(x1, y1) € R, (x1, y2) € R for some x1 € A and y1,y2 € B with
y1 not equal to y2
3. Many to one
• The relation R from the set A to set B is said to be many to one relation
if(x1, y1) € R, (x2, y1) € R for some y1 € B and x1,x2 € A with
x1 not equal to x2
4. Many to Many
• The relation R from the set A to set B is said to be many to many relation
if (x1, y1) € R, (x1, y2) € R , (x2, y1) € R, (x2, y2) € R for some x1,x2 € A
and y1,y2 € B with y1 not equal to y2 and x1 not equal to x2
Complement of a relation
• Consider a relation R from a set A to B. Then, the complement of
relation R denoted by 𝑅ത is a relation from A to B such that
𝑅ത = {(a, b) | (a, b) ∉ 𝑅} i. e 𝑅ത = (A ∗ B)- R

• Ex: If A= {1,2,3} B={8,9} and R={(1,8), (2,8), (1,9), (3,9)} then


𝑅ത =(A*B)-R
={(1,8),(1,9),(2,8),(2,9),(3,8),(3,9)} – {(1,8),(2,8),(1,9),(3,9)}
𝑅ത = {(2,9), (3,8)}
Example
• If X = {4,5,6} Y={1,3} and R= {(5,1),(4,3),(6,1)} find 𝑅ത

• If P={a, b, c ,d} Q={x, y, z} and R={(a, y),(b, y),(d, z),(c, x)} find 𝑅ത

• If A={55, 33, 99}, B={22,44} and R={(55,44),(33,22),(99,44)}


find 𝑅ത
Types of Relations
Reflexive relation
• A relation R on set A is said to be a reflexive if (a, a) ∈ R for every a ∈ A

• Example :
If A = {1, 2, 3, 4} then R = {(1, 1) (2, 2), (1, 3), (2, 4), (3, 3), (3, 4), (4, 4)}
The relation is reflexive as for every a ∈ A. (a, a) ∈ R,
i.e. (1, 1), (2, 2), (3,3) , (4, 4) ∈ R
Symmetric Relation
• A relation R on set A is said to be symmetric iff (a, b) ∈ R ⟺ (b, a) ∈
R.

• Example:
Let A = {1, 2, 3} and R = {(1, 1), (2, 2), (1, 2), (2, 1), (2, 3), (3, 2)}
The relation is symmetric as for every (a, b) ∈ R, we have (b, a) ∈ R,
i.e., (1, 2), (2, 1), (2, 3), (3, 2) ∈ R but not reflexive because (3, 3) ∉ R.
Transitive Relation
• A Relation R on set A is said to be transitive iff (a, b) ∈ R and (b, c) ∈
R ⟺ (a, c) ∈ R

• Example:
Let A = {1, 2, 3} and R = {(1, 2), (2, 1), (1, 1), (2, 2)}
The relation R is transitive as for every (a, b) (b, c) belong to R,
we have (a, c) ∈ R i.e, (1, 2) (2, 1) ∈ R ⇒ (1, 1) ∈ R.
• The relation is said to be non-transitive, if
(a, b) ∈ R and (b, c) ∈ R do not imply (a, c ) ∈ R

• For example, in the set A of natural numbers if the relation


R be defined by ‘x less than y’ then
a < b and b < c imply a < c, that is, aRb and bRc ⇒ aRc.
Hence this relation is transitive.
Anti Reflexive relations
• A relation R defined on set A is said to be anti-reflexive if (a,a)∉ R
for every element a ∈ A
• Also known as irreflexive relation
• Example :
if set A={1,3,5,7}
R1={(1,1),(1,3)(1,7),(3,3),(5,5),(5,7),(7,7)}
R2={(1,3),(1,5),(5,7),(3,7)}
R3={(1,1),(1,3),(1,5),(7,7)}
R2 is AR but R3 is not AR because (1,1) ∈ R3 and (7,7) ∈ R3
Asymmetric Relation
• A relation R on a set A is called asymmetric if no (y,x) ∈ R when (x,y) ∈ R.
Or we can say, the relation R on a set A is asymmetric if and only if,
(x,y)∈R⟹(y,x)∉R.

• For example:
If R is a relation on set A = {12,6} then {12,6}∈R implies 12>6, but
{6,12}∉R, since 6 is not greater than 12.
Anti- Symmetric Relation
• A relation R defined on a set A is said to be anti symmetric if
(a, b) ∈ R and (b, a) ∈ R, then a=b
• Example :
A = {1, 3, 5, 7}
R1={(1,1),(1,3),(3,5),(5,5),(5,7)}
R2={(1,1),(3,3),(7,7)}
R3={(3,3),(3,5),(5,3),(5,7),(7,5),(7,7)}
R1 and R2 are AS and R3 is not AS
Equivalence Relation
• A relation R on a set A is said to be an equivalence relation if and only
if the relation R is reflexive, symmetric and transitive

o Reflexive: A relation is said to be reflexive, if (a, a) ∈ R, for every a ∈ A.

o Symmetric: A relation is said to be symmetric, if (a, b) ∈ R, then (b, a) ∈ R.

o Transitive: A relation is said to be transitive if (a, b) ∈ R and (b, c) ∈ R, then


(a, c) ∈ R
Example
• Let A={a, b, c} and R be a relation on A given by
R={(a, a),(b, b),(c, c), (a, c),(a, b),(b, a)}

i. xRx, ∀ x ∈ A hence R is reflexive


ii. (a, b) ∈ R → (b, a) ∈ R, ∀ a, b ∈ A hence R is Symmetric
iii. (a, b) ∈ R and (b, a) ∈ R ∀ (a, c) ∈ A hence R is transitive

• Thus R is an Equivalence Relation on A


Inverse Relation
• Let R be a relation from A to B. then, the inverse of a relation R denoted
by 𝑅−1

• Defined as 𝑅 −1 ={(b,a)|(a,b)∈R}

• Example :
If R={(1,2),(2,3)} then R′ will be {(2,1),(3,2)}
Examples
1. Let R be a relation in A={1,2,3,4,5,6} defined by ‘x’ and ‘y’ are
relatively prime. Find the relation R and draw R on a co ordinate
diagram of (A*A)
2. Let N be the set of all natural numbers .R be the relation in N
defined xRy if and only if x+3y. Examine the relation R is
i. Reflexive
ii. Symmetric
iii. Transistive
3. Show that the relation x≡y(mod5) defined on the set of integers, I is
an equivalence relation
4. Let A={2,4,6,8} B= {1,5,7,9} and let R be a relation from A to B
defined as xRy if and only if x ≤ y. Find the domain, range and inverse of
the relation R.
5. Let R be the relation on the set {1,2,3,4,5} defined by the rule (x,y)∈ 𝑅
If x+y ≤ 6. Find the following
i. List the elements of R,𝑅−1
ii. Domain of R, 𝑅−1
iii. Range of R, 𝑅−1
6. Let A=Z and R be a relation on A. Show that xRy x divides y. Then
verify R is an equivalence relation on A
7. Let A=Z+, the set of positive integers and R={(a,b) | a≤ b} is a relation
on the set A. Is R an equivalence relation
Functions
• Let A and B be two sets. A function from A to B, denoted f : A → B ,
is an assignment of exactly one element of B to each element of A
• We write f(a) = b to denote the assignment of b to an element a of A
by the function f
Domain Co-domain and Range of Function
Let : A → B (f be function from A to B), then

• Set A is known as the domain of the function ‘f’

• Set B is known as the co-domain of the function ‘f’

• Set of all f-images of all the elements of A is known as the range of f.


Thus, range of f is denoted by f(A).
Types of function
There are 4 types of functions they are :
1. Onto
2. Into
3. One to one
4. One to many
1. Onto Function
• If there exists a function for which every element of set B there is
(are) pre-image(s) in set A, it is Onto Function.
• Onto is also referred as Surjective Function
2. Into function
• Function f from set A to set B is Into function if at least set B has a
element which is not connected with any of the element of set A
3. One to One Function
• A function f: A → B is One to One if for each element of A there is a distinct
element of B. It is also known as Injective.
• Consider if a1 ∈ A and a2 ∈ B, f is defined as f: A →B suchthat f (a1) = f (a2)
4. Many to One Function
• It is a function which maps two or more elements of A to the same
element of set B.
• Two or more elements of A have the same image in B
Composite functions
• Let f be a function from set A to set B and let g be a function from set
B to set C
• The composition of the functions g and f, denoted by g O f is defined
by (g O f)(a) = g(f(a))
Inverse functions
• Let f be a bijection from set A to set B.
• The inverse function of f is the function that assigns to an element b
from B the unique element a in A such that f(a) = b
• The inverse function of f is denoted by f-1
• Hence, f-1 (b) = a, when f(a) = b. If the inverse function of f exists, f
is called invertible.
Example

You might also like