Unit_ 2_ Relations and Functions PART-2 (1)

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 43

Established as per the Section 2(f) of the UGC Act, 1956

Approved by AICTE, COA and BCI, New Delhi

Discrete Mathematics and Graph Theory


UNIT 2
Relations and Functions
School of Applied Sciences
D E PA R T M E N T O F M AT H E M AT I C S
Functions: Types of functions , properties of functions, Sterling number of second kind, composite
functions, invertible functions, Floor and ceiling functions , the pigeon hole principle.
Definition: “A function is a mathematical relationship between two variables, where every input variable has one output
variable”.
A function f from a set A into set B is a relation from A to B such that each element of A is related to exactly one element of the
set B. It is denoted by and read as f is a function from A to B.
We should note that in a relation from A to B , an element of A can be related to more than one element in B, but in the case of
function every element of A is related to only one element of B. That is every function is a relation .But every relation may not
be a function.
Pictorial representation of
Where A-domain of f,
B-codomain of f
b-the image of a
a-preimage of b

a is called the argument of f and is called the value of f for an argument a and the containing all the images is called range and
is denoted by f(A).
Example: If A = {1, 2, 3, 4} and B= {a, b, c, d} and

R = {(1, a), (2, b), (3, c), {4, d)} & S = {(1, b), (1, d), (2, d)} are given below check whether R & S is function are not.

Solution: Therefore, R is not a function because 4 in A is not having any images in B.


S is not a function. Since the element 1 has two images b and d, S is not a function.
1. Let . Consider the function , where R is the set of real numbers defined by Find the
range of f.
Solution: We have ,
Than,
.
Hence, the range of f is
If is function defined by
Determine .

(ii) , ,

Solution: Given

(i)

f (0) ( 3 0)  1 1


f ( 1)   3 ( 1)  1 4
f (5 / 3) (3 5 / 3)  5 0
f ( 5 / 3)   3 (  5 / 3)  1 6
(ii) From the definition of the given function , we find that
f  1 (1) {x  R | f ( x) 1}
for x  0, f ( x) 3 x  5
1 3 x  5  x 2
for x 0, f ( x)  3 x  1
1  3 x  1  x 0
 f  1 (1) {2, 0}

f  1 ( 1) {x  R | f ( x)  1}
for x  0, f ( x) 3 x  5
 1 3 x  5  x 4 / 3
for x 0, f ( x)  3 x  1
 1  3 x  1  x 2 / 3, is neglected because x 0.
 f  1 ( 1) {4 / 3}
f  1 (3) {x  R | f ( x) 3}
for x  0, f ( x) 3 x  5
3 3 x  5  x 8 / 3
for x 0, f ( x)  3 x  1
3  3 x  1  x  2 / 3
 f  1 (3) {8 / 3,  2 / 3}

f  1 ( 3) {x  R | f ( x)  3}
for x  0, f ( x) 3 x  5
 3 3x  5  x 2 / 3
for x 0, f ( x)  3 x  1
 3  3 x  1  x 4 / 3  0, neglected
 f  1 ( 3) {2 / 3}
f  1 ( 6) {x  R | f ( x)  6}
for x  0, f ( x) 3x  5
 6 3x  5  x  1/ 3  0, neglected
for x 0, f ( x)  3x  1
 6  3x  1  x 7 / 3  0, neglected
 f  1 ( 6) { }
3. a) Let A and B be finite sets with Find how many functions are possible form A to B?
b) If there are 2187 functions from A to B and what is
Solution: a) Let with
Then any function is of the form
, where x stands for some j.
Since there are n number of there are n choices for x in each of the m ordered pairs belonging to f. Therefore, the total possible
number of choices for x is
.
Thus, there are possible functions from A to B.
b) We have, number of functions =2187 and
i.e

Thus,
Types of functions
Identity function: A function such that f (a) = a, for every is called the identity function or identity mapping on A. The
identity function defined on a set A is usually denoted by or &

