Skip to main content
Chapter 4 of 9
~18 min read
Last reviewed July 17, 2026

Thinking Computationally

Discover decomposition, pattern recognition, abstraction, and algorithm design, and learn to plan out solutions using flowcharts and pseudocode.

Written and reviewed by the IK Learning team

  • Decomposition & Recognizing Patterns
  • Abstraction & Designing Algorithms
  • Flowcharts & Their Symbols
  • Writing Pseudocode
  • Principles of Problem-Solving

This chapter introduces computational thinking through its four core skills — decomposition, pattern recognition, abstraction, and algorithm design — and shows how to plan solutions using flowcharts and pseudocode before writing any code. It builds the problem-solving foundation needed for programming in later chapters.

Chapter Introduction

What this chapter is about, and why it matters

Computational thinking is a way of approaching problems, not a programming language. That is why this chapter comes before you write any real code: a programmer who cannot break a problem down will write bad code quickly, which is worse than writing no code slowly.

The four skills — decomposition, pattern recognition, abstraction and algorithm design — sound abstract until you apply them to something ordinary. Planning a birthday party uses all four. So does organising a cricket tournament. The chapter is teaching a habit you already half-possess, and giving the parts names so you can use them deliberately.

The examinable output of this chapter is usually a flowchart or a piece of pseudocode. Both are marked on precision, so treat the symbols and the layout as strictly as you would treat spelling in an English exam.

What You Will Learn

The skills this chapter is assessed on

  • Define decomposition, pattern recognition, abstraction and algorithm design, and give an example of each.
  • Write a clear algorithm as a numbered sequence of unambiguous steps.
  • Draw a flowchart using the correct standard symbols.
  • Write pseudocode for a problem involving a decision and a loop.
  • Explain why planning a solution before coding reduces errors.

Key Concepts Explained

7 core ideas — each with its definition and a separate worked example

Computational thinking

Definition

Computational thinking is a problem-solving approach that expresses a problem in a way that a computer — or a person following precise instructions — can solve it.

Example

Finding a name in a printed phone book by repeatedly opening the middle and discarding half the pages is computational thinking. You did not write code, but you followed a precise, repeatable, efficient procedure — which is exactly what an algorithm is.

Decomposition

Definition

Decomposition is the process of breaking a large, complex problem into smaller sub-problems that can each be understood and solved separately.

Example

Building a school website is overwhelming as one task. Decomposed, it becomes: design the layout, write the home page, build the contact form, create the timetable page, test on mobile. Each piece is now something you could start this afternoon.

Detailed Explanation

Decomposition also makes teamwork possible. Five people cannot write one paragraph together, but they can each take one sub-problem. This is exactly how real software is built.

Pattern recognition

Definition

Pattern recognition is the process of identifying similarities, repetitions or shared characteristics between problems or within data, so that one solution can be reused.

Example

While building that website you notice every page needs the same header and footer. That is a pattern — so you write the header once and reuse it on all pages, instead of writing it eight times and having to fix eight copies when the school name changes.

Abstraction

Definition

Abstraction is the process of removing unnecessary detail so that only the information essential to solving the problem remains.

Example

A metro map is an abstraction. It shows which stations connect to which lines, and deliberately shows the distances and street layout wrongly — because for the problem "how do I get from A to B?" those details are noise. A geographically accurate map would be harder to use.

Detailed Explanation

Abstraction is judged by usefulness, not accuracy. The right question is never "what did I leave out?" but "does what remains still solve the problem?" Students often confuse abstraction with decomposition: decomposition splits a problem into parts, abstraction throws away detail within a part.

Algorithm

Definition

An algorithm is a finite sequence of clear, unambiguous, step-by-step instructions that solves a problem or completes a task.

Example

An algorithm to find the largest of three numbers:

1. Read the three numbers A, B and C
2. Set LARGEST = A
3. If B > LARGEST then set LARGEST = B
4. If C > LARGEST then set LARGEST = C
5. Display LARGEST
6. Stop

Detailed Explanation

Three properties make it an algorithm rather than a vague plan: every step is unambiguous, the steps run in a definite order, and it is guaranteed to stop. "Cook the rice until it looks right" fails the first test and is not an algorithm.

