Propositions for recursive functions

  • Context: MHB 
  • Thread starter Thread starter evinda
  • Start date Start date
  • Tags Tags
    Functions
Click For Summary

Discussion Overview

The discussion revolves around the properties of recursive functions, specifically focusing on the propositions that the domain and range of a recursive function are recursively enumerable. Participants explore definitions, provide proofs, and question assumptions related to total and partial recursive functions.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Some participants propose that the domain of a recursive function is recursively enumerable based on the existence of an algorithm that computes the function.
  • Others argue that the output of the algorithm does not necessarily confirm membership in the domain, raising questions about the definitions used.
  • A later reply suggests that the domain of a partial recursive function is recursively enumerable, with a construction of a Turing machine to support this claim.
  • Participants discuss the distinction between total and partial recursive functions, with some asserting that both cases need to be considered for the propositions to hold.
  • There is a proposal that the range of a recursive function is recursively enumerable, with a construction of a Turing machine that checks for outputs matching a given value.
  • Some participants express uncertainty about whether a recursively enumerable set can be the range of a recursive function, questioning the conditions under which this holds.
  • Discussions also touch on the terminology used, such as the difference between computing a function and computing a statement.

Areas of Agreement / Disagreement

Participants generally do not reach consensus on the implications of their arguments, with multiple competing views remaining on the definitions and properties of recursive functions and their domains and ranges.

Contextual Notes

Participants highlight the importance of precise definitions and the conditions under which statements about recursive functions hold. There are unresolved questions regarding the relationship between recursively enumerable sets and the ranges of recursive functions.

evinda
Gold Member
MHB
Messages
3,741
Reaction score
0
Hello! (Wave)

I want to show the following two propositions:

  • The domain of a recursive function is recursively enumerable.
  • The range of a recursive function is recursively enumerable.

I have thought the following in order to prove the first proposition.

Suppose that we have a recursive function $f$. Then we know that there is an algorithm $A$ that computes $f$.
So if $m \in dom(f)$ then we know that the algorithm $A$ with input $m$ terminates, giving output "yes".
Since $m$ is arbitrary, we deduce that the domain of a recursive function is recursively enumerable.

Is my idea right? If so, can't we also deduce from that that the domain of a recursive function is recursive since the algorithm always terminates for the elements of the domain? (Thinking)
 
Physics news on Phys.org
evinda said:
  • The domain of a recursive function is recursively enumerable.
  • The range of a recursive function is recursively enumerable.
By "recursive function" do you mean partial recursive function?

evinda said:
Suppose that we have a recursive function $f$. Then we know that there is an algorithm $A$ that computes $f$.
So if $m \in dom(f)$ then we know that the algorithm $A$ with input $m$ terminates, giving output "yes".
Since $A$ computes $f$, it outputs whatever $f$ outputs and not necessarily "yes".

evinda said:
Since $m$ is arbitrary, we deduce that the domain of a recursive function is recursively enumerable.
I don't see how it follows, but it may depend on the definition you are using. Please remind the definition of a recursively enumerable set. Also please write the facts (similar to the statements from this problem) that you may use.
 
Evgeny.Makarov said:
By "recursive function" do you mean partial recursive function?

I mean a total recursive function.

Evgeny.Makarov said:
Since $A$ computes $f$, it outputs whatever $f$ outputs and not necessarily "yes".

I don't see how it follows, but it may depend on the definition you are using. Please remind the definition of a recursively enumerable set. Also please write the facts (similar to the statements from this problem) that you may use.

Yes, now I think so too that I am wrong.A subset $A$ of $\mathbb{N}^k$ is recursively enumerable iff there is a Turing machine $T$, such that $\forall x \in A$, $T$ with input $x$ halts , giving output $1$ and $\forall x \notin A$, $T$ does not halt, i.e. $T$ computes the function

