Was just brushing up on counting functions and ran into this problem:
Let A and B be defined as follows
$$A:=\{-3,-2,-1,0,1,2,3\}, B:= \{0,1\},$$
how many odd and even functions $f:A $->$ B$ are there?
Now I know the number of injective, surjective and bijective functions there are with no problem, but got a bit stuck when considering odd/even. I know the respective defintions of what it means for a function to be odd and even, but that's as far as my knowledge goes in an attempt to solve this problem. Could obviously list all the possibilities out, but I feel there surely must be a more elegant combinatorial way to do this.
Thanks in advance!
EDIT: A function $f$ is even if $f(-a)=f(a)$ for all $a$ in the domain of $f$ and a function $f$ is odd if $f(-a)=-f(a)$ for all $a$ in the domain of $f$.
EDIT (2): I have listed out the possible functions as sequences here and find that, for the number of even functions, it's the total number of these sequences divided by 2. Is this true in a general case?