Let X and Y be finite non-empty sets. Write down a formula for the number of different functions from X to Y.
Ans: #Y^#X. (hash symbol doesn't seem to work in latex..?)
Can anyone explain why this is?
Suppose X = {a, b, c} and Y = {d, e}.
1. f: X->Y
f(a) = d
f(b) = d
f(c) = d
2. f: X->Y
f(a) = d
f(b) = d
f(c) = e
3. f: X->Y
f(a) = d
f(b) = e
f(c) = d
4. f: X->Y
f(a) = e
f(b) = d
f(c) = d
5. f: X->Y
f(a) = e
f(b) = e
f(c) = d
6. f: X->Y
f(a) = e
f(b) = d
f(c) = e
7. f: X->Y
f(a) = d
f(b) = e
f(c) = e
8. f: X->Y
f(a) = e
f(b) = e
f(c) = e