Recursion: Difference between revisions
From CasGroup
Jump to navigationJump to search
Created page with "'''Recursion''' is the repeated application of a recursive procedure or definition. A recursive process is a self-similar process in which objects are defined in terms of other ..." |
No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
'''Recursion''' is the repeated application of | '''Recursion''' is the repeated application of a recursive procedure or definition. A recursive process is a self-similar process in which objects are defined in terms of other objects of the same type. | ||
a recursive procedure or definition. | |||
A recursive process is a self-similar process | |||
in which objects are defined in terms of other | |||
objects of the same type. | |||
[[Iteration|Iteration]] is the analog of [[Recursion|recursion]], because [http://stackoverflow.com/questions/931762/can-every-recursion-be-converted-into-iteration every recursion be converted into an iteration]. Often a [http://stackoverflow.com/questions/159590/way-to-go-from-recursion-to-iteration recursive algorithm can be replaced by an iterative algorithm] by pushing the parameters that would normally be passed to the recursive function onto a stack. | |||
== Links == | == Links == | ||
| Line 10: | Line 7: | ||
* MathWorld site for [http://mathworld.wolfram.com/Recursion.html Recursion] | * MathWorld site for [http://mathworld.wolfram.com/Recursion.html Recursion] | ||
* Wikipedia site for [http://en.wikipedia.org/wiki/Recursion Recursion] | * Wikipedia site for [http://en.wikipedia.org/wiki/Recursion Recursion] | ||
[[Category:Basic Principles]] | |||
Latest revision as of 15:00, 1 February 2012
Recursion is the repeated application of a recursive procedure or definition. A recursive process is a self-similar process in which objects are defined in terms of other objects of the same type.
Iteration is the analog of recursion, because every recursion be converted into an iteration. Often a recursive algorithm can be replaced by an iterative algorithm by pushing the parameters that would normally be passed to the recursive function onto a stack.