IAE Academy

GATE 2018 CS Q.27: solution and answer

GATE 2018 · CSQ.27 · 2 marks · MCQ

Let be the set of natural numbers. Consider the following sets.

: Set of Rational numbers (positive and negative)
: Set of functions from to
: Set of functions from to
: Set of finite subsets of .

Which of the sets above are countable?

  1. (A)

    and only

  2. (B)

    and only

  3. (C)

    and only

  4. (D)

    , and only

See the question in the paper

Answer and solution

ANSWER

The countable sets are , and only, which is option (D).

Official answer: DSource: Official answer key, GATE 2018 CS (IIT Guwahati)

  1. is countable: every rational can be written as with , , so is the image of the countable set under . The image of a countable set is countable (and is infinite, since it contains ).

  2. is countable: a function is determined by the pair , so is in bijection with . A finite product of countable sets is countable, so is countable.

  3. is uncountable: a function is the indicator function of the subset of , and every subset arises this way exactly once. So is in bijection with the power set .

  4. By Cantor's theorem, (diagonal argument: for any list of subsets of , the set differs from every ). Hence is uncountable.

  5. is countable: for each let be the set of subsets of , which has elements, so it is finite. Every finite subset of is contained in for equal to its largest element (or any for the empty set), so . A countable union of finite sets is countable, so is countable.

  6. So , and are countable and is not. The matching option is (D), , and only.

KEY IDEA

A set is countable if it is the image of or of a countable product or union of countable sets. Functions on a finite domain, finite subsets and fractions of integers all stay countable. Functions from to are the same as subsets of , and by Cantor's theorem there are uncountably many of those.

WATCH OUT FOR

Treating , the set of finite subsets of , as uncountable because it sounds like the power set . Only the infinite subsets make uncountable. Another slip is treating , the set of functions from to , as countable because is finite.

From the GATE 2018 CS paper. Every question of this paper · Download the full paper · All 8 Sets & relations questions, with notes

More Sets & relations questions