Decomposition Thinking
Computer Science: KS3, topic 1.1.2
Computational Thinking with Cupcakes
Decomposing is a method used in computational thinking. Decomposing breaks a complex task down into smaller tasks. We can use decomposing to break down the tasks involved in making cupcakes.

Decomposing
- Imagine telling your friends how to make cupcakes for a party.
- If you just said, ‘make the cupcakes’, your friends might be confused.
- Everybody would make the cupcakes differently.

Decomposing gives the steps
- There are different parts to making cupcakes:
- Make the batter.
- Make the icing.
- Bake the cakes.
- Add the toppings.
- Each of these tasks can be decomposed into logical steps.

Algorithms
- For each part of the cupcake task, there are many smaller steps.
- The steps must be clear and in the right order.
- The steps must be able to be followed to give the same result every time.
- The steps and rules that are followed are called an algorithm.
- Think of an algorithm like the steps in the recipe for the cupcakes.
Test yourself on Decomposition Thinking
What are you left with after decomposing a big task like making cupcakes?
If a recipe's steps are done in the wrong order, what is likely to happen to the cupcakes?
What is one way that decomposing a task is different from writing an algorithm for it?