1. ## number of functions

if i am asked the number of functions between {1,2,3}-> {1,2,3} then as the cardinality is the same all injective functions will be bijective and so also surjective and there are 6 of these, however i am given a formula that states the number of functions between two sets is X -> Y is |X|^|Y| which gives me 27 what have i done wrong here?

2. Originally Posted by hmmmm
if i am asked the number of functions between {1,2,3}-> {1,2,3} then as the cardinality is the same all injective functions will be bijective and so also surjective and there are 6 of these, however i am given a formula that states the number of functions between two sets is X -> Y is |X|^|Y| which gives me 27 what have i done wrong here?
I am not at all sure that I understand what you are asking.
But if $\displaystyle B=\{1,2,3\}$ then there are $\displaystyle 3^3$ functions $\displaystyle f:B\to B$.
Of those 27 functions there $\displaystyle 3!=6$ of them which are bijections.
So what is your question now?

3. well the six functions would be injective and surjective, so are the other 21 functions neither injective or surjective?
thanks the help