Question
Question: If a set A has n elements, then the number of functions defined from A to A that are not one - one i...
If a set A has n elements, then the number of functions defined from A to A that are not one - one is

(n)n2
n!−(nC0+nC1+nC2+......+nCn)
nn−n!
nn
nn−n!
Solution
Let A be a set with n elements. We are considering functions defined from A to A. The domain of the function is A, and the codomain of the function is A. Both the domain and codomain have n elements.
The total number of functions from a set with m elements to a set with k elements is km. In this case, m=n and k=n, so the total number of functions from A to A is nn.
A function f:A→A is one-one (or injective) if for any two distinct elements x1,x2∈A, their images are distinct, i.e., if x1=x2, then f(x1)=f(x2). For a function from a finite set to itself, being one-one is equivalent to being onto (surjective) and being a bijection. To define a one-one function from A to A, we need to assign each element in the domain A to a unique element in the codomain A. This is equivalent to finding a permutation of the elements of the codomain. For the first element in the domain, there are n choices in the codomain. For the second element in the domain, there are n−1 remaining choices in the codomain (since the image must be distinct from the first element's image). For the third element, there are n−2 remaining choices, and so on. For the n-th element, there is only 1 choice left. So, the number of one-one functions from A to A is n×(n−1)×(n−2)×⋯×1=n!.
We are asked to find the number of functions from A to A that are not one-one. The set of all functions from A to A can be partitioned into two disjoint sets: the set of one-one functions and the set of functions that are not one-one. Therefore, the number of functions that are not one-one is equal to the total number of functions minus the number of one-one functions. Number of functions that are not one-one = (Total number of functions) - (Number of one-one functions) Number of functions that are not one-one = nn−n!.
The result nn−n! matches option (3).