Recursion - Research Article from World of Computer Science

This encyclopedia article consists of approximately 3 pages of information about Recursion.

Recursion - Research Article from World of Computer Science

This encyclopedia article consists of approximately 3 pages of information about Recursion.
This section contains 757 words
(approx. 3 pages at 300 words per page)
Buy the Recursion Encyclopedia Article

When a computed function (or procedure) calls itself, it is called "recursive." If the call is via one or more other functions then this group of functions are collectively called "mutually recursive." If a function were to always call itself whenever it is called, then it would never terminate. Since each call of the function requires an activation frame in the computer's memory, it would soon use up all of the computer's resources and bring it to a complete halt as well. Therefore, a recursive function first performs some test on its arguments to check for a "base case"--a condition under which it can return a value without calling itself. When it is called with higher values, then it calls itself with a lower value, and so on, until a base case is reached and values can be returned to the higher-level calling routines.

The canonical example...

(read more)

This section contains 757 words
(approx. 3 pages at 300 words per page)
Buy the Recursion Encyclopedia Article
Copyrights
Gale
Recursion from Gale. ©2005-2006 Thomson Gale, a part of the Thomson Corporation. All rights reserved.