Let A be a set of n distinct elements. Then the total number of distinct functions from A to A is ____ and out of these ____are onto functions.
Open in App
Solution
Let A={a1,a2,...an}.
We can associate each ai(1≤i≤n) with any of a1,a2,...an. Thus, the number of function from A to A is nn.
Since A is finite, a function f:A→A is onto if and only if it is one-to-one. ∴ For a1 we have n choices; a2, there are (n−1) choices and so on. Thus, required number of onto functions is n(n−1)...2.1=n!