Functions and sets
Can somebody explain to me how to do the follow please:
1)Compute the number of functions from a set with n elements to a set with m elements.
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.
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!
Here's another one:
How many ONTO functions can be constructed
Whoops, my mistake. Pankaj is correct.
thanks guys, that is great!