Flowchart

Definition

A flowchart is a diagram that represents an algorithm using standard symbols connected by arrows that show the order in which steps are carried out.

Example

A flowchart deciding whether a student passed would use an oval for Start, a parallelogram to input the marks, a diamond for the decision "marks ≥ 40?", two rectangles for the "Pass" and "Fail" outputs, and an oval for Stop.

Detailed Explanation

The diamond is the only symbol with more than one exit arrow, and every exit must be labelled Yes/No or True/False. Unlabelled branches are the most frequently deducted mark in flowchart questions.

Pseudocode

Definition

Pseudocode is a way of describing an algorithm using structured, English-like statements that follow programming logic without obeying the exact syntax of any programming language.

Example

Pseudocode to print the numbers 1 to 10:

BEGIN
  SET counter = 1
  WHILE counter <= 10 DO
    OUTPUT counter
    SET counter = counter + 1
  ENDWHILE
END

Detailed Explanation

Pseudocode exists so you can think about logic without fighting a language's punctuation. It also communicates: a Python programmer and a C++ programmer can both read the block above and implement it in their own language.

Step-by-Step Worked Examples

How to lay the answer out so method marks are earned

Designing an algorithm to check if a number is even

Question: Design an algorithm that reads a number and displays whether it is even or odd, then express it in pseudocode.

  1. Identify the input: a single whole number, N.
  2. Identify the output: the word "Even" or the word "Odd".
  3. Identify the rule that separates the two cases: a number is even if the remainder when divided by 2 is zero.
  4. Express the rule as a decision, because there are exactly two outcomes.
  5. Write the steps in order, making sure both branches end at Stop.

Answer

BEGIN → INPUT N → IF N MOD 2 = 0 THEN OUTPUT "Even" ELSE OUTPUT "Odd" ENDIF → END. Note that identifying the input and output *before* writing any steps is what makes the algorithm come out right first time.

Where This Is Used in Real Life

The same ideas, outside the syllabus

Decomposition in exam preparation

"Revise Computer Science" is a task nobody can start. "Revise chapter 4 key concepts, then attempt ten MCQs, then write one long answer" is three tasks you can begin immediately. The same skill that structures a program structures a study plan.

Abstraction in map applications

When a navigation app shows a route, it hides road width, surface quality and building heights. It keeps turns, distances and traffic — the only details relevant to the question being asked. Change the question to "where can I park?" and a different set of details becomes essential.

Pattern recognition in code reuse

Professional programmers rarely write something twice. When two pieces of code look similar, that similarity is a pattern, and turning it into one reusable function halves the amount of code that can ever contain a bug.

Common Mistakes to Avoid

Errors that cost marks in this chapter, and the correction for each

Mistake

Confusing decomposition with abstraction.

Correct Approach

Decomposition splits one big problem into smaller problems. Abstraction removes unnecessary detail from a problem. One is about size, the other is about detail.

Mistake

Using a rectangle for a decision in a flowchart.

Correct Approach

Decisions must use a diamond, and every branch leaving it must be labelled Yes/No. Using the wrong symbol loses the mark even if the logic is correct.

Mistake

Writing a flowchart with no Start or Stop.

Correct Approach

Every flowchart begins and ends with an oval (terminator). It is a single mark, it is guaranteed to be examined, and it is the easiest one on the paper to lose.

Mistake

Writing real Python or C++ syntax when asked for pseudocode.

Correct Approach

Pseudocode should be language-neutral. Use INPUT, OUTPUT, IF/ENDIF, WHILE/ENDWHILE — not print() or cout.

Mistake

Writing an algorithm with steps that could be interpreted two ways.

Correct Approach

Every step must have exactly one meaning. "Check the number" is not a step; "IF N > 100 THEN" is.

Mistake

Forgetting to update the counter inside a loop.

Correct Approach

A WHILE loop whose condition never changes runs forever. Make the line that moves the loop towards its ending condition visible in your pseudocode.

Exam Preparation Tips

