0
$\begingroup$

Let $A, B, C$ such that $C \subset B $ , $|A|=5, |B|=6, |C|=3$.

How can I find the number of all functions $f:A \rightarrow B$ such that for every $b \in C$ there exist $a \in A$ with $f(a)=b$ ?

I am asking for a solution that uses the Inclusion-Exclusion principle, which is well-explaind, cause I have a solution by the proffesor and It doesnt make sense to me!

Thanks!

1 Answers 1

0

Hint: Consider the following sets $$A_{c_1}=\{f:A\longrightarrow B: c_1\not \in f(A)\}$$ Do you see that you are looking for all the functions [which is $|B|^{|A|}=6^5$ why?] minus the set $A_{c_1}\cup A_{c_2}\cup A_{c_3}$ where $C=\{c_1,c_2,c_3\}$?
If not, ask.
If yes the only part remaining is to compute $$|A_{c_1}\cup A_{c_2}\cup A_{c_3}|=|A_{c_1}|+|A_{c_2}|+|A_{c_3}|-|A_{c_1}\cap A_{c_2}|-|A_{c_1}\cap A_{c_3}|-|A_{c_1}\cap A_{c_2}|+|A_{c_1}\cap A_{c_2}\cap A_{c_3}|$$ So if $f\in A_{c_1},$ you know that $f$ goes from $A$ to $B\setminus \{c_1\}$ because $c_1$ is not in the codomain so $|A_{c_1}|$ is the number of functions from $A$ to $B\setminus \{c_1\}$ (which is $(|B|-1)^{|A|}=5^5$ why?).
What happens when you have a function $f\in A_{c_1}\cap A_{c_2}$? Do you see that $|A_{c_1}\cap A_{c_2}|=4^5$? What about $f\in A_{c_1}\cap A_{c_2}\cap A_{c_3}$?