0% found this document useful (0 votes)
69 views24 pages

Dm. Unit-2

Descrete mathematics

Uploaded by

ruc200030
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)
69 views24 pages

Dm. Unit-2

Descrete mathematics

Uploaded by

ruc200030
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/ 24

According to DBATU Syllabus 2022-23 UNIT 2:Functions and Relations

Discrete Mathematics

Functions
A function , written f:A→B, is a mathematical relation where each element of a set A, called the domain ,
is associated with a unique element of another set B, called the codomain of the function.

For each element a∈A, we associate a unique element b∈B. The set of all such associations is called a
function f from A into B, denoted f:A→B, with (a,b) used to indicate the mapping f:a→b, or f(a)=b. Here
b is understood to be the image of a assigned by f. The range is the set of all image values f(a). With this
notation, a is allowed to vary over all elements in the set A.

Terms related to functions:


A General Function points from each member of "A" to a member of "B".It never has one "A" pointing to
more than one "B", so one-to-many is not OK in a function (so something like "f(x) = 7 or 9" is not
allowed)But more than one "A" can point to the same "B" (many-to-one is OK).

Domain and co-domain – if f is a function from set A to set B, then A is called Domain and B is
called co-domain.
Range – Range of f is the set of all images of elements of A. Basically Range is subset of co- domain.
Image and Preimage – b is the image of a and a is the pre-image of b if f(a) = b.
Properties of Function:

Addition and multiplication: let f1 and f2 are two functions from A to B, then f1 + f2 and f1.f2 are
defined as-:
f1+f2(x) = f1(x) + f2(x). (addition)
f1f2(x) = f1(x) f2(x). (multiplication)
Equality: Two functions are equal only when they have the same domain, same co-domain and same
mapping elements from domain to co-domain.
Types of functions:
One to one function(Injective):
A function is called one to one if for all elements a and b in A, if f(a) = f(b),then it must be
the case that a = b. It never maps distinct elements of its domain to the same element of its
co-domain.

Notes Prepared by:


Asst.Prof.Vidya A. Huse(v50huse@gmail.com)
According to DBATU Syllabus 2022-23 UNIT 2:Functions and Relations
Discrete Mathematics

Injective means we won't have two or more "A"s pointing to the same "B".So many-to-one is NOT OK
(which is OK for a general function).As it is also a function one-to-many is not OK But we can have a
"B" without a matching "A"Injective is also called "One-to-One"

Onto Function (surjective):


If every element b in B has a corresponding element a in A such that f(a) = b. It is not
required that a is unique; The function f may map one or more elements of A to the same
element of B.

Surjective means that every "B" has at least one matching "A" (maybe more than one).There won't be a
"B" left out.

Examples of Surjective function

There are various examples of surjective functions, which are described as follows:

Example 1: In this example, we will assume X = {4, 5, 7, 8}, and Y = {1, 3}, and f = {(4, 1), (5, 3), (7, 1),
(8, 3)}. Now we have to show whether f is an surjective function from X to Y.

Solution: From the above question, we get the following details:

Notes Prepared by:


Asst.Prof.Vidya A. Huse(v50huse@gmail.com)
According to DBATU Syllabus 2022-23 UNIT 2:Functions and Relations
Discrete Mathematics

X = {4, 5, 7, 8}

Y = {1, 3}

& f = {(4, 1), (5, 3), (7, 1), (8, 3)}

So, all the elements of set Y contain a domain element on set X. That means the elements 4, 7 of set X,
have image 1, and both elements 5, 8 have image 3. Here {1, 3} is known as the range of the function, and
that range is equal to Y. Thus, f: X → Y is onto or surjective function.

Example 2: In this example, we have two sets, X and Y where X = {1, 2, 3, 4}, and Y = {x, y, z}. Now we
have to determine the number of onto functions.

Solution: By the above question, we get the following details:

X = {1, 2, 3, 4}

Y = {x, y, z}

In this case, n = 4, and m = 3.

Now, we will put the value of n and m in the following formula, and after that, we will get the following:

= 34 - 3C1(2)4 + 3C2(1)4

= 81 - 3 (16) + 3(1)

= 81 - 48 + 3

= 84-48

= 36

Thus, the number of surjective functions from X to Y is 36.

Example 3: In this example, we have a function g: R → R, which is defined as g(x) = 1 + x2. Now have to
determine whether this function is surjective or onto function.

