Teaching Algorithmic Thinking to Pupils

Date: Tuesday, April 2, 2019

As part of my degree at University of Liverpool, I am teaching Year 9 & 10 pupils on Wednesdays. The fact that I will be able to share my passion for Computer Science and ignite that passion in pupils has served me as an incentive to get into teaching. Having delivered 3 lessons already, I need to point out that teaching Computer Science is a completely different experience and working with pupils is challenging but rewarding.

Why algorithms?

When planning the delivery lesson, I chose algorithmic paradigms and time efficiency as the main topic of the lesson. I firmly believe that getting to grips with the basic concepts is vital towards becoming a good computer scientist. No matter how fast your CPU is, how much RAM you have, it’s all in vain if the underlying algorithms of the produced software are inefficient. Personally, I think that it is a good practice to take the time to design and then implement the algorithm rather than directly coding the solution. I concur with the sentiment that efficient algorithms lead to efficient programs.


While there are different algorithmic paradigms in Computer Science, I decided to focus on the following strategies: Greedy approach, where we make the choice that seems to be the best at each step so it leads to a globally optimum solution, and Divide-and-Conquer approach, where we divide a problem into smaller parts, so subproblems are solved independently. Although I enjoy solving problems using Dynamic Programming, where we break down a problem into smaller subproblems, solve each only once and store the intermediate results in a lookup table, I decided not to include it as it might be too advanced for Year 9 & 10 pupils. When exploring a few greedy algorithms, 0-1 Knapsack problem in particular, pupils figured out that it is not always possible to obtain the optimal solution using this approach. In fact, that’s one of the highlights of the lesson, i.e. Greedy algorithms do not always yield a genuinely optimal solution. In addition, I decided to include the Tower of Hanoi problem which can be solved using the Divide-and-Conquer approach, which in fact, is considered to be one of the best-known algorithm design techniques.

A slide explaining the 0-1 Knapsack problem

Explaining the 0-1 Knapsack problem


As a result of my observations along with the feedback by the pupils, I came to the conclusion that while many found the Knapsack Problem to be useful but least enjoyable, everyone seemed to have enjoyed solving the Tower of Hanoi problem (http://haubergs.com/hanoi). In addition, although some of the pupils had not heard of the Big-O concept before, they managed to get to grips with the concept and accurately measured the time complexity of the given algorithms.

Although I felt much uncertainty at the very beginning as I did not know what to expect, they have all evaporated after my first interaction with the pupils. I am really glad that I have gone through such an exciting and rewarding experience.