Constant function: A function B such that f (a) =c, for every , where c is a fixed element of B, is called a constant function.
Range of f =f(A)={c}.
Into function: A function B is called an into function if some elements of co-domain B are not images.

Onto functions(Surjective function): A function B is called an onto function if all the elements of Co-domain B are images
i.e .
One-one function( Injective): A function B is called One-One function if different elements of A (domain)
have different images in B under f.

That is if whenever f(a) = f(b), then a = b. Equivalently, if a ≠ b, then f(a) ≠ f(b).

Bijective function (1-1 correspondence ): A function B is bijective if it is both One-One and onto.

Note:
• For the bijective function we have and A and B are said to equivalent.
• For the bijective function every element of B has exactly one preimage in A under f.
Problem
1. (a) Let A and B be finite sets with Find how many 1-1 functions are possible from A to B?
(b) If Find the number of 1-1 functions from A to B?
(c) If there are 60 one-one functions from A to B and , what is ?
Solution:
(i) Let with
Then a1-1 function is of the form
There are n choices for , (n-1) choices for , (n-2) choices for ………. (n-(m-1)) choices for
Therefore, by product rule the number of one-one functions from A to B are n(n-1)(n-2)……..(n-(m-1))
=
Therefore, the number of possible ways to have one-one from A to B is .
(ii) We have
Number of one-one functions = =120.

(iii) By data =60 &


i.e,
60
Stirling number of second kind
Let A and B be finite sets with

n
p ( m, n)  (  1) k . nCn  k ( n  k ) m
k 0

The Stirling number of second kind is denoted and defined as


p (m, n) 1 n
s (m, n)    ( 1)k . nCn  k ( n  k ) m m n
n! n ! k 0

It represents the number of ways in which it is possible assign ‘m’ distinct objects into ‘n’
identical containers with no container left empty.
Note: s ( m,1) 1 s ( m, m) for all m 1.
If m and n are positive integers with than we have

Here gives the number of ways in which the elements of A can be distributed in ‘n’ identical

containers with no container left empty.


The number of possible ways to assign m distinct objects to n identical containers with empty places
allowed is given by
n
p(m)  s(m, k ) for all m n.
k 1
Examples: Let A={1,2,3,4} and B={1,2,3,4,5,6}. How many functions are there from A to B? How
many of these are one-one and how many of these are onto? How many functions are there from B
to A ? How many of these are one-one and how many of these are onto?

Solution: Given

(i) Number of functions from A to B= =

Number of one-one functions from A to B= = .

Number of onto functions form A to B =0


(ii) Number of functions from B to A==

Number of one-one functions from B to A=0

Number of onto functions form B to A is

n
 for f : B  A
 ( 1) k . nCn  k ( n  k ) m B m 6
k 0
A n 4
4
 ( 1) k . 4C4 k (4  k ) 6  4C4 4 6  4C3 36  4C 2 2 6  4C116 1560
k 0
2. Define Stirling number of second kind .Let A={1,2,3,4,5,6,7} and B={w, x, y, z}. Find the
number of onto functions from A to B.

Solution: Given ,

Number of onto functions form A to B is


n
p (m, n)  (  1) k . nCn  k (n  k ) m
k 0
4
 ( 1) k . 4C4  k (4  k ) 7  4C4 47  4C3 37  4C2 27  4C117 8400
k 0
3. Evaluate S(8,7) given that S(7,6)=21.

Solution: Given S(7,6)=21

We have to find S(8,7) using the formula

, since

But

Therefore,
4.Given that S(8,4)=1701, S(8,5)=1050 and S(8,6)=266. Evaluate S(10,6).

Solution: We have

Therefore, S(10,6)=S(9,5)+6S(9,6)

={S(8,4)+5S(8,5)}+6{ S(8,5)+6S(8,6)}

= S(8,4)+11 S(8,5)+36S(8,6)

