Sciweavers

IIE
2007

Recursion Versus Iteration with the List as a Data Structure

13 years 11 months ago
Recursion Versus Iteration with the List as a Data Structure
Abstract. A reversible sequence of steps from the specification of the algorithm and the mathematical definition of the recurrent solution through the recursive procedure, the tail recursive procedure and finally to the iteration procedure, is shown. The notation for analysing recursive function execution as well as modified flow charts of an algorithm to identify the differences between the iteration and the tail recursion are proposed. All the procedures are written in Logo, so the lists are used as the data structure. Transformation from the recursive procedure to the iterative procedure and vice versa can be shown in such a way in every language in which the recursion is allowed. All examples are one-recursion-call examples and all except one are the functions of discrete mathematics. Key words: recursion, iteration, tail-end recursion, Logo, loop, list (data structure), discrete mathematics.
Izabella Foltynowicz
Added 14 Dec 2010
Updated 14 Dec 2010
Type Journal
Year 2007
Where IIE
Authors Izabella Foltynowicz
Comments (0)