36
VIII. Recursive Set Yuxi Fu BASICS, Shanghai Jiao Tong University

VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

  • Upload
    others

  • View
    16

  • Download
    0

Embed Size (px)

Citation preview

Page 1: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

VIII. Recursive Set

Yuxi Fu

BASICS, Shanghai Jiao Tong University

Page 2: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

Decision Problem, Predicate, Number Set

The following emphasizes the importance of number set:

Decision Problem ⇔ Predicate on Number

⇔ Set of Number

A central theme of recursion theory is to look for sensibleclassification of number sets.

Classification is often done with the help of reduction.

Computability Theory, by Y. Fu VIII. Recursive Set 1 / 35

Page 3: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

Synopsis

1. Reduction

2. Recursive Set

3. Undecidability

4. Rice Theorem

Computability Theory, by Y. Fu VIII. Recursive Set 2 / 35

Page 4: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

1. Reduction

Computability Theory, by Y. Fu VIII. Recursive Set 3 / 35

Page 5: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

Reduction between Problems

A reduction is a way of defining a solution to a problem with thehelp of a solution to another problem.

In recursion theory we are only interested in reductions that arecomputable.

Computability Theory, by Y. Fu VIII. Recursive Set 4 / 35

Page 6: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

Reduction

There are several ways of reducing a problem to another.

The differences between different reductions from A to B consistsin the manner and the extent to which information about B isallowed to settle questions about A.

Computability Theory, by Y. Fu VIII. Recursive Set 5 / 35

Page 7: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

Many-One Reduction

The set A is many-one reducible, or m-reducible, to the set B ifthere is a total computable function f such that

x ∈ A iff f (x) ∈ B

for all x . We shall write A ≤m B or more explicitly f : A ≤m B.

If f is injective, then it is a one-one reducibility, denoted by ≤1.

Computability Theory, by Y. Fu VIII. Recursive Set 6 / 35

Page 8: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

An Example

Suppose G is a finite graph and k is a natural number.

1. The Independent Set Problem (IndSet) asks if there are kvertices of G with every pair of which unconnected.

2. The Clique Problem asks if there is a k-complete subgraph of G .

There is a simple one-one reduction from IndSet to Clique.

Computability Theory, by Y. Fu VIII. Recursive Set 7 / 35

Page 9: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

Many-One Reduction

1. ≤m is reflexive and transitive.

2. A ≤m B iff A ≤m B.

3. A ≤m ω iff A = ω; A ≤m ∅ iff A = ∅.

4. ω ≤m A iff A 6= ∅; ∅ ≤m A iff A 6= ω.

Computability Theory, by Y. Fu VIII. Recursive Set 8 / 35

Page 10: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

m-Degree

1. A ≡m B if A ≤m B ≤m A. (many-one equivalence)

2. A ≡1 B if A ≤1 B ≤1 A. (one-one equivalence)

3. dm(A) = {B | A ≡m B} is the m-degree represented by A.

Computability Theory, by Y. Fu VIII. Recursive Set 9 / 35

Page 11: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

m-Degree

The set of m-degrees is ranged over by a,b, c, . . ..

a ≤m b iff A ≤m B for some A ∈ a and B ∈ b.

a <m b iff a ≤m b and b 6≤m a.

Computability Theory, by Y. Fu VIII. Recursive Set 10 / 35

Page 12: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

The Structure of m-Degree

Proposition. The m-degrees form a distributive lattice.

Computability Theory, by Y. Fu VIII. Recursive Set 11 / 35

Page 13: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

Recursive Permutation

A recursive permutation is one-one recursive function.

A is recursively isomorphic to B, written A ≡ B, if there is arecursive permutation p such that p(A) = B.

Computability Theory, by Y. Fu VIII. Recursive Set 12 / 35

Page 14: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

Recursive Invariance

A property of sets is recursively invariant if it is invariant under allrecursive permutations.

I ‘A is infinite’ is a recursively invariant property.

I ‘2 ∈ A’ is not recursively invariant.

Computability Theory, by Y. Fu VIII. Recursive Set 13 / 35

