recursive algorithms introduction an object is said to be recursiveif it partially consists or is defined in terms of itself recursion is encountered not only in mathematicsbut also in daily life who has never seen an advertising picture which contains itselffig picture with recursion recursion is particularly powerful technique in mathematical definitions few familiar examples are those of natural numberstree structuresand of certain functions natural numbers( is natural number (bthe successor of natural number is natural number tree structures(ais tree (called the empty tree(bif and are treesthen the structure consisting of node with two descendants and is also (binarytree the factorial function ( ) ( (nn ( for the power of recursion evidently lies in the possibility of defining an infinite set of objects by finite statement in the same manneran infinite number of computations can be described by finite recursive programeven if this program contains no explicit repetitions recursive algorithmshoweverare primarily appropriate when the problem to be solvedor the function to be computedor the data structure to be processed are already defined in recursive terms in generala recursive program can be expressed as composition of sequence of statements (not containing pand itself [spthe necessary and sufficient tool for expressing programs recursively is the procedure or subroutinefor it allows statement to be given name by which this statement may be invoked if procedure contains an explicit reference to itselfthen it is said to be directly recursiveif contains reference to another procedure qwhich contains (direct or indirectreference to pthen is said to be indirectly recursive the use of recursion may therefore not be immediately apparent from the program text