Consider two sets A = {2, 3, 5, 7, 11, 13} and B = {1, 8, 27}. Let f be a function from A to B such that for every element bin B, there is at least one element a in A such that f(a) = b. Then, the total number of such functions f is
Correct Answer :
540
Solution :
The correct option is 540.
To find the total number of such functions, we need to calculate the number of onto (surjective) functions from set A to set B.
Let us first identify the given sets and their cardinalities:
Set A = {2, 3, 5, 7, 11, 13}, which contains 6 elements. Thus, .
Set B = {1, 8, 27}, which contains 3 elements. Thus, .
The condition that for every element in B, there is at least one element in A such that means that the function must be onto (surjective).
We can use the Principle of Inclusion-Exclusion to find the total number of onto functions from a set of size to a set of size .
Here, and .
The formula for the number of onto functions is:
Substituting and into the formula, we get:
Now, let us calculate the value of each term:
1. Total number of unrestricted functions:
2. Functions missing at least one element of B:
3. Functions missing at least two elements of B:
Combining these terms using the Principle of Inclusion-Exclusion:
Therefore, the total number of such functions is 540.
Access expert-curated educational resources and study materials—completely free.
Create, conduct, and manage professional online assessments with Mindyard. Perfect for teachers and institutes.
Copyright © 2026 Mindyard. All Rights Reserved.