GATE / CS ARCHIVE

GATE CSE 2003 / QUESTION 15

Ordered enumeration and decidability

Theory of Computation · Decidability & Computability · Full GATE CSE 2003 paper

GATE 2003, Q15 1 mark · MCQ
Report issue

Decidability & Computability

Question 15, GATE 2003: If a language’s strings can be effectively enumerated in lexicographic (the reproduction says “alphabetic”) order, which conclusion is intended? A. L is necessarily finite; B. L is regular but not necessarily finite; C. L is context-free but not necessarily regular; D. L is recursive but not necessarily context-free. The distinction between dictionary order and the usual effective length-first order must be addressed.
Tap to enlarge
Your answer
Answer & solution

Answer: D under the standard length-lexicographic convention (no official key was published)

1. Separate two issues: whether membership is decidable, and whether the enumerator itself yields a stopping test. In effective length-first order each target has finitely many predecessors; its absence is detected once the enumeration passes it. Alphabetic dictionary order lacks that finite-predecessor property, so the conventional answer needs the stated interpretation rather than an unqualified appeal to sortedness.

2. With an effective shortlex (length-first, then alphabetic) enumeration in increasing order, membership is decided by enumerating until the target appears or an output exceeds it; if the enumerator terminates, absence is also decided. Finite languages are recursive separately. Thus the conventional result is recursive but not necessarily context-free, D; for example{0n 1n 2n} has a computable ordered enumeration. The the paper explicitly says lexicographic/alphabetic, not length-first. Ordinary dictionary order can have infinitely many predecessors, so the surpassing argument needs an additional guarantee: enumeration of 0,00,000,... never surpasses the absent string 1. The conclusion is recorded under the standard effective length-order convention, not justified by that flawed stopping argument for arbitrary dictionary order.

Original paper, page 2