0% found this document useful (0 votes)
10 views28 pages

Notes of Unit - 1

The document provides a comprehensive overview of sets, including definitions, representations, types, and operations such as union, intersection, and complement. It explains concepts like subsets, Venn diagrams, and Cartesian products, as well as relations between sets and their domains and ranges. Key properties and important points regarding set operations are also highlighted.

Uploaded by

rohitchoud181
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
0% found this document useful (0 votes)
10 views28 pages

Notes of Unit - 1

The document provides a comprehensive overview of sets, including definitions, representations, types, and operations such as union, intersection, and complement. It explains concepts like subsets, Venn diagrams, and Cartesian products, as well as relations between sets and their domains and ranges. Key properties and important points regarding set operations are also highlighted.

Uploaded by

rohitchoud181
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/ 28

Set - A Set is a well-defined collection of objects, known as elements or members of the

set.{1,2,3} is a set consisting of the numbers 1,2, and 3. Verbally, “3 is an element of the set
{1,2,3}.” To show this symbolically, use the symbol ∈, which is read as “is an element of” or
“is a member of.” Therefore, you could have written: 3 ∈ {1,2,3}

NOTE: Order of elements of a set doesn’t matter.

Representation of a Set
A set can be represented by various methods. Two common methods used for representing
set:
1. Roaster form or tabular form method.
2. Set Builder method.

1. Roster form
In this representation, elements are listed within the pair of brackets {} and are separated by
commas. Below are two examples.
a. Let N is the set of natural numbers less than 5.
N = { 1 , 2 , 3, 4 }.
b. The set of all vowels in the English alphabet.
V = { a , e , i , o , u }.
2. Set builder form
In Set-builder set is described by a property that its member must satisfy.
a. {x : x is even number divisible by 6 and less than 100}.
b. {x : x is natural number less than 10}.

Subset
A set A is said to be subset of another set B if and only if every element of set A is also a
part of other set B.
Denoted by ‘⊆‘.
‘A ⊆ B ‘ denotes A is a subset of B.
To prove A is the subset of B, we need to simply show that if x belongs to A then x also
belongs to B.
To prove A is not a subset of B, we need to find out one element which is part of set A but
not belong to set B.
‘U’ denotes the universal set.
Above Venn Diagram shows that A is a subset of B.
Another Definition of Subset

A subset is a set contained within another set, or it can be the entire set itself. The set {1,2} is
a subset of the set {1,2,3}, and the set {1,2,3} is a subset of the set {1,2,3}. When the subset
is missing some elements that are in the set it is being compared to, it is a proper
subset. When the subset is the set itself, it is an improper subset. The symbol used to
indicate “is a proper subset of” is ⊂. When there is the possibility of using an improper
subset, the symbol used is ⊆. Therefore, {1,2} ⊂ {1,2,3} and {1,2,3} ⊆ {1,2,3}.

Note - Both the universal set and the empty set are subsets of every set.

Types of sets

1. Null / Void/ Empty Set is the set with no elements or members. The empty set, or
null set, is represented by ⊘, or { }. However, it is never represented by {⊘}.
2. Singleton Set contains a single element. For example, {a}, {0}.
3. Finite sets have a countable number of elements. For example, { a,b,c,d,e} is a set
of five elements, thus it is a finite set.
4. Infinite sets contain an uncountable number of elements. For example, {1,2,3, …}
is a set with an infinite number of elements, thus it is an infinite set.
5. Universal Set is the general category set, or the set of all those elements under
consideration.
6. Power Set is the set all possible subset of the set S. Denoted by P(S).
Example: What is the power set of {0,1,2}?
All possible subsets
{∅}, {0}, {1}, {2}, {0,1}, {0,2}, {1,2}, {0,1,2}.

Note: Empty set and set itself is also the member of this set of subsets.

Comparing sets

7. Equal sets are those that have the exact same members —

{1, 2, 3} = {3, 2, 1}.

8. Equivalent sets are sets that have the same number of members —

{1, 2, 3} | { a, b, c}.

Venn diagrams (and Euler circles) are ways of pictorially describing sets as shown in
Figure 1.
A Venn diagram

The A represents all the elements in the smaller circle; the B represents all the elements in the
larger circle; and the C represents all the elements that are in both circles at the same time.

Operations with sets

1. Union - The union of two sets is a set containing all the numbers in those
sets, but any duplicates are only written once. The symbol for finding the
union of two sets is ∪.

The shaded area shows the set B∪A.


Example - 1 Find the union {1,2,3} ∪ {3,4,5}.

{1,2,3} ∪ {3,4,5} = {1,2,3,4,5}

The union of the set with members 1, 2, 3 together with the set with members 3, 4, 5
is the set with members 1, 2, 3, 4, 5.

2. Intersection - The intersection of two sets is a set containing only the


members that are in each set at the same time. The symbol for finding the
intersection of two sets is ∩.

The shaded area shows the set B∩A

Example 2- Find the intersection {1,2,3} ∩ {3,4,5}.

{1,2,3} ∩ {3,4,5} = {3}

The intersection of the set with members 1, 2, 3 together with the set with members 3
4, 5 is the set that has only the 3.

If you were to let the set with {1,2,3} be set A, and the set with {3,4,5} be set B, then you
could use Venn diagrams to illustrate the situation (see Figure 2).
Figure 2. Intersection of set A and set B

The union will be all the numbers represented in the diagram, {1,2,3,4,5}.The intersection
would be where the two ovals overlap in the diagram, {3}.

