328 views
1 1 vote

Which of the following are decidable?

I. Whether a given string $w$ belongs to a given Context-Sensitive Language $L$.

II. Whether the language accepted by a given Turing Machine is context-free.

III. Whether a given grammar $G$ qualifies as a Context-Sensitive Grammar.

IV. Whether the language generated by a given Context-Sensitive Grammar is empty.

  1. I AND II
     
  2. I AND III
     
  3. II AND IV
     
  4. III AND IV

1 Answer

1 1 vote

I. Whether a given string $w$ belongs to a given CSL $L$.

  • 1. CSLs are Recursive: By definition, every Context-Sensitive Language (CSL) is a Recursive Language. This is a fundamental theorem of computability.
     
  • 2. Recursive Languages Have Deciders: The very definition of a Recursive Language is that a Halting Turing Machine (a decider) exists for it.
     
  • 3. Deciders Solve the Problem: This Halting TM is the algorithm for the membership problem. When given an input string $w$:
     
  • If $w$ is in the language $L$, the TM is guaranteed to halt in an accept state.
     
  • If $w$ is not in the language $L$, the TM is guaranteed to halt in a reject state.

Since a Halting TM exists for this problem, the problem is DECIDABLE.

II. Whether the language accepted by a TM is context-free.

  • UNDECIDABLE. This is a non-trivial property of the language $L(M)$. Some TMs accept context-free languages (like $a^n b^n$ ), and some accept non-context-free languages (like $\left.a^n b^n c^n\right)$. By Rice's Theorem, this is undecidable.

III. Whether a given grammar $G$ qualifies as a CSG.

  • DECIDABLE. This is a simple syntactic check. We just need an algorithm to iterate through all production rules $\alpha \rightarrow \beta$ and verify that $|\alpha| \leq|\beta|$. This algorithm always halts.

IV. Whether the language generated by a CSL is empty.

  • UNDECIDABLE. The emptiness problem for Context-Sensitive Languages is a wellknown undecidable problem.
Answer:
Position:
Show:

Related questions

0 0 votes
1 1 answer
275
275 views
GO Classes asked Nov 8, 2025
275 views
Which of the following problems is/are UNDECIDABLE?I. Given a Context-Free Grammar $G$, whether $G$ contains any useless symbols (symbols that can never appear in the der...
1 1 vote
1 1 answer
317
317 views
GO Classes asked Nov 8, 2025
317 views
Which of the following problems are decidable?I. Given a Turing Machine $M$ and an input string $w$, whether $M$ halts on $w$ within $|w|^2+$ 100 steps. II. Given a Conte...
4 4 votes
2 2 answers
464
464 views
GO Classes asked Nov 8, 2025
464 views
CONSIDER A DFA OVER $\Sigma=\{a, b\}$ THAT ACCEPTS A STRING $w$ IF AND ONLY IF $w$ CONTAINS THE SUBSTRING "ab" AND DOES NOT CONTAIN THE SUBSTRING "ba".WHAT IS THE MINIMUM...
2 2 votes
1 1 answer
316
316 views
GO Classes asked Nov 8, 2025
316 views
CONSIDER A DFA OVER $\Sigma=\{a, b\}$ ACCEPTING ALL STRINGS $w$ THAT SATISFY BOTH OF THE FOLLOWING CONDITIONS:1. THE NUMBER OF $a$ 'S IN $w$ IS DIVISIBLE BY 4.2. THE (NUM...