1 decidability continued. 2 undecidable problems halting problem: does machine halt on input ?...
Post on 21-Dec-2015
236 views
TRANSCRIPT
2
Undecidable Problems
Halting Problem:
M wDoes machine halt on input ?
State-entry Problem:
Mw
Does machine enter state halt on input ?
q
3
Blank-tape halting problem:
MDoes machine halt when startingon blank tape?
Membership problem:
Is a string member of a recursively enumerable language ? L
w
4
Uncomputable Functions
A function is uncomputable if it cannotbe computed for all the domain
Domain Valuesregion
f
5
Function : )(nf
)(nfmaximum number of moves untilany Turing machine with stateshalts when started with the blank tape
n
6
Theorem:
Function is uncomputable)(nf
Proof:
If was computable thenthe blank-tape halting problem would be decidable
)(nf
7
Algorithm for blank-tape halting problem
Input: machine M
1. Count states of : M m
2. Compute )(mf
3. Simulate for steps starting with empty tape
M )(mf
If halts then return YES otherwise return NO
M
9
Non-trivial property of recursively enumerable languages:
any property possessed by some (not all)recursively enumerable languages
10
Some non-trivial properties of recursively enumerable languages:
• is emptyL
L• is finite
L• contains two different strings of the same length
12
Theorem:
For a recursively enumerable language Lit is undecidable to determine whether is empty L
Proof:
We will reduce the membership problemto this problem
14
Construct machine : wM
When enters a final state, compare input with w
M
}{)()( wMLML w
Observations:
)(MLw if and only if is empty)( wML
15
Algorithm for membership problem:
Inputs: machine and string M w
1. Construct wM
2. Determine if is empty )( wML
Yes: then )(MLw
No: then )(MLw
17
Theorem:
For a recursively enumerable language Lit is undecidable to determine whether is finite L
Proof:
We will reduce the halting problemto this problem
19
Construct machine : wM
When enters a halt state, accept any input
M
Initially, simulates on input M w
(virtual input)
21
Algorithm for halting problem:
Inputs: machine and string M w
1. Construct wM
2. Determine if is finite )( wML
Yes: then doesn’t halt on
No: then halts on
M w
M w
23
Theorem:
For a recursively enumerable language Lit is undecidable to determine whether contains two different string of same length L
Proof:
We will reduce the halting problemto this problem
25
Construct machine : wM
When enters a halt state, accept symbols or
M
Initially, simulates on input M w
a b
(virtual input)
27
Algorithm for halting problem:
Inputs: machine and string M w
1. Construct wM
2. Determine if accepts strings of equal length
)( wML
Yes: then halts on
No: then doesn’t halt on
M w
M w
30
Some undecidable problems forcontext-free languages:
• Is context-free grammar ambiguous?G
• Is ? )()( 21 GLGL
31
We need a tool to prove that the previousproblems for context-free languagesare undecidable:
The Post Correspondence Problem
33
There is a Post Correspondence Solutionif there is a sequence such that:kji ,,,
kjikji vvvwww
PC-solution
35
Example:00100 1000
0 11 011
1w 2w 3w
1v 2v 3v
:A
:B
There is no solution
Because total length of strings from is smaller than total length of strings from
BA
36
The Modified Post Correspondence Problem
Inputs: nwwwA ,,, 21
nvvvB ,,, 21
MPC-solution: kji ,,,,1
kjikji vvvvwwww 11
38
We will show that:
The Modified Post Correspondence Problem is undecidable
In other words: There is not MPC-solution for any pair ),( BA