EX 12-1
1.)what keeps a recursive definition from being circular
-The fact that sum(1) is defined to be 1 without making reference to further invocations of sum saves the process from going on forever and the definition fro being circular.
2.)what are two parts of any recursive method
-A method is said to be recursive if it calls itself. First, some function f(n) is expressed in term of f(n-1) and perhaps f(n-2) and so no. Second, to prevent the definition from being circular, f(1) and perhaps f(2) and so on are defined explicitly.
3.)why is recursion more expensive than iteration
-
4.)what are the benefits of using recursion
-
Chapter 12-1
Advertisement
The URI to TrackBack this entry is: http://nina19899.wordpress.com/2008/04/18/chapter-12-1/trackback/