GATE / CS ARCHIVE

GATE CSE 2017 SET 1 / QUESTION 39

GATE CSE 2017 Set 1 Q39

Theory of Computation · Decidability & Computability · Full GATE CSE 2017 Set 1 paper

GATE 2017 Set 1, Q39 2 marks · MCQ
Report issue

Decidability & Computability

Question 39, GATE 2017: A,B are finite alphabets and # belongs to neither. f:A*→B* is total; computable means a Turing machine halts on every x with f(x) on tape. Lf={x#f(x):x∈A*}. A f computable iff Lf recursive; B f computable iff Lf recursively enumerable; C computability implies recursive graph but not conversely; D computability implies RE graph but not conversely. This is printed as a single-choice question.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Our answer: A and B both valid for total f

1. If f is computable, first reject strings not of form x#y with x∈A*,y∈B*. Otherwise compute f(x), which halts by totality, and compare it with y. This is a decider for Lf, so the graph is recursive and hence RE.

2. Conversely suppose only an RE recognizer for Lf is available. List all y∈B* and simulate the recognizer on x#y in dovetailed rounds, giving every candidate increasingly many steps. Do not run one candidate to completion: a nonmember may loop forever.

3. Because f is total, one candidate y=f(x) exists and will eventually be accepted; function uniqueness ensures it is the right output. This procedure halts for every x and computes f. Thus an RE graph already suffices, and a recursive graph certainly suffices. Both A and B are mathematically true; the protected official single-choice answer A is retained, not treated as eliminating B.

Original paper, page 17 · Answer key