Αρχική » Άρθρα με ετικέτα 'BBC' (Σελίδα 2)
Αρχείο ετικέτας BBC
BBC Abstraction in practice
How to abstract
- a cake needs ingredients
- each ingredient needs a specified quantity
- a cake needs timings
When abstracting, we remove specific details and keep the general relevant patterns.
General patterns | Specific details |
---|---|
We need to know that a cake has ingredients | We don’t need to know what those ingredients are |
We need to know that each ingredient has a specified quantity | We don’t need to know what that quantity is |
We need to know that each cake needs a specified time to bake | We don’t need to know how long the time is |
Creating a model
For example, a model cat would be any cat. Not a specific cat with a long tail and short fur – the model represents all cats. From our model of cats, we can learn what any cat looks like, using the patterns all cats share.
Similarly, when baking a cake, a model cake wouldn’t be a specific cake, like a sponge cake or a fruit cake. Instead, the model would represent all cakes. From this model we can learn how to bake any cake, using the patterns that apply to all cakes.
Once we have a model of our problem, we can then design an algorithm to solve it.
BBC Abstraction
What is abstraction?
What are specific details or characteristics?
In pattern recognition we looked at the problem of having to draw a series of cats.
We noted that all cats have general characteristics, which are common to all cats, eg eyes, a tail, fur, a liking for fish and the ability to make meowing sounds. In addition, each cat has specific characteristics, such as black fur, a long tail, green eyes, a love of salmon, and a loud meow. These details are known as specifics.
In order to draw a basic cat, we do need to know that it has a tail, fur and eyes. These characteristics are relevant. We don’t need to know what sound a cat makes or that it likes fish. These characteristics are irrelevant and can be filtered out. We do need to know that a cat has a tail, fur and eyes, but we don’t need to know what size and colour these are. These specifics can be filtered out.
From the general characteristics we have (tail, fur, eyes) we can build a basic idea of a cat, ie what a cat basically looks like. Once we know what a cat looks like we can describe how to draw a basic cat.
Why is abstraction important?
Abstraction allows us to create a general idea of what the problem is and how to solve it. The process instructs us to remove all specific detail, and any patterns that will not help us solve our problem. This helps us form our idea of the problem. This idea is known as a ‘model’.
If we don’t abstract we may end up with the wrong solution to the problem we are trying to solve. With our cat example, if we didn’t abstract we might think that all cats have long tails and short fur. Having abstracted, we know that although cats have tails and fur, not all tails are long and not all fur is short. In this case, abstraction has helped us to form a clearer model of a cat.
BBC Pattern recognition in practice
Why do we need to look for patterns?

What happens when we don’t look for patterns?
Suppose we hadn’t looked for patterns in cats. Each time we wanted to draw a cat, we would have to stop and work out what a cat looked like. This would slow us down.
We could still draw our cats – and they would look like cats – but each cat would take far longer to draw. This would be very inefficient, and a poor way to go about solving the cat-drawing task.
In addition, if we don’t look for patterns we might not realise that all cats have eyes, tails and fur. When drawn, our cats might not even look like cats. In this case, because we didn’t recognise the pattern, we would be solving the problem incorrectly.
Recognising patterns
Patterns among different problems
To find patterns among problems we look for things that are the same (or very similar) for each problem.
For example, decomposing the task of baking a cake would highlight the need for us to know the solutions to a series of smaller problems:
- what kind of cake we want to bake
- what ingredients we need and how much of each
- how many people we want to bake the cake for
- how long we need to bake the cake for
- when we need to add each ingredient
- what equipment we need
Once we know how to bake one particular type of cake, we can see that baking another type of cake is not that different – because patterns exist.
For example:
- each cake will need a precise quantity of specific ingredients
- ingredients will get added at a specific time
- each cake will bake for a specific period of time
Once we have the patterns identified, we can work on common solutions between the problems.
Patterns within problems
Patterns may also exist within the smaller problems we have decomposed to.
If we look at baking a cake, we can find patterns within the smaller problems, too. For example, for ‘each cake will need a precise quantity of specific ingredients’, each ingredient needs:
- identifying (naming)
- a specific measurement
Once we know how to identify each ingredient and its amount, we can apply that pattern to all ingredients. Again, all that changes is the specifics.
BBC Pattern recognition
Pattern recognition
Once we have decomposed a complex problem, it helps to examine the small problems for similarities or ‘patterns’. These patterns can help us to solve complex problems more efficiently.
What is pattern recognition?
What are patterns?
Imagine that we want to draw a series of cats.
All cats share common characteristics. Among other things they all have eyes, tails and fur. They also like to eat fish and make meowing sounds.
Because we know that all cats have eyes, tails and fur, we can make a good attempt at drawing a cat, simply by including these common characteristics.
In computational thinking, these characteristics are known as patterns. Once we know how to describe one cat we can describe others, simply by following this pattern. The only things that are different are the specifics:
- one cat may have green eyes, a long tail and black fur
- another cat may have yellow eyes, a short tail and striped fur
BBC Decomposition example: creating an app
Decomposing creating an app
How would you decompose the task of creating an app?
To decompose this task, you would need to know the answer to a series of smaller problems:
- what kind of app you want to create
- what your app will look like
- who the target audience for your app is
- what your graphics will look like
- what audio you will include
- what software you will use to build your app
- how the user will navigate your app
- how you will test your app
- where you will sell your app
This list has broken down the complex problem of creating an app into much simpler problems that can now be worked out. You may also be able to get other people to help you with different individual parts of the app. For example, you may have a friend who can create the graphics, while another will be your tester.
BBC Decomposition in practice
Before computers can solve a problem, the problem and the ways in which it can be resolved must be understood. Decomposition helps by breaking down complex problems into more manageable parts.
Decomposition in practice
Example 1: Brushing our teeth
To decompose the problem of how to brush our teeth, we would need to consider:
- which toothbrush to use
- how long to brush for
- how hard to press on our teeth
- what toothpaste to use
Example 2: Solving a crime
It is only normally when we are asked to do a new or more complex task that we start to think about it in detail – to decompose the task.
Imagine that a crime has been committed. Solving a crime can be a very complex problem as there are many things to consider.
For example, a police officer would need to know the answer to a series of smaller problems:
- what crime was committed
- when the crime was committed
- where the crime was committed
- what evidence there is
- if there were any witnesses
- if there have recently been any similar crimes
The complex problem of the committed crime has now been broken down into simpler problems that can be examined individually, in detail.
BBC Decomposition
Before computers can solve a problem, the problem and the ways in which it can be resolved must be understood. Decomposition helps by breaking down complex problems into more manageable parts.
What is decomposition?
Why is decomposition important?
If a problem is not decomposed, it is much harder to solve. Dealing with many different stages all at once is much more difficult than breaking a problem down into a number of smaller problems and solving each one, one at a time. Breaking the problem down into smaller parts means that each smaller problem can be examined in more detail.
Similarly, trying to understand how a complex system works is easier using decomposition.
For example, understanding how a bicycle works is more straightforward if the whole bike is separated into smaller parts and each part is examined to see how it works in more detail.