This preview shows pages 1–4. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 16. Turing Machines as Language Recognizers Hereafter, we shall ssume that the initial configuration of M on input w is ( s, w ). Let M = ( K, Σ , δ, s, H ) be a Turing Machine such that H = { y, n } where y means “yes”, n means “no”. • Σ ⊆ Σ − { , } is the input alphabet of M . • Let L ⊆ Σ ∗ be a language. • On input w : – If M halts at y , we say M accepts w . – If M halts at n , we say M rejects w . – If M loops forever, M neither accepts nor rejects w . 1 Recursive Languages We say M decides L if for any string w ∈ Σ ∗ , the following is true: • if w ∈ L , then M accepts w (i.e. M halts at state y ). • if w / ∈ L , then M rejects w (i.e. M halts at state n ). This means, M halts on all input and it correctly halts at either y or n depending on whether or not the input w is in L . Definition: A language L is said to be recursive (also known as Turing decidable) if and only if there is a TM that decides it. Turing called such languages recursive because he believed that any calculation that could be defined recursively by algorithms could be performed by Turing machines. 2 Recursive Languages Example: Prove that the following language is recursive. L = { a n b n c n : n ≥ } d a b b c c d a d b c c d a d b d c L a, y : changes state to y n: changes state to n Two new basic machines: b c d d R R d R n y a b, c c, a,d b,d a a b b c c d R a, b c An informal description: 1. Start from the left end of the string. 2. Move to the right in search of an a ; if found, replace it by a d ; if b or c is found instead, reject ....
View
Full
Document
This note was uploaded on 09/22/2011 for the course COMP 272 taught by Professor Prof.tai during the Spring '10 term at HKUST.
 Spring '10
 Prof.Tai

Click to edit the document details