Page 15: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

Myhill Isomorphism Theorem

Myhill Isomorphism Theorem (1955). A ≡ B iff A ≡1 B.

Proof.The idea is to construct effectively the graph of an isomorphicfunction h by two simultaneous symmetric inductions:

h0 ⊆ h1 ⊆ h2 ⊆ h4 ⊆ . . . ⊆ hi ⊆ . . .

such that h =⋃

i∈ω hi .

At stage z + 1 = 2x + 1, if hz(x) is defined, do nothing.

Otherwise enumerate {f (x), f (h−1z (f (x))), . . .} until a number ynot in rng(hz) is found. Let hz+1(x) = y .

Computability Theory, by Y. Fu VIII. Recursive Set 14 / 35

Page 16: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

The Restriction of m-Reduction

Suppose G is a finite directed weighted graph and m is a number.

I The Hamiltonian Circle Problem (HC) asks if there is a circlein G whose overall weight is no more than m.

I The Traveling Sales Person Problem TSP asks for the overallweight of a circle with minimum weight if there are circles.

TSP can be reduced to HC. The reduction is not m-reduction.

Computability Theory, by Y. Fu VIII. Recursive Set 15 / 35

Page 17: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

2. Recursive Set

Computability Theory, by Y. Fu VIII. Recursive Set 16 / 35

Page 18: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

Definition of Recursive Set

Let A be a subset of ω. The characteristic function of A is given by

cA(x) =

