Re: Grammatical Recursion

From: Jacques Guy (jguy_at_alphalink.com.au)
Date: 12/17/04


Date: Sat, 18 Dec 2004 05:13:02 +1000

Greg Lee wrote:

> As you say, recursion is not equivalent to iteration, contrary to
> what Jacques said.

Merde! I never wrote that. They are _functionally_ equivalent,
insofar as anything you do through recursive function calls,
you can do through simple iteration without function calls,
e.g.:

factorial = 1
for i=1 to n do
  factorial = factorial * i
end for

> However, I don't see what is wrong with referring
> to iterative patterns as recursive.

They are not patterns, they are algorithms. In
plain English: "recipes", like in "first you do this,
next you do that". "Recursive" and "iterative"
describes how the algorithm is described, period.
And that says nothing about the pattern.

As I wrote in another post a few minutes ago
"put one more pebble in the bag" is self-referencing,
and recursive, and what-strikes-your-fancy. But
in plain English it's still "put one more pebble
in the bag". Wow!



Relevant Pages

  • Re: division by 7 efficiently ???
    ... and is thus an invalid solution for the original question. ... Build a recursive function, which uses two arbitrary numbers, say 1 ... Might it not be better to halve the interval at each iteration instead ... I'll bet money that since this was a programming interview, ...
    (comp.lang.python)
  • Re: task time-out&abort
    ... delay. ... object to collect each improved result, and when the abort occurs, you ... iteration takes a limited time. ... This of course requires that Horribly Complicated Recursive Function can ...
    (comp.lang.ada)
  • Re: Optimizing by replacing a recursinve function with var pars with a recursive object method
    ... Its an alphabeta search with all kind of refinements ... one of the arguments to the recursive function is ... >> requires indefinite iteration ... >> int ackerman ...
    (borland.public.delphi.language.basm)
  • Re: Run-time accessibility checks
    ... No, if index is unordered and not dense, then iteration is meaningless. ... If you want to iterate a container you have ... But to be able to iterate is a contract on the container. ... surely all of the classic containers (including a "bag") need iteration. ...
    (comp.lang.ada)
  • Re: retracing iterations of a grid
    ... Node values are +/-1 so the grid doesn't ... start flashing patterns around iteration after iteration. ... When this buffer node changes value, ...
    (sci.math.num-analysis)

Quantcast