When analysing a problem, we always need to think about three things:
the INPUTS,
the PROCESS,
the OUTPUTS.
An algorithm is the joining of these three structures into a working solution. An algorithm is a robust set of instructions that when executed for different INPUTS will deliver meaningful OUTPUTS.
For further understanding of algorithms do review some of the following:
Algorithms - The Secret Rules of Modern Living Algorithms - BBC documentary (18mns)
Algorithms - The Secret Rules of Modern Living Algorithms - BBC Documentary. (58 mins)
In understanding the PROCESS, we shall be using some or all of the following:
Sequence Structure: this might be a single or multiple step process such as INPUT a value or SET a variable to a value. A sequence structure will be part of the following.
Decision Structure: This occurs where there are two possible outcomes and each one depends upon a given condition. Each outcome will involve the running of a sequence structure. This is described by statements such as IF ENDIF or IF ELSE ENDIF
Iteration/Repetition Structure: involves the execution (or not) of a sequence structure for a prescribed number of iterations. This is described by statements such REPEAT.
The words in capital letters above are taken from a small set of English words that help us to describe problem in what is called Structure English. Structure English uses key words that are often found in our coding languages.
We use Structure English to give a logical structure to solving our problem. This is what we call an algorithm and from such structures we can easily produce code in our programming language of choice (OUBuild in our case).
We have shown how structure English can be used in problem solving (sometimes called Algorithmic Thinking) through our design tutorials but here are some further points of reference: