2. Computational Thinking
Learning Objective: To be able to demonstrate an
understanding of the thought processes involved in
understanding problems and formulating solutions that
computers can process.
Success Criteria:
1. I can define the terms Decomposition, Abstraction and
Algorithmic Thinking.
2. I can explain how each of these are used to help
understand and process computing problems.
Unit
2:
Computational
Thinking,
Algorithms
&
Programming
3. Decomposition
Decomposition reduces a problem into sub-problems or
components. These smaller parts are easier to understand and solve.
Unit
2:
Computational
Thinking,
Algorithms
&
Programming
Problem
Create a ‘snakes and ladders’ computer game
Sub-problems
Design of playing area
Positions of snakes and ladders
Dice throw for each player
Movement of each player on the board
Movement up ladders and down snakes
How does a player finish?
As you can see in
this example, the
main problem has
been decomposed
into smaller sub-
problems making it
easier to
understand.
Just like how you
used decomposition
to break down your
NEA task.
Definition: Breaking a
complex problem down
into smaller problems and
solving each one
individually.
Example:
4. PATTERN RECOGNITION
Pattern recognition is the ability to analyze and
identify the shared characteristics between parts
of a decomposed problem. (Can we conclude
pattern recognition occurs after decomposition?)
It can be applied to identify the commonalities of
the problems and finding solutions to address
them.
In the process of solving a problem, it helps in
identifying the solution that can be used again
from similar problems that were solved in the
past. Pattern recognition helps avoid duplications,
and not to reinvent the wheel!
Patterns help in creating an abstraction of a
concept that can be used over and over again
without being similar in every instance of the
application.
We may conclude that pattern recognition goes
hand in hand with abstraction.
Unit
2:
Computational
Thinking,
Algorithms
&
Programming
Definition: Pattern recognition is the skill
of recognizing the similarities and
differences between concepts and objects.
Example: Can you identify a pattern in this
picture and predict the arrangement of the
shapes in the row number 4?
You might have already guessed the right answer!
How did we predict the arrangement? - We
observed the similarities and differences between
the first three rows and predicted the arrangement
(solved the problems based on a developed
pattern). What are the observed similarities and
differences? Similarities: the unique shapes and
colors and direction of the shift (right shift in
shapes of every row)Differences: The position of
shapes in each row
In artificial intelligence, we use pattern recognition
to analyze data and identify similarities to
recommend an object or content to the end user.
5. Abstraction
Abstraction identifies essential
elements that must be included in
the computer models of real-life
situations and discards inessential
ones.
For a computer model of ‘Snakes
and Ladders’, the sub-problem ‘Dice
throw for each player’ includes the
essential element ‘Generate a
random number between 1 and 6’.
Inessential elements would include
whether you use a shaker, how long
you shake it for and how far you
throw the dice.
Unit
2:
Computational
Thinking,
Algorithms
&
Programming Definition: the process of removing
unnecessary details so that only the
main, important points remain.
Example:
When driving a car, there are some essential
elements that you need to know:
• How to turn on the engine
• How to use the brakes
• How to use the gears
There are some inessential elements that you
could afford to ignore:
• The number of miles per gallon
• The dimensions of the wheels
• How each component under the bonnet
works
These inessential things are useful to know,
but not essential to actually driving the car =
Abstraction.
6. Algorithmic Thinking
Algorithmic thinking is a subset of computational thinking that
involves defining a clear set of instructions to solve a problem.
Once a successful solution to a problem has been found, it can
be used repeatedly for the same problem.
For example, the process of calculating the mean of a set of
numbers is always the same irrespective of how many
numbers and what they are – add up all the numbers and
divide the total by the number in the set.
Unit
2:
Computational
Thinking,
Algorithms
&
Programming
Definition: a logical way of getting from the problem to the solution. A set
of instructions for solving a problem.
7. QUESTIONS
1. What is Computational thinking?
2. State and explain the four cornerstones of
Computational thinking
3. Describe a real life situation step by step where the
four cornerstones of computational thinking can be
applied to solve a complex problem