Computer ScienceExam code: 0984

Problem Solving and Design

Algorithm Design and Problem Solving

Decomposition is the process of breaking a large, complex problem down into smaller, easier sub-problems.

A small problem is easier to design, code, test and debug than a big one. Once each sub-problem has been solved, the solutions are combined to solve the original problem.

Decomposition tree: a system broken into sub-system 1, sub-system 2 and sub-system 3, with sub-system 2 further split into sub-system 2.1 and sub-system 2.2
Source: Algorithm by Save My Exams

Why decomposition helps

  • Easier to think about: a small task is easier to plan than a huge one.
  • Easier to code: each sub-problem becomes a procedure or function (topic 24).
  • Easier to test: small chunks of code can be tested in isolation.
  • Easier to share: different programmers can work on different sub-problems in parallel.
  • Easier to debug: a bug in one sub-problem can be fixed without disturbing the others.

Quick check

3 short questions on this note. See what has stuck, and where to look if something hasn't.

About 1 minute

Build on this topic