# Math Help - Functions and sets

1. ## Functions and sets

1)Compute the number of functions from a set with n elements to a set with m elements.

and secondly,

2) compute the number of one-to-one functions (injections) from a set with n elements to a set with m elements.

Can someone tell me how they get the answer, i really want to understand this.

Thanks guys.

2. 1) Each element in the domain can be mapped to one of m elements. m choices for the first, m choices for the 2nd, ... , m choices for the nth. So n^m.

2) The first element can be mapped to m different elements, the 2nd to m-1, the 3rd to m-3 .. etc
So n*...*(n-m+1) = n! / m!

3. 2.
$n(n-1)(n-2)(n-3)......(n-m+1)=\frac{n!}{(n-m)!}$

Here's another one:
How many ONTO functions can be constructed

4. Whoops, my mistake. Pankaj is correct.

5. thanks guys, that is great!