Mathematics (JEE)Hard

A function from {1, 2, 3, 4} to {1, 2, 3, 4} is chosen uniformly at random among all 4⁴ functions. What is the probability that it is onto (every value is attained)?

  1. A. 1/4
  2. B. 9/64
  3. C. 9/32
  4. D. 3/32

Correct answer: D. 3/32

Onto functions are bijections: 4! = 24 out of 256, so the probability is 24/256 = 3/32. The value 1/4 would be the chance that a particular value is hit, and 9/64 ignores the injectivity.

More Permutations, Combinations and Probability questions

Exams that ask this topic