Recursively Enumerable Sets

Slides:



Advertisements
Similar presentations
Primitive Recursive Functions (Chapter 3)
Advertisements

CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
Copyright © Cengage Learning. All rights reserved.
October 13, 2009Theory of Computation Lecture 11: A Universal Program III 1 Coding Programs by Numbers Gödel numbers are usually very large, even for small.
October 27, 2009Theory of Computation Lecture 12: A Universal Program IV 1Universality Then we append the following instruction: [C]IF K = Lt(Z) + 1 
November 10, 2009Theory of Computation Lecture 16: Computation on Strings I 1Diagonalization Another example: Let TOT be the set of all numbers p such.
September 24, 2009Theory of Computation Lecture 6: Primitive Recursive Functions II 1 Homework Questions Question 1: Write a program P that computes 
September 17, 2009Theory of Computation Lecture 4: Programs and Computable Functions III 1 Macros Now we want to use macros of the form: W  f(V 1, …,
October 1, 2009Theory of Computation Lecture 8: Primitive Recursive Functions IV 1 Primitive Recursive Predicates Theorem 6.1: Let C be a PRC class. If.
November 3, 2009Theory of Computation Lecture 14: A Universal Program VI 1 Recursively Enumerable Sets Definition: We write: W n = {x  N |  (x, n) 
Chapter 4: A Universal Program 1. Coding programs Example : For our programs P we have variables that are arranged in a certain order: Y 1 X 1 Z 1 X 2.
1 Example 2 (a) Find the range of f(x) = x 2 +1 with domain [0,2]. Solution The function f is increasing on the interval [0,2] from its smallest value.
September 29, 2009Theory of Computation Lecture 7: Primitive Recursive Functions III 1 Some Primitive Recursive Functions Example 3: h(x) = x! Here are.
Theory of Computation Lecture 5: Primitive Recursive Functions I
Recursively Enumerable and Recursive Languages
Equivalence Relations Lecture 45 Section 10.3 Fri, Apr 8, 2005.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
1 Recursively Enumerable and Recursive Languages.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
Decidability.
Advanced Algorithms Analysis and Design By Dr. Nazir Ahmad Zafar Dr Nazir A. Zafar Advanced Algorithms Analysis and Design.
Chapters 11 and 12 Decision Problems and Undecidability.
Modeling Arithmetic, Computation, and Languages Mathematical Structures for Computer Science Chapter 8 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesTuring.
October 4, 2016Theory of Computation Lecture 9: A Universal Program I 1Minimalization Example 15: R(x, y) R(x, y) is the remainder when x is divided by.
Equivalence Relations
The Acceptance Problem for TMs
Recursively Enumerable Languages
Another Word on PRC Classes
Gödel's Legacy: The Limits Of Logics
Theory of Computation Lecture 10: A Universal Program I
Chapter 5 Limits and Continuity.
Recursively Enumerable and Recursive Languages
Theory of Computation Lecture 12: A Universal Program III
Theory Of Computer Science
Linear Bounded Automata LBAs
Diagonalization and Reducibility
Theory of Computation Lecture 14: A Universal Program V
CSE322 Recursive and Recursively enumerable sets
The Growth of Functions
LIMITS OF ALGORITHMIC COMPUTATION
Theory of Computation Lecture 16: A Universal Program VII
Theory of Computation Lecture 5: Programs and Computable Functions III
Theory of Computation Lecture 6: Primitive Recursive Functions I
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Theory Of Computer Science
MA/CSSE 474 More Math Review Theory of Computation
Proposed in Turing’s 1936 paper
Formal Languages, Automata and Models of Computation
Composition OF Functions.
Composition OF Functions.
Pairing Functions and Gödel Numbers
Chapter 5 Limits and Continuity.
Diagonalization and Reducibility
Recursively Enumerable Sets
Theory of Computability
Primitive Recursive Predicates
Theory of Computation Lecture 9: A Universal Program I
Tell whether the relation below is a function.
Equivalence Relations
Theory of Computability
Pairing Functions and Gödel Numbers
Theory of Computation Lecture 6: Primitive Recursive Functions I
Some Primitive Recursive Functions
Theory of Computation Lecture 13: A Universal Program V
Recursively Enumerable Sets
Theory of Computation Lecture 17: Calculations on Strings II
Heuristic Search Viewed as path Finding in a Graph
Lecture 4: Unsolvable Problems
Theory of Computation Lecture 11: A Universal Program III
Theory of Computation Lecture 23: Turing Machines III
Presentation transcript:

Recursively Enumerable Sets Thus, saying that a set B is computable or recursive is the same as saying that P(x1, …, xn) is a computable function. Likewise, B is a primitive recursive set if P(x1, …, xn) is a primitive recursive predicate. It follows that: Theorem 4.1: Let the sets B, C belong to some PRC class C . Then so do the sets BC, BC, B. Proof: This is an immediate consequence of Theorem 5.1, Chapter 3. November 2, 2017 Theory of Computation Lecture 15: A Universal Program VI

Recursively Enumerable Sets Example: Let us consider the case BC. There must be predicates PB and PC such that: B = { x  N | PB(x) } C = { x  N | PC(x) } Then: BC = { x  N | PB(x)  PC(x) } Since  is a primitive-recursive function, the predicate PB(x)  PC(x) is also in class C . Then the equation above shows that BC is in C as well. November 2, 2017 Theory of Computation Lecture 15: A Universal Program VI

Recursively Enumerable Sets As long as the Gödel numbering functions [x1, …, xm] and (x)i are available, we only need to consider subsets of N instead of subsets of Nm. Then we have: Theorem 4.2: Let C be a PRC class, and let B be a subset of Nm, m  1. Then B belongs to C if and only if B’ = {[x1, …, xm] N | (x1, …, xm)  B} belongs to C. November 2, 2017 Theory of Computation Lecture 15: A Universal Program VI

Recursively Enumerable Sets Proof: If PB(x1, …, xm) is the characteristic function of B, then PB’(x)  PB((x)1, …, (x)m) & Lt(x)  m & x > 0 is the characteristic function of B’, and PB’ clearly belongs to C if PB belongs to C . On the other hand, if PB’(x) is the characteristic function of B’, then PB(x1, …, xm)  PB’([x1, …, xm]) is the characteristic function of B, and PB clearly belongs to C if PB’ belongs to C . For example, {[x, y]  N | HALT(x, y)} is not a computable set. November 2, 2017 Theory of Computation Lecture 15: A Universal Program VI

Recursively Enumerable Sets Definition: The set B  N is called recursively enumerable if there is a partially computable function g(x) such that B = {x  N | g(x) } . The term recursively enumerable is abbreviated r.e. A set is r.e. just when it is the domain of a partially computable function. If P is a program that computes the function g (see above), then B is simply the set of all inputs to P for which P eventually halts. November 2, 2017 Theory of Computation Lecture 15: A Universal Program VI

Recursively Enumerable Sets If we think of P as providing an algorithm for testing for membership in B, we see that if a number belongs to B, the algorithm will provide a positive answer, if a number does not belong to B, the algorithm will never terminate. Such algorithms are called semi-decision procedures. They can be considered an “approximation” to solving the problem of testing membership in B. November 2, 2017 Theory of Computation Lecture 15: A Universal Program VI

Recursively Enumerable Sets Theorem 4.3: If B is a recursive set, then B is r.e. Proof: Consider the following program P : [A] IF (X  B) GOTO A Since B is recursive, the predicate X  B is computable and P can be expanded to a program of L . Let P compute the function h(x). Then, clearly, B = {x  N | h(x) } . November 2, 2017 Theory of Computation Lecture 15: A Universal Program VI

Recursively Enumerable Sets If B and B are both r.e., then we can devise two algorithms: one algorithm that terminates if a given input is in B, and another algorithm that terminates if a given input is not in B. Can we find a way to combine these two algorithms to obtain a single algorithm that always terminates and tells us whether a given input is in B? The trick is to let the two algorithms run for more and more steps until one of them terminates (dovetailing). November 2, 2017 Theory of Computation Lecture 15: A Universal Program VI

Recursively Enumerable Sets Theorem 4.4: The set B is recursive if and only if B and B are both r.e. Proof: If B is recursive, then by Theorem 4.1 so is B, and hence by Theorem 4.3, they are both r.e. Conversely, if B and B are both r.e., we may write B = {x  N | g(x) }, B = {x  N | h(x) }, where g and h are both partially computable. November 2, 2017 Theory of Computation Lecture 15: A Universal Program VI

Recursively Enumerable Sets Now let g be computed by program P and h be computed by program Q , and let p = #(P ) and q = #(Q ). Then the following program computes B: [A] IF STP(1)(X, p, T) GOTO C IF STP(1)(X, q, T) GOTO E T  T+1 GOTO A [C] Y  1 November 2, 2017 Theory of Computation Lecture 15: A Universal Program VI

Recursively Enumerable Sets Definition: We write: Wn = {x  N | (x, n) }. Theorem 4.6 (Enumeration Theorem): A set B is r.e. if and only if there is an n for which B = Wn. This is an immediate consequence of the definition of (x, n). The theorem gets its name from the fact that the sequence W0, W1, W2, … is an enumeration of all r.e. sets. November 2, 2017 Theory of Computation Lecture 15: A Universal Program VI

Recursively Enumerable Sets We further define: K = {n  N | n  Wn}. Then n  Wn (n, n)  HALT(n, n). K is the set of all numbers n such that program number n eventually halts on input n. Theorem 4.7: K is r.e. but not recursive. November 2, 2017 Theory of Computation Lecture 15: A Universal Program VI

Recursively Enumerable Sets Proof: Since K = {n  N | (n, n) }, and by the universality theorem (Theorem 3.1), (n, n) is partially computable, K is obviously r.e. If K were recursive, then K would be r.e. If that were the case, then by the enumeration theorem there would have to be some number i so that K = Wi. But then: i  K i  Wi  i  K. Contradiction! Or: i  K i  Wi  i  K. November 2, 2017 Theory of Computation Lecture 15: A Universal Program VI

Recursively Enumerable Sets There are alternative ways of describing r.e. sets: Theorem 4.8: Let B be an r.e. set. Then there is a primitive recursive predicate R(x, t) such that B = {x  N | (t) R(x, t)}. Proof: Let B = Wn. Then B = {x  N | (t) STP(1)(x, n, t)}, and STP(1) is primitive recursive by Theorem 3.2. November 2, 2017 Theory of Computation Lecture 15: A Universal Program VI

Recursively Enumerable Sets Theorem 4.9: Let S be a nonempty r.e. set. Then there is a primitive recursive function f(u) such that S = {f(n) | n  N} = {f(0), f(1), f(2), …}. In other words, S is the range of f. Theorem 4.10: Let f(x) be a partially computable function, and let S = {f(x) | f(x) } (so S is the range of f). Then S is r.e. If we combine Theorems 4.9 and 4.10, we get: November 2, 2017 Theory of Computation Lecture 15: A Universal Program VI

Recursively Enumerable Sets Theorem 4.11: Consider a set S  . The following statements are all equivalent: S is r.e.; S is the range of a primitive recursive function; S is the range of a recursive function; S is the range of a partial recursive function. This theorem motivates the term recursively enumerable. A nonempty r.e. set is enumerated by a recursive function. November 2, 2017 Theory of Computation Lecture 15: A Universal Program VI