Designing, creating and refining algorithms - OCRAlgorithm production

Algorithms are step-by-step plans for solving problems. Algorithms can be designed using pseudocode and flow diagrams.

Part ofComputer ScienceComputational thinking, algorithms and programming

Algorithm production

An is a logical, step-by-step process for solving a problem. Algorithm production is part of algorithmic thinking, an important concept in computational thinking. This focuses on how a desired solution can be reached by identifying the steps needed to get there. You can read more about this in the computational thinking guide.

Algorithms are normally written as one of the following:

  • a

An algorithm should be seen as a starting point before writing a . The finished program should follow the steps the algorithm describes.

Before an algorithm can be designed, it is important to check that the problem is completely . The decomposed problem should consider:

  • What are the into the problem?
  • What will be the of the problem?
  • In what order do need to be carried out?
  • What decisions need to be made in the problem?
  • Are any areas of the problem repeated?

Only when a problem is properly decomposed and understood can an algorithm design begin.

Structure diagrams

Structure diagrams are a visual way of breaking down a problem into smaller parts. They show how a problem is organised by dividing it into components and are frequently used when designing systems. Each box on the diagram represents a separate part with lines showing how each one connects or depends upon the other. For example, a school website structure diagram may include:

  • Home page
  • Student zone
  • Teacher zone
  • Parental zone
  • Contact page
  • About us

Each section will then have sub-sections, such as timetable, newsletters, term dates, etc.

AdvantagesDisadvantages
They are a planning tool before coding.They can take a lot of time to create.
They are a visual way of breaking a big problem into smaller parts.The diagrams require updating if the system changes.
It is easier to assign tasks when working in a team.They can be open to interpretation if there isn’t clear labelling.
They can assist with spotting errors or missing parts early on in the design process.They can be confusing to follow, if made overly detailed.
They serve as a tool to explain the system to others.
AdvantagesThey are a planning tool before coding.
DisadvantagesThey can take a lot of time to create.
AdvantagesThey are a visual way of breaking a big problem into smaller parts.
DisadvantagesThe diagrams require updating if the system changes.
AdvantagesIt is easier to assign tasks when working in a team.
DisadvantagesThey can be open to interpretation if there isn’t clear labelling.
AdvantagesThey can assist with spotting errors or missing parts early on in the design process.
DisadvantagesThey can be confusing to follow, if made overly detailed.
AdvantagesThey serve as a tool to explain the system to others.
Disadvantages