0

I have the following problem.

Let $\Phi$ be an admissible numbering of the single-parameter partially-recursive functions. That is, $\Phi(i, x) = f_i(x)$ with $f_i$ the $i$th partially-recusive function with one parameter. Denote with $f(x)\!\uparrow$ that $f(x)$ is undefined in the sense that its computation does not halt.

Now let $B$ be a partially computable set (finite or infinite) so that $\Phi(i,i)\!\uparrow$ for all $i \in B$.

Show that

$\qquad H_1(x) = \begin{cases}1 \text{ if } \Phi(x,x)\downarrow \\ 0 \text{ if } x \in B \\ \uparrow \text{ otherwise}\end{cases}$

is partially recursive.

I know from here that there is even an infinite set. I am preparing for an exam, so just assume that they give an suitable infinite set. How would the program differ if B is a finite set like $B= \{b_1,b_2,\cdots,b_n\}$?

Also a function obtained from composition, recursion is partially computable. So since definition by piecewise is primitive recursive , Could I say $x \in B$ is partially computable if $B$ is finite or would it be better to comeup with a program. I don't know how using just these four instructions, one could say $x \in B$ or not.

\begin{array} \\ \;\;\;\;\;\;\;\;\;Y \gets 0 \\ \;\;\;\;\;\;\;\;\;\text{IF } X \neq 0 \text{ GOTO } A \\ [E] \;\;\;\text{ GOTO } E \\ [A]\;\;\;\; Y \gets Y+1 \end{array}

I am using the Davis book of Computability where this is mentioned in page 70 of second edition.

Raphael
  • 73,212
  • 30
  • 182
  • 400

1 Answers1

2

You can solve this problem in a straight-forward way: give an algorithm that (semi-)computes $H_1$.

Here is a rough sketch that you have to expand into appropriate detail in the model you want to work with and then show correctness and computability.

Let $M_B$ be a semi-decider for $B$.

  1. Compute $\Phi(x,x)$ and $M_B(x)$ simultaneously.
  2. If $\Phi(x,x)$ terminates first, return $1$.
  3. If $M_B(x)$ terminates first (and accepts), return $0$.
  4. Otherwise, loop.

Hints

  • In step 1, use dovetailing.

  • Steps 2 and 3 can not disagree.

  • Step 4 only happens when it should.

You can show the necessary lemmas using the assumptions on $B$.

As you see, we don't care at all if $B$ is finite as we do not care what $M_B$ looks like; we just use it as a black box.


Aside: I am not sure that infinite $B$ with all the properties as listed in the question exist. We can ignore this, though: the problems is stated such that we show something for each such $B$ -- if there is none, we are good.

Raphael
  • 73,212
  • 30
  • 182
  • 400