2.2.11. Recursion portrayal

Recursion is not an easy concept to teach or understand. Visual representations are often attempted as part of this effort. For the most part, recursion is represented using containment:

In some cases, the well-known technique of unwinding recursion through a set of variables or a stack is used so that a recursive problem can be represented with flow charts:

Without performing this unwinding, it is impossible to represent recursion in a flow chart - recursion is not a visual concept, it is a symbolic one. The following representation suggests the difficulty:

In the top diagram, the inner box, stringcopy, must call itself. The bottom diagram shows the only way this can be visually displayed - by using a containment convention, inserting a copy of itself at a smaller scale. This process must continue n times - in other words, the physical diagram itself is dependent on one of the input parameters. In order to avoid this, the top diagram is most often used - it makes use of the power of the symbolic realm by naming the inner box the same as the outer box.

This inability of the visual to represent recursion without recourse to the symbolic is a warning sign about the limits of the visual. The visual cannot refer to itself in the same way as the symbolic can.


Return to Chapter Two of Visual Programming

Return to Visual Programming Index