8
$\begingroup$

I'm not sure if my wording is entirely correct, but I was just wondering if every recursive formula can be turned into an explicit formula.

I am asking this because various sources online gives me opposite answers. Although, one thing I have noticed is that every source likes to use different words other than "formula", like "expression" and such.

According to wiki, "Although not all recursive functions have an explicit solution"

So I guess another part of my question is : What difference is it when people say recursive function, expression, formula, etc. (if there is any)

But yeah, I have seen a stackoverflow post saying that every recursion can be turned into an iteration, and doesn't this also mean everything can be explicitly defined?

$\endgroup$
7
  • $\begingroup$ Define $f(0)=1$ and $f(n)=n f(n-1)$, for $n \geq 1$. Thus $f(n)=n!$. Is this "explicit"? It's a matter of opinion: some people say no, others say yes. $\endgroup$ Commented Oct 18, 2012 at 23:49
  • $\begingroup$ I think you need to fix a language of terms in order to get a meaningful answer. Anyways, are we allowed to use Iverson brackets, $\sum$ and $\prod$ symbols, for the non-recursive expression? $\endgroup$
    – user2468
    Commented Oct 19, 2012 at 0:08
  • $\begingroup$ I'm not sure if I understand how this can be an opinion. Shouldn't this just be true or false? Or do people define recursion differently? As for summations, I thought that summation indicates recursion. And I never saw the other symbol before. $\endgroup$
    – krikara
    Commented Oct 19, 2012 at 0:18
  • $\begingroup$ @krikara What is your definition of "explicit formula"? $\endgroup$ Commented Oct 19, 2012 at 0:20
  • $\begingroup$ I'm thinking of recursive as a formula that depends on the previous value to obtain the next whereas an explicit one does not depend on any previous values. Not sure if this is correct, but this is how I came to understand recursion $\endgroup$
    – krikara
    Commented Oct 19, 2012 at 0:43

2 Answers 2

3
$\begingroup$

You are reading about two different things. There are recursive functions in math, and there are recursive functions in computer programming. Programming is a form of math, but never mind that. In general, a recursive function where $f(n) = g(n, f(n-1), f(n-2), \ldots)$ can not always be converted to an explicit form. On the other hand, a recursive function in a computer program can be converted to a non-recursive (iterative) function. This is due to a rather trivial solution where the program's call stack is imitated in an iterative function.

$\endgroup$
1
2
$\begingroup$

This question is not "well-formed".

Recursion is a way (actually several ways, as there are many formalisms containing different recursion schemes) to describe a function (or a collection of functions or some other structures..).

So, what you are actually asking, is whether or not it is possible to describe functions that can be described "by means of recursion" within some other formalism. You fail to specify the "other formalism" as well as the "recursion-formalism" (of which recursion will be only a part).

Some formalisms that do not contain recursion can express exactly the same functions as some other "recursive formalisms" eg.:

  • LOOP computable functions vs. primitive recursive functions
  • WHILE computable functions vs. $\mu$-recursive functions

However, if you aim at asking whether or not every formalism (that describes a family of functions) can be replaced by an equivalent "non-recursive" formalism, then we have to:

  • Define what we mean by a formalism
  • What we mean by equivalent
  • And maybe ask ourselves why we would want to get rid of recursion in the first place ;)

I think that in most cases (given proper definitions of the above) the answer would be 'yes' but at the cost of some other complexity of the formalism (like additional quantifiers or other advanced constructs)

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .