# Thread: [SOLVED] SETS AND FUNCTIONS

1. ## [SOLVED] SETS AND FUNCTIONS

Let S be the set of all functions from {1, 2} to {1, 2, 3}. Let F be an element of S chosen at random.

Find |S| and find the probability that F is an injective function.

For the question I know the |S|= 9 but finding it difficult to find the probability that f is an injective function.

Let S be the set of all functions from {1, 2, 3} to {1, 2}. Let G be an element of S chosen at random.

Find |S| and find the probability that G is an injective function.

For the question I know that the probability that f is an injective function is 0 as this can not be injective as the domain and co domain is disjoint. But I am finding it difficult to find |S|.

Let S be the set of all functions from {1, 2,…, M} to {1, 2,…, N}. Let Q be an element of S chosen at random.

Find |S| and find the probability that Q is an injective function.

For this question I do not understand it at all.

2. In order for there to be an injection from $A \mapsto B$ it must be the case that $
\left| A \right| \leqslant \left| B \right|$
.
Then we count the number of permutations of $\left| B \right|$ taken $\left| A \right|$ at a time: $\frac{{\left| B \right|!}}{{\left[ {\left| B \right| - \left| A \right|} \right]!}}$.
In terms of probability $
\frac{{\frac{{\left| B \right|!}}{{\left[ {\left| B \right| - \left| A \right|} \right]!}}}}{{\left| B \right|^{\left| A \right|} }}$
.

3. Originally Posted by Plato
In order for there to be an injection from $A \mapsto B$ it must be the case that $
\left| A \right| \leqslant \left| B \right|$
.
Then we count the number of permutations of $\left| B \right|$ taken $\left| A \right|$ at a time: $\frac{{\left| B \right|!}}{{\left[ {\left| B \right| - \left| A \right|} \right]!}}$.
In terms of probability $
\frac{{\frac{{\left| B \right|!}}{{\left[ {\left| B \right| - \left| A \right|} \right]!}}}}{{\left| B \right|^{\left| A \right|} }}$
.
Thanks for for the help. I do understand the first part and what is meant by injective but i do not understand about the following:

Then we count the number of permutations of taken at a time: .
In terms of probability and the question.

Can you please explain it to me in more detail.

Thanks

The1u2001

4. Let’s say that $\left| A \right| = 5\;\& \;\left| B \right| = 9$ so there are $9^5\ = 59049$ possible mappings $A\mapsto B$.
The set $B^A$, the set of all mappings $A\mapsto B$, has cardinality $\left| {B^A } \right| = \left| B \right|^{\left| A \right|}$. (The notation makes it easy to remember.)

Now the number of injections $A\mapsto B$ is $P(9,5) = \frac{{9!}}{{\left[ {9 - 5} \right]!}} = \left( 9 \right)\left( 8 \right)\left( 7 \right)\left( 6 \right)\left( 5 \right) = 15120$.

So the probability of randomly selecting an injection is $\frac {15120}{59049}$.

5. Originally Posted by Plato
Let’s say that $\left| A \right| = 5\;\& \;\left| B \right| = 9$ so there are $9^5\ = 59049$ possible mappings $A\mapsto B$.
The set $B^A$, the set of all mappings $A\mapsto B$, has cardinality $\left| {B^A } \right| = \left| B \right|^{\left| A \right|}$. (The notation makes it easy to remember.)

Now the number of injections $A\mapsto B$ is $P(9,5) = \frac{{9!}}{{\left[ {9 - 5} \right]!}} = \left( 9 \right)\left( 8 \right)\left( 7 \right)\left( 6 \right)\left( 5 \right) = 15120$.

So the probability of randomly selecting an injection is $\frac {15120}{59049}$.
Know i get it.

Once again, thanks for helping me, i really appriate it.

THE1U2001