- IX. Recursively Enumerable Set
IX. Recursively Enumerable Set Yuxi Fu BASICS, Shanghai Jiao Tong - - PowerPoint PPT Presentation
IX. Recursively Enumerable Set Yuxi Fu BASICS, Shanghai Jiao Tong - - PowerPoint PPT Presentation
IX. Recursively Enumerable Set Yuxi Fu BASICS, Shanghai Jiao Tong University We have seen that many sets, although not recursive, can be effectively generated in the sense that, for any such set, there is an effective procedure that produces
We have seen that many sets, although not recursive, can be effectively generated in the sense that, for any such set, there is an effective procedure that produces the elements of the set in a non-stop manner. We shall formalize this intuition in this lecture.
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
1 / 39
Synopsis
- 1. Recursively Enumerable Set
- 2. Characterization of r.e. Set
- 3. Rice-Shapiro Theorem
- 4. Recursive Enumeration of r.e. Set
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
2 / 39
- 1. Recursively Enumerable Set
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
3 / 39
The Definition of Recursively Enumerable Set
The partial characteristic function of a set A is given by χA(x) = 1, if x ∈ A, ↑, if x / ∈ A. A is recursively enumerable if χA is computable. We shall often abbreviate ‘recursively enumerable set’ to ‘r.e. set’.
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
4 / 39
Partially Decidable Problem
A problem f : ω → {0, 1} is partially decidable if dom(f ) is r.e.
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
5 / 39
Partially Decidable Predicate
A predicate M( x) of natural number is partially decidable if its partial characteristic function χM( x) = 1, if M( x) holds, ↑, if M( x) does not hold, is computable.
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
6 / 39
Partially Decidable Problem ⇔ Partially Decidable Predicate ⇔ Recursively Enumerable Set
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
7 / 39
Example
- 1. The halting problem is partially decidable. Its partial
characteristic function is given by χH(x, y) = 1, if Px(y) ↓, ↑,
- therwise.
- 2. K, K0, K1 are r.e.. But none of K, K0, K1 is r.e..
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
8 / 39
Index for Recursively Enumerable Set
A set is r.e. iff it is the domain of a unary computable function.
◮ So W0, W1, W2, . . . is an enumeration of all r.e. sets. ◮ Every r.e. set has an infinite number of indexes.
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
9 / 39
Closure Property
Union Theorem. The recursively enumerable sets are closed under union and intersection uniformly and effectively.
Proof.
According to S-m-n Theorem there are primitive recursive functions r(x, y), s(x, y) such that Wu(x,y) = Wx ∪ Wy, Wi(x,y) = Wx ∩ Wy.
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
10 / 39
The Most Hard r.e. Set
- Fact. If A ≤m B and B is r.e. then A is r.e..
- Theorem. A is r.e. iff A ≤1 K.
Proof.
Suppose A is r.e. Let f (x, y) be defined by f (x, y) = 1, if x ∈ A, ↑, if x / ∈ A. By S-m-n Theorem there is an injective primitive recursive function s(x) st. f (x, y) = φs(x)(y). It is clear that x ∈ A iff s(x) ∈ K.
- Comment. No r.e. set is more difficult than K.
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
11 / 39
- 2. Characterization of r.e. Set
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
12 / 39
Normal Form Theorem
Normal Form Theorem. M( x) is partially decidable iff there is a primitive recursive predicate R( x, y) such that M( x) iff ∃y.R( x, y).
Proof.
If R( x, y) is primitive recursive and M( x) ⇔ ∃y.R( x, y), then the computable function “if µyR( x, y) then 1 else ↑” is the partial characteristic function of M( x). Conversely suppose M( x) is partially decided by P. Let R( x, y) be P(x) ↓ in y steps. Then R( x, y) is primitive recursive and M( x) ⇔ ∃y.R( x, y).
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
13 / 39
Quantifier Contraction Theorem
Quantifier Contraction Theorem. If M( x, y) is partially decidable, so is ∃y.M( x, y).
Proof.
Let R( x, y, z) be a primitive recursive predicate such that M( x, y) ⇔ ∃z.R( x, y, z). Then ∃y.M( x, y) ⇔ ∃y.∃z.R( x, y, z) ⇔ ∃u.R( x, (u)0, (u)1).
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
14 / 39
Uniformisation Theorem
Uniformisation Theorem. If R(x, y) is partially decidable, then there is a computable function c(x) such that c(x) ↓ iff ∃y.R(x, y) and c(x) ↓ implies R(x, c(x)). We may think of c(x) as a choice function for R(x, y). The theorem states that the choice function is computable.
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
15 / 39
A is r.e. iff there is a partially decidable predicate R(x, y) such that x ∈ A iff ∃y.R(x, y).
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
16 / 39
Complementation Theorem
Complementation Theorem. A is recursive iff A and A are r.e.
Proof.
Suppose A and A are r.e. Then some primitive recursive predicates R(x, y), S(x, y) exist such that x ∈ A ⇔ ∃yR(x, y), x ∈ A ⇔ ∃yS(x, y). Now let f (x) be µy(R(x, y) ∨ S(x, y)). Then f (x) is total and computable, and x ∈ A ⇔ R(x, f (x)).
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
17 / 39
Applying Complementation Theorem
- Fact. K is not r.e.
- Comment. If K ≤m A then A is not r.e. either.
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
18 / 39
Applying Complementation Theorem
- Fact. If A is r.e. but not recursive, then A ≤m A ≤m A.
- Comment. However A and A are intuitively equally difficult.
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
19 / 39
Graph Theorem
Graph Theorem. Let f (x) be a partial function. Then f (x) is computable iff the predicate ‘f (x) ≃ y’ is partially decidable iff {x, y | f (x) ≃ y} is r.e.
Proof.
If f (x) is computable by P(x), then f (x) ≃ y ⇔ ∃t.(P(x) ↓ y in t steps). The predicate ‘P(x) ↓ y in t steps’ is primitive recursive. Conversely let R(x, y, t) be such that f (x) ≃ y ⇔ ∃t.R(x, y, t). Now f (x) ≃ µy.R(x, y, µt.R(x, y, t)).
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
20 / 39
Listing Theorem
Listing Theorem. A is r.e. iff either A = ∅ or A is the range of a unary total computable function.
Proof.
Suppose A is nonempty and its partial characteristic function is computed by P. Let a be a member of A. The total function g(x, t) given by g(x, t) = x, if P(x) ↓ in t steps, a, if otherwise. is computable. Clearly A is the range of h(z) = g((z)1, (z)2). The converse follows from Graph Theorem.
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
21 / 39
Listing Theorem
The theorem gives rise to the terminology ‘recursively enumerable’.
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
22 / 39
Implication of Listing Theorem
A set is r.e. iff it is the range of a computable function.
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
23 / 39
Implication of Listing Theorem
- Corollary. For each infinite nonrecursive r.e. A, there is an
injective total recursive function f such that rng(f ) = A.
- Corollary. Every infinite r.e. set has an infinite recursive subset.
Proof.
Suppose A = rng(f ). An infinite recursive subset is enumerated by the total increasing computable function g given by g(0) = f (0), g(n + 1) = f (µy(f (y) > g(n))).
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
24 / 39
Applying Listing Theorem
- Fact. The set {x | φx is total} is not r.e.
Proof.
If {x | φx is total} were a r.e. set, then it is the range of a total computable function f . The function g(x) given by g(x) = φf (x)(x) + 1 would be total and computable.
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
25 / 39
- 3. Rice-Shapiro Theorem
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
26 / 39
Rice-Shapiro Theorem. Suppose that A is a set of unary computable functions such that the set {x | φx ∈ A} is r.e. Then for any unary computable function f , f ∈ A iff there is a finite function θ ⊆ f with θ ∈ A.
- Comment. Intuitively a set of recursive functions is r.e. iff it is
effectively generated by an r.e. set of finite functions.
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
27 / 39
Proof of Rice-Shapiro Theorem
Suppose A = {x | φx ∈ A} is r.e. (⇒): Suppose f ∈ A but ∀ finite θ ⊆ f .θ / ∈ A. Let P be a partial characteristic function of K. Define the computable function g(z, t) by g(z, t) ≃ f (t), if P(z) ↓ in t steps, ↑,
- therwise.
According to S-m-n Theorem, there is an injective primitive recursive function s(z) such that g(z, t) ≃ φs(z)(t). By construction φs(z) ⊆ f for all z. z ∈ K ⇒ φs(z) is finite ⇒ s(z) / ∈ A; z / ∈ K ⇒ φs(z) = f ⇒ s(z) ∈ A.
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
28 / 39
Proof of Rice-Shapiro Theorem
(⇐): Suppose f is a computable function and there is a finite θ ∈ A such that θ ⊆ f and f / ∈ A. Define the computable function g(z, t) by g(z, t) ≃ f (t), if t ∈ Dom(θ) ∨ z ∈ K, ↑,
- therwise.
According to S-m-n Theorem, there is an injective primitive recursive function s(z) such that g(z, t) ≃ φs(z)(t). z ∈ K ⇒ φs(z) = f ⇒ s(z) / ∈ A; z / ∈ K ⇒ φs(z) = θ ⇒ s(z) ∈ A.
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
29 / 39
What Rice-Shapiro Theorem cannot Do
Can we apply Rice-Shapiro Theorem to show that any of the following sets is non-r.e.: Fin = {x | Wx is finite}, Inf = {x | Wx is infinite}, Tot = {x | φx is total}, Con = {x | φx is total and constant}, Cof = {x | Wx is cofinite}, Rec = {x | Wx is recursive}, Ext = {x | φx is extensible to a total recursive function}.
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
30 / 39
Reversing Rice-Shapiro Theorem
{x | φx ∈ A} is r.e. if the following hold:
- 1. Θ = {e(θ) | θ ∈ A and θ is finite} is r.e., where e is a
canonical effective encoding of the finite functions.
- 2. ∀f ∈ A.∃ finite θ ∈ A.θ ⊆ f .
- Comment. We cannot take e as the G¨
- del encoding function of
the recursive functions. Why? How would you define e?
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
31 / 39
- 4. Recursive Enumeration of r.e. Set
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
32 / 39
We have seen that Fin is not r.e., which implies that the G¨
- del
numbers for programs do not make a very useful indexing system for the finite sets. It is clear however that there is a simple and natural encoding for the finite sets, which can be exploited to define effective approximations of r.e. sets.
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
33 / 39
Canonical Index for Finite Set
Suppose A = {x1, . . . , xk}, where x1 < . . . < xk. The number 2x1 + . . . + 2xk is the canonical index of A. Let 0 be the canonical index of the empty set. Let Dy denote the finite set with canonical index y. There are recursive functions m and s such that m(x) = max(Dx), s(x) = |Dx|.
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
34 / 39
Strong Array
A sequence {An}n∈ω of finite sets is a strong array if some recursive function f exists such that An = Df (n) for all n ∈ ω. A strong array {An}n∈ω is disjoint if Am ∩ An = ∅ whenever m = n. It is cumulative if An ⊆ An+1 for all n ∈ ω.
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
35 / 39
Approximation of r.e. Set
- Lemma. For each infinite r.e. set A, there is an infinite number of
disjoint/cumulative strong array {An}n∈ω such that A =
- n∈ω
An. The lemma, and its proof, suggest the next definition.
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
36 / 39
Recursive Enumeration
A recursive enumeration, or simply an enumeration, of an r.e. set A consists of a strong array {As}s∈ω such that As ⊆ As+1 for all s ∈ ω and A =
- s∈ω
As.
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
37 / 39
A Standard Enumeration of R.E. Set
Recall that e, x, y, t < s whenever s = e, x, y, t. Let φe,s(x) be defined by φe,0(x) = ⊥, φe,s+1(x) = y, either φe,s(x) = y, or Pe(x) outputs y in t steps for t > 0 st. s = e, x, y, t, ⊥,
- therwise.
Let We,s be the domain of φe,s. We,0 ⊆ We,1 ⊆ . . . ⊆ We,s ⊆ . . . is a recursive enumeration.
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
38 / 39
Property of φe,s and We,s
- 1. (φe,s(x) = y) ⇒ (e, x, y < s).
- 2. ∀s.∃ at most one e, x, y.(φe,s(x) = y) ∧ (φe,s−1(x) ↑).
- 3. ∀s.∃ at most one e, x.x ∈ We,s+1 \ We,s.
- 4. {e, x, s | φe,s(x) = ⊥} is recursive.
- 5. {e, x, y, s | φe,s(x) = y} is recursive.
Computability Theory, by Y. Fu
- IX. Recursively Enumerable Set
39 / 39