0% found this document useful (0 votes)
14 views34 pages

Unitii PPT

Uploaded by

chinmaygambhir7
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)
14 views34 pages

Unitii PPT

Uploaded by

chinmaygambhir7
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/ 34

Types of Functions

1. Injective (One-to-One) Functions: A function


in which one element of Domain Set is connected
to distinct element of Co-Domain Set.

2. Surjective (Onto) Functions: A function in
which every element of Co-Domain Set has
atleast one pre-image in domain.

Example: Consider, A = {1, 2, 3, 4}, B = {a, b, c}


and f = {(1, b), (2, a), (3, c), (4, c)}.
It is a Surjective Function, as every
element of B is the image of some A

Note: In an Onto Function, Range is equal to Co-Domain.


3. Bijective (One-to-One Onto)
Functions:

A function which is both injective (one to - one)
and surjective (onto) is called bijective (One-to-
One Onto) Function.

Example:
Consider P = {x, y, z}
Q = {a, b, c}
and f: P → Q such that
f = {(x, a), (y, b), (z, c)}
Identity Functions

The function f is called the identity function if
each element of set A has an image on itself i.e.
f (a) = a ∀ a ∈ A.


It is denoted by I.
Example:
Consider, A = {1, 2, 3, 4, 5} and f: A → A such
that
f = {(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)}.


The function f is an identity function as each
element of A is mapped onto itself. The function
f is a one-one and onto
Invertible (Inverse) Functions

A function f: X → Y is invertible if and only if it is a bijective
function.


Consider the bijective (one to one onto) function f: X → Y. As f
is a one to one, therefore, each element of X corresponds to a
distinct element of Y. As f is onto, there is no element of Y
which is not the image of any element of X, i.e., range = co-
domain Y.


The inverse function for f exists if f-1 is a function from Y to X.
Example:
12

10

Column 1
6
Column 2
Column 3

0
Row 1 Row 2 Row 3 Row 4
Example:
Consider, X = {1, 2, 3}
Y = {k, l, m} and f: X→Y such that

