GATE / CS ARCHIVE

GATE CSE 2015 SET 2 / QUESTION 59

GATE CSE 2015 Set 2 Q59

Discrete Mathematics · Sets, Relations & Functions · Full GATE CSE 2015 Set 2 paper

GATE 2015 Set 2, Q59 2 marks · NAT
Report issue

Sets, Relations & Functions

Question 59, GATE 2015: Choose uniformly from all functions from a two-element set to a twenty-element set. Find the probability that the function is one-to-one.
Tap to enlarge
Answer & solution

Official answer: 0.95

The first domain element has 20 possible images and the second must choose one of the remaining 19 for injectivity. Among 20² equally likely functions, 20*19 are injective, giving 19/20=0.95.

The first domain element may map to any of 20 values. Of the 20 choices for the second, exactly 19 differ from the first. Uniform independent choices among all 20² functions therefore give 20·19/20²=19/20=0.95. The number 20·19 is a count of injective functions, not the requested probability. The uniformity over all functions is essential to this simple ratio.

Original paper, page 49 · Answer key