2.7 Turing Machines and Grammars We now turn our attention back to Turing Machines as language acceptors. We have already seen in Sec. 2.4 how Turing Machines define two classes of languages, i.e., recursive language and recursively enumerable languages, depending on whether string membership in the respective languages can be decided on or merely accepted.
Recursive and Recursively Enumerable Languages
Accepting Vs Deciding M accepts a language when it halts on every member string. M decides a language when it halts (resp. hangs) on a string that is (resp. is not) a member of the language.
Accepting, Deciding and Languages Recursive Languages are decidable. Recursively Enumerable are accepted (recognised) by Turing Machines.
Slide 58
Chomsky Language Class Hierarchy
Regular Languages: Recognised by Regular Grammars.
Context Free Languages: Recognised by Context Free Gram- mars. ... Phrase Structured Languages: Recognised by Phrase Struc- tured Grammars.
Slide 59
One alternative way how to categorise languages is using (Phrase Structured) Grammars. But how do these language classes compare in relation to those defined by types of Turing Machines? In an earlier course, we have already laid some foundation towards answering this question by considering machines that characterise these language classes. For instance, recall that regular languages were recognised by Finite State Automata. We also saw how the inverse of a regular language was also recognised by an FSA. Thus, if we could construct two Turing Machines corresponding to the FSMs that recognise a regular language L, and its inverse, L,respectively, then we could construct a third Turing Machine from these two Turing Machines that dovetails the two is search of whether x L and x L; the third Turing Machine terminates as soon as either of the sub-tms terminate and returns2 true is the2 Turing Machine accepting x L terminates as false if the Turing Machine accepting x L terminates. Clearly, this third Turing Machine2 will always terminate since, for any x,we have either x2 L or else x L. This leads us to conclude that regular languages are included as part of the recursive languages.2 The2 observation is complete by noting that a Turing Machine can easily act as an
45 Regular Grammars and Recursive Languages
Theorem 41. LReg ⇢LRec Proof. Consider both inclusion relations:
: FSA transitions can be encoded as Turing Machine transitions ✓ as