# Decidable languages and unrestricted grammars?

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?

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$.

• 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
• 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
• 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

There can not be a useful class of grammars for $\mathrm{R}$ (the set of recursive languages), since

• every useful class of grammars is enumerable, and
• $\mathrm{R}$ is not semi-decidable or, equivalently, not enumerable.

The first is obviously not a rigorous theorem (and can't be), it's just judgemental conjecture. The set of all grammars is enumerable, and any restriction that is not decidable is likely not very useful¹ in itself; in particular it won't be a syntactic restriction (like Chomsky's).