Error in plato.stanford.edu article on recursive functions

48 Views Asked by At

It seems there is an error in section 2.1.1 of the article on recursive functions: https://plato.stanford.edu/entries/recursive-functions/


Primitive recursion is also a functional operation. In the simplest case, it operates by taking a single unary function $g(x)$ and a natural number $n \in \mathbb{N}$ and returns the unary function defined by

$h(0)=n$

$h(x+1)=g(h(x))$

In such a definition, the first clause (known as the base case) determines the value of $h$ at $0$, while the second clause determines how its value at $x+1$ depends on its value at $x$. In this case it is easy to see that the value of $x$ determines how many times the function $g$ is iterated (i.e., applied to itself) in determining the value of $h$. For instance, if $n=3$ and $g(x)=\text{mult}(x,x)$, then $h(x)=3^{x+1}$ — i.e., the $x+1$st iterate of the map $x \mapsto 3 \times x$.


Given the example in the last sentence above, then

  • $h(0) = 3$

  • $h(1) = g(h(0)) = h(0) \times h(0) = 3 \times 3$

  • $h(2) = g(h(1)) = h(1) \times h(1) = h(0) \times h(0) \times h(0) \times h(0) = (3 \times 3) \times (3 \times 3)$

  • $h(3) = g(h(2)) = h(2) \times h(2) = (3 \times 3 \times 3 \times 3) \times (3 \times 3 \times 3 \times 3)$

etc.

Thus $h(x) = 3^{2^x}$, not $3^{x+1}$. I think the exponential function needs two variables:

https://proofwiki.org/wiki/Exponentiation_is_Primitive_Recursive

1

There are 1 best solutions below

1
On BEST ANSWER

It looks like you're correct -- the function $h(x)$ does in fact compute $3^{2^x}$, not $3^{x+1}$.

I'm not sure what to do about this, though. Scrolling to the bottom of the page, we see it's signed by "Walter Dean", with an email address [email protected]. It might be worth sending an email describing the situation.


I hope this helps ^_^