Search any question & find its solution
Question:
Answered & Verified by Expert
Let $\mathrm{A}=\{1,2,3, \ldots ., \mathrm{n}\}$ and $\mathrm{B}=\{\mathrm{a}, \mathrm{b}, \mathrm{c}\}$, then the number of functions from A to B that are onto is
Options:
Solution:
2205 Upvotes
Verified Answer
The correct answer is:
$3^{n}-3\left(2^{n}-1\right)$
Number of onto functions: If A\& B are two sets having $m$ \& $n$ elements respectively such that $1 \leq \mathrm{n} \leq \mathrm{m}$ then number of onto functions from A to B is
$\sum_{\mathrm{r}=1}^{\mathrm{n}}(-1)^{\mathrm{n}-\mathrm{r}}{ }^{\mathrm{n}} \mathrm{C}_{\mathrm{r}} \mathrm{r}^{\mathrm{n}}$
Given $\mathrm{A}=\{1,2,3,-\cdots, \mathrm{n}\} \& \mathrm{~B}=\{\mathrm{a}, \mathrm{b}, \mathrm{c}\}$
$\therefore$ Number of onto functions
$=\sum_{\mathrm{r}=1}^{3}(-1)^{3-\mathrm{r}} \cdot{ }^{3} \mathrm{C}_{\mathrm{r}}(\mathrm{r})^{\mathrm{n}}$
$=(-1)^{3-1}{ }^{3} \mathrm{C}_{1}(1)^{\mathrm{n}}+(-1)^{3-2}{ }^{3} \mathrm{C}_{2}(2)^{\mathrm{n}}+{ }^{3} \mathrm{C}_{3}(3)^{\mathrm{n}}(-1)^{3-3}$
$={ }^{3} \mathrm{C}_{1}-{ }^{3} \mathrm{C}_{2} 2^{\mathrm{n}}+{ }^{3} \mathrm{C}_{3} 3^{\mathrm{n}}$
$=\frac{3 !}{2 ! 1 !}-\frac{3 !}{2 ! 1 !} 2^{\mathrm{n}}+\frac{3 !}{3 ! 0 !} 3^{\mathrm{n}}$
$=3-3 \cdot 2^{\mathrm{n}}+3^{\mathrm{n}}$
$=3^{\mathrm{n}}-3\left(2^{\mathrm{n}}-1\right)$
$\sum_{\mathrm{r}=1}^{\mathrm{n}}(-1)^{\mathrm{n}-\mathrm{r}}{ }^{\mathrm{n}} \mathrm{C}_{\mathrm{r}} \mathrm{r}^{\mathrm{n}}$
Given $\mathrm{A}=\{1,2,3,-\cdots, \mathrm{n}\} \& \mathrm{~B}=\{\mathrm{a}, \mathrm{b}, \mathrm{c}\}$
$\therefore$ Number of onto functions
$=\sum_{\mathrm{r}=1}^{3}(-1)^{3-\mathrm{r}} \cdot{ }^{3} \mathrm{C}_{\mathrm{r}}(\mathrm{r})^{\mathrm{n}}$
$=(-1)^{3-1}{ }^{3} \mathrm{C}_{1}(1)^{\mathrm{n}}+(-1)^{3-2}{ }^{3} \mathrm{C}_{2}(2)^{\mathrm{n}}+{ }^{3} \mathrm{C}_{3}(3)^{\mathrm{n}}(-1)^{3-3}$
$={ }^{3} \mathrm{C}_{1}-{ }^{3} \mathrm{C}_{2} 2^{\mathrm{n}}+{ }^{3} \mathrm{C}_{3} 3^{\mathrm{n}}$
$=\frac{3 !}{2 ! 1 !}-\frac{3 !}{2 ! 1 !} 2^{\mathrm{n}}+\frac{3 !}{3 ! 0 !} 3^{\mathrm{n}}$
$=3-3 \cdot 2^{\mathrm{n}}+3^{\mathrm{n}}$
$=3^{\mathrm{n}}-3\left(2^{\mathrm{n}}-1\right)$
Looking for more such questions to practice?
Download the MARKS App - The ultimate prep app for IIT JEE & NEET with chapter-wise PYQs, revision notes, formula sheets, custom tests & much more.