06.09.2021 Views

Mind, Body, World- Foundations of Cognitive Science, 2013a

Mind, Body, World- Foundations of Cognitive Science, 2013a

Mind, Body, World- Foundations of Cognitive Science, 2013a

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

In the code given above, recursion was evident because MoveStack () called itself. There<br />

are other ways in which recursion can make itself evident. For instance, recursion<br />

can produce hierarchical, self-similar structures such as fractals (Mandelbrot, 1983),<br />

whose recursive nature is immediately evident through visual inspection. Consider<br />

the Sierpinski triangle (Mandelbrot, 1983), which begins as an equilateral triangle<br />

(Figure 3-3).<br />

Figure 3-3. The root <strong>of</strong> the Sierpinski triangle is an equilateral triangle.<br />

The next step in creating the Sierpinski triangle is to take Figure 3-3 and reduce it<br />

to exactly half <strong>of</strong> its original size. Three <strong>of</strong> these smaller triangles can be inscribed<br />

inside <strong>of</strong> the original triangle, as is illustrated in Figure 3-4.<br />

Figure 3-4. The second step <strong>of</strong> constructing a Sierpinski triangle.<br />

The rule used to create Figure 3-4 can be applied recursively and (in principle) infinitely.<br />

One takes the smaller triangle that was used to create Figure 3-4, makes it<br />

exactly half <strong>of</strong> its original size, and inscribes three copies <strong>of</strong> this still smaller triangle<br />

into each <strong>of</strong> the three triangles that were used to create Figure 3-4. This rule can be<br />

64 Chapter 3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!