Recursion in Children's Comprehension and Formulation of Algorithms

Recursive loops in informal algorithms are difficult to formulate, even for naı̈ve adults (Khemlani et al., 2013). Children can formulate algorithms that do not require loops (Bucciarelli et al., 2016), and anecdotal evidence suggests that they can understand loops. As there were no previous studies, we examined how they made deductions of the consequences of loops, and how they abduced loops in creating informal algorithms in everyday language. We therefore tested fifth-grade children’s ability carry out both these tasks in algorithms that rearrange the order of cars on a toy railway track with one siding. Experiment 1 showed that they could deduce rearrangements from algorithms containing loops, and Experiment 2 showed that they could formulate at least some algorithms that contained loops. These abilities are the likely precursors to the comprehension of recursion and to computer programming.