Information Technology Reference
In-Depth Information
the recursion process (see, e.g., G￶tschi et al. 2003 ; Kahney 1989 ; Wu et al. 1998 ).
Sometimes, even viable models, such as the copies mental model, do not help learn-
ers to execute recursive algorithms correctly (Scholtz and Sanders 2010 ).
Therefore, suitable tracing models are needed to help learners capture the es-
sence of the recursive process. Two models are presented here: the Little People
model and the Top-Down Frames model. Both models are demonstrated by the
following mystery method.
SXEOLFVWDWLFYRLGP\VWHU\LQWQ^
LIQ
6\VWHPRXWSULQWOQ³ILQLVKHG´
HOVH^
6\VWHPRXWSULQWOQQ
P\VWHU\Q
6\VWHPRXWSULQWOQQ
`
`
This example is chosen for several reasons. First, in order to ease the tracing of the
process, all the instructions included in this method are based on printings. Second,
the example is a procedure (and not a function), because it is more difficult to ex-
plain the return process included in a recursive function (like factorial). Third, one
of the difficulties learners face with respect to understanding recursion is the com-
puter's behavior when a recursive execution ends; therefore, it is recommended to
start with a full recursion (not a tail recursion) since its flow is easier to understand.
12.4.1
The Little People Model
The little people model is a powerful model that helps learners actually see the exe-
cution of a recursive process. This model not only provides a tool that simulates the
recursive process but is also based on learners' active participation in the creation
of the recursive process, and at each step enables them to predict the next step(s). In
his Computer Science Logo Style topic, Harvey ( 1997 ) explains the model in detail
and illustrates it with detailed examples. In what follows, it is described briefly.
The model assumes that a large community of little people 5 exists inside the
computer, where (a) each person is an expert in the execution of a specific method/
program, and (b) more than one little person can have the same expertise. Thus, for
our example, there are mystery specialists. When a method is invoked, one little
person, who is an expert in its execution, is called by another little person to execute
it. The little person wears a vest with pockets; the number of pockets equals the
number of the inputs of the program/method that the little person is an expert of its
execution. In our case, any mystery expert has one pocket. Each pocket can contain
 
Search WWH ::




Custom Search