Let f:{1,2,3,4,5} to {1,2,3,4} be a function randomly formed. What is the probability that f is onto and f(i)≠i , i=1,2,3,4,5
Answer is given 2/9
Solution with explanation is required
Answers
Let us first count the number of elements in F.
Total number of functions from A to B is 34=81.
The number of functions which contain exactly two elements in the range is 3⋅24=48.
The number of functions which contain exactly one elements in its range is 3×14=3 .
Thus, the number of onto functions from A to B is 81−48+3=36 [using principle of inclusion exclusion]
∴n(F)=36
Let f∈F.
We now count the number of ways in which f−1(x) consists of single element.
We can choose preimage of x in 4 ways.
The remaining 3 elements can be mapped onto [y,z] is 23−2=6 ways.
∴f−1(x) will consists of exactly one element in 4×6=24ways.
Thus, the probability of the required event is 24/36=2/3.
ANSWER
Let us first count the number of elements in F.
Total number of functions from A to B is 3
4
=81.
The number of functions which contain exactly two elements in the range is 3⋅2
4
=48.
The number of functions which contain exactly one elements in its range is 3×1
4
=3 .
Thus, the number of onto functions from A to B is 81−48+3=36 [using principle of inclusion exclusion]
∴n(F)=36
Let f∈F.
We now count the number of ways in which f
−1
(x) consists of single element.
We can choose preimage of x in 4 ways.
The remaining 3 elements can be mapped onto [y,z] is 2
3
−2=6 ways.
∴f
−1
(x) will consists of exactly one element in 4×6=24ways.
Thus, the probability of the required event is 24/36=2/3.