GATE Computer ScienceVery hardGATE CSE · NIELIT
How many onto (surjective) functions f from {1,…,8} to {a,b,c,d} satisfy f(1) ≠ f(2)?
- A. 40824
- B. 8400
- C. 32424
- D. 36000
Correct answer: C. 32424
Total surjections 4!·S(8,4) = 40824; those with f(1)=f(2) correspond to surjections from 7 points = 8400; the difference is 32424.
More Discrete Mathematics questions
- In how many ways can the set {1, 2, …, 8} be partitioned into non-empty blocks so that every block has at least 2 elements?
- How many integer solutions does x₁ + x₂ + x₃ + x₄ + x₅ = 30 have if 3 ≤ xᵢ ≤ 10 for every i?
- A path runs from (0,0) to (7,7) using unit steps right (+1,0) or up (0,+1). It must satisfy y ≤ x at every lattice point visited and must…
- What is the value of 7^(7^7) mod 100 (the last two digits of 7 raised to the power 7⁷)?
- How many equivalence relations on the set {1, 2, 3, 4, 5, 6, 7} have exactly 3 equivalence classes?
- What is the maximum number of regions into which 6 circles can divide the plane (any two circles meet in at most 2 points)?