Mathematics (JEE)HardGATE CS
How many functions from a 6-element set onto a 4-element set are surjective, that is, use every one of the 4 target values at least once?
- A. 4096
- B. 1564
- C. 1560
- D. 65
Correct answer: C. 1560
By inclusion-exclusion, 4^6 - 4*3^6 + 6*2^6 - 4*1^6 = 4096 - 2916 + 384 - 4 = 1560.
Practise more Permutations, Combinations and Probability questionsPermutations, Combinations and Probability: notes and key points
More Permutations, Combinations and Probability questions
- How many functions f from {1, 2, 3, 4, 5, 6} to {1, 2, 3, 4} are onto (every value 1..4 is attained) and satisfy f(1) = f(2)?
- How many integers n with 1 <= n <= 10000 are divisible by exactly one of 3 and 7?
- How many 4-digit numbers have four distinct digits, none of them 0, and an even digit sum?
- How many nonempty subsets of {1, 2, ..., 10} have an element sum that is divisible by 5?
- How many 4-element subsets of {1, 2, ..., 12} have an element sum divisible by 3?
- How many binary strings of length 10 contain neither the substring 11 nor the substring 000?