X and Y contain 2 and 20 distinct objects respectively. Choose uniformly from all functions X→Y. What is the probability that the function is one-to-one?
There are 20² possible functions. For an injective function, choose the image of the first input in twenty ways and that of the second in nineteen ways. The probability is 20×19/20²=19/20=0.95.
More Probability and Statistics questions
GATE 2015 CS (CS3) Q61– X1,X2,X3 are independent, each equally likely zero or one. Y=(X1X2) XOR X3, where…
GATE 2021 CS (CS2) Q32– A biased coin has P(head)=0.4. Let X count heads in 1000 independent tosses. Find its…
GATE 2021 CS (CS2) Q39– A student chooses the order for independent questions A,B. A is answered correctly with…
GATE 2021 CS (CS2) Q43– A bag initially has r red and b black balls. In each trial, draw a ball uniformly, note…
GATE 2026 CS (CS1) Q11– An urn contains one red ball and one blue ball. At each step, a ball is picked uniformly…
GATE 2026 CS (CS1) Q58– Let X be a random variable which takes values in the set \1, 2, 3, 4, 5, 6, 7, 8\.…