Technique specific to this chapter

  • Before writing any algorithm, write down the inputs and the expected output. This one habit prevents most logic errors.
  • Memorise the four flowchart symbols by shape and purpose: oval = start/stop, parallelogram = input/output, rectangle = process, diamond = decision.
  • Trace your own algorithm with a real value before moving on. Running "N = 7" through an even/odd algorithm takes ten seconds and catches reversed conditions.
  • Indent pseudocode inside loops and IF blocks. Markers use the indentation to follow your logic, and unindented pseudocode reads as one confused block.
  • When asked to "design an algorithm", numbered steps are safer than a paragraph — the numbering itself demonstrates sequence.

Quick Revision Summary

The whole chapter in one screen — read this the night before

  • Four skills: decomposition, pattern recognition, abstraction, algorithm design.
  • Decomposition = break a big problem into smaller ones.
  • Pattern recognition = spot similarities so a solution can be reused.
  • Abstraction = remove detail that does not matter for this problem.
  • An algorithm is finite, ordered and unambiguous.
  • Flowchart symbols: oval start/stop, parallelogram input/output, rectangle process, diamond decision.
  • Only the diamond has more than one exit, and every exit must be labelled.
  • Pseudocode = structured English, no language-specific syntax.
  • Plan first, then code — errors caught on paper cost nothing to fix.

Glossary of Terms

Words used in this chapter, defined plainly

Sub-problem
A smaller, self-contained part of a larger problem.
Terminator
The oval flowchart symbol marking the start or end of a process.
Iteration
Repeating a set of steps; a loop.
Selection
Choosing between alternative paths based on a condition.
Sequence
Steps carried out one after another in a fixed order.
Trace table
A table recording how each variable changes as an algorithm runs.

Practice Questions

Now test yourself on the concepts above. Collapse the answers to make it a real practice run.

Multiple Choice Questions with Explanations

10 MCQs — pick an option to check yourself, then read why the answer is right

1Which of the following best defines computational thinking?

Correct answer: BA problem-solving approach that uses systematic, algorithmic, and logical thinking

Computational thinking is a systematic, algorithmic, and logical problem-solving approach.

2Why does problem decomposition matter in computational thinking?

Correct answer: AIt simplifies problems by breaking them down into smaller, more manageable parts

Decomposition breaks a complex problem into smaller, easier-to-solve parts.

3Pattern recognition involves:

Correct answer: AFinding and using similarities within problems

Pattern recognition means spotting similarities, trends, or patterns within problems or data.

4Which term refers to setting aside details to focus on the main idea?

Correct answer: CAbstraction

Abstraction focuses on relevant information while setting aside unnecessary details.

5Which of the following is a principle of computational thinking?

Correct answer: BProblem simplification

Problem simplification — breaking a problem into smaller sub-problems — is a core principle of computational thinking.

6Algorithms are:

Correct answer: CStep-by-step instructions for solving a problem

An algorithm is a precise, step-by-step set of instructions for solving a problem.

7Which of the following is the first step in problem-solving according to computational thinking?

Correct answer: BUnderstanding the problem

Understanding the problem — pinpointing the core issue and requirements — is always the first step.

8Flowcharts are used to:

Correct answer: BRepresent algorithms graphically

Flowcharts visually represent the steps and logic of an algorithm using symbols and arrows.

9Pseudocode is:

Correct answer: BA high-level description of an algorithm using plain language

Pseudocode describes an algorithm in simple, readable language rather than actual code.

10Dry running a flowchart involves:

Correct answer: BTesting the flowchart with sample data

Dry running means manually tracing through a flowchart with sample data to check its logic.

Short Questions with Answers

8 short-answer questions

Computational thinking is a problem-solving process that uses skills such as decomposition, pattern recognition, abstraction, and algorithms to work through complex problems in a way a computer can execute.
Decomposition is the process of breaking a complex problem down into smaller, more manageable parts. Example: Building a birdhouse can be decomposed into designing, gathering materials, cutting wood, assembling, painting, and installing.
Abstraction means hiding complex details and focusing only on the necessary parts of a problem. Example: Making tea can be abstracted as: boil water → add tea → wait → pour into cup → add milk/sugar.
An algorithm is a step-by-step set of instructions for solving a problem or completing a task. Example: Planting a tree involves choosing a spot, digging a hole, placing the tree, filling soil, watering, and adding mulch.
Understanding a problem helps pinpoint the core issue, requirements, and objectives, which makes it possible to develop more accurate and effective solutions.
Flowcharts are used to visually represent the steps in a process, making it easier to understand, communicate, document, and spot problems or bottlenecks.
Pseudocode is used to represent an algorithm in simple, readable language. It clarifies the logic, helps plan out steps, and makes it easy to communicate ideas before coding.
- Flowcharts: Use symbols and arrows, read visually, show the process and decisions at a glance, good for grasping the overall flow. - Pseudocode: Uses plain text, read sequentially like a story, a detailed narrative, useful for coding logic.

