QlarIITy

MathematicsJEE Main 2025 · 24 JanuaryInteger

Number of functions f:{1,2,…,100}→{0,1}f : \{1, 2, \ldots, 100\} \to \{0, 1\}, that assign 1 to exactly one of the positive integers less than or equal to 98, 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. Inputs not mentioned in a condition are free, and each doubles the count for a two-valued function.

Concept refresher. If one choice can be made in mm ways and an independent second choice in nn ways, both can be made together in

N=mnN = mn

ways.

Picture the situation. The inputs 1 to 98 are restricted: exactly one of them is assigned the value 1 and the other 97 the value 0. The inputs 99 and 100 are not mentioned, so each may be assigned 0 or 1 freely.

Approach. Count the choices for the restricted inputs and for the free inputs, and multiply.

  1. Step 1: The restricted inputs

    The input among 1 to 98 that receives the value 1 can be chosen in 98 ways, and the rest of them receive 0.

  2. Step 2: The free inputs

    Each of 99 and 100 has 2 possible values, which is 22=42^2 = 4 ways. So the number of functions is 98×4=39298 \times 4 = 392.

Answer. 392

Sanity check. Without the last two inputs the count would be 98, and each free input doubles it: 98×2×2=39298 \times 2 \times 2 = 392.

Common wrong answers

  • 98: Forcing 99 and 100 to map to 0 as well gives 98.
  • 100: Letting exactly one of all the 100 inputs receive the value 1 gives 100, which ignores that 99 and 100 are free.

Key takeaway

The trap. A condition on some of the inputs says nothing about the others.

How toppers think. They split the domain into the restricted part and the free part before counting.

Remember. 98×22=39298 \times 2^2 = 392

More on Types of Functions