$\phi(x)=\left\{\begin{matrix}
1 & \text{ if } x \in A \\
\infty & \text{ if } x \notin A
\end{matrix}\right.$

A subset $A$ of $\mathbb{N}^k$ is recursive iff $A$ and $A^c$ are recursively enumerable.
 
evinda said:
I mean a total recursive function.
So you are not sure how to show that $\mathbb{N}^k$ is r.e.? Since the domain of a total function is $\mathbb{N}^k$.
 
Evgeny.Makarov said:
So you are not sure how to show that $\mathbb{N}^k$ is r.e.? Since the domain of a total function is $\mathbb{N}^k$.

Oh yes, that's true. Maybe we have to show the statement for both total and partial recursive functions. (Thinking)

Having $\mathbb{N}^k$ as the domain , we can write a program that checks if a vector contains only natural numbers and so $\mathbb{N}^k$ is recursively enumerable. Right?
 
evinda said:
Maybe we have to show the statement for both total and partial recursive functions.
The domain of a partial recursive function is indeed r.e.

evinda said:
Having $\mathbb{N}^k$ as the domain , we can write a program that checks if a vector contains only natural numbers and so $\mathbb{N}^k$ is recursively enumerable. Right?
Yes.
 
Evgeny.Makarov said:
The domain of a partial recursive function is indeed r.e.

Suppose that we have a partial recursive function $f$. Then there is a Turing machine $A$ that computes $f$.
We construct a Turing machine $M$ such that if $A(m)$ terminates for some $m \in \mathbb{N}$ then $M$ terminates giving output $1$ and otherwise $M$ does not terminate. Then $M$ computes the domain of $f$ and thus the domain of $f$ is recursively enumerable.

Is my idea right?
 
I would not say "$M$ computes the domain of $f$". Usually one says "computes a function". Otherwise I agree.
 
Evgeny.Makarov said:
I would not say "$M$ computes the domain of $f$". Usually one says "computes a function". Otherwise I agree.

Then $M$ computes the characteristic function of the domain of $f$ and thus the latter is recursively enumerable. Right?
 
  • #10
evinda said:
Then $M$ computes the characteristic function of the domain of $f$
No, a characteristic function is total.
 
  • #11
Evgeny.Makarov said:
No, a characteristic function is total.

A Turing machine can also compute a statement, right? So can we say that then $M$ computes the statement "is the element an element of the domain of $f$", deducing in this way that the domain of $f$ is recursively enumerable?
 
  • #12
evinda said:
A Turing machine can also compute a statement, right?
I don't remember seeing anything other than a function after the phrase "a Turing machine computes". And I don't really care about what you write with words. You can give whatever definitions you see fit. The important thing is that you can formulate precise statements and write them using formulas.
 
  • #13
Writing this I was thinking about an answer of yours, at an other post of me, namely this one:

It is important that "$A(m)$ terminates within $n$ steps" is a decidable statement. That is, there is a Turing machine $M$ (or a Java method, C function, etc.) that for given $m$ and $n$ will always terminate and return "yes" or "no" depending on whether this statement is true or false.

So I think that I didn't formulate it correctly. Is it more clear as follows?

We construct a Turing machine $M$ such that if $A(m)$ terminates for some $m \in \mathbb{N}$ then $M$ halts giving output $1$, otherwise $M$ does not halt. So we see that the statement "$x$ is an element of the domain of $f$" is recursively enumerable and so the domain of $f$ is recursively enumerable.
 
  • #14
This is OK. Usually the term "r.e." is applied to sets, but it can be applied to predicates (as you are writing) if you explicitly define what it means. I would simply say after defining $M$ that the domain of $f$ is r.e. by definition.
 
  • #15
Ok.

For the second proposition I have thought the following:
Suppose that $f$ is a recursive function. Let $y \in image (f)$. We construct $M$ like that:
We run $f$ on $0,1,2, \dots$ and if $f(n)=y$ for some $n \in \mathbb{N}$ then $M$ terminates giving input $1$, otherwise $M$ loops forever. So the range of a recursive function is recursively enumerable.

Am I right?

Does it also hold that if $A$ is recursively enumerable then $A$ is the range of some recursive function?
If so, how can we find a function whose range is $A$?
 
  • #16
evinda said:
Suppose that $f$ is a recursive function. Let $y \in image (f)$. We construct $M$ like that:
We run $f$ on $0,1,2, \dots$ and if $f(n)=y$ for some $n \in \mathbb{N}$ then $M$ terminates giving input $1$, otherwise $M$ loops forever.
If $y \in image (f)$, then the second option is impossible.

evinda said:
Does it also hold that if $A$ is recursively enumerable then $A$ is the range of some recursive function?
Or $A=\emptyset$.

evinda said:
If so, how can we find a function whose range is $A$?
It was discussed in https://driven2services.com/staging/mh/index.php?threads/19389/.
 
  • #17
Evgeny.Makarov said:
If $y \in image (f)$, then the second option is impossible.

Oh yes, that's right... It should be as follows, right?

Suppose that $f$ is a recursive function. We construct $M$ like that:
We run $f$ on $0,1,2, \dots$ and if $f(n)=y$ for some $n \in \mathbb{N}$ then $M$ terminates giving input $1$, otherwise $M$ loops forever. So the range of a recursive function is recursively enumerable.
Evgeny.Makarov said:
Or $A=\emptyset$.

It was discussed in https://driven2services.com/staging/mh/index.php?threads/19389/.

I see.
 
  • #18
evinda said:
Suppose that $f$ is a recursive function. We construct $M$ like that:
Given input $y$, $M$ runs
evinda said:
$f$ on $0,1,2, \dots$ and if $f(n)=y$ for some $n \in \mathbb{N}$ then $M$ terminates giving input $1$, otherwise $M$ loops forever.
Thus, $M$ terminates on elements of the image of $f$ and only on them, i.e., the image of $f$ is r.e.
 
  • #19
Evgeny.Makarov said:
Given input $y$, $M$ runs
Thus, $M$ terminates on elements of the image of $f$ and only on them, i.e., the image of $f$ is r.e.

I see... Thanks a lot! (Smile)
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K