f = {(1, k), (2, m), (3, l)


The inverse function of f is shown in fig:
Composition of Relations

Let A, B, and C be sets, and let R be a relation
from A to B and let S be a relation from B to C.

That is, R is a subset of A × B and S is a
subset of B × C.

Then R and S give rise to a relation from A to C
indicated by R◦S and defined by:

a (R◦S)c if for some b ∈ B we have aRb and
bSc. is,

R ◦ S = {(a, c)| there exists b ∈ B for which
(a, b) ∈ R and (b, c) ∈ S}

The relation R◦S is known the composition of R and
S; it is sometimes denoted simply by RS.


Let R is a relation on a set A, that is, R is a relation
from a set A to itself. Then R◦R, the composition of
R with itself, is always represented.

Also, R◦R is sometimes denoted by R2. Similarly,
R3 = R2◦R = R◦R◦R, and so on. Thus Rn is defined
for all positive n.
R1 = {(4, a), (4, b), (5, c), (6, a), (6, c)}
R2 = {(a, l), (a, n), (b, l), (b, m), (c, l), (c, m), (c,
n)}

Find the composition of relation (i) R1 o R2 (ii) R1o R1-1


Solution:

The composition relation R1 o R2 as shown in
fig:

R1 o R2 = {(4, l), (4, n), (4, m), (5, l), (5, m), (5, n), (6, l), (6, m), (6, n)}
Partial Function

What is a Total Function?


In general, a total function is usually just another name for a regular function. The use of
the term is to make it clear that the function is defined for all elements in its domain,
compared to partial functions which are only defined for part of the domain. If there’s any
chance a reader might interpret a function as being a partial function (or something else
entirely), an author will usually state it’s a “total” function to avoid misinterpretation.

In notation, if dom f = A, then f is a total function on A


The total function in blue has all elements in its domain {A, B, C, D} mapped to the set
{V, X, Y, Z}. The bottom function has one element in the domain that isn’t defined, so it’s
a partial function.
What is a Partial Function?

A partial function is a function that only partially
works.

A function usually creates one unique output for
every input. For example, let’s say you have
inputs A, B, and C. They might map to X, Y, and
Z, as shown in the blue circle on the left:
The blue circle is a function; The orange circle is missing a link from one
output (B), and so is a partial function.
Constant Function in Mathematics

A constant function is a way to describe
something that stays constant as time passes,
and it’s one of the most basic kinds of functions
with real numbers. When you construct a graph
with a constant function, you get a straight
horizontal line. One practical example of a
constant function is the fixed salary of an
employee for every month.
Constant Function Notation

As output in the Constant Function Remain always
the same, we can represent these function
mathematically as:
y = f(x) = c
where,

y or f(x) represents the output of the function, and


c is the constant value that can be any real number.
Constant Function Example
here are various examples of Constant Functions. Some of them are listed below:

Constant Zero Function: f(x) = 0


Constant One Function: f(x) = 1
Constant Negative Number Function: f(x) = -5
Constant Positive Number Function: f(x) = 10
Constant Pi Function: f(x) = π (pi)
Constant e Function: f(x) = e
Constant Square Root of 2 Function: f(x) = √2 (square root of 2)
Constant Rational Number Function: f(x) = 3/4
Constant Decimal Function: f(x) = 2.5
Constant Fraction Function: f(x) = -1/3
Pigeonhole Principle

The Pigeonhole Principle is a fundamental
concept in combinatorics and mathematics that
states if more items are put into fewer
containers than the number of items, at least
one container must contain more than one item.
This seemingly simple principle has profound
implications and applications in various fields,
including mathematics, computer science, and
engineering.

The Pigeonhole Principle can be formally stated as follows:


If n items are distributed among m containers and n > m,
then at least one container must contain more than one
item.


The pigeonhole principle is useful in counting methods. In
order to apply the principle, one has to decide which
objects will play the role of pigeon and which objects will
play the role of pigeonholes.
Pigeonhole Principle Example

Suppose that a flock of 20 pigeons flies into a set of 19
pigeonholes to roost. Because there are 20 pigeons but
only 19 pigeonholes, at least one of these 19
pigeonholes must have at least two pigeons in it. To see
why this is true, note that if each pigeonhole had at
most one pigeon, at most 19 pigeons, one per hole,
could be accommodated. This illustrates a general
principle called the pigeonhole principle, which states
that if there are more pigeons than pigeonholes, there
must be at least one pigeonhole with at least two
pigeons. Pigeonhole Principle

Example 2: A bag contains 10 red marbles, 10
white marbles, and 10 blue marbles. What is
the minimum no. of marbles you have to
choose randomly from the bag to ensure that
we get 4 marbles of same color?

Solution:
Apply pigeonhole principle. No. of colors
(pigeonholes) n = 3 No. of marbles (pigeons)
K+1 = 4 Therefore the minimum no. of marbles
required = Kn+1 By simplifying we get Kn+1 =
10.

Verification: ceil[Average] is [Kn+1/n] = 4
[Kn+1/3] = 4 Kn+1 = 10 i.e., 3 red + 3 white + 3
blue + 1(red or white or blue) = 10

Example 2: A box contains 6 red, 8 green, 10
blue, 12 yellow and 15 white balls. What is the
minimum no. of balls we have to choose
randomly from the box to ensure that we get 9
balls of same color?
Solution:
Here in this we cannot blindly apply pigeon principle. First we will see
what happens if we apply above formula directly.
From the above formula we have get answer 47 because 6 + 8 + 10 + 12
+ 15- 5 + 1 = 47. But it is not correct.

In order to get the correct answer we need to include only blue, yellow
and white balls because red and green balls are less than 9.

But we are picking randomly so we include after we apply pigeon


principle. i.e., 9 blue + 9 yellow + 9 white – 3 + 1 = 25
Since we are picking randomly so we can get all the red and green balls
before the above 25 balls. Therefore we add 6 red + 8 green + 25 = 39
We can conclude that in order to pick 9 balls of same color randomly, one
has to pick 39 balls from a box.

You might also like