What are recursion and iteration?
An iteration is a mathematical (or geometrical) operation that is repeated a certain number of times to reach (or approximate) the final result. The division of 10 by 3 gives a result of 3 and a remainder of 1. The division of 1 by 3 gives a result of 0.3 and a remainder of 0.1. The division of 0.1 by 3 gives a result of 0.03 and a remainder of 0.01. Therefore 3+0.3+0.03…=3.33… is the approximate value of 10/3 and you see that the division algorithm is iterative. Now, suppose an operation giving certain result and an iteration which applies the same operation to the result itself: this iterating process is recursive. This can be illustrated in a simple way by the process used to obtain the Cantor dust: Start with a straight segment, the length of which is L. Remove the central 1/3 of this segment. That leaves you 2 segments of length L/3. Remove the central 1/3 of each segment, and you get 4 segments of length L/9. Repeating this recursive process endlessly leads to the Cantor dust