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:
Figure 2.17. Recursion frames. From Bauer (1982).
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:
Figure 2.18. Recursion with flow charts. From Bauer (1982).
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:
Figure 2.19. Stringcopy using enclosure diagrams. From Reade (1989).
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.