How many onto functions are there from {1, 2, 3, 4} to {a, b}?
A16
B14
C8
D12
Show answer & solution
Correct answer: B. 14
Solution: There are 2⁴ = 16 functions in all. Exactly 2 of them are not onto (all values a, or all values b), so 16 − 2 = 14 are onto.