2.1.1 Computational Thinking

In this lesson, you will learn about computational thinking, a problem-solving approach used by computer scientists and programmers. You will explore the three key principles of computational thinking (abstraction, decomposition, and algorithmic thinking) and see how they help solve complex problems by making them easier to understand and manage.

What is Computational Thinking?

Computers cannot think for themselves. They simply follow the instructions that programmers give them. Even though computers can solve very complicated problems, someone must first work out how those problems should be solved before writing the instructions for the computer.

Computational thinking is a way of approaching problems so they are easier to understand and solve. Rather than trying to solve a large problem all at once, computational thinking helps you break it into manageable parts and develop a logical solution.

The three key principles of computational thinking are:

  • Abstraction: Focusing only on the important information while ignoring unnecessary details.
  • Decomposition: Breaking a large problem into smaller, more manageable parts.
  • Algorithmic Thinking: Planning the logical sequence of steps needed to solve a problem.

These principles do not solve the problem automatically, but they provide a structured way of thinking that makes finding a solution much easier.

Abstraction

Abstraction is the process of simplifying a problem by focusing on the important information while ignoring unnecessary details. This allows you to create a simplified representation, known as a model, that is easier to understand and work with.

A good abstraction removes information that is not needed for the current task, while keeping everything that is essential; one of the best-known examples of abstraction is the London Underground map as seen in Figure 1 below.

Figure 1. This London Underground map is an example of abstraction, showing simplified connections between stations without reflecting their real-world distances or geography.

Instead of showing the exact geographical locations of stations, the true distances between them, or every road and landmark above ground, the map only shows the information passengers need to travel successfully: station names, the order of stations, line colours, and where passengers can change lines.

Figure 2. This simplified map of the Bakerloo line is another example of abstraction, showing clear station connections without representing real distances or geography.

By removing unnecessary geographical detail, the London Underground map becomes much easier to read and helps passengers plan journeys quickly without being distracted by information they do not need.

Decomposition

Decomposition is the process of breaking a large or complex problem into smaller, more manageable sub-problems. Each sub-problem can then be solved separately before combining the solutions together to solve the original problem.

Large problems can often seem difficult because there are many things happening at once. Decomposition makes them easier to understand, organise, and solve by allowing you to focus on one part at a time.

It is also useful when working in teams because different people can work on different parts of the same project at the same time.

A common approach to decomposition is:

  1. Clearly identify the problem.
  2. Break it into smaller sub-problems.
  3. Examine each sub-problem individually.
  4. Design a solution for each part.
  5. Refine each solution until it works efficiently.
  6. Combine the completed solutions to solve the overall problem.

During this process, programmers often use pattern recognition to identify similarities with problems they have solved before, and abstraction to ignore unnecessary information. They may also use diagrams, flowcharts, or pseudocode to help plan their solutions.

Algorithmic Thinking

Algorithmic thinking is the process of planning the logical sequence of steps needed to solve a problem. These step-by-step instructions are called algorithms. The aim is to create a solution that can be followed repeatedly to solve the same problem whenever it occurs. Many algorithms can also be adapted to solve similar problems.

Algorithmic thinking focuses on deciding what steps need to happen, the order they should happen in, and what decisions the computer needs to make along the way. For instance, when a user logs into a website, an algorithm might work like this:

  1. The user enters their username and password.
  2. The computer checks whether the details are correct.
  3. If they are correct, the user is signed in.
  4. Otherwise, an error message is displayed and the user is asked to try again.

This logical sequence allows the computer to perform the same task consistently every time.

Ready to finish?

Log in to save this lesson and earn rewards.