# Problem Decomposition

> Computer Science · CIE A-Level 9618
> Source: https://www.owlsprep.com/study/cie-9618-u13-problem-decomposition/

Problem decomposition is the core first step in computational problem solving. This guide covers what decomposition is, its benefits, practical methods, and common mistakes to avoid for CIE 9618 exams.

**Prerequisites:** [Basic understanding of computational problem solving](https://www.owlsprep.com/study/cie-9618-u13-intro-computational-thinking/)

## Learning objectives

- Explain what problem decomposition is and its purpose in computational problem solving
- Decompose complex problems into manageable, independent sub-problems
- Compare functional and object-oriented decomposition methods for exam questions
- Avoid common pitfalls when answering decomposition questions in CIE 9618

## What is Problem Decomposition?

Problem decomposition (also called top-down decomposition or divide-and-conquer) is the foundational first step for solving any complex computational problem. It involves splitting a large, unmanageable problem into smaller, self-contained sub-problems.

**Problem Decomposition** — A core computational thinking technique that breaks a complex problem into smaller, independent sub-problems, each with a clear, specific goal.

*Example:* Decomposing a school attendance system into sub-problems for data entry, report generation, and user authentication.

Good decomposition delivers three key benefits for development: it reduces cognitive load by letting developers work on one small part at a time, enables parallel work for team projects, and simplifies testing by isolating errors to individual sub-problems.

**Worked example:** Decompose the problem of building a simple online coffee ordering app

1. First, list all core requirements of the app to identify natural divisions: users place orders, admins manage the menu, the system processes payments.
2. Split the problem into three independent top-level sub-problems: 1) User-facing order placement, 2) Admin menu management, 3) Payment processing.
3. Decompose each top-level sub-problem further. For example, user-facing order placement splits into: browse menu, select items, modify order, submit order.
4. Each final sub-problem is now small enough to design, code, and test independently before integrating all solutions.

## Common Decomposition Methods

In CIE 9618, you can use two standard decomposition methods depending on the problem type and programming approach you will use later.

**Comparing methods**

The two most widely used methods for exam problems are:

- **Functional Decomposition** — Split the problem based on the actions/functions the system needs to perform. Each sub-problem corresponds to one function.
  - Pros: Simple for small problems, aligns with procedural programming
  - Cons: Harder to scale and maintain for large systems

- **Object-Oriented Decomposition** — Split the problem based on core entities (objects) in the system. Each sub-problem covers the attributes and methods of one entity.
  - Pros: Aligns with OOP, easier to scale for large systems
  - Cons: Overkill for small, simple problems

**Worked example:** Decompose a student grade book using both methods

1. Functional decomposition: Split by required actions: add student grade, calculate average grade, generate grade report, search for student. Each action is a separate sub-problem.
2. Object-oriented decomposition (first level): Identify core entities: Student, GradeBook, Report. Each entity is a main sub-problem.
3. Object-oriented decomposition (second level): Split each entity by requirements. For Student: store ID/name, add grade, return grades. For GradeBook: store all students, search for student, calculate overall average.

> **tip**
>
> Always state which method you are using if the question does not specify, to make your approach clear to examiners.

## Exam Requirements for Decomposition Questions

To get full marks in CIE 9618 decomposition questions, your answer needs to match the expectations of the command term used.

**Exam command terms**

- **Decompose** — Split the problem into sub-problems and show the hierarchical structure *(Examiners expect at least two levels of decomposition for full marks)*

- **Explain benefits of decomposition** — Link benefits to the specific problem given in the question *(Do not just list generic benefits, explain why it helps for this problem)*

**Check your understanding**

Test your understanding of exam requirements:

1. Which of these is a characteristic of good decomposition?

   - All sub-problems are interdependent
   - Each sub-problem can be solved independently
   - Sub-problems are the same size as the original problem
   - Decomposition stops after one level

   *Answer:* Each sub-problem can be solved independently

   *Why:* Correct. Independent sub-problems are the core goal of decomposition, to simplify testing and development.

2. How many levels of decomposition should you show in an exam answer at minimum?

   - 1
   - 2
   - 5
   - Any number

   *Answer:* 2

   *Why:* Correct. CIE examiners expect at least two levels to show you can break problems down into manageable parts.

## Common pitfalls

- **Wrong:** Stopping decomposition after only one level, leaving large, complex sub-problems
  - Why it fails: Large sub-problems retain the same complexity as the original problem, defeating the purpose of decomposition
  - Correct: Decompose repeatedly until each final sub-problem is small enough to code as a single function or class
- **Wrong:** Creating overlapping sub-problems that share the same responsibilities
  - Why it fails: Overlap leads to duplicated code and makes debugging much harder when changes are needed
  - Correct: Ensure each sub-problem has one clear responsibility with no overlapping functionality
- **Wrong:** Starting decomposition before understanding all requirements of the original problem
  - Why it fails: If you do not know what the problem needs to do, your decomposition will miss key requirements
  - Correct: Always list all requirements of the original problem first before splitting into sub-problems
- **Wrong:** Mixing decomposition methods without a clear structure in exam answers
  - Why it fails: Unstructured mixed decomposition is hard for examiners to follow, leading to lost marks
  - Correct: Pick one method, stick to it, and explicitly state which method you are using

## Cheatsheet

| Key Principle | Exam Note |
| --- | --- |
| Split into small sub-problems | Decompose until each solves one clear task |
| Keep sub-problems independent | Minimise dependencies to simplify testing |
| Show at least 2 levels | Required for full marks in most decomposition questions |
| Pick the right method | Functional for procedural code, OO for OOP problems |

## What's next

Problem decomposition is the foundational first step of all computational problem solving, and the quality of your decomposition directly impacts how easy it is to design, code, and test your final solution. It is the starting point for all other core computational thinking techniques, including pattern recognition, abstraction, and algorithm design. For OOP-based problems, decomposition is also how you identify core classes and objects, making it a critical skill for object-oriented design questions. Mastering decomposition will make all subsequent programming and problem solving topics easier to learn and apply in exams.

- [Pattern Recognition](https://www.owlsprep.com/study/cie-9618-u13-pattern-recognition/)
- [Abstraction](https://www.owlsprep.com/study/cie-9618-u13-abstraction/)
- [Object-oriented problem solving](https://www.owlsprep.com/study/cie-9618-u13-object-oriented-problem-solving/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/cie-9618-u13-problem-decomposition/
