The language L = {ai b ci ? i / 0} over the alphabet {a, b, c} is : a regular…

2017

The language L = {ai b ci ? i / 0} over the alphabet {a, b, c} is :

a regular language.

not a deterministic context free language but a context free language.

recursive and is a deterministic context free language.

not recursive.

  1. A.

    a regular language.

  2. B.

    not a deterministic context free language but a context free language.

  3. C.

    recursive and is a deterministic context free language.

  4. D.

    not recursive.

Attempted by 43 students.

Show answer & explanation

Correct answer: C

Answer: The language is recursive and is a deterministic context-free language.

Reasoning overview:

  • Not regular: Sketch via the pumping lemma — assume a finite automaton with pumping length p; consider the string a^p b c^p. Any pumped decomposition that repeats a substring inside the a-block changes the number of a's but leaves the number of c's unchanged, producing a string not in the language, a contradiction. Thus the language is not regular.

  • Deterministic context-free: DPDA construction sketch — use a stack to count a's: for each a read, push one symbol. On reading the single b, switch to a popping phase. For each c read, pop one symbol. Accept if the input ends and the stack is empty. The transitions are deterministic because at most one action is applicable at each step (while reading a's, push; at the first b switch mode; while reading c's, pop). Hence the language is accepted by a deterministic pushdown automaton.

  • Recursive (decidable): Because a deterministic PDA decides membership and can be simulated by a Turing machine that always halts, the language is decidable (recursive).

Conclusion: The language requires equal numbers of a's and c's separated by a single b, so it is not regular, but it is accepted by a deterministic PDA and therefore is a deterministic context-free language and is recursive.

Explore the full course: Mppsc Assistant Professor