Long Questions with Detailed Answers

5 in-depth answers

Computational Thinking (CT) is a systematic problem-solving approach that applies concepts and methods from computer science to tackle complex problems. It involves a set of key skills and techniques that help break down difficult problems, spot patterns, focus on important details, and develop step-by-step solutions. The four core components of computational thinking are: - Decomposition: Breaking a complex problem into smaller, more manageable parts. - Pattern Recognition: Spotting similarities, trends, or patterns within problems or data. - Abstraction: Focusing on relevant information while setting aside unnecessary details. - Algorithm Design: Creating precise, step-by-step instructions to solve a problem. Significance in Modern Problem-Solving - Simplifies Complex Problems: CT lets individuals break large, complicated tasks into smaller, solvable components. Example: building a website can be decomposed into designing, coding, testing, and deploying. - Enhances Logical Thinking: By using algorithms and step-by-step reasoning, CT encourages logical thinking and precision, keeping solutions clear, structured, and effective. - Encourages Reusable Solutions: Pattern recognition helps identify solutions that can be reused in similar problems, boosting efficiency. - Bridges Real-World and Digital Solutions: CT isn't limited to programming — it can be applied in science, mathematics, business, and everyday tasks. - Supports Innovation and Creativity: By abstracting unnecessary details and focusing on the core problem, CT lets problem-solvers experiment with creative solutions. - Improves Communication and Collaboration: Using tools like pseudocode and flowcharts, CT enables clear documentation and communication of solutions. Example in Practice: Building a birdhouse can be broken into steps such as designing, gathering materials, cutting, assembling, painting, and installing. CT helps organize and carry out each step efficiently.
- Flowcharts (Graphical) Flowcharts are visual representations of the steps in a process or system, drawn using different symbols connected by arrows. They are widely used across fields, including computer science, engineering, and business, to model processes, design systems, and communicate complex workflows clearly and effectively. - Flowchart Symbols (Pictorial) - Oval (Terminal): Represents the start or end of a process. Often labeled "Start" or "End." - Rectangle (Process): Represents a process, task, or operation that needs to be carried out. - Parallelogram (Input/Output): Represents data input or output (e.g., reading input from a user or displaying output on a screen). - Diamond (Decision): Represents a decision point in the process where the flow can branch based on a yes/no question or true/false condition. - Arrow (Flowline): Shows the direction of flow within the flowchart, connecting the symbols to indicate the sequence of steps. - Importance of Flowcharts - Clarity: Flowcharts provide a clear, concise way to represent processes, making them easier to grasp at a glance. - Communication: They are excellent tools for communicating complex processes to a wide audience, making sure everyone shares a common understanding. - Problem Solving: Flowcharts help spot bottlenecks and inefficiencies in a process, aiding in problem-solving and optimization. - Documentation: They serve as essential documentation for systems and processes, which is useful for training and reference purposes.
Pattern recognition is the process of finding similarities, trends, or repeated elements in problems or data. It is an important skill in computational thinking because it helps simplify complex problems. How It Helps in Problem-Solving - Makes Problems Easier to Solve: By noticing repeated patterns, we can predict what will happen next and avoid solving the same problem multiple times. - Helps Reuse Solutions: Patterns let us apply a solution from one problem to similar problems, saving time and effort. - Supports Logical Thinking: Recognizing patterns helps organize information and reveal relationships between different parts of a problem. Example: When calculating the area of squares: - Side 1 → Area 1² = 1 - Side 2 → Area 2² = 4 - Side 3 → Area 3² = 9 We notice that the areas follow a pattern of adding consecutive odd numbers (1 + 3 + 5 …). Recognizing this pattern makes it easier to calculate the area of larger squares without repeated calculations.
- Problem Understanding: Understanding a problem involves pinpointing the core issue, defining the requirements, and setting the objectives. This is the first and most important step in problem-solving, especially in computational thinking. It involves thoroughly analyzing the problem to identify its key components and requirements before attempting to find a solution. - Problem Simplification: Simplifying a problem involves breaking it down into smaller, more manageable sub-problems. Example: To design a website, break the tasks down into designing the layout, creating content, and coding the functionality. - Solution Selection and Design: Choosing the best solution involves evaluating different approaches and picking the most efficient one. Designing the solution requires creating a detailed plan or algorithm.
LARP stands for Logic of Algorithms for Resolution of Problems. It is a fun, interactive way to learn how algorithms work by running them and watching the results unfold step by step. Importance in Learning and Practicing Algorithms - Understand How Algorithms Work: LARP helps students see how each step of an algorithm is carried out. - Experiment with Different Inputs: Students can test how changes in input affect the output, helping them understand the behavior of algorithms. - Practice Writing Algorithms: It gives hands-on experience creating and improving algorithms using commands like START, READ, WRITE, IF…THEN…ELSE, END. - Develop Logical Thinking: Using LARP teaches step-by-step problem solving and clear logical reasoning. - Safe Learning Environment: Students can test their algorithms without worrying about real-life consequences, turning mistakes into a learning opportunity. Example: A simple LARP program can check if a number is even or odd: START → READ number → IF number % 2 == 0 THEN WRITE "Even" ELSE WRITE "Odd" → END

