All Exams Test series for 1 year @ ₹349 only
Question

Let \(A = \{1, 2, 3, 4, 5\}\) and \(B = \{6, 7\}\). What is the number of onto functions from \(A\) to \(B\)?

This question was previously asked in
NDA 2 2024 GAT Question Paper (01-Sep-2024)
The correct answer is
30

Understanding Onto Functions

The question asks for the number of onto functions from a set \(A = \{1, 2, 3, 4, 5\}\) to a set \(B = \{6, 7\}\).

An onto function (or surjective function) is a function where every element in the codomain (set \(B\) in this case) is mapped to by at least one element from the domain (set \(A\)). In simpler terms, every element in set \(B\) must be 'hit' by the function.

Here, the domain set \(A\) has \(n = |A| = 5\) elements, and the codomain set \(B\) has \(m = |B| = 2\) elements.

Method 1: Using the Inclusion-Exclusion Principle

The number of onto functions from a set of size \(n\) to a set of size \(m\) can be calculated using the inclusion-exclusion principle. The formula is:

\(\text{Number of onto functions} = \sum_{k=0}^{m} (-1)^k \binom{m}{k} (m-k)^n\)

Substituting \(n=5\) and \(m=2\) into the formula:

\(\sum_{k=0}^{2} (-1)^k \binom{2}{k} (2-k)^5\)

Let's expand the sum:

  • For \(k=0\): \((-1)^0 \binom{2}{0} (2-0)^5 = 1 \times 1 \times 2^5 = 1 \times 1 \times 32 = 32\)
  • For \(k=1\): \((-1)^1 \binom{2}{1} (2-1)^5 = (-1) \times 2 \times 1^5 = (-1) \times 2 \times 1 = -2\)
  • For \(k=2\): \((-1)^2 \binom{2}{2} (2-2)^5 = 1 \times 1 \times 0^5 = 1 \times 1 \times 0 = 0\)

Adding these values together:

\(32 + (-2) + 0 = 30\)

Therefore, there are 30 onto functions from set \(A\) to set \(B\) using this method.

Method 2: Total Functions Minus Non-Onto Functions

This method is often simpler when the codomain is small.

  1. Calculate the total number of functions: The total number of functions from set \(A\) (size \(n\)) to set \(B\) (size \(m\)) is \(m^n\). In this case, it's \(2^5 = 32\).
  2. Identify non-onto functions: A function is *not* onto if it fails to map to at least one element in the codomain (\(B\)). Since \(B\) only has two elements, \(\{6, 7\}\), a function fails to be onto if its range is only \(\{6\}\) or only \(\{7\}\).
    • Case 1: Range is only {6}. Every element in \(A\) maps only to 6. There is only one such function: \(f(x) = 6\) for all \(x \in A\).
    • Case 2: Range is only {7}. Every element in \(A\) maps only to 7. There is only one such function: \(f(x) = 7\) for all \(x \in A\).
  3. Calculate the number of non-onto functions: The total number of functions that are not onto is \(1 + 1 = 2\).
  4. Calculate the number of onto functions: Subtract the non-onto functions from the total number of functions. \(\text{Number of onto functions} = \text{Total functions} - \text{Non-onto functions}\) \(\text{Number of onto functions} = 32 - 2 = 30\)

Both methods confirm that the number of onto functions from set \(A\) to set \(B\) is 30.

Was this answer helpful?

Similar Questions

  1. Let P and Q be two non-void relations on a set A. Which of the following statements are correct?
    I. P and Q are reflexive \(\Rightarrow P \cap Q\) is reflexive.
    II. P and Q are symmetric \(\Rightarrow P \cup Q\) is symmetric.
    III. P and Q are transitive \(\Rightarrow P \cap Q\) is transitive.
    Select the answer using the code given below.
  2. Let \(A = \{x \in R: -1 > x < 1\}\). Which of the following is/are bijective functions from \(A\) to itself?
    1. \(f(x) = x|x|\)
    2. \(g(x) = \cos(\pi x)\)
    Select the correct answer using the code given below :
  3. Let \(R\) be a relation on the open interval \((-1, 1)\) and is given by \(R = \{(x, y) : |x + y| < 2\}\). Then which one of the following is correct?
  4. If \(f(x) = ax-b\) and \(g(x) = cx + d\) are such that \(f(g(x)) = g(f(x))\), then which one of the following holds ?
  5. Let R be a relation on the set N of natural numbers defined by
    \(R = \{(x, y) : x, y \in N \text{ and } x = y^3\}\).
    Which of the following statements is/are correct ?
    I. R is symmetric relation
    II. R is transitive relation
    Select the answer using the code given below :
  6. Let \(A = \{-3,-2,-1, 0, 1, 2, 3\}\) and \(B = \{0, 1, 4, 9\}\). How many elements does the subset of \(A \times B\) corresponding to the relation \(R = \{(x, y): |x| < y\}\) have, where \(x \in A\) and \(y \in B\)?

Important Questions from Relations and Functions

  1. If the function of \(f(x)=\dfrac{x}{x-1}\) express f(3x) in terms of f(x)

  2. If \(f(x)-\dfrac{1}{1+2^{1/x}}\) then at x = 0 the function is:

  3. If f(x) is a periodic function and a is a positive real number such that f(x + 2α) + f(x) = 0 for all x ∈ ℝ, then the period of f(x) is:

  4. If \(f(x)=\frac{1}{1+x}\), g(x) = f{f(x)} and h(x) = f[f{f(x)}], then the value of f(x).g(x).h(x) is:

  5. If \(f(x) = {\sin ^{ - 1}}\left[ {\frac{{\sqrt 3 }}{2}x - \frac{1}{2}\sqrt {1 - {x^2}} } \right]\), \(x \in \left[ { - \frac{1}{2},1} \right]\), then f(x) will be

Need Expert Advice?
Test Series
NDA img
Defence
NDA 2026 Mock Test Series (Latest Pattern)
526 Tests 1 Tests Free
1164 Attempts
4.7(159)
English, Hindi

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App