JEEAdvanced

A function f from {1,2,3,4,5} to {1,2,3,4,5} is chosen uniformly at…

Question

A function f from {1,2,3,4,5} to {1,2,3,4,5} is chosen uniformly at random among all 5^5 such functions. Let p be the probability that the image (range) of f has exactly 3 elements. Write p = m/n in lowest terms and find m+n.

✓ Verified answer: 37checked by our engine — not a guess

Step-by-step solution

The image has exactly 3 elements means: choose which 3 of the 5 codomain values are hit, then map all 5 domain elements ONTO those 3 values (a surjection of a 5-set onto a 3-set).

Number of surjections from a 5-set onto a fixed 3-set = 3!

* S(5,3), where S(5,3) is the Stirling number of the second kind.

S(5,3) = 25, so surjections = 6 * 25 = 150.
(Check S(5,3): inclusion-exclusion 3^5 - 3*2^5 + 3*1^5 = 243 - 96 + 3 = 150 surjections directly, matching 6*25.)
Choose the 3 image values: C(5,3) = 10.
Favourable count = 10 * 150 = 1500.
Total functions = 5^5 = 3125.
p = 1500/3125 = 12/25.
m+n = 12 + 25 = 37.

Final answer37

Stuck on a problem like this?

Paste any JEE or NEET question — verified working, a confidence %, and an honest “not sure” instead of a bluff.

Solve my doubt →

More Probability solutions