Example 3 Find {1,2,3} ∩ {4,5}.

Since there are no members that are in both sets at the same time, then {1,2,3} ∩
{4,5} = ⊘.

The intersection of the set with members 1, 2, 3 together with the set with members 4, 5
is the empty set, or null set. There are no members in both sets at the same time.

Two sets A and B are mutually exclusive or disjoint if they do not have any shared
elements; i.e their intersection is the empty set, A∩B=∅.

3. Complement of Set
The complement of a set A denoted as A′ or Ac (read as A complement) is defined as the set
of all the elements in the given universal set(U) that are not present in set A. To understand
this set operation of complement of sets better, let us consider an example: If U = {1, 2, 3, 4,
5, 6, 7, 8, 9} and A = {1, 2, 3, 4}, then the complement of set A is given by A' = {5, 6, 7, 8,
9}.
The shaded area shows the set 𝐴′ = 𝐴𝐶

4. Set Difference
The set operation difference between sets implies subtracting the elements from a set which is
similar to the concept of the difference between numbers. The difference between sets A and
set B denoted as A − B lists all the elements that are in set A but not in set B. To understand
this set operation of set difference better, let us consider an example: If A = {1, 2, 3, 4} and B
= {3, 4, 5, 7}, then the difference between sets A and B is given by A - B = {1, 2}.

The shaded area shows the set A−B


Properties of Set Operations
The properties of set operations are similar to the properties of fundamental operations on
numbers. The important properties on set operations are stated below:
1. Idempotent Laws - Any given set A, the idempotent property is defined as,
A∩A=A
A∪A=A
2. Identity Laws - For any given set A, the identity property is defined as,
A∪Φ=A
A∩U=A
3. Commutative Law - For any two given sets A and B, the commutative
property is defined as,
A∪B=B∪A
This means that the set operation of union of two sets is commutative.
A∩B=B∩A
This means that the set operation of intersection of two sets is commutative.
4. Associative Law - For any three given sets A, B and C the associative
property is defined as,
(A ∪ B) ∪ C = A ∪ (B ∪ C)
This means the set operation of union of sets is associative.
(A ∩ B) ∩ C = A ∩ (B ∩ C)
This means the set operation of intersection of sets is associative.
5. Distributive Law
A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)
A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)
6. De-Morgan's Law - The De Morgan's law states that for any two sets A and
B, we have
(A ∪ B)' = A' ∩ B' and (A ∩ B)' = A' ∪ B'
Key Points
1. A∩∅=∅
2. A∪∅=A
3. A∩B⊆A
4. A⊆A∪B
5. A∩U=A
6. A∪U=U
Important points on Set Operations

1. Set operation formula for union of sets is n(A ∪ B) = n(A) + n(B) − n(A ∩ B) and
set operation formula for intersection of sets is n(A ∩ B) = n(A)+ n(B)−n(A ∪ B).
2. Set operation formula for three sets is n(A ∪ B ∪ C) = n(A) + n(B) + n(C) − n(A
∩ B) - n(B ∩ C) - n(C ∩ A) + n(A ∩ B ∩ C).
3. The complement of a universal set is an empty set U′ = ϕ. The complement of
an empty set is a universal set ϕ′ = U.

Example 4: In a school, every student plays either football or soccer or both. It was
found that 200 students played football, 150 students played soccer and 100 students
played both. Find how many students were there in the school using the set operation
formula.

Solution: Let us represent the number of students who played football as n(F) and the
number of students who played soccer as n(S).
We have n(F) = 200, n(S) = 150 and n(F ∩ S) = 100.
We know that,

n(F ∪ S) = n(F) + n(S) − n(F ∩ S)

Therefore, n(F ∪ S)=(200+150)−100

n(F ∪ S) = 350 − 100 = 250

Answer: Hence the total number of students in the school is 250.

Example 5: If A = {a, b, c, d, e}, B = {a, e, i, o, u}, U = {a, b, c, d, e, f, g, h, i, j, k, l,


o, u}. Perform the following operations on sets and find the solutions.

a) A ∪ B
b) A ∩ B
c) A′
d) A - B

Solution: a) A ∪ B = {a, b, c, d, e, i, o, u}

b) A ∩ B = {a, e}

c) A' = {f, g, h, i, j, k, l, o, u}

d) A - B = {b, c, d}
Cartesian Products

Let A and B be two sets. Cartesian product of A and B is denoted by A × B, is the set of all
ordered pairs (a,b), where a belong to A and b belong to B.
A × B = {(a, b) | a ∈ A ∧ b ∈ B}.
Example 6. What is Cartesian product of A = {1,2} and B = {p, q, r}.
Solution : A × B ={(1, p), (1, q), (1, r), (2, p), (2, q), (2, r) }

The cardinality of A × B is N*M, where N is the Cardinality of A and M is the cardinality


of B.
Note: A × B is not the same as B × A.

Definition of Relations

A relation describes the cartesian product of two sets. Cartesian product of two
sets A and B, such that a∈A and b∈B, is given by the collection of all order pairs (a,b).
Relation tells that every element of one set is mapped to one or more elements of the
other set.

Domain and Range of a Relation


Let R be a relation from a set A to set B. Then, set of all first components or coordinates of
the ordered pairs belonging to R is called : the domain of R, while the set of all second
components or coordinates of the ordered pairs belonging to R is called the range of R.
Thus, domain of R = {a : (a , b) ∈ R} and range of R = {b : (a, b) ∈ R}

