Let A have 5 elements and let B have 4 elements.
1) How many everywhere defined functions are there from A to B?
For the function to be everywhere defined it must contain all 5 elements of A and each can have 4 possible partners so there are 4*4*4*4*4=4^5 possible everywhere defined functions?Is this correct?If not how do I do it?
2) How many one to one functions are there from A to B?
Logically the function can have a maximum of 4 elements but I don't know how to count the possibilities here.
Any help would be appreciated.
Thanks in advance.