=1701+(11*1050)+(36*266)=22,827.

Exercises:

1. Evaluate S(5,4) and S(8,6)

2. Given that p(6,4)=1560 and p(7,4)=8400, evaluate S(6,4) and S(7,4).

3. Prove the following: S(5,3)=25, S(7,2)=63, S(8,5)=1050.


4. Define Sterling’s number of second kind and evaluate S(8,6).
Composition of functions

Let & be any two functions then the composition (or product) function is a function from to
denoted by and defined by with .

Pictorial representation

Note: For ,
1. If A={1, 2, 3, 4} ,B={a, b, c} and C={w, x, y, z} with & given by Find .
Solution: Given & than
Therefore,

Thus, }.
2. L & be any 3 functions then prove that.

Solution: Given & be defined by

Also, ,

Consider LHS:

Now, RHS

LHS=RHS

Thus,
3.Let f, g, h be functions from Z to Z defined by
Determine and verify that .
Solution: We have

 g  h  x   g  h  x  3h x 
Therefore,
 1 if x is even
 f  ( g  h) ( x)  f {g  h ( x)} 3h( x)  1 
 2 if x is odd

On the other hand,

 f  g  x   f  g  x  g  x   1 3x  1
Therefore,
 1 if x is even
  f  g   h)  ( x)  f  g {h( x)} 3h( x)  1 
 2 if x is odd

From the above expressions , it follows that


4. Lbe two functions.
(i) If is onto, prove that g is onto.
(ii) If is one –one one-one, prove that f is one –one.
Solution:
(iii)Given that is onto.
To prove that is onto.
Suppose be arbitrary then such that

, since
Therefore, for every , there exist such that
Thus is onto

(ii) Given that is one-one.


