GATE / CS ARCHIVE

GATE CSE 2018 / QUESTION 27

Countable sets of numbers and functions

Discrete Mathematics · Sets, Relations & Functions · Full GATE CSE 2018 paper

GATE 2018, Q27 2 marks · MCQ
Report issue

Sets, Relations & Functions

Question 27, GATE 2018: Let P be the rationals; Q the functions {0,1}→N; R the functions N→{0,1}; S the finite subsets of N. Which are countable? A Q,S; B P,S; C P,R; D P,Q,S.
Tap to enlarge
Your answer
Answer & solution

Official answer: D

Method

A function on two inputs is completely specified by the pair (f(0),f(1)), so Q is in bijection with N² and can be enumerated diagonally. A finite subset can be written as an increasing finite tuple; for each length these tuples are countable, and there are countably many lengths. In contrast a function in R specifies an infinite binary sequence. Cantor diagonalization constructs a sequence differing from the nth listed sequence at position n, defeating any proposed enumeration.

Solution

Rationals are countable. Functions from{0, 1} to N correspond to ordered pairs of naturals, a countable set. Finite subsets of N are a countable union over subset size of countable collections. Functions N→{0, 1} correspond to arbitrary subsets of N and are uncountable by Cantor’s theorem. Thus P, Q, S, D.

Original paper, page 11 · Answer key