The GATE Grind

GATE 2012 CS (CS1) – Question 47

Engineering Mathematics · Discrete Mathematics: Combinatorics (Counting, Recurrence Relations, Generating Functions) · 2 marks · Multiple choice

How many surjections exist from an n-element set (n≥2) to a two-element set?

  1. $2^n$
  2. $2^n-1$
  3. $2^n-2$
  4. $2(2^n-2)$

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (C) $2^n-2$

Explanation

Each of n domain elements independently chooses one of two images, giving 2ⁿ functions. Exactly two fail to hit both targets: the constant function to the first and the constant function to the second. Subtracting gives 2ⁿ−2, C.

More Discrete Mathematics: Combinatorics (Counting, Recurrence Relations, Generating Functions) questions

All Discrete Mathematics: Combinatorics (Counting, Recurrence Relations, Generating Functions) questions →