Recursion is a natural idea. When humans perform repetitive tasks, we don't assign state variables, and we generally don't keep counters. We just keep

Cease labeling recursion as challenging for students

submited by
Style Pass
2024-04-25 21:00:02

Recursion is a natural idea. When humans perform repetitive tasks, we don't assign state variables, and we generally don't keep counters. We just keep doing the same thing over and over until we arrive at some kind of terminating condition. This “pattern” forms the basis of recursive programming.

This is a very natural, very basic way of going about writing recursive functions. Take for example a function that performs exponentiation. Here are the questions we might ask ourselves if we were to perform the computation.

In my experience, effective recursive thinking requires two important mental processes come naturally. The first is understanding the process that recursive procedures generate. Continuing the example above, we need to be able to quickly understand that that procedure will generate a process that looks like:

at every step in its computation. This can be hard for students to understand as comparatively, an iterative process is much easier to understand at every “step” in a given computation. Recursive procedures in some sense need to be understood as a gestalt, thinking about them as a series of computations can be somewhat frustrating. This brings us to the next important shift in mental processes.

Leave a Comment