Algorithm Decomposition

Decomposition is breaking a problem down into smaller, more manageable chunks. In programming, this means you will be breaking down an algorithm into smaller problems that can be solved on their own.

Computers find tasks that we may find very simple difficult, this is perhaps because what Screen Shot 2018-08-01 at 08.58.36.pngwe believe to be simple is actually us interacting with the world in a complex way. Take opening a door for instance. What steps would you need to complete in order to open the door in your room? Are there things in the way? Do you know where the door is? How do you get there? How does the door handle work? How do you make sure that the door doesn’t slam? You may not have to consider any of these things consciously because you have spent your whole life learning how to interact with the objects around you.

When decomposing a problem, you must learn how to think like a compter instead of a human. This means breaking down tasks into more managable sections. This has two benefits: firstly, they are easier to program and secondly, if they are small enough they can be reused to solve similar tasks.