GATE Computer ScienceHardGATE CS
Let f be a function from {1, 2, 3, 4, 5, 6} to {a, b, c, d}. How many onto (surjective) functions satisfy f(1) = a?
- A. 360
- B. 390
- C. 1560
- D. 420
Correct answer: B. 390
The total number of surjections is 4^6 − 4·3^6 + 6·2^6 − 4 = 1560. By symmetry each of the four codomain elements is equally likely to be the image of 1, so 1560 / 4 = 390.
More Discrete Mathematics questions
- The complete bipartite graph K(2,4) has two vertices on one side and four on the other, with every cross pair joined. How many distinct…
- The wheel graph W5 consists of a hub joined to every vertex of a 5-cycle. In how many ways can its 6 vertices be properly coloured using 4…
- How many binary strings of length 8 contain no three consecutive 0s?
- The divisors of 360 are ordered by divisibility and drawn as a Hasse diagram. How many edges does the diagram have?
- A sequence of 82 distinct real numbers is given. Which is the largest L such that EVERY such sequence is guaranteed to contain an…
- A permutation of {1, 2, …, 10} is chosen uniformly at random. What is the expected number of cycles in its cycle decomposition (fixed…