Question:

Let $A = \{1,2,3,....., n\}$ and $B = \{a,b,c\}$, then the number of functions from $A$ to $B$ that are onto is

Updated On: Apr 15, 2024
  • $3^n - 2^n$
  • $3^n - 2^n -1$
  • $3 (2^n - 1)$
  • $3^n - 3(2^n - 1)$
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

Number of onto functions: If A & B are two sets having m & n elements respectively such that 1$\le$ n $\le$ m then number of onto functions from A to B is
$\sum^{^n}_{_{_{r-1}}}\left(-1\right)^{n-r} .^{n}C_{r} r^{n}$
Given A =$\left\{1,2,3,---- n\right\}\& B=\left\{a,b,c\right\}$
$\therefore\quad$ Number of onto functions
$=\sum ^{^3}_{_{_{r-1}}}\left(-1\right)^{3-r} .^{3}C_{r} r^{n}$
$= -1^{3-1}^{3} C_{1} 1^{n} + -1^{3-2}^{3}C_{2}2^{n} + ^{3}C_{3} 3^{n}-1 ^ {3-3}$
$=^{3}C_{1}-^{3}C_{2} 2^{n}+^{3}C_{3} 3^{n}$
$=\frac{3!}{2!1!}-\frac{3!}{2!1!} 2^{n} +\frac{3!}{3!0!}3^{n}$
$=3-3.2^{n}+3^{n}$
$=3^{n}-3\left(2^{n}-1\right)$
Was this answer helpful?
1
0

Concepts Used:

Functions

A function is a relation between a set of inputs and a set of permissible outputs with the property that each input is related to exactly one output. Let A & B be any two non-empty sets, mapping from A to B will be a function only when every element in set A has one end only one image in set B.

Kinds of Functions

The different types of functions are - 

One to One Function: When elements of set A have a separate component of set B, we can determine that it is a one-to-one function. Besides, you can also call it injective.

Many to One Function: As the name suggests, here more than two elements in set A are mapped with one element in set B.

Moreover, if it happens that all the elements in set B have pre-images in set A, it is called an onto function or surjective function.

Also, if a function is both one-to-one and onto function, it is known as a bijective. This means, that all the elements of A are mapped with separate elements in B, and A holds a pre-image of elements of B.

Read More: Relations and Functions