Lesson video

In progress...


Hi, I'm Kashif, your computer science teacher for the algorithms unit.

In this unit we're going to be looking at searching and sorting algorithms as well as computational thinking, trace tables and flow charts.

This first lesson, we're going to be looking at computational thinking techniques.

These include abstraction, decomposition and algorithmic thinking.

For this lesson, you're going to need a pen, some paper, and you're going to need to remove any distractions that are going to get in your way of focusing.

Once you've done this, let's begin.

Five sticks.

Adam has five sticks.

He puts them on the table and creates this shape.

Nola comes to the table.

She takes one stick and puts it in a different place: Then Bob comes to the table.

He also takes one stick and puts it in a different place.

Which shape is Bob not able to make? So have a look at the shapes at the bottom and have a think about which shape he cannot make.

Right, let's have a look at the solution.

That Bob cannot make shape D.

Here the shapes as you can see, there's a possibility of making them by moving one of the sticks, however with shape D, you'd have to move at least two.

In this lesson, you will define decomposition, abstraction, and algorithmic thinking.

Recognise scenarios where each of these computational thinking techniques is applied.

And apply decomposition, abstraction and algorithmic thinking to help solve a problem.

So what is computational thinking? Computational thinking is a systematic approach to solving problems. It involves understanding the problem and developing possible solutions that can be understood by a computer, a person, or both.

This is a topic that I was quite passionate about.

And as you can see with my previous videos I've always got quite a few Rubik's cubes.

So with the Rubik's cubes there is an algorithm to solve it.

And if you are interested, I have created a series on YouTube.

If you search up, Coding With Cash, you'll see eight steps on how you can solve this Rubik's cube.

Okay, so there are three characteristics of computational thinking that you need to be aware of.

Decomposition, abstraction and algorithmic thinking.

What is decomposition? Decomposition is the process of breaking problems down into smaller, more manageable parts.

Each of the subproblems can then be looked into and solved separately, which makes it easy to solve the overall problem.

If the subproblems are not manageable enough they can be decomposed further.

So if you have a look there, we've got a main problem.

And then we've broken it down into three separate problems. Just like with the Rubik's cube, you've got one problem of solving it and it's broken down into eight separate steps.

To understand how the composition can be applied, let's look at the example of a problem to solve.

Imagine you're organising a trip to the Eiffel Tower in Paris.

What things would you need to plan in order to get from your hometown to the Eiffel Tower? Have a think about it, write it down.

Okay, let's see what we've got.

So you can start by breaking down the problem into smaller parts.

Which mode of transport would you use to get from the UK to Paris? How would you get to the Eiffel Tower once you get to Paris? And what tickets do you need to book for your journey? Structure diagram can be used to visualise a problem by showing the different levels of detail.

This overview illustrates how each subproblem relates to other parts of the structure.

So on the right, we can see our main problem is, or our main objective here is to get to the Eiffel Tower.

So in order to do that we've got to think about the transport and the tickets.

In regards to the transport we've got to think about from UK to Paris and then to the Eiffel Tower itself.

What is abstraction? Abstraction is a process of removing unnecessary information and focusing on the important details.

This allows you to develop a general idea of what the problem is and how to solve it.

So a great example of abstraction is the use of maps.

A map includes only the information that is relevant.

The Paris street map in this example, on the right-hand side, contains the roads, rivers and names of important landmarks.

It doesn't include the exact details of how the buildings look in real life.

There are different levels of abstraction that serve different purposes.

The Paris Metro map has even more detail removed from it showing only the lines, stops and river.

So as you can see from the map above to the map below, there's quite a big difference even though they're covering the same area.

When would you use each map and why? Write this down.

So both maps are useful.

The first map you might use if you were above ground and you're walking around looking for different destinations.

The second map you might use if you're using the Paris Metro and you were underground trying to figure out how you can get from one station to the other.

What is algorithmic thinking? Algorithmic thinking is a process of developing an algorithm to solve a problem.

An algorithm is a precise step-by-step solution to a problem that can be replicated by a human, a computer or both.

We've got a quote on the right hand side by Anna McVeigh-Murphy, which is, "Algorithmic thinking is not solving a specific answer; "instead, it solves how to build a sequential, complete "and replicable process "that has an endpoint - an algorithm." For example, an algorithm for getting the Eurostar to Paris could be: Go to Platform 5 at London St.

Pancras for 7:45.

Wait until the 8:15 Eurostar arrives on the platform, then board Carriage 5.

Find Seat 57 and sit there.

And lastly, wait until you arrive in Paris and alight from the Eurostar.

Task 1- Playing a Game.

In this activity you're going to apply each computational thinking skill to help you plan a game.

The game involves moving a character around a simple world.

Help solve the problem using computational thinking.

Pause the video to complete your task.

Task 1 - Planning a Game.

Using the worksheet complete Task 1, there are 3 parts: Decomposition, abstraction, algorithmic thinking.

Resume once you're finished.

Task 1 - Planning a Game - Part 1 solution.

Decomposition: breaking down the problem.

As you can see, these were the steps or these were the subproblems from the main problem.

So in terms of moves we can allow the plane to go forward turn left and turn right.

In terms of items, we can pick them up, we can use them, we can drop them.

And in terms of spells, we cast them and we can learn them.

Task 1 - Playing a Game - Part 2 solution.

Abstraction: removing unnecessary information.

As you can see there we've got the large building, we've got the small house and we've got the route to get there.

Task 1 - Planning a Game - Part 3 solution.

Algorithmic thinking: organise a step-by-step solution.

The actual algorithm can be described in many ways as long as the logic is correct.

An efficient example would be: Step 1 or Move Number 1, move forward, turn left, forward, turn right, forward, turn right, forward, turn right, forward.

So there we have our steps.

Revisiting five sticks.

How could the following techniques be applied to solve the five sticks problem that we originally looked up? So how can we apply decomposition? So how can we break it down? How can we apply abstraction? So how can we simplify it? And how can we apply algorithmic thinking where we look at the steps involved? So here we go, there's the question again.

And how would you apply the computational thinking skills or techniques to this problem? Well, thank you very much for joining me on this first video.

It's getting YouTube grips with thinking about algorithms, thinking about the computational techniques and thank you for following along and having a go at the activities.

Share your work with Oak National.

If you'd like to please ask a parent or carer to share your work on Instagram, Facebook, or Twitter tagging @OakNational and #LearnwithOak.

Thank you very much for your time today and hopefully I'll see you on the next lesson.