Theory of Computability Giorgi Japaridze Theory of Computability Decidability Episode 2
Examples of decidable problems (sets) Giorgi Japaridze Theory of Computability Decidable: {1,3,5} {x | x is even} {x | x is a perfect square} {x | x2-10x = 0} {x | x=y*z for some integers y,z>1 (i.e. x is not prime)} {x | x is a prime (i.e. x is not divisible by anything except 1 and itself)} {<G> | G is a connected graph} {<P> | P is a one-variable polynomial expression with an integral root} Undecidable: {<P> | P is a two-variable polynomial expression with an integral root}
The universal Turing machine Giorgi Japaridze Theory of Computability Let ATM = {<M,w> | M is a TM and M accepts string w} We call the above set the acceptance problem. Theorem 2.1: ATM is recognizable. Proof idea. The following TM U, called the universal TM, recognizes ATM: U = “On input <M,w>, where M is a TM and w is a string: 1. Simulate M on input w. 2. If M ever enters its accept state, accept; if M ever enters its reject state, reject.” Does U also decide ATM? No!
Theorem 2.2: ATM is undecidable. Giorgi Japaridze Theory of Computability Theorem 2.2: ATM is undecidable. Proof idea. Suppose, for a contradiction, that ATM is decidable. That is, there is a TM H that decides ATM. Thus, that machine H behaves as follows: accept if M accepts w reject if M does not accept w H(<M,w>) = Using H as a subroutine, we can construct the following TM D: D = “On input <M>, where M is a TM: 1. Run H on input <M,<M>>. 2. Do the opposite of what H does. That is, if H accepts, reject, and if H rejects, accept.” accept if M does not accept <M> reject if M accepts <M> Thus, D(<M>) =
Theorem 2.2: ATM is undecidable. Giorgi Japaridze Theory of Computability Theorem 2.2: ATM is undecidable. Proof idea. Suppose, for a contradiction, that ATM is decidable. That is, there is a TM H that decides ATM. Thus, that machine H behaves as follows: accept if M accepts w reject if M does not accept w H(<M,w>) = Using H as a subroutine, we can construct the following TM D: D = “On input <M>, where M is a TM: 1. Run H on input <M,<M>>. 2. Do the opposite of what H does. That is, if H accepts, reject, and if H rejects, accept.” accept if D does not accept <D> reject if D accepts <D> Thus, D(<D>) = Contradiction!
A Turing-unrecognizable problem Giorgi Japaridze Theory of Computability ATM = {<M,w> | M is a TM and M accepts string w} ATM = {<M,w> | M is a TM and M does not accept string w} Theorem 2.3: ATM is unrecognizable. Proof idea. Suppose, for a contradiction, that ATM is recognizable. That is, there is a TM U that recognizes ATM. U recognizes ATM (slide 2.2.a) U recognizes ATM Thus, Let K = “On input <M,w>: 1. Run both U and U on input <M,w> in parallel; 2. If U accepts, accept; if U accepts, reject.” It can bee seen that K decides ATM, which contradicts Theorem 2.2.
There are uncountably many problems 2.2.d Giorgi Japaridze Theory of Computability 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Set of even numbers Empty set Set of prime numbers Set of all numbers …
There are uncountably many problems 2.2.d Giorgi Japaridze Theory of Computability 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Set of even numbers Empty set Set of prime numbers Set of all numbers … Reverse the diagonal
There are uncountably many problems 2.2.d Giorgi Japaridze Theory of Computability 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Set of even numbers Empty set Set of prime numbers Set of all numbers … Reverse the diagonal
There are uncountably many problems 2.2.d Giorgi Japaridze Theory of Computability 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Set of even numbers Empty set Set of prime numbers Set of all numbers … Reverse the diagonal
There are uncountably many problems 2.2.d Giorgi Japaridze Theory of Computability 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Set of even numbers Empty set Set of prime numbers Set of all numbers … Reverse the diagonal
There are uncountably many problems 2.2.d Giorgi Japaridze Theory of Computability 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Set of even numbers Empty set Set of prime numbers Set of all numbers … Reverse the diagonal
There are uncountably many problems 2.2.d Giorgi Japaridze Theory of Computability 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Set of even numbers Empty set Set of prime numbers Set of all numbers … Reverse the diagonal
There are uncountably many problems 2.2.d Giorgi Japaridze Theory of Computability 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Set of even numbers Empty set Set of prime numbers Set of all numbers … Every set of numbers can be represented as an infinite bit string. However, as we see, not all such strings can be listed (the new diagonal string is not on the list!). On the other hand, all TMs can be encoded as bit strings and hence listed. To summarize, the set of TMs is countable (可数的) but the set of problems is not (there are more problems than TMs). So, some problems have no TMs.