Halting Problem
Halting Problem
Classifying Problems
Computability and Complexity 5-2
Decidable Languages
Examples
• *
•
• {x| |x| = 20}
• {x | x is prime}
• {x | x encodes a graph G, and a Hamilton circuit of G}
• {x | x is a valid encoding of a TM}
Computability and Complexity 5-5
Examples
All languages accepted by finite automata, or generated by
context-free grammars are decidable
All
Languages
Decidable
Languages
Regular Context-free
Languages Languages
Acceptable Languages
So, to show that there are languages that are not decidable, we must
find a language that is not acceptable …
Computability and Complexity 5-8
• LHalting is acceptable
- use a universal TM U to simulate T on x and modify it so that
that if it halts then it moves to “Accept” state
• LHalting is not decidable
- see next slide
Computability and Complexity 5-9
I N P U T
A? R?
T
Computability and Complexity 5-11
I N P U T
A? R?
I N P U T ; I N P U T
T
A? R?
TH
Computability and Complexity 5-12
Consequences
Theorem LAccept
Theorem isisundecidable.
undecidable.
Proof
see next slide
Computability and Complexity 5-18
Regularity
Instance: A Turing Machine T.
Question: Can T be simulated by a finite automaton?
Ambiguous Grammars
Instance: A context-free grammar G.
Question: Is G ambiguous?
Computability and Complexity 5-20
Diophantine Equations
Instance: A multivariate polynomial equation such as
x 2 y 3xy y 2 17 0