Decomposition
decompositionBreaking down a complex problem or system into smaller parts that are more manageable and easier to understand. involves breaking down a complex problem or system into smaller parts that are more manageable and easier to understand. The smaller parts can then be examined and solved, or designed, individually, as they are simpler to work with.
If a problem is not decomposed, it is much harder to solve. Dealing with a complex problem is much more difficult than breaking a problem down into a number of smaller problems and solving each one, one at a time. Smaller problems are easier to understand and can be examined in more detail.
For example, suppose that a crime has been committed. Solving a crime can be a very complex problem as there are many things to consider.
A police officer would need to know the answer to a series of smaller problems:
- what crime was committed
- when the crime was committed
- where the crime was committed
- what evidence there is
- if there were any witnesses
- if there have recently been any similar crimes
The complex problem of the committed crime has now been broken down into simpler problems that can be examined individually, in detail. Once the individual information has been gathered and collated, the police officer may be able to solve the crime.
Question
How might a programmer decompose the complex problem of how to create an app?
The problem might decompose into these simpler problems:
- what kind of app they want to create
- what the app will look like
- who the target audience for the app is
- what the graphics will look like
- what audio will be included
- what software they will use to build the app
- how the user will navigate the app
- how they will test the app
- where they will sell the app
These smaller problems, solved individually, will help the programmer to create an app.