# 03 - Decomposition

1. What is decomposition?

The process of breaking down a problem into more complex problems

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 taking a problem and making it bigger

2. Decomposition helps us solve complex problems and manage ____________.

the smallest of problems with only one tiny step

large projects

extremely simple small projects

our daily emotional life

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

eating

making breakfast

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 ….

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

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

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

TRUE

FALSE

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

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

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

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

It is not useful

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

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

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

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

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

All of these options

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

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

Easier to debug and manage smaller modules/problems

9. Read the following excerpt on top down programming (decomposition) 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
programmed as self-contained modules of code.```

False

True

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.```

True

False

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.```

All of the above

Just #1 and #3

#1, #2 and #4

None of the above

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

python programming code variables

N/A - decomposition cannot be used in programming

binary sequences

modules (e.g. separate functions or subroutines)

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

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

The task of building an app can simply not be decomposed

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.

TRUE

FALSE

15. Which of these is an example of decomposition?

None of the above

Watching a mechanic repair a bicycle

Looking at different bicycles for similarities between them

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