Partial and Total functions

509 Views Asked by At

OK guys I have to find the number of partial and total functions $ f:A\rightarrow A $ , where $ |A|=n $. The answers are respectively $ (n+1)^n $ and $ n^n $, but I just can't figure out how exactly we come to this conclusion. Could you please explain why this is so and the logic behind it ?

1

There are 1 best solutions below

3
On BEST ANSWER

Consider for each element of $A$ what it can be sent to under a function $f$ - how many options are there in each case?