Lecture_7 Undecidability

  • 格式:pdf
  • 大小:1.05 MB
  • 文档页数:57
Lecture 7 : Undecidability
The Theory of Computation
Undecidability
Lecture 7 : Undecidability
Content
• The Church‐Turing Thesis • Universal Turing Machine • The Halting Problem
Lecture 7 : Undecidability
Decidable Languages
• Decidable problem for CFLs Every CFL is decidable Let A be a CFL, G be a CFG for A.
MG=“On input w: 1. Run TM S on input < G, w >; 2. If the machine S accepts w, accept; If it rejects, reject.”
Lecture 7 : Undecidability
H‐L Description of a Turing machine
• Example
M1=“On input string w: (1). Sweep left to right across the tape, off every other 0; (2). If in stage (1) the tape contained a single 0, accept; (3). If in stage (1) the tape contained more than a single 0 and the number of 0s was odd, reject; (4). Return the head to the left-hand end of the tape; (5). Go to stage (1).”
Halting Problem
Lecture 7 : Undecidability
Halting Problem
Lecture 7 : Undecidability
Halting Problem
Lecture 7 : Undecidability
Unsolvable Problems about TM
Lecture 7 : Undecidability
?
Diophantine Equation的可解性:能求出一个整系 数方程的整数根,称为Diophantine Equation可 解。希尔伯特问:能否用一种由有限步构成的 一般算法判断一个Diophantine Equation的可解 性?1970年,苏联的IO.B.马季亚谢维奇证明了 希尔伯特所期望的算法不存在。
Specification of U
Lecture 7 : Undecidability
Design of U
Lecture 7 : Undecidability
Design of U
Lecture 7 : Undecidability
???
• Can the all standard TMs be simulated by the Universal TM (U)? Answer : Yes! • Can all TMs be simulated by the Universal TM? Answer : ???
Lecture 7 : Undecidability
The Church‐Turing Thesis
Lecture 7 : Undecidability
The Models of Computation
Lecture 7 : Undecidability
The Models of Computation
Lecture 7 : Undecidability
The Church‐Turing Thesis
“Nothing will be considered an algorithm if it cannot be rendered as a Turing machine that is guaranteed to halt on all inputs, and all such machines will be rightfully called algorithms.”
Lecture 7 : Undecidability
The Church‐Turing Thesis
Lecture 7 : Undecidability
Universal Turing Machine
Lecture 7 : Undecidability
Universal Turing Machine
Halting Problem
Lecture 7 : Undecidability
Halting Problem
Lecture 7 : Undecidability
Halting Problem
Lecture 7 : Undecidability
Halting Problem
Lecture 7 : Undecidability
In 1900, the 10th of Hilbert’s 20 questions
Lecture 7 : Undecidability
The Church‐Turing Thesis
1936: • Alonzo Church: the symbol system of λ‐figures
• Alan Turing: the Turing Machine
Lecture 7 : Undecidability
More Unsolvable Problems
Lecture 7 : Undecidability
More Unsolvable Problems
Lecture 7 : Undecidability
More Unsolvable Problems
Lecture 7 : Undecidability
Properties of Recursive Languages
Lecture 7 : Undecidability
Turing‐Enumerable
Lecture 7 : Undecidability
Turing‐Enumerable
Lecture 7 : Undecidability
Lecture 7 : Undecidability
Decidable Languages
• Acceptance problem for NFAs ANFA={<B, w>|B is a NFA that accepts input string w} N=“On input < B, w >, where B is NFA and w is a string: 1. Convert NFA B to an equivalent DFA C 2. Simulate C on input w; 3. If the simulation ends in an accept state, accept. If it ends in a non-accepting state, reject.”
Lecture 7 : Undecidability
Decidable Languages
• Decidable problem for CFLs ACFG={<G, w>|G is a CFG that generates string w} S=“On input <G, w >, where G is CFG and w is a string: 1. Convert G to an equivalent grammar in Chomsky normal form; 2. List all derivations with 2n-1 steps, where n is the length of w, except if n=0, then instead list all derivations with 1 step; 3. If any of these derivations generate w, accept; If not , reject.”
Lecture 7 : Undecidability
Decidable Languages
• Acceptance problem for DFAs ADFA={<B, w>|B is a DFA that accepts input string w} M=“On input < B, w >, where B is DFA and w is a string: 1. Simulate B on input w; 2. If the simulation ends in an accept state, accept. If it ends in a non-accepting state, reject.”
Lecture 7 : Undecidability
Universal Turing Machine
Lecture 7 : Undecidability
A suitable code
Lecture 7 : Undecidability
A suitable code
Lecture 7 : Undecidability
Lecture 7 : Undecidability
Unsolvable Problems about TM
Lecture 7 : Undecidability
Unsolvable Problems about TM