Finding the number of functions that map two specific elements

45 Views Asked by At

Let's say I have two different sets, set $A$ and set $B$, where $|A|$ $\geq$ $|B|$. I am having a problem where one of my exercises is asking me, to sum up the question without totally just asking for answers on my exercises, find the number of functions that $\textbf{DON'T}$ map two specific elements between the sets. We are going from $A$ to $B$.

Where I am at right now, is that I think we are supposed to subtract the number of functions that do map the two elements from $|A|^{|B|}$, or am I just totally wrong with saying that? I am just confused on how do I find that number of functions I guess?

2

There are 2 best solutions below

4
On

Hint: You can think of it as the number of functions from the rest of $A$ to $B$ times the number of choices for $f(a)$.

4
On

Alternatively, consider all functions from $A$ to $B$ and subtract the number that satisfy $f(a)=b$, yielding $$|B|^{|A|}-|B|^{|A\setminus \{a\}|}=|B|^{|A|}-|B|^{|A|-1}=|B|^{|A|-1}(|B|-1).$$ The last expression is the product suggested by @RossMillikan.