The function is the special relation in which elements of one set are mapped to only one
element of another set.

In mathematics, a set of order pairs is called the relation. For any two non -empty
sets A and B, the relation R is the subset of the cartesian product of A×B. The below
figure shows the relation (R:A→B) between set A and set B by an arrow diagram.
Domain and Range of Relations

There are several types of relations in maths. Relation defines the relationship between
two sets. The relation of two sets is the subset of the cartesian product of the sets .
Let A and B be two non-empty sets of ordered pairs, the relation of set A with set B is
written as R:A→B. Here, set A is called the domain of the relation and set B is called the
range of the relation.
The set of first elements in the ordered pair is a domain, and the set of second elements
of the ordered pair is the range of the relation.

Example: In the ordered pair {(a,1),(b,2),(c,3)}, the elements {a,b,c} are known as the
domain of the relation, and the elements {1,2,3} are known as the range of the relation.

Arrow Diagram
In this method, the relation between two sets is shown by using the arrow drawn from
one set to another set.
The relation of two sets A={2,3,4} and B={4,9,16}, in which elements of set A are the
square root of elements of set B. The relation can be written by using an arrow diagram
below.
Types of Relation
Relation defines the relationship between two sets. The relation of two sets is the subset
of the cartesian product of the sets. There are various types of relations:

Universal
Relation

Identity
Relation Empty
Relation

Types Of
Relations

Inverse Complement
Relation of a Relation

1. Empty Relation
A relation is said to be an empty relation if the element of any set is not mapped with
another set or itself. Therefore, empty relation is also known as void relation .
Condition: No element of set P is mapped with another set Q or set P itself. The empty
relation is shown by R=∅.
Example: Consider set A consisting of 10 apples in the basket. Then finding the
relation R of getting mangoes from the basket is not possible. Since this basket has only
apples and not mangoes. So, the above relation is known as empty or void relation.

2. Universal Relation
A relation is universal if all the elements of any set are mapped to all th e elements of
another set or the set itself. Universal relation is also known as full relation, where all
the elements are mapped.
Condition:
The relation R is universal; all the elements of set P is mapped with all the elements of
set Q or set P itself.
R=P×P or R=P×Q.
Example: Consider set P consists of all whole numbers, and set Q consists of all
integers. Then the relation R:P→Q is universal because all the elements of set P are there
in set Q.

3. Identity Relation
A relation is said to be an identity relation if all the elements are related to
itself. “I” generally denotes identity relation.
Condition:
If the relation (I) is identity, then all the elements of set PP are related with itself, such
that for every x∈P, it is (x,x)∈I.
Example: In the set P={1,2,3,4}, then the identity relation is given
by I={(1,1),(2,2),(3,3),(4,4)}

4. Inverse Relation
If a set with elements has the inverse pairs of another set, then the relation is called
inverse relation.
Condition:
Consider R={(a,b):a∈P,b∈Q} be the relation from set P to set Q, then the relation from
set Q to set P is known as inverse relation, such that 𝑅 −1:Q→P={(b,a):(a,b)∈R}
The range of relation R and domain of the inverse relation 𝑅 −1are the same.
Example: Let the relation R={(a,x),(b,y)}, then the inverse relation 𝑅 −1={(x,a),(y,b)}

5. Complement of a Relation
Let relation R is defined from A to B, then complement of R is set of ordered
pairs { (𝑎, 𝑏): ( 𝑎, 𝑏) ∉ 𝑅}. It is denoted by𝑅 ′ or 𝑅 𝑐 . It is also called
complementary relation.

Properties of Relation

i. Reflexive Relation
A relation is said to be reflexive if all the elements of any set are mapped to itself .
Condition:
If the relation (R) is reflexive, then all the elements of set P are mapped with itself, such
that for every x∈P, then (x,x)∈R.
Example: If the set A={1,2,3},then the relation R = {(1,1),(2,2),(3,3)} is reflexive
relation. Here, every element of set A is mapped with itself, such that 1∈A,(1,1)∈R.

ii. Irreflexive Relation


A relation R defined on set A is said to be irreflexive if there is no element in A which
is related to itself i.e., ∀ 𝑎 ∈ 𝐴 such that (𝑎, 𝑎) ∉ 𝑅
Example: If the set A={1,2,3},then the relation R = {(1,2),(2,1),(3,1)} is irreflexive
relation. Here, every element of set A is not mapped with itself, such that 1∈A,
(1,1) ∉ R, (2,2) ∉ R, (3,3) ∉ R.

iii. Non-reflexive Relation


A relation R defined on set A is said to be non-reflexive if there if it is neither reflexive
nor irreflexive i.e., some elements related to itself but there exist atleast one element not
related to itself.
Example: Let R = {(1,1),(1,2),(2,1),(2,2)}be relation defined on the set A={1,2,3}, .As
(1,1) ∈ R, (2,2) ∈ R but (3,3) ∉ R. So given relation is non-reflexive relation.

iv. Symmetric Relation


A relation R defined on set A is said to be symmetric, in which the ordered pair of a set
and the reverse ordered pair are present in the relation.
Condition:
The relation (R) is defined on set P, is said to be symmetric if whenever aRb then bRa
i.e. (a,b)∈R, then, (b,a)∈R, for a,b ∈ P. R is symmetric if 𝑅 = 𝑅 −1

Example: For the set P={a,b},the relation R={(a,b),(b,a)} is called symmetric relation,
where a,b ∈ P

