Unitii PPT
Unitii PPT
●
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
●
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)}
R1 o R2 = {(4, l), (4, n), (4, m), (5, l), (5, m), (5, n), (6, l), (6, m), (6, n)}
Partial Function
●
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.