Turing Decidable and Recognizable Languages
TMs and Infinite Loops
- Question: If a TM is given a string, what can happen to the computation?
- Answer: The machine can either
- Accept the string (ie enter the Accept state and halt the computation)
- Reject the string (ie enter the Reject state and halt the computation)
- Enter an Infinite Loop (ie the computation never ends)
Looping on a String
- We say that a machine loops on a string if the string puts
the machine into an infinite loop
- When a machine loops, it never enters the Accept state or the Reject state
- When a machine loops, it transitions forever among states that are
neither the Accept state nor the Reject state
Looping and Defining Languages
- The possibility of looping affects how we define the relationship
between a machine and the language it defines
- Notice that this is not an issue with DFA, NFA, PDA: they ALWAYS halt!
- TM M recognizes language L iff
- the strings L put M into the Accept state
- the strings NOT IN L
- EITHER put M into the Reject state
- OR cause M to loop
- TM M decides language L iff
- the strings L put M into the Accept state
- the strings NOT IN L put M into the Reject state
Recognizers and Deciders
- A recognizer of a language is a machine that recognizes that language
- A decider of a language is a machine that decides that language
- Both types of machine halt in the Accept state on strings that are in the language
- A Decider also halts if the string is not in the language
- A Recogizer MAY or MAY NOT halt on strings that are not in the language
- On all input:
- A Decider MUST halt (in Accept or Reject state)
- A Recogizer MAY or MAY NOT halt on some strings (Q: Which ones?)
- Is every Recognizer a Decider, or is every Decider a Recognizer?
- Finish this statement: TM M decides language L if M
recognizes L and it also ...
Examples
- Think about the Turing machines for these languages:
- Are they deciders or recognizers?
Example Recognizers
- Examples of recognizers? Hmmm, let's think about it ...
- If machine M ______ L, then M ______ L
- Can we find a machine M that recognizes L but that does not
decide L?
- It's easy
- How can we modify the previous examples.
- More interesting question: Can we find a L that has a recognizer but not a decider?
- Let's think about language classes before answering this question.
Definition: Turing Decidable Language
- A language is Turing-decidable (or decidable) if some Turing
machine decides it
- Aka Recursive Language
Review: Turing Recognizable Language
- A language is Turing-recognizable if some Turing
machine recognizes it
- Aka Recursively Enumerable Language
Relationship among Language Classes
- How do these language classes fit togther
- Regular
- Context Free
- Turing Decidable
- Turing Recognizable
- (We haven't yet proved the relation between CF and TD langs)
- What are some examples in each class (and not in smaller class)?
- First three are easy: Regular, CF, decidable
- Are there languages that are recognizable but NOT decidable?
- Are the languages that are NOT recognizable?