v. Asymmetric Relation
A relation is said to be asymmetric in which the ordered pair of a set and the reverse
ordered pair are not present in the relation.
Condition:
The relation (R) is asymmetric on set P, if (x,y) ∈ R, then, (y,x) ∉ R.
Example: For the set A={4,5,6},the relation R={(4,3),(5,6) (6,4)} is defined
(4,3) ∈ R but (3,4) ∉ R
(5,6) ∈ R but (6,5) ∉ R
(6,4) ∈ R but (4,6) ∉ R

vi. Anti-Symmetric Relation


A relation R is said to be anti-symmetric relation, iff (a, b) ∈ R and (b, a) ∈ R ⇒ a = b,∀ a, b
∈ R.
Example: For the set A={1,2,3},the relation R={(1,1),(2,2)} is defined
(1,1) ∈ R and (2,2) ∉ R i.e., a=b

vii. Transitive Relation


The relation R on set P, if (x,y)∈R and (y,z)∈R, then (x,z)∈R, for all x,y,z ∈R is called
transitive relation.
Example: For the set P={a,b,c},the relation R={(a,b),(b,c),(a,c)} is called transitive
relation, where a,b,c ∈P.

viii. Equivalence Relation


A relation is said to be equivalence if it is reflexive, transitive and symmetric. Universal
and identity relations are equivalence relations.
Conditions:
1. If the relation (R) is reflexive, then all the elements of set P are mapped with itself,
such that for every x∈P, then (x,x)∈R.
2. The relation (R) is symmetric on set P, if (x,y)∈R, then (y,x)∈R, such that a,b∈P.
3. The relation R on set P, if (x,y)∈R and (y,z)∈R, then (x,z)∈R, for all a,b,c ∈R is called
transitive relation.

ix. Partial Order Relation


A relation R is said to be a partial order relation, if it is simultaneously reflexive,
symmetric and anti-symmetric on A.
COMPOSITION OF RELATIONS
Suppose that we have three sets A, B and C; a relation R defined from A to B, and a
relation S defined from B to C. We can now define a new relation known as the
composition of R and S, written as S ◦ R. This new relation is defined as follows. If a
is an element in A and c is an element in C, then a(S ◦ R)c if and only if there exists
some element b in B, such that aRb and bSc. This means that we have a relation S ◦ R
from a to c, if and only if we can reach from a to c in two steps; i.e. from a to b related
by R and from b to c related by S. In this manner relation S ◦ R can be interpreted as
R followed by S, since this is the order in which the two relations need to be
considered, first R then S. † Example 1: Let us try to understand this better through an
example.
Let A = {1, 2, 3, 4}, R = {(1, 2),(1, 1),(1, 3),(2, 4),(3, 2)},
and S = {(1, 4),(1, 3),(2, 3),(3, 1),(4, 1)}.
Find S ◦ R.
Solution: Here we see that (1, 2) ∈ R and (2, 3) ∈ S. This gives us (1, 3) ∈ S ◦ R.
Similarly we can proceed with the others:
• (1, 1) ∈ R and (1, 4) ∈ S ⇒ (1, 4) ∈ S ◦ R
• (1, 1) ∈ R and (1, 3) ∈ S ⇒ (1, 3) ∈ S ◦ R
• (1, 3) ∈ R and (3, 1) ∈ S ⇒ (1, 1) ∈ S ◦ R
• (2, 4) ∈ R and (4, 1) ∈ S ⇒ (2, 1) ∈ S ◦ R
• (3, 2) ∈ R and (2, 3) ∈ S ⇒ (3, 3) ∈ S ◦ R ⇒
S ◦ R = {(1, 3),(1, 4),(1, 1),(2, 1),(3, 3)}.

Other Explanation of Composition of Relations

Let R be a relation from set A to the set B and S be another relation from set B to the set C.
Then we define a relation SoR (Read as “R composite S”) from A to C such that (a, c) ∈ SoR
⇔∃ b ∈ B such that (a, b) ∈ R and (b, c) ∈ S
[The symbol ∃ is read as “there exists”]
Clearly, aRb and bSc ⇒ a SoRc
Example :
Let A = {1, 2, 3} B = {x, y}, C = {a, b, c}
Let R = {(1, x), (1,y), (3, y)} ∈ A×B
S = {(x,a), (x,b), (y,b), (y,c)} ⊆ B×C
Then SoR = {(1,a), (1,b), (1,c), (3,b), (3,c)} ⊆ A × C
Because (1,x) ∈ R and (x,a) ∈ S ⇒ (1,a) ∈ SoR, etc.
Pictorial Representation of Relation
A relation can be expressed in many ways. Some of these ways are:
i. Relation as a Matrix
ii. Relation as a directed graph

Relation as a Matrix
Let 𝐴 = { 𝑎1 , 𝑎2 , 𝑎3 , … … … . 𝑎𝑚 } and 𝐵 = { 𝑏1 , 𝑏2 , 𝑏3 , … … … . 𝑏𝑛 } are finite sets containing
m and n elements respectively and R be relation from set A to B, then the relation matrix of R
is m x n matrix defined by
𝑴𝑹 = [ 𝒎𝒊𝒋 ]

