12

Turing machines and unrestricted grammars are two different formalisms that define the RE languages. Some RE languages are decidable, but not all are.

We can define the decidable languages with Turing machines by saying that a language is decidable iff there is a TM for the language that halts and accepts all strings in the language and halts and rejects all strings not in the language. My question is this: is there an analogous definition of decidable languages based on unrestricted grammars rather than Turing machines?

Raphael
  • 72,336
  • 29
  • 179
  • 389
templatetypedef
  • 9,102
  • 1
  • 30
  • 60

3 Answers3

7

A language is decidable, iff it is semi-decidable and its complement is semi-decidable. Moreover, a language is recursive-enumerable iff it is semi-decidable and thus you can find an unrestricted Grammar. Therfore:

A language $L$ is decidable iff there is both an unrestricted Grammar $G$ with $L(G) = L$ and an unrestricted Grammar $\bar G$ with $L(\bar G) = \bar L$.

Simon S
  • 593
  • 3
  • 14
  • This is definitely true, but this would require finding two different grammars. Is there a way that we could find one grammar that could definitively prove the language was decidable (much in the same way that finding a TM that always halts proves that a language is decidable?) – templatetypedef Feb 26 '13 at 18:16
  • 2
    Also, aren't "semi-decidable" and "recursively enumerable" synonyms? – templatetypedef Feb 26 '13 at 18:18
  • 1
  • IIRC there is no known class of formal grammars corresponding to decidable languages, so i don't think this is possible with a single unrestricted grammar. 2. Yes, they happen to mean the same.
  • – Simon S Feb 26 '13 at 18:47
  • 1
    You are mistaken about the definition of decidability. Decidable means "there is a Turing machine which computes the answer". The relation you quote as the definition is in fact a theorem, which I have heard attributed to Emile Post. – Andrej Bauer Feb 26 '13 at 23:01
  • 2
    Next, semidecidability and recursive enumerability are not synonyms, but they are equivalent notions. A set is semidecidable if it is the halting set of a Turing machine, while it is recursively enumerable if it is enumerated by a Turing machine. – Andrej Bauer Feb 26 '13 at 23:03
  • 1
  • You are right, decidability isn't necessarily defined that way (but can be), and therefore I edited the answer. 2. Thats why i wrote "they happen to mean the same", perhaps "synonym" is the wrong word.
  • – Simon S Feb 27 '13 at 10:27
  • The Wikipedia article on Recursive Languages indicates that the axioms of Presburger Arithmetic constitute an example of a grammar for a language that is decidable yet NOT context sensitive. This kind of grammar is not included in Chomsky's hierarchy and would have to be located between Chomsky's Type 0 & Type1 grammars. – John Strong Mar 10 '24 at 21:19