is below this banner.

Can't find a solution anywhere?

NEED A FAST ANSWER TO ANY QUESTION OR ASSIGNMENT?

You will get a detailed answer to your question or assignment in the shortest time possible.

## Here's the Solution to this Question

Let $S$ be a finite set with $|S|=n$.

(a) If $f:S \to S$ is onto and $S$ is finite, then $f$ is injection. Indeed, suppose that $f$ is not injection, then $f(a)=f(b)$ for some $a\ne b$. It follows that $|f(S)|\le n-1$, and therefore $f(S)\subsetneq S$. This contadicts to the fact that $f$ is onto. Consequently, $f:S \to S$ is bijection, and thus it is invertible.

(b) The number of distinct functions $g:S \to S$ that are onto is equal to the number of all distinct bijection on the set $S$. Taking into account that the number of all bijection on the set $S$ is equal to the number of all permutation of the $n$-element set $S$, we conclude that the number of distinct functions $g:S \to S$ that are onto is equal to $n!.$

(c) Let us compute the number of all functions $f:S \to S$. For each $a\in S$ the value $f(a)$ of the function $f$ at a point $a$ can independently acquire one of the $n=|S|$ values of the set $S$. So, by the combinatorial rule of product, the number of all functions $f:S \to S$ is equal to $\underbrace{n\cdot...\cdot n}_n=n^n$.

Consequently, the number of functions $f:S \to S$ that are not invertible is equal to $n^n-n!.$ .