Important Questions for Revision

5 high-priority questions

Computational thinking is a systematic problem-solving approach using computer science concepts. Its four components are Decomposition, Pattern Recognition, Abstraction, and Algorithm Design.
Decomposition means breaking a complex problem into smaller, manageable parts — e.g., building a birdhouse can be decomposed into designing, gathering materials, cutting, assembling, painting, and installing.
An algorithm is a step-by-step set of instructions for solving a problem or completing a task.
A flowchart uses symbols and arrows to visually represent a process; pseudocode uses plain, story-like text to describe the logic of an algorithm.
LARP (Logic of Algorithms for Resolution of Problems) is an interactive way to run algorithms step by step, helping students understand how algorithms work and practice writing them safely.

Frequently Asked Questions

6 quick answers to common questions about this chapter

A flowchart shows an algorithm visually using shapes and arrows, which makes the overall flow easy to see at a glance. Pseudocode describes the same algorithm using plain, structured sentences instead of symbols, which makes it easier to translate directly into real programming code later.
Large problems can feel overwhelming to tackle all at once. Decomposition breaks them into smaller, self-contained pieces that are each easier to understand and solve individually — similar to how you'd tackle a big school project by breaking it into daily tasks.
When you use a TV remote, you press "power" without needing to know the electronics inside. That's abstraction — hiding unnecessary complexity so you only deal with the parts you actually need, which is exactly the same idea used when designing algorithms.
No — that's a common misconception. Computational thinking skills like decomposition, pattern recognition, abstraction, and algorithm design apply to planning a school event, cooking a recipe, or organizing a study schedule, which is why this chapter frames it as a general problem-solving approach, not just a coding technique.
Dry-running means manually tracing through the flowchart step by step with sample values to check the logic works correctly. Catching a logic mistake on paper is much faster and cheaper than discovering it after the algorithm has already been coded and tested.
Yes. Decomposition, pattern recognition, abstraction, algorithm design, flowcharts, and pseudocode are core topics tested through MCQs, short questions, and long questions in Class 9 exams.

Chapter Test

10 questions with the answers hidden — check what you actually remember

You have just read the explanations above. This checks whether they stuck. The answers stay hidden until you finish, so it is closer to exam conditions than scrolling through the notes again.

  • 10 questions, one at a time — no time limit.
  • You can move back and change an answer before submitting.
  • Afterwards you get your score, every explanation, and what to re-read.

Your score is saved in this browser only. No account, nothing sent anywhere.