computability and complexity
DESCRIPTION
Computability and Complexity. 4-1. Existence of Undecidable Problems. Computability and Complexity Andrei Bulatov. Computability and Complexity. 4-2. Math Prerequisites. We can make a list of natural numbers: 1,2,3,4,5 ,…. integers : 0,1,-1,2,-2 ,…. even rationals :. - PowerPoint PPT PresentationTRANSCRIPT
Computability and Complexity 4-1
Existence of UndecidableProblems
Computability and ComplexityAndrei Bulatov
Computability and Complexity 4-2
Math Prerequisites
We can make a list of natural numbers: 1,2,3,4,5,…
integers: 0,1,-1,2,-2,…
even rationals:
33
23
13
32
22
12
31
21
11
These sets are countable
Computability and Complexity 4-3
Math Prerequisites
However, we cannot make a list of reals
Every real number can be thought to have an infinite decimal representation,say, =3.14159…
Suppose we get a list of all real numbers:
.0 .3
.0 .2
.0 .1
333231
232221
131211
aaa
aaa
aaa
Then the number where (modulo 10) is not inthe list.
321.0 bbb iii ab
The set of real numbers is uncountable
Computability and Complexity 4-4
Question
Is the set * countable? uncountable?
Computability and Complexity 4-5
Coding up a TM
Any TM may be described by a finite string of 0’s and 1’s
Here is one way to do it:
• First we code the states:
• Then we code S as 0, L as 00, R as 000• Then we code the alphabet:
( is coded as an empty string of 0’s)
000000000000000
,,,,,{ 43210 qqqqqQ
000000000000000
,,,,,{ 54321 sssss
Computability and Complexity 4-6
• Now we can code the elements of the transition function:
000100001100001),,(),,(01000100100100),,(),,(
332
3120
SsqqLsqsq
• Now we can code the whole machine by giving the whole transition function:
),,(),,(),,(),,( 3323120
0001000011000011010001001001001SsqqLsqsq
Computability and Complexity 4-7
Universal TM
Definition A “Universal Turing Machine” (UTM) is a TM, U, such that, for any TM T and any input x
• U(T,x) is finite iff T(x) is finite; and• the output of U(T,x) encodes the output of T(x)
Turing showed in his 1936 paper that UTMs exist
One form of UTM uses 3 tapes. To simulate the operation of T oninput x:
• Write the code for T on Tape 1 and the code for x on Tape 2
• Write the code for on Tape 30q
Computability and Complexity 4-8
Universal TM description
• Find the first symbol of the coded input on Tape 2;
• Search the list of transitions on Tape 1 for a transition from that applies to this symbol;
• Simulate the effect of this transition on the coded input and the stored state (Tapes 2 and 3);
• Search the list of transitions for one that applies in the new situation;
• Continue until a final state is reached.
0q
(Marvin Minsky designed a UTM using only 7 states and 4 symbols in1962. No one has yet designed a smaller one … )
Computability and Complexity 4-9
Unsolvable problem
Problems: functions from {0,1}* to {0,1} (that is problems of recognizing 01-strings)
Theorem There exists a problem that cannot be solved by any Turing Machine
Computability and Complexity 4-10
Lemma 1 There are countably many Turing Machines
Proof Each TM can be represented as a binary string. Therefore the set set all TMs can be thought as a subset of {0,1}* Since {0,1}* is countable, the set of all TMs is also countable
Computability and Complexity 4-11
Lemma 2 The set of all problems is uncountable.
Proof Each function {0,1}* {0,1} can be represented as a binary string: f(0) f(1) f(00) f(01) f(10) f(11) …
Suppose this set is countable. Then we are able to create a list of allproblems
.3
.2
.1
333231
232221
131211
aaa
aaa
aaa (This time )}1,0{ija
The string , where321 bbb
0 if ,1
1 if ,0
ii
ii
ia
ab
Computability and Complexity 4-12
Lemmas 1 and 2 implies that there are a lot more problems than Turing Machines. Therefore at least one of the problems cannot be solved by a TM QED
Note that this is an “existence argument”.
We cannot point out any particular undecidable problem
This is what we shall do in the next lecture