# 03 - Decomposition

1. What is decomposition?

The process of taking a problem and making it bigger

The process of breaking down multiple problems and combining them into one hugely complex problem

The process of breaking down a problem into smaller manageable parts

The process of breaking down a problem into more complex problems

2. Decomposition helps us solve complex problems and manage ____________

extremely simple small projects

the smallest of problems with only one tiny step

large projects

our daily emotional life

3. The process of making breakfast can be 'decomposed' into:

Making breakfast

Eating

making toast and making tea that can both be further decomposed

4. Decomposition gives us an overview of the problem and how to tackle it, e.g. for making breakfast ….

it is not possible to decompose the 'big problem' into smaller problems.

the process of decomposition makes it obvious that the task is far too complex for even ten people to attempt

only one person could make this breakfast and it would take a very long time to do so

two people could make this breakfast at the same time, one could make tea and one could make toast.

5. Decomposing problems into their smaller parts is not unique to computing: it’s pretty standard in engineering, design and project management.

FALSE

TRUE

6. Why is decomposition useful in the creation of a tablet?
```A tablet can be broken down (decomposed) into smaller components.
With thanks to iFixit.com```

It shows the immensity and difficulty of the single problem and encourages hard work

Different people can work on the different components and save time/test more accurately

It is not useful

It highlights the whole problem as a single entity and creates a sense of urgency

7. Which statement is most accurate (in reference to the below quiz modular diagram)

A quiz cannot be decomposed as it is not a problem in itself

A quiz is a problem that can be broken down into smaller problems, but this is not decomposition.

A quiz can be decomposed into its parts to help the programmer work on each part in turn.

A quiz cannot be broken down as it a single thing, and this diagram is therefore inaccurate

8. Why is it useful to use decomposition when dealing with a large problem?

All the options listed here are correct.

Easier to debug and manage smaller modules/problems

smaller parts of a problem are easier to solve/tackle / understand than the larger problem

Easier to delegate and assign different people to work on different parts of the problem

9. Read the following excerpt on top down programming (decomposiiton) and see if you think it is TRUE or FALSE
```Top down programming
==================================
In top-down programming, a programmer takes a task and
then breaks it down into smaller tasks. They then take
They continue to do this until each sub-task is simple enough
to understand and program and, ideally, each sub-task performs
only one job. The sub-tasks are then programmed as self-contained
modules of code```

TRUE

FALSE

10. Read this excerpt on reusability of modules and decide whether it is true or false
```Decomposition and re-usability of modules
==================================
Splitting up a problem into modules improves a company's efficiency because
self-contained modules can be re-used. They can be put into a library of
modules. When a module is needed to, for example, display some values,
you don't need to get the programmers
to write and test a module for this again.
You just re-use a module from the library. Over time, this will save a
company a lot of time and money.```

FALSE

TRUE

11. Which of the following statements is an ADVANTAGE of decomposition?
```The advantages of decomposition
==================================
#1 >> Splitting up a problem into modules helps get the job done more
efficiently because modules of code can be worked on at the same time by different
programmers. In addition, it helps because easier modules can be given to less
experienced programmers while the harder ones can be given to more experienced ones.

#2 >> Splitting up a problem into modules helps program testing because it is easier to
debug lots of smaller self-contained modules than one big program.

#3 >> Splitting up a problem into modules helps program readability because it is easier
to follow what is going on in smaller modules than a big program.

#4 >> Splitting up a problem into modules improves a company's efficiency because self-
contained modules can be re-used. They can be put into a library of modules.
When a module is needed to, for example, display some values, you don't need
to get the programmers to write and test a module for this again. You just re-use
a module from the library. Over time, this will save a company a lot of time and money.

#5 >> Splitting up a problem into modules improves a Project Manager's ability to monitor the
progress of a program. Modules can be 'ticked off the list' as they are done and this
will demonstrate some progress. This is far harder for a Project Manager to do if
the program has not been split up into modules.

#6 >> Splitting up a problem into modules is good for future program maintenance.
If a program needs to be changed for any reason, it may be possible simply to
remove one module of code and replace it with another.```

Just #1 and #3

#1 , #2 and #4

none of the above

All of the above

12. In programming, one way of decomposing a task is to break it into…..

binary sequences

modules (e.g. separate functions or suboutines)

python programming code variables

Decomposition cannot be used in programming

13. How would you decompose the task of creating an app?

The task of building an app can simply not be decomposed.

First know the answer to a series of smaller problems e.g. will it be android or iphone, what is the colour scheme, what language will you use?

By making the problem a single whole entity by using an overview diagram (to define a single task)

By finding other similar apps and copying their code

14. Dealing with many different stages all at once is much more difficult than breaking a problem down into a number of smaller problems and solving each one, one at a time.

FALSE

TRUE

15. Which of these is an example of decomposition?

Looking at different bicycles for similarities between them

None of the above

Watching a mechanic repair a bicycle

Finding out how a bicycle works by looking in detail at the different parts that make up the bicycle