Computability and Undecidability
Total Page:16
File Type:pdf, Size:1020Kb
A talk given at Huawei Company (Oct. 31, 2019) and Shenzhen Univ. (Nov. 28, 2019) Computability and Undecidability Zhi-Wei Sun Nanjing University Nanjing 210093, P. R. China [email protected] http://math.nju.edu.cn/∼zwsun Nov. 28, 2019 Abstract In this talk we introduce the theory of computability and the undecidability results on Hilbert's Tenth Problem. We will also mention some algorithms concerning primes. 2 / 39 Part I. The Theory of Computability 3 / 39 Primitive recursive functions Let N = f0; 1; 2;:::g and call each n 2 N a natural number. Three Basic Functions: Zero Function: O(x) = 0 (for all x 2 N). Successor Function: S(x) = x + 1. Projection Function: Ink (x1;:::; xn) = xk (1 6 k 6 n) Composition: f (x1;:::; xn) = g(h1(x1;:::; xn);:::; hm(x1;:::; xn)) Primitive Recursion: f (x1;:::; xn; 0) =g(x1;:::; xn); f (x1;:::; xn; y + 1) =h(x1;:::; xn; y; f (x1;:::; xn; y)) Primitive recursive functions are the basic functions and those obtained from the basic functions by applying composition and primitive recursion a finite number of times. 4 / 39 Acknermann's function It is easy to see that all primitive recursive functions are computable by our intuition. Skolem's Claim (1924): All intuitively computable number-theoretic functions are primitive recursive functions. In 1928 Ackermann showed that the following Ackermann function A(m; n) is computable but not primitively recursive. A(0; n) =n + 1; A(m + 1; 0) =A(m; 1) A(m + 1; n + 1) =A(m; A(m + 1; n)): For example, A(1; 2) =A(0; A(1; 1)) = A(0; A(0; A(1; 0))) =A(0; A(0; A(0; 1))) = A(0; A(0; 2)) =A(0; 3) = 4: 5 / 39 Partial recursive functions µ-operator: f (x1;:::; xn) = µy(g(x1;:::; xn; y) = 0) means that f (x1;:::; xn) is the least natural number y such that g(x1;:::; xn; y) = 0. If g(x1;:::; xn; y) 6= 0 for all y 2 N, then f (x1;:::; xn) is undefined. Partial recursive functions are the basic functions and those obtained from the basic functions by applying composition and µ-operator a finite number of times. If a partial recursive function f (x1;:::; xn) is defined for all x1;:::; xn 2 N, then f is called a total recursive function. All primitive functions as well as the Ackermann function A(m; n) are total recursive functions. 6 / 39 Church's Thesis For any partial recursive function f , it is easy to see that if f (x1;:::; xn) is defined then the value f (x1;:::; xn) is effectively computable. In 1936 A. Turing introduced the notion of Turing machine which is an abstract machine that manipulates symbols on a strip of tape according to a table of rules (i.e., a program). A function f (x1;:::; xn) is Turing computable if there is a program according to which the Turing machine with initial inputs x1;:::; xn finally stops and yields the value f (x1;:::; xn) as outut if f (x1;:::; xn) is defined, and never stops if f (x1;:::; xn) is undefined. Partial recursive functions and Turing computable functions were proved to be equivalent. Church's Thesis (1936). If a function f into N with natural number variables is effectively computable by intuition, then it must be a partial recursive function (or a Turing computable function). 7 / 39 Recursively enumerable sets A subset A of N is said to be an r.e. (recursively enumerable) set (or a semi-decidable set) if the function ( 1 if x 2 A; f (x) = undefined if x 2 N n A: is a partial recursive function. If A = Dom(f ) for some partial recursive function f , then we may revise the program computing f (x) by letting the output be 1 if f (x) is computed, and thus A is an r.e. set. In view of the above, A ⊆ N is an r.e. set () A = Dom(f ) for some partial recursive function f : 8 / 39 Recursively enumerable sets If A is an r.e. set containing an element a, and the program P computes the above function f , then the function ( x if the program P computes f (x) within y steps; g(x; y) = a otherwise is a partial recursive function with Ran(g) = A. If A is the range of a partial recursive function h(x1;:::; xn), then the function ( 1 if x 2 Ran(h) = A; f (x) = undefined otherwise; is a partial recursive function (we may seek for x1;:::; xn with h(x1;:::; xn) equal to a given x 2 A), and thus A is an r.e. set. So, a nonempty A ⊆ N is an r.e. set if and only if A = Ran(f ) for some partial recursive function f . 9 / 39 r.e. sets and recursive sets Enumeration Theorem. There is a partial recursive function '(m; n) such that '0;'1;'2;::: list all the partial recursive functions of one variable. where 'm is given by 'm(n) = '(m; n)(n = 0; 1; 2;:::): A set A ⊆ N is called decidable or recursive, if the characteristic function ( 1 if x 2 A; χA(x) = 0 if x 2 N n A: is Turing computable (or recursive). A set A ⊆ N is recursive if and only if both A and N n A are r.e. sets. 10 / 39 Halting Problem is undecidable Theorem. The set K = fx 2 N : x 2 Dom('x )g is a nonrecursive r.e. set. Proof. As the function 'x (x) = '(x; x) is a partial recursive function, we see that K is an r.e. set. Suppose that K is recursive. Then the function ( ' (x) + 1 if x 2 Dom(' ); f (x) = x x 0 otherwise; is totally recursive, thus for some m 2 N we have 'm = f and hence f (m) = 'm(m) 6= 'm(m) + 1 which leads a contradiction. Let Px be a Turing program computing 'x . Whether a Turing machine with input x and program Px finally stops, is an undecidable problem which is called the halting problem. 11 / 39 Part II. Solution to Hilbert's Tenth Problem 12 / 39 Hilbert's Tenth Problem In 1900, at the Paris conference of ICM, D. Hilbert presented 23 famous mathematical problems. He formulated his tenth problem as follows: Given a Diophantine equation with any number of unknown quantities and with rational integral numerical coefficients: To devise a process according to which it can be determined in a finite number of operations whether the equation is solvable in rational integers. In modern language, Hilbert's Tenth Problem (HTP) asked for an effective algorithm to test whether an arbitrary polynomial equation P(z1;:::; zn) = 0 (with integer coefficients) has solutions over the ring Z of the integers. However, at that time the exact meaning of algorithm was not known. 13 / 39 Diophantine equations over N and Z Throughout this talk, variables always range over Z. Let P(z1;:::; zn) 2 Z[z1;:::; zn]. Then 9z1 ::: 9zn[P(z1;:::; zn) = 0] Y () 9x1 > 0 ::: 9xn > 0 P("1x1;:::;"nxn) = 0 : "1;:::;"n∈{±1g On the other hand, by Lagrange's four-square theorem (each m 2 N can be written as the sum of four squares), we have 9x1 > 0 ::: 9xn > 0[P(x1;:::; xn) = 0] () 9u19v19y19z1 ::: 9un9vn9yn9zn 2 2 2 2 2 2 2 2 [P(u1 + v1 + y1 + z1 ;:::; un + vn + yn + zn ) = 0] So HTP has the following equivalent form (HTP over N): Is there an algorithm to decide for any polynomial P(x1;:::; xn) with integer coefficients whether the Diophantine equation P(x1;:::; xn) = 0 has solutions with x1;:::; xn 2 N ? 14 / 39 Diophantine relations and Diophantine sets A relation R(a1;:::; am) with a1;:::; am 2 N is said to be Diophantine if there is a polynomial P(t1;:::; tm; x1;:::; xn) with integer coefficients such that R(a1;:::; am) () 9x1 > 0 ::: 9xn > 0[P(a1;:::; am; x1;:::; xn) = 0]: A set A ⊆ N is Diophantine if and only if the predicate a 2 A is Diophantine. It is easy to see that any Diophantine set A is an r.e. set. In fact, for a given element a 2 A we may search for the natural number solutions of the related Diophantine equation. If it has a solution, then we will find one and let the computer stop and give the output 1. If it has no solution, the computer will never stop. 15 / 39 Davis Daring Hypothesis In 1944 E. L. Post thought that HTP begs for an unsolvability proof, i.e., HTP might be undecidable. In 1949 Martin Davis used G¨odel'scoding idea to obtain that any r.e. set A ⊆ N has the following Davis normal form a 2 A () 9x > 080 6 y 6 x9z1 > 0 ::: 9zn > 0 [P(a; x; y; z1;:::; zn) = 0]; where a is a natural number and P is a polynomial with integer coefficients. Davis Daring Hypothesis. Any r.e. set A ⊆ N is Diophantine. Under this hypothesis, for the nonrecursive r.e. set K = fx 2 N : x 2 Dom('x )g there is a polynomial P(x; x1;:::; xn) such that for any a 2 N we have a 2 K () 9x1 > 0 ::: 9xn > 0[P(a; x1;:::; xn) = 0]: Thus Davis Daring Hypothesis implies that HTP over N is undecidable. 16 / 39 Systems of Diophantine equations A system of finitely many Diophantine equations is equivalent to a single Diophantine equation. In fact, if Pi (z1;:::; zn) 2 Z[z1;:::; zn] for all i = 1;:::; k, then P1(z1;:::; zn) = 0 & ::: & Pk (z1;:::; zn) = 0 2 2 () P1 (z1;:::; zn) + ::: + Pk (z1;:::; zn) = 0: 17 / 39 The Davis-Putnam-Robinson Theorem Theorem (M.