Recently in an exam question, they had used the wording: a function $f$ on set $[1,2,\ldots,n]$ , and so i assumed that this meant that the function had domain and codomain equal to $[1,2,\ldots,n]$ and I solved the question and got the correct answer but apparently we had to take the codomain as whole numbers which would give a different answer. (like I got that the answer was $p(8)$, the number of partitions of $8$, while the given answer is $p(7)$ )
I remember seeing/ reading in a lot of places that a function on set $S$ meant the function was $f: S \to S$ and that this is also pretty common notation, but now i can't remember where I read this,
So my question is that,
This is a common notation right? Like a function on set S means domain and codomain is $S$
And also, more importantly, could you please give me any example of any math resource where this notation is used, the reason I am asking is that the organisers are accepting answer key challenges, so I would like to ask them to accept both $p(7)$ and $p(8)$ as answers, and I would like to ideally attach some math books/ handouts whatever where this notation is used, so that they can see that this is indeed common notation.
I really need to get the question right to have a chance of qualifying for the next round, so I am asking for your help.
Looking forward to any possible help, please.
Thanks!
These are the conventions that I have seen:
Despite the fact that functions are a special kind of relation, a function on $S$ is not a special case of a relation on $S$.