{1, if x ∈ A,0, if x /∈ A.

A is recursive if cA(x) is computable.

Computability Theory, by Y. Fu VIII. Recursive Set 17 / 35

Page 19: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

Fact about Recursive Set

Fact. If A is recursive then A is recursive.

Fact. If A is recursive and B 6= ∅, ω, then A ≤m B.

Fact. If A,B are recursive and A,B,A,B are infinite then A ≡ B.

Fact. If A ≤m B and B is recursive, then A is recursive.

Fact. If A ≤m B and A is not recursive, then B is not recursive.

Computability Theory, by Y. Fu VIII. Recursive Set 18 / 35

Page 20: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

Theorem. An infinite set is recursive iff it is the range of a totalincreasing computable function.

Proof.Suppose A is recursive and infinite. Then A is range of theincreasing function f given by

f (0) = µy(y ∈ A),

f (n + 1) = µy(y ∈ A and y > f (n)).

The function is total, increasing and computable.

Conversely suppose A is the range of a total increasing computablefunction f . Obviously y = f (n) implies n ≤ y .

Hence y ∈ A⇔ y ∈ Ran(f )⇔ ∃n ≤ y(f (n) = y).

Computability Theory, by Y. Fu VIII. Recursive Set 19 / 35

Page 21: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

3. Undecidability

Computability Theory, by Y. Fu VIII. Recursive Set 20 / 35

Page 22: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

Unsolvable Problem

A decision problem f : ω → {0, 1} is solvable if it is computable.

It is unsolvable if it is not solvable.

Computability Theory, by Y. Fu VIII. Recursive Set 21 / 35

Page 23: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

Undecidable Predicate

A predicate M(x̃) is decidable if its characteristic function cM(x̃)given by

cM(x̃) =

{1, if M(x̃) holds,0, if M(x̃) does not hold.

is computable.

It is undecidable if it is not decidable.

Computability Theory, by Y. Fu VIII. Recursive Set 22 / 35

Page 24: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

Non-recursive ⇔ Unsolvable ⇔ Undecidable

Computability Theory, by Y. Fu VIII. Recursive Set 23 / 35

Page 25: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

Some Important Undecidable Sets

K = {x | x ∈Wx},K0 = {π(x , y) | x ∈Wy},K1 = {x |Wx 6= ∅},Fin = {x |Wx is finite},Inf = {x |Wx is infinite},Con = {x | φx is total and constant},Tot = {x | φx is total},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 VIII. Recursive Set 24 / 35

Page 26: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

Fact. K is undecidable.

Proof.If K were recursive, the characteristic function

c(x) =

{1, if x ∈Wx ,0, if x /∈Wx ,

would be computable. Let m be an index for

g(x) =

{0, if c(x) = 0,↑, if c(x) = 1.

Then m ∈Wm iff c(m) = 0 iff m /∈Wm.

Computability Theory, by Y. Fu VIII. Recursive Set 25 / 35

Page 27: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

K is often used to prove undecidability result.

I To show that A is undecidable, it suffices to construct anm-reduction from K to A.

Computability Theory, by Y. Fu VIII. Recursive Set 26 / 35

Page 28: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

Fact. There is a computable function h such that both Dom(h)and Ran(h) are undecidable.

Proof.Define

h(x) =

{x , if x ∈Wx ,↑, if x /∈Wx .

Clearly x ∈ Dom(h) iff x ∈Wx iff x ∈ Ran(h).

Computability Theory, by Y. Fu VIII. Recursive Set 27 / 35

Page 29: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

Fact. Both Tot and {x | φx ' λz .0} are undecidable.

Proof.Consider the function f defined by

f (x , y) =

{0, if x ∈Wx ,↑, if x /∈Wx .

By S-m-n Theorem there is an injective primitive recursive functionk(x) such that φk(x)(y) ' f (x , y).

It is clear that k : K ≤1 Tot and k : K ≤1 {x | φx ' λ.0}.

Computability Theory, by Y. Fu VIII. Recursive Set 28 / 35

Page 30: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

Fact. Both {x | c ∈Wx} and {x | c ∈ Ex} are undecidable.

Proof.Consider the function f defined by

f (x , y) =

{y , if x ∈Wx ,↑, if x /∈Wx .

By S-m-n Theorem there is some injective primitive recursivefunction k(x) such that φk(x)(y) ' f (x , y).

It is clear that k is a one-one reduction from K to both{x | c ∈Wx} and {x | c ∈ Ex}.

Computability Theory, by Y. Fu VIII. Recursive Set 29 / 35

Page 31: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

Fact. The predicate ‘φx(y) is defined’ is undecidable.

Fact. The predicate ‘φx ' φy ’ is undecidable.

Computability Theory, by Y. Fu VIII. Recursive Set 30 / 35

Page 32: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

4. Rice Theorem

Computability Theory, by Y. Fu VIII. Recursive Set 31 / 35

Page 33: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

Henry Rice

Classes of Recursively Enumerable Sets and their DecisionProblems. Transactions of the American Mathematical Society,77:358-366, 1953.

Computability Theory, by Y. Fu VIII. Recursive Set 32 / 35

Page 34: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

Rice Theorem (1953).

If ∅ ( B ( C, then {x | φx ∈ B} is not recursive.

Proof.Suppose f∅ 6∈ B and g ∈ B. Let f be defined by

f (x , y) =

{g(y), if x ∈Wx ,↑, if x /∈Wx .

By S-m-n Theorem there is some injective primitive recursivefunction k(x) such that φk(x)(y) ' f (x , y).

It is clear that k is a one-one reduction from K to{x | φx ∈ B}.

Computability Theory, by Y. Fu VIII. Recursive Set 33 / 35

Page 35: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

Applying Rice Theorem

Assume that f (x) ' φx(x) + 1 could be extended to a totalcomputable function say g(x). Let e be an index of g(x).Then φe(e) = g(e) = f (e) = φe(e) + 1. Contradiction.

So we may use Rice Theorem to conclude that

Ext = {x | φx is extensible to a total recursive function}

is not recursive.

Comment: Not every partial recursive function can be obtained byrestricting a total recursive function.

Computability Theory, by Y. Fu VIII. Recursive Set 34 / 35

Page 36: VIII. Recursive Setyuxi/teaching/computability2013/slides/8... · Recursive Set16 / 35. De nition of Recursive Set Let A be a subset of !. The characteristic function of A is given

Remark on Rice Theorem

Rice Theorem deals with programme independent properties.

It talks about classes of computable functions rather than classesof programmes.

All non-trivial semantic problems are algorithmically undecidable.

Computability Theory, by Y. Fu VIII. Recursive Set 35 / 35