QlarIITy

MathematicsJEE Main 2023 · 8 AprilInteger

Let R={a,b,c,d,e}R = \{a, b, c, d, e\} and S={1,2,3,4}S = \{1, 2, 3, 4\}. Total number of onto functions f:R→Sf : R \to S such that f(a)≠1f(a) \neq 1, is equal to ______.

Try it before you look.The full solution is on this page, below the answer box, the moment you check. No sign-in needed.

Solution

Core idea. When the values are interchangeable, a condition on one element removes an equal share of the functions.

Concept refresher. The number of onto functions from a set of rr elements to a set of 4 elements is, by inclusion and exclusion,

N=4r−4⋅3r+6⋅2r−4N = 4^r - 4 \cdot 3^r + 6 \cdot 2^r - 4

Picture the situation. An onto function from the 5 elements of RR to the 4 elements of SS uses every value at least once. Among all onto functions, the values 1, 2, 3 and 4 are interchangeable, so f(a)f(a) equals each of them in the same number of functions.

Approach. Count the onto functions by inclusion and exclusion, then remove a quarter of them.

  1. Step 1: Onto functions

    Removing the functions that miss at least one value gives

    45−4×35+6×25−4=1024−972+192−4=240\begin{aligned} &4^5 - 4 \times 3^5 + 6 \times 2^5 - 4 \\[4pt] &= 1024 - 972 + 192 - 4 = 240 \end{aligned}
  2. Step 2: The condition

    By symmetry f(a)=1f(a) = 1 in 2404=60\dfrac{240}{4} = 60 of them, so the number with f(a)≠1f(a) \neq 1 is 240−60=180240 - 60 = 180.

Answer. 180

Sanity check. Directly, an onto function from 5 elements to 4 values has one value used twice: 5C2×4!=10×24=240{}^5C_2 \times 4! = 10 \times 24 = 240.

Common wrong answers

  • 240: Counting all onto functions without the condition f(a)≠1f(a) \neq 1 gives 240.
  • 768: Ignoring the onto condition gives 3×44=7683 \times 4^4 = 768.

Key takeaway

The trap. The onto condition and the forbidden value must both hold for the same function.

How toppers think. They use symmetry in place of a second inclusion and exclusion.

Remember. 240×34=180240 \times \dfrac{3}{4} = 180

More on Types of Functions