GATE / CS ARCHIVE

GATE CSE 2000 / QUESTION 2.9

Decidability of finite-state membership and CFG infiniteness

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

GATE 2000, Q2.9 2 marks · MCQ
Report issue

Decidability & Computability

Question 2.9, GATE 2000: Decide whether P1,finite-state-machine acceptance of a given string,and P2,infiniteness of a CFG language,are decidable. Options: both,neither,only P1,only P2.
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

Step 1: For P1, simulate the finite automaton on the finite input, tracking a set of states if it is nondeterministic, then inspect acceptance. This always terminates.

Step 2: For P2, convert the productive nonempty-word portion of the grammar to Chomsky normal form with m variables. Any parse tree without a repeated variable along a root-to-leaf path has bounded height and hence bounded word length. A sufficiently long word forces a repeat and pumping to infinitely many lengths.

One can effectively test whether the CFG generates a word exceeding that finite bound by intersection with the regular language of longer words and then CFG emptiness. Hence infiniteness is decidable too, giving A.

Original paper, page 4