Section 5.2

R. E. Sets and Recursive Sets

[15/33%]
Show
LaTeX
Example 5.9

Assume that sets AA and BB are r.e. Show that sets A∪BA \cup B and A∩BA \cap B are also r.e.

?
Example 5.10

Show that the set {y∣Wy≠∅}\left\{ y \mid W_{y} \neq \emptyset \right\} is r.e.

?
Example 5.11

Show that if AA is r.e. then B=⋃y∈AWyB=\bigcup_{y \in A} W_{y} is also r.e.

?
Example 5.12

Show that the range of a partial recursive function ff : {0,1}∗→{0,1}∗\left\{ 0,1\right\}^{*} \rightarrow \left\{ 0,1\right\}^{*} is an r.e. set.

?
Example 5.16

Show that if AA and BB are recursive sets, then A∪B,A∩BA \cup B, A \cap B and Aˉ\bar{A} are all recursive.

?
Problem 5.2.1

Assume that A,B,C⊆{0,1}∗A, B, C \subseteq \left\{ 0,1\right\}^{*} are r.e. sets. Let

D=(A∩B)∪(B∩C)∪(C∩A). D=(A \cap B) \cup (B \cap C) \cup (C \cap A).
?
(a)

Construct a DTM that simulates the three DTM's accepting sets A,BA, B, and CC in parallel and accepts set DD.

(b)

Construct a DTM that simulates the three DTM's accepting sets A,BA, B, and CC by the dovetailing method and accepts DD.

(c)

Find a recursive predicate RR such that D={x∣(∃y)R(x,y)}D=\left\{ x \mid (\exists y) R(x, y)\right\}.

Problem 5.2.2

Design two dovetailing algorithms for set BB of Example 5.11, the first based on the intuitive algorithm given in the solution, and the second based on the last line of the proof by the projection theorem.

?
Problem 5.2.3

Assume that A,B,C⊆{0,1}∗A, B, C \subseteq \left\{ 0,1\right\}^{*} and A∩B=B∩C=C∩A=∅A \cap B=B \cap C=C \cap A=\emptyset. Also assume that there exist three partial recursive functions f1,f2,f3f_{1}, f_{2}, f_{3} that have the following properties:

f1(x)={1 if x∈A∪B,2 if x∈C,↑ otherwise f2(x)={↑ if x∈A∪C, and 0 otherwise ,f3(x)={↑ if x∈B∪C,0 otherwise  \begin{aligned} & f_{1}(x)=\begin{cases} 1 & \text{ if } x \in A \cup B, \\ 2 & \text{ if } x \in C, \\ \uparrow & \text{ otherwise } \end{cases} \quad f_{2}(x)= \begin{cases} \uparrow & \text{ if } x \in A \cup C, \text{ and } \\ 0 & \text{ otherwise },\end{cases} \\ & f_{3}(x)= \begin{cases} \uparrow & \text{ if } x \in B \cup C, \\ 0 & \text{ otherwise }\end{cases} \end{aligned}
?
(a)

Prove that sets A,B,CA, B, C are all recursive.

(b)

Let M1,M2M_{1}, M_{2} and M3M_{3} be three DTM's that compute functions f1,f2f_{1}, f_{2} and f3f_{3}, respectively. Construct DTM's that simulate M1,M2M_{1}, M_{2} and M3M_{3} to compute χA,χB\chi_{A}, \chi_{B} and χC\chi_{C}.

Problem 5.2.4

Show that every infinite r.e. set has an infinite subset that is recursive.

?
Problem 5.2.5
?
(a)

Assume that f:{0,1}∗→{0,1}∗f: \left\{ 0,1\right\}^{*} \rightarrow \left\{ 0,1\right\}^{*} is a partial recursive function, and AA is an r.e. set. Show that f(A)f(A) and f−1(A)f^{-1}(A) are r.e. (Recall that f(A)={f(x)∣x∈A,f(x)↓}f(A)=\left\{ f(x) \mid x \in A, f(x) \downarrow \right\} and f−1(A)={x∣f(x)↓, f(x)∈A}f^{-1}(A)=\left\{ x \mid f(x) \downarrow \text{, }f(x) \in A\right\}.

(b)

Assume that ff is a recursive function and AA is a recursive set. Is f(A)f(A) recursive? Is f−1(A)f^{-1}(A) recursive?

Problem 5.2.6

A function f:{0,1}∗→{0,1}∗f: \left\{ 0,1\right\}^{*} \rightarrow \left\{ 0,1\right\}^{*} is strictly increasing if f(x)<f(x+1)f(x)<f(x+1) for all x∈{0,1}∗x \in \left\{ 0,1\right\}^{*}. Show that an infinite set AA is recursive if and only if AA is the range of a strictly increasing recursive function ff.

?
Problem 5.2.7

Show that the following sets are r.e.

?
(a)

A1={n∣{0,1,…,n}⊆Wn}A_{1}=\left\{ n \mid \left\{ 0,1, \ldots , n\right\} \subseteq W_{n}\right\}.

(b)

A2={n∣∣Wn∩{0,1,…,n}∣≥n/2}A_{2}=\left\{ n \mid \left|W_{n} \cap \left\{ 0,1, \ldots , n\right\} \right| \geq n / 2\right\}. [Hint: Use the Gödel numbering to encode n/2n / 2 strings into a single string.]

(c)

A3={⟨n,x⟩∣ there exist n1,…,nk,k≥1, such that x∈Wn1, n1∈Wn2,…,nk−1∈Wnk,nk∈Wn}A_{3}=\left\{ \langle n, x\rangle \mid \text{ there exist }n_{1}, \ldots , n_{k}, k \geq 1\text{, such that }x \in W_{n_{1}}\text{, }n_{1} \in W_{n_{2}}, \ldots , n_{k-1} \in W_{n_{k}}, n_{k} \in W_{n}\right\}.

(d)

A4={x∣ there exists an integer n such that ϕx(y)=0 for all y∈{0,1}n}A_{4}=\left\{ x \mid \text{ there exists an integer }n\text{ such that }\phi_{x}(y)=0\text{ for all }y \in \left\{ 0,1\right\}^{n}\right\}.

(e)

A5={n∣ during the computation of Mn(111),Mn has a configuration that contains a substring 000 }A_{5}=\left\{ n \mid \text{ during the computation of }M_{n}(111), M_{n}\text{ has a configuration that contains a substring 000 }\right\}.

Problem 5.2.8

Recall that AB={xy∣x∈A,y∈B}A B=\left\{ x y \mid x \in A, y \in B\right\}. Define A+B={n+m∣n∈A,m∈B}A+B=\left\{ n+m \mid n \in A, m \in B\right\}.

?
(a)

Show that if AA and BB are r.e. sets then AB,A+BA B, A+B and A∗A^{*} are also r.e.

(b)

Show that if AA and BB are recursive sets then AB,A+BA B, A+B and A∗A^{*} are also recursive.

Problem 5.2.9

Define a set C={⟨x,y⟩∣ there exists a partial recursive function f such that f(x) is defined and f(x)=y}C=\left\{ \langle x, y\rangle \mid \text{ there exists a partial recursive function }f\text{ such that }f(x)\text{ is defined and }f(x)=y\right\}.

?
(a)

Prove that CC is r.e.

(b)

Is CC recursive? why?

Problem 5.2.10

Show that the following function is partial recursive:

g(i,j,k)={k if (∃n)[ϕi(n)=ϕj(n)=k]↑ otherwise . g(i, j, k)= \begin{cases} k & \text{ if }(\exists n)\left[\phi _{i}(n)=\phi _{j}(n)=k\right] \\ \uparrow & \text{ otherwise }.\end{cases}
?