1, 𝑖𝑓 (𝑎𝑖 , 𝑏𝑗 ) ∈ R
Where 𝑚𝑖𝑗 = {
0, 𝑖𝑓 (𝑎𝑖 , 𝑏𝑗 ) ∉ R

Where 𝑚𝑖𝑗 is the element in ith row and jth column.

Example: Let A = {a,b,c}


R = { (a,b),(a,c),(b,b),(c,a),(c,c)}

The matrix is given by


a b c
𝑎 0 1 1 0 1 1
𝑀𝑅 = 𝑏 [0 1 0] = [0 1 0]
𝑐 1 0 1 1 0 1

Relation as a Directed graph (Digraph) –


A relation can also be represented using a directed graph. It gives visual display about the
relation. Let R be a relation defined on set 𝐴 = { 𝑎1 , 𝑎2 , 𝑎3 , … … … . 𝑎𝑛 } , then following are
the key points used to draw a directed graph.

i. Elements of A are represented by points or circles which are called nodes or vertices.
ii. If (𝑎𝑖 , 𝑎𝑗 ) ∈ 𝑅, then ai to aj are connected using a directed line with an arrow toward
aj

ai aj

iii. If (𝑎𝑖 , 𝑎𝑗 ) ∈ 𝑅 and (𝑎𝑗 , 𝑎𝑖 ) ∈ 𝑅, the we draw two directed lines from ai to aj.

ai aj
iv. If If (𝑎𝑖 , 𝑎𝑖 ) ∈ 𝑅, then we draw an arc which starts from ai to ai. It is called loop.

ai

If all the nodes corresponding to each ordered pair in R are connected by arcs, then we get
graph of relation.

Example : Let A={0,1,2,3}, and let R={(0,0),(0,3),(1,2),(2,1),(3,2),(2,0)}

In representing this relation as a graph, elements of A are called the vertices of the graph.
They are typically represented by labelled points or small circles. We connect vertex a to
vertex b with an arrow, called an edge, going from vertex a to vertex b if and only
if aRb. This type of graph of a relation R is called a directed graph or digraph. Figure shows
a digraph for R. Notice that since 0 is related to itself, we draw a “self-loop” at 0.

ONE-ONE CORRESPONDENCE
If A and B are two sets such that each element of A corresponds to one and only one element
of B, and conversely, each element of B corresponds to one and only one element of A, then
we say that there is one-one correspondence between the elements of A and the elements of
B.
For example :
1 1 1 1 1
a. Let 𝐴 = {1,2,3,4,5,6}𝑎𝑛𝑑 𝐵 = { 1, 2 , 3 , 4 , 5 , 6} then there is one-one
correspondence between the elements of A and their reciprocals in B and vice
versa.
b. There is one-one correspondence between the set of real numbers R and the
points on a straight line.

FUNCTION OR MAPPING
If A and B are two non-empty sets, then a function or mapping or map from A to B is a
subset f of A × B such that for every x ∈ A there is a unique y ∈ B, and the ordered pairs (x,
y) ∈ f.
In other words, a function f is a relation from a non-empty set A into a non-empty set B such
that domain of f is A and no two ordered pairs in f have the same first component. Clearly,
every function is a relation but every relation is not a function.

If f is a function from A into B, then we write (x,y) ∈ f as f (x) = y, where x ∈ A and y ∈ B.


y is called the IMAGE of x under f and x is called the PRE-IMAGE of y under f.
The function f from A into B is denoted by 𝑓: 𝐴 → 𝐵.

For example :
Let 𝐴 = {1,2,3}, 𝐵 = { 𝑎, 𝑏, 𝑐}
let us define following relations from A to B
a. 𝑅1 = {(1, 𝑎), (3, 𝑏), (2, 𝑐)}

In R1 every element of A occurs once and only once as the first element in the ordered pairs
of R1, hence R1 is a function. We say that a is the image of 1; b is the image of 3 and c is the
image of 2 and we may write
f (1) = a, f (2) = c and f (3) = b
1, 2 and 3 are pre-images of a, c and b respectively.

b. 𝑅2 = {(1, 𝑎), (2, 𝑎), (3, 𝑎)}


R2 is a function
In this case ‘a’ is the image of each of 1, 2 and 3, thus
f (1) = a, f (2) = a and f (3) = a.

c. 𝑅3 = {(1, 𝑎), (1, 𝑐), (2, 𝑎), (3, 𝑏)}

R3 is not a function as 1 occurs twice as the first elements in ordered pairs of R3.
d. 𝑅4 = {(1, 𝑎), (2, 𝑏)}
R4 is not a function as 3 does not occur as the first element in any of the ordered pairs of R4.

KINDS OF FUNCTION

1. One-to-one Function (or injective function)


A function 𝑓: 𝐴 → 𝐵 is called one-one mapping if every distinct element of A has a
distinct image in B. Thus, a function 𝑓: 𝐴 → 𝐵 is one-one if 𝑓(𝑥1 ) = 𝑓 (𝑥2 ) →
𝑥1 = 𝑥2 , ∀ 𝑥1 , 𝑥2 ∈ 𝐴
Alternatively, 𝑥1 ≠ 𝑥2 → 𝑓(𝑥1 ) ≠ 𝑓 (𝑥2 )
2. Many-one Function : A function 𝑓: 𝐴 → 𝐵 is many-one if two or more different
elements of A have the same image in B. Thus, 𝑓: 𝐴 → 𝐵 is many-one if
𝑓(𝑥1) = 𝑓( 𝑥2 ) → 𝑥1 ≠ 𝑥2
or 𝑥1 ≠ 𝑥2 → 𝑓(𝑥1 ) = 𝑓 (𝑥2 ) for some 𝑥1 , 𝑥2 ∈ 𝐴
3. Onto or Surjective Function : The function 𝑓: 𝐴 → 𝐵 is said to be an onto function
if every element of B is image of at least one element of A. That is, if for each 𝑦 ∈ 𝐵,
there exists at least one 𝑥 ∈ 𝐴 such that f(x) = y, then f is an onto function.
Thus, for a surjective function f, Range of f = codomain (B)
4. Into Function : If the function 𝑓: 𝐴 → 𝐵 is such that there is at least one element of
B which is not the image of any element of A, then f is called an into function.
For an into function f, Range of 𝑓 ϲ 𝑐𝑜𝑑𝑜𝑚𝑎𝑖𝑛 (𝐵)
Example : Various combinations are shown in the following Venn diagrams.

5. Bijective function : A function 𝑓: 𝐴 → 𝐵 is a bijective function if f is one-one as well


as onto, i.e. f is injective and surjective both.
6. Inverse Function : An inverse function is a function that undoes the action of another
function. A function g is the inverse of a function f if whenever y=f(x) then x=g(y). In
other words, applying f and then g is the same thing as doing nothing. We can write
this in terms of the composition of f and g as g(f(x)) = x.
A function ff has an inverse function only if for every y in its range there is only one
value of x in its domain for which f(x) = y. This inverse function is unique and is
frequently denoted by f−1 and called “f inverse.”

7. Hashing Function : A hash function is any function that can be used to map data of
arbitrary size to fixed-size values. The values returned by a hash function are called
hash values, hash codes, digests, or simply hashes. The values are usually used to
index a fixed-size table called a hash table. We can use hashing to scramble
passwords into strings of authorized characters.

Composition of functions
Let A, B, C be three sets and 𝑓: 𝐴 → 𝐵, 𝑔: 𝐵 → 𝐶 be two functions.
Define a function 𝑔𝑜𝑓: 𝐴 → 𝐶 such that go f (x) = g ( f(x)) for all x ∈A.
Since f (x) ∈ B ∴ g ( f (x)) ∈ C.
The function gof is called the composition of f and g

.
IMPORTANT RESULTS
If A and B are two finite sets having m and n elements respectively, then

a. Total number of functions from the set A to the set B = nm


b. The number of one-one (injective) functions from A to B
𝑛 𝑛!
𝑚𝑃 = (𝑛−𝑚)! , 𝑖𝑓 𝑛 ≥ 𝑚
= 𝑓(𝑥) = {
0 , 𝑖𝑓 𝑛 < 𝑚
c. If n = m, then every one-one function is a bijective function, thus, the number of
bijective functions from A to B, provided n = m is n! = m!

Solved Examples
Q.1. Let A be the set of two male persons in a family. R be a relation defined on set A is
“is a brother of”, check whether R is symmetric or not?
Ans:
Let a,b are two persons in a family, then a,b∈A.
The given relation on set “is a brother of”.
If a is the brother of b, then b is also the brother of a.
R={(a,b),(b,a)}
Hence, the relation R is symmetric.

Q.2. Find the inverse relation of R={(1,2),(3,4),(5,6)}.


Ans:
Given relation is R={(1,2),(3,4),(5,6)}.
Consider R={(a,b): a∈P, b∈Q} be the relation from set P to set Q, then the relation from
set Q to set P is known as inverse relation, such that R–1:Q→P={(a,b):(a,b)∈R}.
So, inverse relation is obtained by taking the reverse of the given ordered pairs .
R–1:{(2,1),(4,3),(6,5)}

Q.3. Find the identity relation on the set P={x,y,z}.


Ans:
We know that the relation (I) is identity, then all the elements of set P are related with
itself, such that for every a∈P, then (a,a)∈I.
Given set is P={x,y,z}
Then the identity relation is given by I={(x,x),(y,y),(z,z)}.
Q.4. Let P={1,2,3},R be a relation defined on set P as “is greater than”
and R={(2,1),(3,2),(3,1)}. Verify R is transitive.
Ans:
Given set P={1,2,3},
Let P={1,2,3}, then we have
(b,a)=(2,1)→2 is greater than 1.
(c,b)=(3,2)→3 is greater than 2.
(c,a)=(3,1)→3 is greater than 1.
Thus in a transitive relation, if (x,y)∈R,(y,z)∈R, then (x,z)∈R.
So, the relation R={(2,1),(3,2),(3,1)} is transitive.

Q.5. Let set A contain the bag of red balls. Then the relation R of getting white balls
from the bag of red balls is what type of relation?
Ans: Given set A contains the bag contains the red balls. From the bag of red balls,
relation R of getting the white ball is not possible. So, the given relation is an empty
relation.

.
Definition: Propositional Logic - A proposition is a collection of declarative statements
that has either a truth value "true” or a truth value "false". A propositional consists of
propositional variables and connectives. We denote the propositional variables by capital
letters (A, B, C etc). The connectives connect the propositional variables.
Some examples of Propositions are given below:
• "Man is Mortal", it returns truth value“TRUE” as T.
• "12 + 9 = 3 − 2", it returns truth value “FALSE” as F. The following is not a
Proposition
• "A is less than 2". It is because unless we give a specific value of A, we
cannot say whether the statement is true or false.
Connectives In propositional logic generally we use five connectives which are
i. OR ()
ii. AND ()
iii. Negation/ NOT (¬)
iv. Conditional or Implication / if-then (→)
v. Bi conditional or If and only if ()

i. AND (  ) operation – The AND operation of two propositions A and B (written


as A  B) is true if both the propositional variable A and B is true. The truth table
is as follows
A B AB
TRUE TRUE TRUE
TRUE FALSE FALSE
FALSE TRUE FALSE
FALSE FALSE FALSE

ii. OR (  ) operation – The OR operation of two propositions A and B (written as


A  B) is true if at least any of the propositional variable A or B is true. The truth
table is as follows

A B AB
TRUE TRUE TRUE
TRUE FALSE TRUE
FALSE TRUE TRUE
FALSE FALSE FALSE

iii. Negation (¬) operation − The negation of a proposition A (written as ¬A) is


false when A is true and is true when A is false. The truth table is as follows

A ¬A
TRUE FALSE
FALSE TRUE
iv. Implication / if then (A→B) – An implication is False if A is true and B is false.
The rest cases are true. The truth table is as follows

A B A→B
TRUE TRUE TRUE
TRUE FALSE FALSE
FALSE TRUE TRUE
FALSE FALSE TRUE

v. If and only if (A  B) - A bi-conditional logical connective which is true when


A and B are both false or both are true. The truth table is as follows

A B AB
TRUE TRUE FALSE
TRUE FALSE TRUE
FALSE TRUE TRUE
FALSE FALSE FALSE

Well Formed Formulas(WFFs) - The well formed formulas(WFFs) or


statement formulas or logic formulas are defined recursively (or inductively)
as
1. Propositional variables p,q,r,… and propositional constants F,T are well
formed formulas. They are known as primitive WFFs.
2. If P and Q are WFFs then P,Q,P Q,P  Q,P →Q and P  Q are also
WFFs.
3. All WFFs are obtained by the above procedures applied a finite number of
times. For example, the following are WFFs p, pq, p →q, p(q →r)
(pq)→r,(p →q)→(q → p)
Note: In order to avoid excessive use of parenthesis, we adopt an order of
precedence for logical Operators. , , , → and 

Tautologies - A Tautology is a formula which is always true for every


value of its propositional variables. Example − Prove [(A → B)  A] → B is a
tautology The truth table is as follows

A B A→B (A → B)  A [(A → B)  A] → B
TRUE TRUE TRUE TRUE TRUE
TRUE FALSE FALSE FALSE TRUE
FALSE TRUE TRUE TRUE TRUE
FALSE FALSE TRUE FALSE TRUE

Every value of ([(A → B)  A] → B is “True”, it is a Tautology.


Contradictions A Contradiction is a formula which is always false for
every value of its propositional variables.
Example − Prove (A V B)  [(¬A)  (¬B)] is a contradiction The truth table
is as follows

A B AVB (¬A) (¬B) (¬A)  (¬B) (A V B)  [(¬A)  (¬B)]


TRUE TRUE TRUE FALSE FALSE FALSE FALSE
TRUE FALSE TRUE FALSE TRUE FALSE FALSE
FALSE TRUE TRUE TRUE FALSE FALSE FALSE
FALSE FALSE FALSE TRUE TRUE TRUE FALSE

Every value of (A  B)  [(¬A)  (¬B)] is “False”, it is a Contradiction.

Contingency A Contingency is a formula which has both some true and


some false values for every value of its propositional variables.
Example − Prove (A  B)  (¬A) a contingency.

The truth table is as follows

A B AB ¬A (A  B)  (¬A)
TRUE TRUE TRUE FALSE FALSE
TRUE FALSE TRUE FALSE FALSE
FALSE TRUE TRUE TRUE TRUE
FALSE FALSE FALSE TRUE FALSE

Every value of (A  B)  (¬A) has both “True” and “False”, it is a


contingency.

Propositional Equivalences - Two statements X and Y are logically


equivalent if any of the following two conditions –

• The truth tables of each statement have the same truthvalues


• The bi-conditional statement X  Y is a tautology.
Example−Prove ¬(A  B)and[(¬A)  (¬B)] are equivalent
Testing by 1st method (Matching truth table)

¬ (A  B) and [(¬A)  (¬B)]


A B A V B ¬ (A  B) ¬A ¬B [(¬A)  (¬B)]
TRUE TRUE TRUE FALSE FALSE FALSE FALSE
TRUE FALSE TRUE FALSE FALSE TRUE FALSE
FALSE TRUE TRUE FALSE TRUE FALSE FALSE
FALSE FALSE FALSE TRUE TRUE TRUE TRUE

The truth values of ¬ (A  B) and [(¬A)  (¬B)] are same, hence the statements are
equivalent.

Testing by 2nd method (Bi-conditionality )


A B ¬ (A  B) (¬A)  (¬B) ¬ (A  B)  [(¬A)  (¬B)]
TRUE TRUE FALSE FALSE TRUE
TRUE FALSE FALSE FALSE TRUE
FALSE TRUE FALSE FALSE TRUE
FALSE FALSE TRUE TRUE TRUE

As [¬ (A  B)]  [(¬A)  (¬B)] is a tautology, the statements are equivalent.


`

Laws of Propositional Logic:

S.No Name of Laws Primal Form Dual Form


1. Idempotent Law ppp ppp
2. Identity Law pFp p T  p
3. Dominant Law p T  T pFF
4. Complement Law p  p  T p  p  F
5. Commutative Law pqqp pqqp
6. Associative Law p(qr) (pq)r p(qr) (pq)r
7. Distributive Law p(qr) (pq)(pr) p(qr) (pq)(pr)
8. Absorption Law p(pq) p p(pq) p
9. De Morgan’s Law (pq) pq (pq) pq
10. Double Negation Law (p) p -

Logical Equivalences involving Conditional Statements


Logical Equivalences involving Biconditional Statements

Inverse, Converse, and Contra-positive


A conditional statement has two parts – Hypothesis and Conclusion.

Example of Conditional Statement − “If you do your homework, you will


not be punished.” Here, "you do your homework" is the hypothesis and "you
will ` not be punished" is the conclusion.
Inverse –An inverse of the conditional statement is the negation of both the
hypothesis and the conclusion. If the statement is “If p, then q”, the inverse
will be “If not p, then not q”. The inverse of “If you do your homework, you
will not be punished” is “If you do not do your homework, you will be
punished.”
Converse−The converse of the conditional statement is computed by
interchanging the hypothesis and the conclusion. If the statement is “If p, then
q”, the inverse will be “If q, then p”. The converse of "If you do your
homework, you will not be punished" is "If you will not be punished, you do
not do your homework”.
Contra-positive –The contra-positive of the conditional is computed by
interchanging the hypothesis and the conclusion of the inverse statement. If
the statement is “If p, then q”, the inverse will be “If not q, then not p”. The
Contrapositive of "If you do your homework, you will not be punished” is "If
you will be punished, you do your homework”.

Recall that a formula is a statement whose truth value may depend on the values of some
variables. For example,

"x ≤ 5 ∧ x > 3'' is true for x=4 and false for x=6. Compare this with the statement

"For every xx, x ≤ 5∧ x >3,'' which is definitely false and the statement

"There exists an x such that x ≤ 5 ∧ x > 3,''

which is definitely true. The phrase "for every x'' (sometimes "for all x'') is called a universal
quantifier and is denoted by ∀x. The phrase "there exists an x such that'' is called
an existential quantifier and is denoted by ∃x. A formula that contains variables is not
simply true or false unless each of these variables is bound by a quantifier. If a variable is not
bound the truth of the formula is contingent on the value assigned to the variable from the
universe of discourse.

The Universal Quantifier

A sentence ∀xP(x) is true if and only if P(x) is true no matter what value (from the universe
of discourse) is substituted for x.

Example 1: ∀x (x2 ≥ 0 ), i.e., "the square of any number is not negative.''

∀x ∀y ( x + y = y + x), i.e., the commutative law of addition.

∀x ∀y ∀z (( x + y ) + z = x + ( y + z )), i.e., the associative law of addition.

The "all'' form. The universal quantifier is frequently encountered in the following context:

∀x(P(x)⇒Q(x)),
which may be read, "All x satisfying P(x) also satisfy Q(x).'' Parentheses are crucial here;
∀x P(x) ⇒∀x Q(x) and (∀x P(x))⇒Q(x) (∀x P(x))⇒ Q(x).

The latter formula might also be written as ∀x P(x)⇒Q(x) ∀x P(x)⇒Q(x), which is to say that
the universal quantifier has higher precedence than the conditional; to avoid
misunderstanding, it is best to include the parentheses. The meaning of this formula might not
be clear at first. The x in P(x) is bound by the universal quantifier, but the x in Q(x) is not.
The formula (∀x P(x))⇒Q(x) has the same meaning as (∀x P(x))⇒Q(y), and its truth depends
on the value assigned to the variable in Q(⋅).
Example 2

∀x (x is a square ⇒ x is a rectangle), i.e., "all squares are rectangles.''

∀x (x lives in Walla Walla ⇒ x lives in Washington), i.e., "every person who lives in Walla
Walla lives in Washington.''

This construction sometimes is used to express a mathematical sentence of the form "if this,
then that,'' with an "understood'' quantifier.

Example 3

∙If we say, "if x is negative, so is its cube,'' we usually mean "every negative x has a negative
cube.'' This should be written symbolically as ∀x (( x < 0)⇒(x3< 0 )).

"If two numbers have the same square, then they have the same absolute value'' should be
written as ∀x ∀y (( x2= y2)⇒( |x| = |y|)).

∙"If x = y, then x + z = y + z'' should be written as ∀x ∀y ∀z ((x = y) ⇒ ( x + z = y + z)).

The Existential Quantifier

A sentence ∃x P(x) is true if and only if there is at least one value of x (from the universe of
discourse) that makes P(x) true.

Example 4

∃x ( x ≥ x2) is true since x = 0 is a solution. There are many others.

∃x ∃y (x2+y2 = 2xy) is true since x = y = 1 is one of many solutions.

The "some'' form. The existential quantifier is frequently encountered in the following
context:

∃x (P(x) ∧ Q(x))
which may be read, "Some x satisfying P(x) also satisfies Q(x).''

Example 5

∃x (x is a professor ∧ x is a republican), i.e., "some professor is a republican.''

∃x (x is a prime number ∧ x is even), i.e., "some prime number is even.”

It may at first seem that "Some x satisfying P(x) satisfies Q(x)'' should be translated as

∃x (P(x) ⇒ Q(x)),
like the universal quantifier. Suppose P(x)="x is an apple'' and Q(x)="x is an orange.'' The
sentence "some apples are oranges'' is certainly false, but
∃x (P(x) ⇒ Q(x))
is true. To see this suppose x0 is some particular orange. Then P(x0) ⇒ Q(x0) evaluates to
F⇒T, which is T, and the existential quantifier is satisfied.

We use abbreviations of the "some'' form much like those for the "all'' form.

You might also like