Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Asian MathSci League, Inc (AMSLI)

Website: amsliphil.com
Email address: amsliphil@yahoo.com

AIEP 1
Session 2
Elements of Computational Thinking (Part 3)

What is computational thinking?

Computational thinking (CT) is an approach in which you break down problems into
distinct parts, look for similarities, identify the relevant information and opportunities for
simplification, and create a plan for a solution. This broad problem-solving technique
includes four elements: decomposition, pattern recognition, abstraction and algorithms.
In this session, the discussion will be focused on the next two elements of computational
thinking: abstraction and algorithms.

Abstraction

In computational thinking, abstraction refers to how one may be able


to generalize a problem. In other words, abstraction prompts one to
step back from the specific details that are presented in the problem in
order to solve the problem while finding a general approach that can
be applied to other similar problems.

Consider a painting. Paintings are complex. An


impressionistic painting, with its emphasis on how
paint is applied to the canvas, can be contrasted
against the smoothly detailed works of hyperrealist
artists. And yet, at a purely visual level, each work is
just an array of brush strokes arranged in a specific
order. As we look into a painting, we often ignore the
how each brush stroke was made but we try to see
how each brush stroke contributes to the visual
elements of a painting which then allows us to see its
bigger picture. This is abstraction in action. Try to see
how you might use abstraction to look at the painting
on the left. If you focus on a specific portion of the
painting, what can you make sense of it? If you look
Prepared by 2022 AIEP Team: Jayson Catindig and Anna Patricia Miravite
at the whole painting, what differences in perspective do you have of the painting?
When doing abstraction, it is necessary to exercise our analytical skills to determine
which among the given details could lead us into solving a problem and which of those
details would distract or not help in doing so. After being able to determine the
important details, we may be able to start dissecting the problem and observe any
patterns which would then lead us to generalizations. If these sound familiar, then you
are right to think that decomposition and pattern recognition is also needed when we are
doing abstraction!

Abstraction through Concept Mapping and Diagramming


Suppose we are trying to observe a lion. What are
some generalizations that we can make of the lion? We
may be able to say that, because a lion primarily eats
meat as its source of energy and nutrients, a lion can
be categorized as a carnivore. On the other hand, we
can say that a lion is a type of cat because of its feline-
like qualities. While a lion does not look the ordinary
cat that we see around our homes, we can ignore some
specific details of a lion and a cat and focus on the necessary features of both animals to
see their similarities to each other.
Let’s consider a more challenging concept. In the modern world, one of the rampant
problems is climate change which, simply put,
describes a long-term change in the average
weather patterns across the world. We can see
the effects of climate change through the higher
temperatures (global warming) and through the
more severe effects of natural disasters. In a
nutshell, climate change is a complex concept and
there are many things that we need to
understand to fully grasp its concept. Now, refer
to the concept map on the left. In this concept
map, we break down the concepts of climate
change into three major categories: evidence,
causes, and solutions. The evidence show how we
are experiencing climate change, causes tell us
the reasons why climate change occurred, and
solutions tell us how we might be able to solve
this complex problem. This is a perfect example of
abstraction wherein a concept map is used as a
Prepared by 2022 AIEP Team: Jayson Catindig and Anna Patricia Miravite
tool. While there are more specific details that are involved in the studies of climate
change, by breaking down the concept in this manner, we gain a sufficient understanding
of a complex concept. What’s nice about this is that using this structure (or pattern) can
be useful in understanding other concepts as well!
Abstraction in Programming
When programming, abstraction is one of the most widely used concepts. It is used to
simplify a complex piece of program or code and make it more intuitive. Look at the short
code on the right which has been applied with abstraction. We know right away that it
can be used to launch a rocket, although we have no information on the specifics of how
the rocket will be launched. Now, let us look at the code below to see what
launch_rocket does.

Here, we can see that launch_rocket starts with some introduction before the rocket is
actually launched. For our purposes, it is only important for us to know that this
launch_rocket program will have a timer countdown for 5 seconds before it actually
launches the rocket. Finally, as the rocket launches, something is gonna say, “And we’re
off!” to signal that the rocket is about to launch.

Prepared by 2022 AIEP Team: Jayson Catindig and Anna Patricia Miravite
Algorithms

In computational thinking, an algorithm refers to a step-by-step set of


instructions that allows one to solve a certain problem. This sequential
set of steps allows one to easily develop a solution to a problem that is
logical and more importantly, a solution that could apply to many other
problems of similar nature. As with any other aspects of computational
thinking, algorithms are also deeply integrated in our daily lives.

Consider the act of putting on one’s shoes. One person may do this process in the
following way: put on a sock on the left foot, put on a sock on the right foot, put on the
left shoe, and finally, put on the right shoe. Another person may, perhaps, do that act by
putting on a sock on the left foot then putting on the left shoe then proceed with the
right side. However, it would be absurd for one to place on shoes first before placing
socks!
From this example, we see that thinking algorithmically allows us to determine what the
necessary steps must be taken towards achieving a goal or solving a problem. Equally
important to this is knowing the correct sequence of steps as a wrong ordering of such
instructions may lead to an outcome that is not what we intended.

Since algorithms are closely tied to a logical


sequence of instructions, it may be beneficial for
us to express some algorithms as flow charts
which tell us how to proceed from one point of
the algorithm to another. Consider the example
on the left. It tells us how to correctly prepare a
pancake batter. In this case, we want the
pancake batter to be spreadable.
Algorithmic thinking has close ties to computer
science and mathematics, as algorithms are the
key to completing sequences of code or
chunking big problems into smaller, more solvable parts. They take advantage of
computers’ decision-making processes to do specific things at specific times. Instead of
saying that the answer is always “red,” an algorithm defines rules that lead to that
answer being a natural conclusion.
In some cases, there are already algorithms that are pre-established. Having these
algorithms are handy as they could allow us to solve many types of problems. One
established algorithm for sorting data is bubble sort. In this algorithm, we check first if
Prepared by 2022 AIEP Team: Jayson Catindig and Anna Patricia Miravite
the list of things that we want to sort is already sorted (who knows!). If not, we compare
the first two elements in the list, and if the first is greater than the second, swap them.
Then, we proceed with the second and third elements in the list and compare and swap
as needed. Repeat this with every pair of adjacent elements in the list. Then, repeat this
process until the list is fully sorted. Suppose we have a list of numbers that we want to
arrange in ascending order: 6 2 4 1. The bubble sort will result to the following:
6241 2641 since 6 > 2, we swap them
2641 2461 since 6 > 4, we swap them
2461 2416 since 6 > 1, we swap them
2416 2416 no swapping needed since 2 < 4
2416 2146 since 4 > 1, we swap them
2146 2146 no swapping needed since 4 < 6
2146 1246 since 2 > 1, we swap them; and we are done!
We have to keep in mind, though, that there are other algorithms which are not really
defined. For example, what’s the best way to get from point A to point B? The mental
map you envision might take different factors into account: construction, the fact that
you can’t get there too early, the fact that you need to drive by a specific store along the
way. These decisions factor into the “wayfinding” algorithm you create.

Prepared by 2022 AIEP Team: Jayson Catindig and Anna Patricia Miravite

You might also like