English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2006-07-25 03:45:43 · 4 answers · asked by ann janet m 1 in Science & Mathematics Mathematics

4 answers

Recursion is a property of some mathematical series and also a term used in programming. A recursive computer procedure calls itself. As an example, suppose you want to write a function that computes the factorial of a number. Here's a recursive way to do it:
Function Fac(N)
If N=1 then
fac = 1: exit function
Else fac=N*fac(N-1)
End If
End Function
A practical disadvantage of such programming is that too many steps of recursion can result in a "stack overflow", where the memory allocated to storing the parameters of calls to procedures is filled. X=fac(50) would put 50 sets of these parameters (register contents, etc) into stack memory.
A mathemetical series like the Fibonacci series, in which each successive term is defined by previous terms is also considered recursive (and is easily programmed recursively). Math recursion can lead to some interesting fields such as the generation of fractals (see ref.).

2006-07-25 03:54:46 · answer #1 · answered by kirchwey 7 · 0 0

If you mean "recursion", it's a programming tool where a function calls itself

2006-07-25 10:49:17 · answer #2 · answered by Rich M 3 · 0 0

Recursion.

Have a look here: http://en.wikipedia.org/wiki/Recursion

2006-07-25 10:52:09 · answer #3 · answered by bloo435 4 · 0 0

Please re-spell the word.....it doesn't exist in the dictionary!

2006-07-25 10:48:31 · answer #4 · answered by Coo coo achoo 6 · 0 0

fedest.com, questions and answers