This article is about recursive approaches to solving problems. Each branch can be seen as a smaller version of algorithms data structures programs pdf niklaus wirth pdf tree. The power of recursion evidently lies in the possibility of defining an infinite set of objects by a finite statement.

In the same manner, an infinite number of computations can be described by a finite recursive program, even if this program contains no explicit repetitions. Because the base case breaks the chain of recursion, it is sometimes also called the “terminating case”. The job of the recursive cases can be seen as breaking down complex inputs into simpler ones. In a properly designed recursive function, with each recursive call, the input problem must be simplified in such a way that eventually the base case must be reached. An inductively defined recursive data definition is one that specifies how to construct instances of the data.