Solution: Here we have g(x) = 1 + x2

Notes Prepared by:


Asst.Prof.Vidya A. Huse(v50huse@gmail.com)
According to DBATU Syllabus 2022-23 UNIT 2:Functions and Relations
Discrete Mathematics

As we know that x2 > 0 for all the real numbers. Hence, 1 + x2 > 1 or g(x) > 1, and we can also say that the
range of this function is (1, ∞). The real numbers (R) are also contained by the second set. So this range
and codomain are not equal to each other. Hence, the given function is not a surjective function.

One to one correspondence function(Bijective/Invertible):


A function is a Bijective function if it is both one to one and onto function.Bijective means both Injective
and Surjective together.Think of it as a "perfect pairing" between the sets: everyone has a partner and no
one is left out.So there is a perfect "one-to-one correspondence" between the members of the sets.(But
don't get that confused with the term "One-to-One" used to mean injective).Bijective functions have an
inverse.If every "A" goes to a unique "B", and every "B" has a matching "A" then we can go back and
forwards without being led astray.

Example 1:

In this example, we have to prove that the function f(x) = 3x - 5 is bijective from R to R.

Solution:

On the basis of bijective function, a given function f(x) = 3x -5 will be a bijective function if it
contains both surjective and injective functions.
Prove that Function is injective
If we want to show that the given function is injective, then we have to prove that f(a) = c and f(b)
= c then a = b.
For this, we will assume that
f(a) = c and f(b) = c
Therefore, we can write it like this:

Notes Prepared by:


Asst.Prof.Vidya A. Huse(v50huse@gmail.com)
According to DBATU Syllabus 2022-23 UNIT 2:Functions and Relations
Discrete Mathematics

c = 3a -5 and c = 3b -5
Thus, we can write it like this:
3a - 5 = 3b - 5
a=b
So, we can say that the given function f(x)= 3x -5 is injective.

Prove that Function is Surjective


If we want to show that a given function is surjective, then we have to first show that in the range
for any point 'a' there exists a point 'b' in subdomain 's'. That means f(b) = a.
For this, we will assume that
a = 3x - 5
Therefore, the value of b will be like this:
b = (a + 5)/3
Since, the above number is a real number, and it is also shown in the domain. So we can say that
the function is surjective.

Thus, the function f(x) = 3x - 5 satisfies the condition of onto function and one to one function. So
we can say that the given function is bijective.E

Example 2:

In this example, we will have a function f: A → B, where set A = {x, y, z} and B = {a, b, c}. We have
to prove that this function is bijective or not.

Solution:

As we know f: A → B such thatf = {(x, a), (y, b), (z, c)}As we can see that the above function
satisfies the property of onto function and one to one function. That's why the given function is a
bijective function.

Inverse Functions:
Bijection functions are also known as invertible functions because they have inverse
function properties. The inverse of bijection f is denoted as f-1. It is a function which
assigns to b, a unique element such that f(a) = b. hence f-1 (b) = a.
Steps to find an Inverse function
Notes Prepared by:
Asst.Prof.Vidya A. Huse(v50huse@gmail.com)
According to DBATU Syllabus 2022-23 UNIT 2:Functions and Relations
Discrete Mathematics

We can easily determine the inverse function with the help of the following sequence of steps. Here we
will assume a function f where f(x) = ax + b, and then try to determine the inverse of this function with the
help of following steps:

1) For the above function f(x) = ax + b, we will replace f(x) = y, and then obtain y = ax + b.
2) In this function, we will interchange y with x and x with y. After interchanging, y = ax + b will
become x = ay + b.
3) Now we will solve this expression x = ay + b for y. After solving this expression, we will get y = (x
- b) / a.
4) Lastly, we will replace y = f-1(x), and then we will have f-1(x) = (x - b) / a.

Examples of Inverse function

There are various examples of inverse functions. Some of the examples of inverse function are described
as follows:

Example 1: In this example, we will consider two functions, f and g. Where f(x) = 2x + 3 and g(x) = (x-3)
/ 2. Now we have to determine the inverse of these functions with the help of the formula of an inverse
function.

Solution:

Here we have to show that (f o g)(x) = (g o f)(x) = x.

To prove this, first we will take the left side part, which is described as follows:

(f o g)(x) = f (g(x))

= f ((x-3) /2)

