Professional Documents
Culture Documents
Lesson Plan 4
Lesson Plan 4
Content
Starter
PowerPoint Guide: Lesson 4 Algorithmic Thinking 2
The starter asks students to consider a famous phrase. Ask them how they would reduce the
number of characters (including spaces) to a smaller number. Some ideas for compressing
could include missing out characters, using digits or using emoji.
Main
Compression
Take students through the two types of compression, lossy and lossless. This lesson firstly
looks at lossy compression which is rarely used for text. However, this is an easy way for
students to see how compression can be undertaken. Ask them to create an algorithm to do
their compression. This most likely will start with IF statements. Once they have completed
their algorithm, take them through the Answers slide.
Hand out Worksheet 4 and ask students to complete Task 1.
Lesson 4 Worksheet 4
Locked-in syndrome
Explain to students that this is a real condition. Jean-Dominique Bauby suffered from this
syndrome and wrote an entire book ‘The Diving-Bell and the Butterfly’ via blinking.
Ask students to work in pairs. Each partner then thinks of a word and tries to communicate it
with their partner by simply blinking. They will find that this process is quite time consuming
with each letter taking several seconds to establish.
Letter order
We now use algorithmic thinking to see if we can make this process more efficient. In the
English language, certain letters are far more common than others. So, we can reorder the
list so that fewer letters need to be considered. Ask students to consider how the chart should
be re-ordered with the knowledge about letter frequency. The complete chart is shown on the
Answers slide.
Ask students to complete Task 2 on Worksheet 4.
Another algorithm
Explain to students that Computer Scientists are constantly looking to improve their solutions
and algorithms to the problem. A more elegant solution may execute faster, use less memory
The alternative algorithm presented here is to use a binary tree. More astute students may
notice that a line break is used – they would need to either blink with both eyes or pause to
achieve this. Using line breaks simplifies the binary tree we have created. In Computer
Science, this method of compression would use Huffman coding (see here:
https://en.wikipedia.org/wiki/Huffman_coding).
Ask students for the word represented. The answer is TEN.
Plenary
Ask the first question on the slide to the class, then ask students to work in pairs to find the
word represented by the binary and binary tree. Remind students of the different solutions
that were given to solving the problem of Locked-in syndrome. All the algorithms were correct
and solved the same problem – however, it should be clear to students how some algorithms
are far better than others in the way they solve the problem.
Hand out Homework 4.
Lesson 4 Homework 4