Examples of functions that are 1-1 and onto

51 Views Asked by At

Just starting with discrete maths.

Set $A = \{e,f,g\}$ and Set $B = \{2,5\}$

Q1. Give an example of a function $\space f: B \rightarrow A$ that is not 1-1.

I am not used to having the elements of the set given to me. I am thinking maybe something along the lines of:

$$f(2) = f(5) = e$$

Q2. Give an example of $\space g: P(B) \rightarrow A $ that is onto.

I don't know how to tackle this one.

Juan

2

There are 2 best solutions below

0
On

Your first answer is fine. For 2, note that you are going from the power set of B, not from B itself. How many elements are in that power set? Now you just need to make sure that at least one of them goes to each element in A.

0
On

$P(B) = \{\emptyset, \{2\}, \{5\},\{2,5\}\}$. That's four elements (it okay if the elements are themselves sets) and you want to map it to a set of three elements that is onto so that each of the three elements are mapped to. That's possible because $4$ is a bigger number than $3$.

So we just do it. $\emptyset$ must get mapped to something. So let's map it to $e$. So $f(\emptyset) = e$. And $\{2\}$ must get mapped to something. Let's map it to something else just to play it safe. Let's map it to $f$. So $f(\{2\}) = f$.

And so on. Let's make $f(\{5\}) = g$. Okay, we've made sure everything is mapped to. So to finish off we must map $\{2,5\}$ to something. Why not $e$ again.

So for any $C\subset B$ if we define:

$f(C) = \begin{cases}e &\text {if } C = \emptyset\\ f& \text {if }C=\{2\}\\g& \text {if }C =\{5\}\\e&\text {if } C=B \end{cases}$

If an onto function from $P(B)\to A$

That's all.