SPPP1042 Unit 4b Computational Thinking
SPPP1042 Unit 4b Computational Thinking
Decomposition
• breaking down a complex problem or system into smaller parts
that are more manageable and easier to understand.
Pattern recognition
• looking for similarities among and within problems that can
helps us to solve more complex problems more efficiently
Abstraction
• focusing on the important information only, ignoring irrelevant
detail involves filtering out the characteristics that we don't
need in order to concentrate on those that we do.
Algorithms
• developing a step-by-step solution to the problem, or the rules
to follow to solve the problem
Decomposition in practice
We do many tasks on a daily basis without even thinking about – or
decomposing – them.
Example 2: Solving a crime
Example 1: Brushing our teeth Solving a crime can be a very complex
To decompose the problem of problem as there are many things to
how to brush our teeth, we consider.
would need to consider: a police officer would need to know the
• which toothbrush to use answer to a series of smaller problems:
• how long to brush for • what crime was committed
• when the crime was committed
• how hard to press on our • where the crime was committed
teeth • what evidence there is
• what toothpaste to use • 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.
Pattern Recognition
To find patterns in
problems we look for Patterns exist among different
things that are the same problems and within individual
(or very similar) in each problems.
problem. It may turn out
that no common
characteristics exist
among problems, but we
should still look.
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.
• 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
Patterns among different problems
• 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.
Abstraction
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.
Abstraction
When baking a cake, there are some general characteristics
between cakes. For example:
• 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.
http://games.thinkingmyself.com/
https://www.curriki.org/oer/Introduction-to-Computational-Thinking-101728/?mrid=10114
• Abstraction a creation of a more generalised
model of the complex problem being solved