To prove that is one-one
Let such that
[

is one-one
Hence is one-one.
5. Lbe one-one and onto functions. Prove that is also one –one and onto functions.
Solution: Given be one-one and onto functions.
Suppose be arbitrary
such that

, is one-one
is one-one
Therefore, is one-one.
Now let be arbitrary then since g is onto such that
For ,invertible such that
Thus,
That is , for every arbitrary element , there exist such that
Thus is onto
Exercise:
1. Let f, g, h be functions from R to R defined by
Show that
2. Let A=B=C=R and be defined by Find (i) (-2) (ii)
Invertible functions
A function is said to be invertible if there exist a function such that & where is the identity
function on A and is the identity function on B. Then is called the inverse of and we write .

Results:

(i) If is an invertible function, then the statement are equivalent.

(ii)If is invertible then .

(iii)If is an invertible function, then is also an invertible function and


1. Let and and be functions from A to A given by and
prove that and are inverses of each other.
Solution: By Data and
We check that,

Thus, for all we have and therefore is an inverse of and is an inverse of


2. If a function is an invertible, then it has a unique inverse. Further if
Solution: Suppose function is an invertible function and it has g & h as inverse. Then g & h are
functions from B to A such that
&
&
Consider
Therefore, the function f has a unique inverse.
Suppose since g is the inverse of f.
We have &
Consider
, since .
3. A function is an invertible if and only if is one-one and onto.
Solution: Suppose is invertible function a function such that &
Take any then,

This proves that is one-one


Now take any , then & Thus, y is the image of an element under f. Therefore, is onto.
Conversely, suppose that is one-one & onto. We have show that is an invertible .
Since is onto for every a preimage which is unique. Also, is one-one such that
Now consider a function such that
Consider,
Similarly ,
This shows that is an invertible with g as an inverse.
4. I and are then is invertible function and
Solution: Since & are invertible functions, they both are one-one & onto. Consequently, is both are
one-one & onto. Therefore, is invertible.
Now, the inverse of is a function from B to A & the inverse of is a function from C to B. Therefore,
if then is a function from C to A.
We find that,

and
This above expressions show that is the inverse of &
Thus, .
Hence the proof.
Floor and Ceiling functions
Let x be any real number. Then x is an integer or x lies between two integers .
Let denote the greatest integer that is less than or equal to x, and denote the least integers that is greater
than or equal to x.
Then is called the floor of x and is called the ceiling of x.
Examples:

1. Evaluate
Solution:

2. Evaluate
Solution:
=0
Exercise:
Evaluate the following

1.
2.
3.

4.
5.
6.
Pigeonhole principle
Suppose that a flock of 10 pigeons flies into a set of 9 pigeonholes to roost. Because there are 10 pigeons but only 9
pigeonholes, a least one of these 9 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 in it, at most 9 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, then there must be at
least one pigeonhole with at least two pigeons in it.
Statement: If m pigeons occupy n pigeonholes and if m>n then at least one pigeonhole
contains two or more pigeons.
Examples:
1. In group of 13 people there must be at least two people having the birthday in the same
month of the year.
2. If 8 postcards are put in 5 post boxes then at least one box contains two or more postcards.
Generalised Pigeonhole Principle.
Statement: If m pigeons occupy n pigeonholes and if m>n then atleast one pigeon hole contains pigeons.
Proof: We prove the result by method of contradiction.
Assume that result is false (not true).
No pigeonhole contains pigeons
Every pigeonhole contains pigeons
Every pigeonhole contains pigeons
Therefore, total number of Pigeons

This is a contradiction because total number of pigeons is m.


Therefore, our assumption is wrong.
Hence the given result is true.
Problems:
1. Show that if 30 dictionaries in a library contain a total of 61327 pages, then one of the dictionaries must
have atleast 2045 pages.

Solution: Let the pages and dictionaries denote the pigeons and pigeonholes respectively.

Then by the generalised pigeonhole principle, one dictionary must contain

= pages
2.Show that if seven numbers are selected from 1 to 12 then two of them will add up to 13.

Solution: Let us consider the following set.

These are the only sets containing two number from 1 to 12 whose sum is 13.

Since every number from 1 to 12 belongs to one of the above sets, each of seven numbers chosen
must belong to one of the sets. Since there are only six sets, two of the seven numbers chosen must
have to belong to the same set .These two numbers have their sum equal to 13 by pigeonhole
principle.
3. Let be equilateral with AB=1. If 5 points are selected from the interior of the triangle, show
that there are atleast two points whose distance apart is less than 1/2.

Solution: Consider the triangle DEF formed by the midpoints of the sides AB,AC and BC of the
given triangle ABC. Then the Triangle ABC is partitioned into four small equilateral triangles each of
which has sides of equal to 1/2 .Treating each of these four portions as a pigeonhole and five points
chosen inside the triangle as pigeons. We find by using the pigeonhole principle that atleast one
portion must contain two or more points. Clearly the distance between such points is less than ½.
4. Let be equilateral with AB=1.If 10 points are selected from the interior of the triangle, show
that there must be atleast two points whose distance apart is less than 1/3.
Solution: Divide the given triangle ABC into 9 sub-triangles by Trisecting the given triangle. Clearly
the length of each side of every sub triangle is 1/3 cm. By pigeonhole principle, if we select 10
points form interior of a triangle then atleast one sub-triangle contains 2 or more points and the
distance between them is definitely less than 1/3 cm.
5. Let ABCD be a square with AB=1.Show that if we select 5 points in the interior of this square. There are
atleast two points whose distance apart is less than .
Solution: Divide the interior of the square into 4 smaller congruent squares as shown in the figure.

Each smaller square has diagonal length . Let the region R1 be the interior of the square AEKH together with the
points on segment EK, excluding point E. Region R2 is the interior of square EBFK, together with line segment
FK , excluding points F. Region R3,R4 are defined in the similar way. Then if 5 points are chosen in the interior of
square ABCD, atleast two are in region Ri,and these points are within of each other.

You might also like