# Functions and sets

• May 28th 2009, 02:32 AM
kurac
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.
• May 28th 2009, 05:45 AM
amitface
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!
• May 28th 2009, 07:24 AM
pankaj
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
• May 28th 2009, 08:29 AM
amitface
Whoops, my mistake. Pankaj is correct.
• May 28th 2009, 04:51 PM
kurac
thanks guys, that is great!