GATE Computer ScienceModerateGATE CSE · NIELIT
How many onto (surjective) functions exist from a 5-element set to a 3-element set?
- A. 126
- B. 180
- C. 90
- D. 150
Correct answer: D. 150
By inclusion–exclusion: 3⁵ − 3·2⁵ + 3·1⁵ = 243 − 96 + 3 = 150.
More Discrete Mathematics questions
- In how many ways can 6 distinct letters be placed into their 6 addressed envelopes (one per envelope) so that no letter is in its own…
- What is the smallest positive integer x with x ≡ 2 (mod 3), x ≡ 3 (mod 5) and x ≡ 2 (mod 7)?
- How many spanning trees does the complete bipartite graph K₃,₃ have?
- How many binary relations on a 4-element set are both reflexive and symmetric?
- What is the multiplicative inverse of 17 modulo 3120?
- What is Euler's totient φ(360)?