programs in which the use of algorithmic recursion is to be avoided can be characterized by schema which exhibits the pattern of their composition the equivalent schemata are shown below their characteristic is that there is only single call of either at the end (or the beginningof the composition if then sp end sif then end these schemata are natural in those cases in which values are to be computed that are defined in terms of simple recurrence relations let us look at the well-known example of the factorial numbers fi ! fi the first number is explicitly defined as whereas the subsequent numbers are defined recursively in terms of their predecessorfi+ ( + this recurrence relation suggests recursive algorithm to compute the -th factorial number if we introduce the two variables and to denote the values and fi at the -th level of recursionwe find the computation necessary to proceed to the next numbers in the sequences to be : : andsubstituting these two statements for swe obtain the recursive program if then : : fp end : : the first line is expressed in terms of our conventional programming notation as procedure pbegin if then : : *fp end end more frequently usedbut essentially equivalentform is the one given below is replaced by function procedure fi procedure with which resulting value is explicitly associatedand which therefore may be used directly as constituent of expressions the variable therefore becomes superfluousand the role of is taken over by the explicit procedure parameter procedure (iinteger)integerbegin if then return ( else return end end it now is plain that in this example recursion can be replaced quite simply by iteration this is expressed by the program : : while do : : * end in generalprograms corresponding to the original schemata should be transcribed into one according to the following schemap [ : while do endthere also exist more complicated recursive composition schemes that can and should be translated into an iterative form an example is the computation of the fibonacci numbers which are defined by the recurrence relation