= 2 ((x-3) /2) + 3 (2 is cancelled by the 2)

= x-3+3

=x

Now we will take the right side of part and try to prove it like this:

(g o f)(x) = g (f(x))

Notes Prepared by:


Asst.Prof.Vidya A. Huse(v50huse@gmail.com)
According to DBATU Syllabus 2022-23 UNIT 2:Functions and Relations
Discrete Mathematics

= g(2x+3)

= (2x +3 -3) /2

= 2x /2

=x

Through this, we can see that (f o g)(x) = (g o f)(x) = x.

With the help of the inverse formula, we can say that f and g are inverses of each other.

Hence, we have proved that f = g-1 and g = f-1.

Example 2: In this example, we have a function f. Where f(a) = 4a+1 /3a-2. Now we have to determine the
inverse function with the help of the formula of an inverse function.

Solution:

Here we will use the formula of inverse function to determine the inverse function.

As we know that the given function is:

b = (4a+1) / (3a-2)

When we interchange x and y, we will get the following:

a = (4b+1) / (3b-2)

Now we will solve the expression for y. For this, we will multiply both sides by (3b- 2) and get the
following:

a(3b - 2) = 4b+1

3ab - 2a = 4b+1

3ab - 4b = 2a+1

b(3a - 4) = 2a+1

b = 2a+1 /3a-4

Now we will replace b with f-1(a), and get the following:

Notes Prepared by:


Asst.Prof.Vidya A. Huse(v50huse@gmail.com)
According to DBATU Syllabus 2022-23 UNIT 2:Functions and Relations
Discrete Mathematics

f-1(a) = 2a+1 /3a-4

Hence, the value of an inverse function is 2a+1 /3a-4.

S. Injective Function Surjective Function Bijective Function


No
.

A function will be injective A function will be Bijective function contains both

if the distinct element of surjective if one more injective and surjective functions.

the domain maps the than one element of A

distinct elements of its maps the same

codomain. element of B.

2 This function can also be This function can also This function can also be called

called a one-to-one be called an onto as one to one correspondence.

function. function.

Composition of Functions
In Maths, the composition of a function is an operation where two functions say f and g generate a new function say
h in such a way that h(x) = g(f(x)). It means here function g is applied to the function of x. So, basically, a function is
applied to the result of another function.

Notes Prepared by:


Asst.Prof.Vidya A. Huse(v50huse@gmail.com)
According to DBATU Syllabus 2022-23 UNIT 2:Functions and Relations
Discrete Mathematics

Let’s have a look at the definition of a composite function.

Composite Functions Definition


Let f : A → B and g : B → C be two functions. Then the composition of f and g, denoted by g ∘ f, is defined as the
function g ∘ f : A → C given by g ∘ f (x) = g(f (x)), ∀ x ∈ A.

The below figure shows the representation of composite functions.

he order of function is an important thing while dealing with the composition of functions since (f ∘ g) (x)
is not equal to (g ∘ f) (x).

The relation and function is an important concept of Class 11 and 12. See below the function composition
symbol and domain with example.

Symbol: It is also denoted as (g∘f)(x), where ∘ is a small circle symbol. We cannot replace ∘ with a dot (.),
because it will show as the product of two functions, such as (g.f)(x).

Domain: f(g(x)) is read as f of g of x. In the composition of (f o g) (x) the domain of function f becomes
g(x). The domain is a set of all values which go into the function.

Example: If f(x) = 3x+1 and g(x) = x2 , then f of g of x, f(g(x)) = f(x2) = 3x2+1.

If we reverse the function operation, such as f of f of x, g(f(x)) = g(3x+1) = (3x+1)2


Properties of Function Compositions
Associative Property: As per the associative property of function composition, if there are three functions
f, g and h, then they are said to be associative if and only if;

f ∘ (g ∘ h) = (f ∘ g) ∘ h

Notes Prepared by:


Asst.Prof.Vidya A. Huse(v50huse@gmail.com)
According to DBATU Syllabus 2022-23 UNIT 2:Functions and Relations
Discrete Mathematics

Commutative Property: Two functions f and g are said to be commute with each other, if and only if;

g∘f=f∘g

Few more properties are:

The function composition of one-to-one function is always one to one.


The function composition of two onto function is always onto
The inverse of the composition of two functions f and g is equal to the composition of the inverse of both
the functions, such as (f ∘ g)-1 = ( g-1 ∘ f-1).
How to Solve Composite Functions
In maths, solving a composite function signifies getting the composition of two functions. A small circle
(∘) is used to denote the composition of a function.

