Notes of Unit - 1
Notes of Unit - 1
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}
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 —
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.
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 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.
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}.
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}.
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,
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) }
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.
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.
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
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
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.
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.
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.
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
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
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.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 ()
A B AB
TRUE TRUE TRUE
TRUE FALSE TRUE
FALSE TRUE TRUE
FALSE FALSE FALSE
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
A B AB
TRUE TRUE FALSE
TRUE FALSE TRUE
FALSE TRUE TRUE
FALSE FALSE FALSE
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
A B AB ¬A (A B) (¬A)
TRUE TRUE TRUE FALSE FALSE
TRUE FALSE TRUE FALSE FALSE
FALSE TRUE TRUE TRUE TRUE
FALSE FALSE FALSE TRUE FALSE
The truth values of ¬ (A B) and [(¬A) (¬B)] are same, hence the statements are
equivalent.
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
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.
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.
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 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|)).
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
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
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.