GATE Computer ScienceModerateGATE CS (PYQ pattern)
A DFA has 8 states. To decide whether the language it accepts is infinite, it suffices to check whether it accepts some string whose length lies in the range
- A. 9 to 16
- B. 7 to 14
- C. 8 to 16
- D. 8 to 15
Correct answer: D. 8 to 15
The language is infinite iff some accepted string has length n ≤ |w| < 2n: a string of length ≥ n pumps, and a shortest pumpable accepted string has length < 2n. With n = 8 this is 8 to 15.
More Theory of Computation questions
- Which of the following statements are correct? I. The reversal of a deterministic context-free language is always deterministic…
- Which of the following statements are correct? I. Recursively enumerable languages are closed under union and intersection. II…
- L₁ and L₂ are context-free languages. Which statement about L₁ ∩ L₂ is always correct?
- The grammar S → aSb | SS | ab generates 14 strings of length 8. How many of these strings have MORE than one parse tree?
- How many strings of length 6 over {a, b} match the regular expression (a + ab)(b + ba)?
- An NFA over {a, b} has states 0, 1, 2, 3, start state 0 and accepting set {2,3}. Transitions: δ(0): a→{2}, b→{0,2,3}; δ(1): a→{0,1,2}…