DM Unit 2 Part2
DM Unit 2 Part2
Unit-II
Relations & Functions
By
Prof. Vishwas M. Gaikwad
Functions
It is a mapping in which every element of set A is uniquely associated at the element with set
B. The set of A is called Domain of a function and set of B is called Co domain.
Let A and B be two non-empty sets. A function 'f' from A to B is a set of ordered pairs f is a
subset of AxB. For each element x in A, there is a unique element y in B such that (x,y) ∈ f.
The statement 'f is a function from A to B' is represented as f: A → B or A → B.
* There may be some elements of set B which are not associated to any element of the set A.
* Each element of set A must be associated to one and only one element of set B.
Let x = {1, 2, 3, 4}
y = {a, b, c, d, e}
f = {(1, b), (2, a), (3, d), (4, c)
Solution:
Solution:
1.It is a function. Range (f) = {1, 2, 3, 4}
2.It is not a function because every element of X does not relate with some element of Y i.e., Z is
not related with any element of Y.
3.h is not a function because h (x) = {1, 2, 3, 4} i.e., element x has more than one image in set Y.
4.d is not a function because d (y) = {2, 3} i.e., element y has more than image in set Y.
Note: For sake of understating, in injective function, set B element can not mapped to many A elements.
Example: Consider, A = {1, 2, 3, 4}, B = {a, b, c} and f = {(1, b), (2, a), (3, c), (4, c)}.
Let, A and B be two non-empty sets. A partial function f : A' → B for some subset A' of A.
where A' ⊂ A i.e. A' is a proper subset of A. For any element x ∈ A - A', the value of f(x) is
said to be undefined.
Example: Let, A = {I, 2, 3, 4, 5}, B = {a, b, c, d, e}
F be a function from A to B i.e. f : A' → B
Here, f is a partial function which maps elements of A' (proper subset of A) to elements of B.
A - A' = {4, 5} are undefined.
Here, f is a constant function since, every domain element has same image that is "C".
𝑅1 is a function and it is constant function since, Here, 𝑅2 is not a function, since, element 2 is not
every element of domain is uniquely mapped uniquely mapped into co-domain.
into co-domain. In other way, 𝑅2 is not a function because two ordered
pairs have same first element.
𝑅3 = {(1, 6), (2, 2), (4, 4), (5, 10)} 𝑅4 = { 1, 6 , (2, 2), (3, 2), (4, 4), (5, 10)}
𝑅3 is not a function because 3 is not mapped into It is a function, since every element of domain is
any of the element of co-domain. mapped into co-domain.
Solution:
(𝑖) 𝑔𝑜𝑔 𝑔 (𝑔 𝑎 ) = 𝑔 (𝑏) = 𝑎, (ii) go (gog) 𝑔 (𝑔 𝑜 𝑔 𝑎 ) = 𝑔 (𝑎) = 𝑏
𝑔 (𝑔 𝑏 ) = 𝑔 (𝑎) = 𝑏 𝑔 (𝑔 𝑜 𝑔 𝑏 ) = 𝑔 (𝑏) = 𝑎
𝑔 (𝑔 𝑐 ) = 𝑔 (𝑐) = 𝑐 𝑔(𝑔𝑜𝑔 𝑐 ) = 𝑔 (𝑐) = 𝑐
𝑔 ( 𝑔 𝑑 ) = 𝑔 (𝑒) = 𝑑 𝑔 (𝑔 𝑜 𝑔 𝑑 ) = 𝑔 (𝑑) = 𝑒
𝑔 ( 𝑔(𝑒)) = 𝑔 (𝑑) = 𝑒 𝑔 (𝑔 𝑜 𝑔 𝑒 ) = 𝑔 (𝑒) = 𝑑
gog (one to one and onto function) go (g o g) (one to one and onto function)
(i) Each person on the earth is assigned a number which corresponds to his age.
It is a function. Since each person has unique age.
- It is not injective function, because two person's may have same age.
- There is no person whose age is 250 years. Hence Function will not be surjective. It is not bijective
function.
(ii) Each student is assigned a teacher.
It is a function, each student is not exactly mapped to teacher. So, it is not injective function, as many
students may be assigned to the same teacher. It is surjective function as each teacher will have some
student assigned to him. It is not bijective.
(v) To each book written by only one author, assign the author.
It is a function. It is not injective as one author can have many books. It is a surjective function, as
every author has written a book. It is not bijective.
(vi) To each country having prime minister, assign the prime minster.
It is a function
- It is both Injective and Surjective function as each country has unique prime minister and each
prime minister is associated with a country.
- Hence it is bijective function.
𝑬𝒙𝒂𝒎𝒑𝒍𝒆𝒔 ;
(𝑖) 𝑆𝑒𝑡 𝑜𝑓 𝑎𝑙𝑙 𝑝𝑜𝑠𝑖𝑡𝑖𝑣𝑒 𝑖𝑛𝑡𝑒𝑔𝑒𝑟𝑠 => 𝑍+ => 𝐼𝑛𝑓𝑖𝑛𝑖𝑡𝑒 𝑠𝑒𝑡
(𝑖𝑖) 𝑆𝑒𝑡 𝑜𝑓 𝑎𝑙𝑙 𝑤ℎ𝑜𝑙𝑒 𝑛𝑢𝑚𝑏𝑒𝑟𝑠 => 𝑊 => 𝑖𝑛𝑓𝑖𝑛𝑖𝑡𝑒 𝑠𝑒𝑡
(𝑖ii) 𝑆𝑒𝑡 𝑜𝑓 𝑎𝑙𝑙 𝑛𝑎𝑡𝑢𝑟𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟𝑠 => 𝑁 => 𝐼𝑛𝑓𝑖𝑛𝑖𝑡𝑒 𝑠𝑒𝑡
𝑬𝒙𝒂𝒎𝒑𝒍𝒆𝒔 ;
(𝑖) 𝐴 = {1, 2, 3, 4, ... 5000} 𝑖𝑠 𝑐𝑜𝑢𝑛𝑡𝑎𝑏𝑙𝑒
(𝑖𝑖)𝑇ℎ𝑒 𝑠𝑒𝑡 𝑜𝑓 𝑟𝑎𝑡𝑖𝑜𝑛𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟𝑠 𝑖𝑠 𝑐𝑜𝑢𝑛𝑡𝑎𝑏𝑙𝑒.
(𝑖𝑖𝑖)𝑇ℎ𝑒 𝑠𝑒𝑡 𝑜𝑓 𝑟𝑒𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟𝑠 𝑖𝑠 𝑢𝑛𝑐𝑜𝑢𝑛𝑡𝑎𝑏𝑙𝑒.
(𝑖𝑣) 𝑇ℎ𝑒 𝑠𝑒𝑡 𝑜𝑓 𝑟𝑒𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟𝑠 𝑖𝑛 [𝑎, 𝑏], 𝑎 < 𝑏 𝑖𝑠 𝑢𝑛𝑐𝑜𝑢𝑛𝑡𝑎𝑏𝑙𝑒.
𝑇ℎ𝑒𝑟𝑒 𝑒𝑥𝑖𝑠𝑡𝑠 𝑘 𝑒𝑙𝑒𝑚𝑒𝑛𝑡𝑠 𝑎1, 𝑎2, … … . 𝑎𝑘 ∈ 𝐴 𝑠𝑢𝑐ℎ 𝑡ℎ𝑎𝑡 𝑓(𝑎1) = 𝑓(𝑎2) … = 𝑓(𝑎𝑘)
𝐼𝑛 𝑜𝑡ℎ𝑒𝑟 𝑤𝑎𝑦, 𝑖𝑓 𝑛 𝑝𝑖𝑔𝑒𝑜𝑛𝑠 𝑎𝑟𝑒 𝑜𝑐𝑐𝑢𝑝𝑖𝑒𝑑 𝑡𝑜 𝑚 𝑝𝑖𝑔𝑒𝑜𝑛 ℎ𝑜𝑙𝑒𝑠, 𝑡ℎ𝑒𝑛 𝑜𝑛𝑒 𝑜𝑓 𝑡ℎ𝑒 𝑝𝑖𝑔𝑒𝑜𝑛ℎ𝑜𝑙𝑒𝑠 𝑚𝑢𝑠𝑡 𝑏𝑒
𝑛−1
𝑜𝑐𝑐𝑢𝑝𝑖𝑒𝑑 𝑏𝑦 𝑎𝑡 𝑙𝑒𝑎𝑠𝑡 + 1 𝑝𝑖𝑔𝑒𝑜𝑛𝑠.
𝑚
𝑛−1
𝐾= +1
𝑚
5000 − 1
= +1=3+1=4
24 × 60
Hence, there are at least 4 peoples who born on the same day or same minute.