Definitions & Examples of Recursion:
Recursion, from Everything2.com
- Contains humorous definitions and examples of recursion...
- …one of which reminded me of the best recursive movie:
Passage to Marseilles (1944), starring Humphrey
and most of the cast of Casablanca.
It begins with a
reporter asking a character (played by Claude Rains)
who the Humphrey Bogart character (Matrac) is.
In a flashback,
the Rains character
tells how he met Matrac.
Part of his story involves a flashback
else telling a story,and we're back in the present.
part of which is a flashback of someone else telling a story,
until all the stories flash forward (or "unwind", as
Here are a couple more humorous definitions; these are from the
Wikipedia article on recursion:
- "Here is another, perhaps simpler way to understand recursive processes:
- Are we done yet? If so, return the results. Without such a
termination condition a recursion would go on forever.
- If not, simplify the problem, solve the simpler problem(s), and
assemble the results into a solution for the original problem. Then
return that solution.
- A more humorous illustration goes: ‘In order to understand recursion,
one must first understand recursion.’
- Or perhaps more accurate is the
"If you already know what recursion is,
just remember the answer. Otherwise, find someone who is standing closer
than you are; then ask him or her what recursion is."
Or you could try Googling "recursion" and then noticing what Google's
"correction" ("Did you mean...") is.
On the need for a base case:
(The mathematician Leopold Kronecker once said:
"The dear God made the whole numbers; all else is man-made.")
On Recurrence Relations:
- On their relationship to difference equations, see:
"Relationship to difference equations", in
Wikipedia (accessed 13 January 2009).
"...theoretical physicists commonly describe the world using
differential equations, which specify the rate of change of physical
variables, such as density, at each point in the spacetime continuum.
But when spacetime is grainy, we instead use so-called difference
equations, which break up the continuum into discrete intervals."
Bojowald, Martin (2008),
"Follow the Bouncing Universe",
(October): 44-51; quote on p.47 (emphasis added).
- "continuum" = a mathematical entity that is
continuous, i.e., not discrete;
- "grainy" = "gappy", discrete
Rapaport, William J. (1974),
"Paper Folding and Convergent Sequences",
67 (May): 453-457.
- Discusses an interesting sequence that can
be constructed by folding a strip of paper and
that converges to a surprising number.
article gives a solution using ideas from calculus,
but can also be done using recurrence relations.
- (My very first publication, too! :-)
"How to Generate the Thue Morse Sequence",
- Presents a curious binary sequence that can be
defined using recurrence relations; also, has some