Go through the below-given steps to understand how to solve the given composite function.

Step 1: First write the given composition in a different way.

Consider f(x) = x2 and g(x) = 3x

Now,

(f ∘ g) (x) can be written as f[g(x)].

Step 2: Substitute the variable x that is there in the outside function with the inside function by taking the
individual functions as a reference.

That means,

(f ∘ g)(x) = f(3x) {since g(x) = 3x}

Step 3: Finally, simplify the obtained function.

(f ∘ g)(x) = f(3x) = (3x)2 {since f(x) = x2}

= 9x2

Function Composition With Itself


Notes Prepared by:
Asst.Prof.Vidya A. Huse(v50huse@gmail.com)
According to DBATU Syllabus 2022-23 UNIT 2:Functions and Relations
Discrete Mathematics

It is possible to compose a function with itself. Suppose f is a function, then the composition of function f
with itself will be

(f∘f)(x) = f(f(x))

Let us understand this with an example:

Example: If f(x) = 3x2, then find (f∘f)(x).

Solution: Given: f(x) = 3x2

(f∘f)(x) = f(f(x))

= f (3x2)

= 3(3x)2

= 3.9x2

= 27x2

Example of Composition of Functions


Q.1: If f (x) = 2x and g(x) = x+1, then find (f∘g)(x) if x = 1.

Solution: Given, f(x) = 2x

g(x) = x+ 1

Therefore, the composition of f from g will be;

(f∘g)(x) = f(g(x)) = f(x+1) = 2(x+1)

Now putting the value of x = 1

f(g(1)) = 2(1+1) = 2 (2) = 4

Q.2: If f(x) = 2x +1 and g(x) = -x2, then find (g∘f)(x) for x = 2.

Solution: Given,
Notes Prepared by:
Asst.Prof.Vidya A. Huse(v50huse@gmail.com)
According to DBATU Syllabus 2022-23 UNIT 2:Functions and Relations
Discrete Mathematics

f(x) = 2x+1

g(x) = -x2

To find: g(f(x))

g(f(x)) = g(2x+1) = -(2x+1)2

Now put x =2 to get;

g(f(2)) = -(2.2+1)2

= -(4+1)2

=-(5)2

=-25
Equivalence Relation
In mathematics, an equivalence relation is a kind of binary relation that should be reflexive, symmetric and
transitive. The well-known example of an equivalence relation is the “equal to (=)” relation. In other
words, two elements of the given set are equivalent to each other if they belong to the same equivalence
class. Equivalence Relation Definition
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. The equivalence relation is a relationship on the set which is generally
represented by the symbol “∼”.

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

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

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

In terms of equivalence relation notation, it is defined as follows:

A binary relation ∼ on a set A is said to be an equivalence relation, if and only if it is reflexive, symmetric
and transitive.

Notes Prepared by:


Asst.Prof.Vidya A. Huse(v50huse@gmail.com)
According to DBATU Syllabus 2022-23 UNIT 2:Functions and Relations
Discrete Mathematics

(i.e) For all x, y, z in set A,

x ∼ x (Reflexivity)
x ∼ y if and only if y ∼ x (Symmetry)
If x∼y and y∼z, then x∼z (Transitivity)
Equivalence relations can be explained in terms of the following examples:

The sign of ‘is equal to (=)’ on a set of numbers; for example, 1/3 = 3/9.
For a given set of triangles, the relation of ‘is similar to (~)’ and ‘is congruent to (≅)’ shows equivalence.
For a given set of integers, the relation of ‘congruence modulo n (≡)’ shows equivalence.
The image and domain are the same under a function, which shows the relation of equivalence.
For a set of all angles, ‘has the same cosine’.
For a set of all real numbers,’ has the same absolute value’.

Equivalence Relation Proof


Here is an equivalence relation example to prove the properties.

Let us assume that R be a relation on the set of ordered pairs of positive integers such that ((a, b), (c, d))∈
R if and only if ad=bc. Is R an equivalence relation?

In order to prove that R is an equivalence relation, we must show that R is reflexive, symmetric and
transitive.

The Proof for the given condition is given below:

Reflexive Property
According to the reflexive property, if (a, a) ∈ R, for every a∈A

For all pairs of positive integers,

((a, b),(a, b))∈ R.

Clearly, we can say

ab = ab for all positive integers.

Hence, the reflexive property is proved.

Symmetric Property
Notes Prepared by:
Asst.Prof.Vidya A. Huse(v50huse@gmail.com)
According to DBATU Syllabus 2022-23 UNIT 2:Functions and Relations
Discrete Mathematics

From the symmetric property,

if (a, b) ∈ R, then we can say (b, a) ∈ R

For the given condition,

if ((a, b),(c, d)) ∈ R, then ((c, d),(a, b)) ∈ R.

If ((a, b),(c, d))∈ R, then ad = bc and cb = da

since multiplication is commutative.

Therefore ((c, d),(a, b)) ∈ R

Hence symmetric property is proved.

Transitive Property
From the transitive property,

if (a, b) ∈ R and (b, c) ∈ R, then (a, c) also belongs to R

For the given set of ordered pairs of positive integers,

((a, b), (c, d))∈ R and ((c, d), (e, f))∈ R,

then ((a, b),(e, f) ∈ R.

Now, assume that ((a, b), (c, d))∈ R and ((c, d), (e, f)) ∈ R.

Then we get, ad = cb and cf = de.

The above relation implies that a/b = c/d and that c/d = e/f,

so a/b = e/f we get af = be.

Therefore ((a, b),(e, f))∈ R.

Hence transitive property is proved.Equivalence Relation Examples


Go through the equivalence relation examples and solutions provided here
Notes Prepared by:
Asst.Prof.Vidya A. Huse(v50huse@gmail.com)
According to DBATU Syllabus 2022-23 UNIT 2:Functions and Relations
Discrete Mathematics

Question 1:

Let us assume that F is a relation on the set R real numbers defined by xFy if and only if x-y is an integer.
Prove that F is an equivalence relation on R.

Solution:

Reflexive: Consider x belongs to R,then x – x = 0 which is an integer. Therefore xFx.

Symmetric: Consider x and y belongs to R and xFy. Then x – y is an integer. Thus, y – x = – ( x – y), y – x
is also an integer. Therefore yFx.

Transitive: Consider x and y belongs to R, xFy and yFz. Therefore x-y and y-z are integers. According to
the transitive property, ( x – y ) + ( y – z ) = x – z is also an integer. So that xFz.

Thus, R is an equivalence relation on R.

Question 2:

Show that the relation R is an equivalence relation in the set A = { 1, 2, 3, 4, 5 } given by the relation R =
{ (a, b):|a-b| is even }.

Solution:

R = { (a, b):|a-b| is even }. Where a, b belongs to A

Reflexive Property :

From the given relation,

|a – a| = | 0 |=0

And 0 is always even.

Thus, |a-a| is even

Therefore, (a, a) belongs to R

Notes Prepared by:


Asst.Prof.Vidya A. Huse(v50huse@gmail.com)
According to DBATU Syllabus 2022-23 UNIT 2:Functions and Relations
Discrete Mathematics

Hence R is Reflexive

Symmetric Property :

From the given relation,

|a – b| = |b – a|

We know that |a – b| = |-(b – a)|= |b – a|

Hence |a – b| is even,

Then |b – a| is also even.

Therefore, if (a, b) ∈ R, then (b, a) belongs to R

Hence R is symmetric.

Transitive Property :

If |a-b| is even, then (a-b) is even.

Similarly, if |b-c| is even, then (b-c) is also even.

Sum of even number is also even

So, we can write it as a-b+ b-c is even

Then, a – c is also even

So,

|a – b| and |b – c| is even , then |a-c| is even.

Therefore, if (a, b) ∈ R and (b, c) ∈ R, then (a, c) also belongs to R

Hence R is transitive.

Notes Prepared by:


Asst.Prof.Vidya A. Huse(v50huse@gmail.com)
According to DBATU Syllabus 2022-23 UNIT 2:Functions and Relations
Discrete Mathematics

Combinatorics:
Combinatorics is a stream of mathematics that concerns the study of finite discrete structures. It deals with
the study of permutations and combinations, enumerations of the sets of elements. It characterizes
Mathematical relations and their properties.Mathematicians use the term “Combinatorics” as it refers to the
larger subset of Discrete Mathematics. It is frequently used in computer Science to derive the formulas
and it is used for the estimation of the analysis of the algorithmsCombinatorics is the branch of
Mathematics dealing with the study of finite or countable discrete structures. It includes the enumeration or
counting of objects having certain properties. Counting helps us solve several types of problems such as
counting the number of available IPv4 or IPv6 addresses.
Counting Principles –

There are two basic counting principles, sum rule and product rule.
Sum Rule – If a task can be done in one of n1 ways or one of n2 ways, where none of the set of n1 ways
is the same as any of the set of n2 ways, then there are n1+n2 ways to do the task.
Product Rule – If a task can be broken down into a sequence of k subtasks, where each subtask can be
performed in n1,n1,...nk respectively, then the total number of ways the task can be performed is
n1*n2*...*nk.

● Example 1 – In how many ways can 3 winning prizes be given to the top 3 players in a game
played by 12 players?

● Solution – We have to distribute 3 prizes among 12 players. This task can be divided into 3
subtasks of assigning a single prize to a certain player.
Giving out the first prize can be done in 12 different ways. After giving out the first prize, two
prizes remain and 11 players remain. Similarly, the second prize and third prize can be given in
11 ways and 10 ways. The total number of ways by the product rule is 12 * 11 * 10 = 1320.

● Example 2 – In how many ways can a person choose a project from three lists of projects of
sizes 10, 15, and 19 respectively?

● Solution – The person has a choice of choosing a project from either of the three lists. So the
person can choose from either 10 projects or 15 projects or 19 projects. Since choosing from

Notes Prepared by:


Asst.Prof.Vidya A. Huse(v50huse@gmail.com)
According to DBATU Syllabus 2022-23 UNIT 2:Functions and Relations
Discrete Mathematics

one list is not the same as choosing another list, the total number of ways of choosing a pro

Principle of Inclusion-Exclusion :
The sum-rule mentioned above states that if there are multiple sets of ways of doing a task, there shouldn’t
be any way that is common between two sets of ways because if there is, it would be counted twice and the
enumeration would be wrong.
The principle of inclusion-exclusion says that in order to count only unique ways of doing a task, we
must add the number of ways to do it in one way and the number of ways to do it in another and then
subtract the number of ways to do the task that are common to both sets of ways.
The principle of inclusion-exclusion is also known as the subtraction principle. For two sets of ways A1
and A2, the enumeration would like-

● Example 1 – How many binary strings of length 8 either start with a ‘1’ bit or end with two
bits ’00’?

● Solution – If the string starts with one, there are 7 characters left which can be filled in
ways.
If the string ends with ’00’ then 6 characters can be filled in ways.
Now if we add the above sets of ways and conclude that it is the final answer, then it would be
wrong. This is because there are strings with start with ‘1’ and end with ’00’ both, and since
they satisfy both criteria they are counted twice.
So we need to subtract such strings to get a correct count.
Strings that start with ‘1’ and end with ’00’ have five characters that can be filled in
ways.
So by the inclusion-exclusion principle we get-
Total strings = 128 + 64 – 32 = 160

Notes Prepared by:


Asst.Prof.Vidya A. Huse(v50huse@gmail.com)
According to DBATU Syllabus 2022-23 UNIT 2:Functions and Relations
Discrete Mathematics

Counting:
Permutations
A permutation is an arrangement of some elements in which order matters. In other words a Permutation is
an ordered Combination of elements.

Examples
From a set S ={x, y, z} by taking two at a time, all permutations are −

xy,yx,xz,zx,yz,zy.

We have to form a permutation of three digit numbers from a set of numbers S={1,2,3}. Different three
digit numbers will be formed when we arrange the digits. The permutation will be = 123, 132, 213, 231,
312, 321

Number of Permutations
The number of permutations of ‘n’ different things taken ‘r’ at a time is denoted by nPr
nPr=n!/(n−r)!
where n!=1.2.3.…(n−1).n

Some important formulas of permutation


If there are n elements of which a1 are alike of some kind, a2 are alike of another kind; a3 are alike of third
kind and so on and ar are of rth kind, where (a1+a2+...ar)=n.

Then, the number of permutations of these n objects is = n!/[(a1!(a2!)…(ar!)].

Number of permutations of n distinct elements taking n elements at a time = nPn=n!


The number of permutations of n dissimilar elements taking r elements at a time, when x particular things
always occupy definite places = n−xpr−x
The number of permutations of n dissimilar elements when r specified things always come together is −
r!(n−r+1)!
The number of permutations of n dissimilar elements when r specified things never come together is −
n!–[r!(n−r+1)!]
The number of circular permutations of n different elements taken x elements at time = npx/x
The number of circular permutations of n different things = npn/n
Some Problems
Problem 1 − From a bunch of 6 different cards, how many ways can we permute it?

Solution − As we are taking 6 cards at a time from a deck of 6 cards, the permutation will be 6P6=6!=720
Problem 2 − In how many ways can the letters of the word 'READER' be arranged?

Solution − There are 6 letters word (2 E, 1 A, 1D and 2R.) in the word 'READER'.

Notes Prepared by:


Asst.Prof.Vidya A. Huse(v50huse@gmail.com)
According to DBATU Syllabus 2022-23 UNIT 2:Functions and Relations
Discrete Mathematics

The permutation will be =6!/[(2!)(1!)(1!)(2!)]=180.

Combinations
A combination is selection of some given elements in which order does not matter.

The number of all combinations of n things, taken r at a time is −

nCr=n!/r!(n−r)!
Problem 1

Find the number of subsets of the set {1,2,3,4,5,6} having 3 elements.

Solution

The cardinality of the set is 6 and we have to choose 3 elements from the set. Here, the ordering does not
matter. Hence, the number of subsets will be 6C3=20.

Problem 2

There are 6 men and 5 women in a room. In how many ways can we choose 3 men and 2 women from the
room?

Solution

The number of ways to choose 3 men from 6 men is 6C3 and the number of ways to choose 2 women from
5 women is 5C2
Hence, the total number of ways is − 6C3×5C2=20×10=200
Problem 3

How many ways can you choose 3 distinct groups of 3 students from a total of 9 students?

Solution

Let us number the groups as 1, 2 and 3

For choosing 3 students for 1st group, the number of ways − 9C3
The number of ways for choosing 3 students for 2nd group after choosing 1st group − 6C3
The number of ways for choosing 3 students for 3rd group after choosing 1st and 2nd group − 3C3
Hence, the total number of ways =9C3×6C3×3C3=84×20×1=1680

Pigeonhole Principle
In 1834, German mathematician, Peter Gustav Lejeune Dirichlet, stated a principle which he called the

Notes Prepared by:


Asst.Prof.Vidya A. Huse(v50huse@gmail.com)
According to DBATU Syllabus 2022-23 UNIT 2:Functions and Relations
Discrete Mathematics

drawer principle. Now, it is known as the pigeonhole principle.

Pigeonhole Principle states that if there are fewer pigeon holes than total number of pigeons and each
pigeon is put in a pigeon hole, then there must be at least one pigeon hole with more than one pigeon. If n
pigeons are put into m pigeonholes where n > m, there's a hole with more than one pigeon.

Examples
Ten men are in a room and they are taking part in handshakes. If each person shakes hands at least once
and no man shakes the same man’s hand more than once then two men took part in the same number of
handshakes.

There must be at least two people in a class of 30 whose names start with the same alphabet.

The Inclusion-Exclusion principle


The Inclusion-exclusion principle computes the cardinal number of the union of multiple non-disjoint sets.
For two sets A and B, the principle states −

|A∪B|=|A|+|B|−|A∩B|
For three sets A, B and C, the principle states −

|A∪B∪C|=|A|+|B|+|C|−|A∩B|−|A∩C|−|B∩C|+|A∩B∩C|
The generalized formula -

|⋃ni=1Ai|=∑1≤i<j<k≤n|Ai∩Aj|+∑1≤i<j<k≤n|Ai∩Aj∩Ak|−⋯+(−1)\n−1|A1∩⋯∩A2|
Problem 1

How many integers from 1 to 50 are multiples of 2 or 3 but not both?

Solution

From 1 to 100, there are 50/2=25 numbers which are multiples of 2.

There are 50/3=16 numbers which are multiples of 3.

There are 50/6=8 numbers which are multiples of both 2 and 3.

So, |A|=25, |B|=16 and |A∩B|=8.

|A∪B|=|A|+|B|−|A∩B|=25+16−8=33
Problem 2

In a group of 50 students 24 like cold drinks and 36 like hot drinks and each student likes at least one of
the two drinks. How many like both coffee and tea?

Notes Prepared by:


Asst.Prof.Vidya A. Huse(v50huse@gmail.com)
According to DBATU Syllabus 2022-23 UNIT 2:Functions and Relations
Discrete Mathematics

Solution

Let X be the set of students who like cold drinks and Y be the set of people who like hot drinks.

So, |X∪Y|=50, |X|=24, |Y|=36


|X∩Y|=|X|+|Y|−|X∪Y|=24+36−50=60−50=10
Hence, there are 10 students who like both tea and coffee.

Recurrence Relations
A recurrence relation is a functional relation between the independent variable x, dependent variable f(x)
and the differences of various order of f (x). A recurrence relation is also called a difference equation, and
we will use these two terms interchangeably.

Example1: The equation f (x + 3h) + 3f (x + 2h) + 6f (x + h) + 9f (x) = 0 is a recurrence relation.

It can also be written as

ar+3 + 3ar+2 + 6ar+1 + 9ar = 0


yk+3 + 3yk+2 + 6yk+1 + 9yk = 0
Example2: The Fibonacci sequence is defined by the recurrence relation ar = ar-2 + ar-1, r≥2,with the initial
conditions a0=1 and a1=1.

Order of the Recurrence Relation:

The order of the recurrence relation or difference equation is defined to be the difference between the
highest and lowest subscripts of f(x) or ar=yk.

Example1: The equation 13ar+20ar-1=0 is a first order recurrence relation.

Example2: The equation 8f (x) + 4f (x + 1) + 8f (x+2) = k (x)

Degree of the Difference Equation:

The degree of a difference equation is defined to be the highest power of f (x) or ar=yk

Example1: The equation y3k+3+2y2k+2+2yk+1=0 has degree 3, as the highest power of yk is 3.

Example2: The equation a4r+3a3r-1+6a2r-2+4ar-3 =0 has degree 4, as the highest power of ar is 4.

Example3: The equation yk+3 +2yk+2 +4yk+1+2yk= k(x) has degree 1, because the highest power of yk is 1
and its order is 3.

Notes Prepared by:


Asst.Prof.Vidya A. Huse(v50huse@gmail.com)
According to DBATU Syllabus 2022-23 UNIT 2:Functions and Relations
Discrete Mathematics

Example4: The equation f (x+2h) - 4f(x+h) +2f(x) = 0 has the degree1 and its order is 2.

Generating Functions-
Generating functions are used to represent sequences efficiently by coding the terms of a sequence as
coefficients of powers of a variable (say) in a formal power series.
Now with the formal definition done, we can take a minute to discuss why should we learn this concept.
This concept can be applied to solve many problems in mathematics. There is a huge chunk of
mathematics dealing with just generating functions.
● It can be used to solve various kinds of Counting problems easily.
● It can be used to solve recurrence relations by translating the relation in terms of sequence to a
problem about functions.
● It can be used to prove combinatorial identities.

In simple words generating functions can be used to translate problems about sequences to problems about
functions which are comparatively easy to solve using maneuvers.

Some basic prerequisites…

Before we start let’s go through some basic Combinatorics formula.

A generating function is a “formal” power series in the sense that we usually regard x as a placeholder
rather than a number. Only in rare cases will we actually evaluate a generating function by letting x take a
real number value, so we generally ignore the issue of convergence.
of real numbers is the infinite series:

Example: Solve the recurrence relation ar+2-3ar+1+2ar=0

By the method of generating functions with the initial conditions a0=2 and a1=3.

Solution: Let us assume that

Notes Prepared by:


Asst.Prof.Vidya A. Huse(v50huse@gmail.com)
According to DBATU Syllabus 2022-23 UNIT 2:Functions and Relations
Discrete Mathematics

Multiply equation (i) by tr and summing from r = 0 to ∞, we have

(a2+a3 t+a4 t2+⋯)-3(a1+a2 t+a3 t2+⋯)+2(a0+a1 t+a2 t2+⋯)=0

[∴ G(t)=a0+a1 t+a2 t2+⋯]

+2G(t)=0............equation (ii)

Now, put a0=2 and a1=3 in equation (ii) and solving, we get

Put t=1 on both sides of equation (iii) to find A. Hence

-1=- A ∴A=1

Put t= on both sides of equation (iii) to find B. Hence

= B ∴B=1

Thus G (t) = .Hence,ar=1+2r.

Notes Prepared by:


Asst.Prof.Vidya A. Huse(v50huse@gmail.com)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy