Let A = {a, b, c, d} and B = {1, 2, 3, 4}. a) How many functions f: A->B are there? b) How many functions f: A -> B satisfy f(a) = 2?
[Let A={a,b,c,d} and B={1,2,3,4,} How many functions f: A \rightarrow B. How many functions f: A \rightarrow B satisfy f(a)=2\]
The number of functions \(f:A\to B\) is just \(|B|^{|A|}\), where \(|A|,|B|\) are the cardinalities of our sets. Here, \(|A|=4,|B|=4\), so we have \(4^4=256\) such functions for (a).
For (b), if we know that \(f(a)=2\) must be true, we're only really left with "freedom" for the subsets \(\{b,c,d\},\{1,2,3,4\}\). The number of functions between these two sets is just \(4^3\). This should make intuitive sense, since for a function \(f\) we require that either \(f(a)=1,f(a)=2,f(a)=3,\) or \(f(a)=4\), and it would be nonsensical for order to matter, so the number of functions satisfying any *one* of these should be a fourth of our total functions \(1/4\times4^4=4^3=64\).
thanks I have one more problem if you could help with that it would be great
Join our real-time social learning platform and learn together with your friends!