Skip to main content

A Level ยท Computer Science

Algorithm Design and Problem-Solving: A Level Computer Science

How to turn a problem into a solution a computer can follow: abstraction, decomposition and stepwise refinement, then algorithms written as structured English, flowcharts and 9618 pseudocode, checked with trace tables and test data.

  • Lesson
  • 5 quizzes
  • Worksheet PDF

A step-by-step lesson, 5 self-marking quizzes and a printable worksheet, all on Algorithm Design and Problem-Solving for A Level.

Algorithm Design and Problem-Solving: the short answer

Real problems are messy. A bus service has a colour, a driver, a timetable, seats, weather and passengers. To plan journeys, you need only some of that.

Learn it: the lesson

Algorithm Design and Problem-solving: Flowcharts and Pseudocode8 steps ยท one idea at a time ยท quick check at the endStart the lesson โ†’
What the lesson covers8 steps ยท tap to see
  1. 1Abstraction: keeping only what matters

    Real problems are messy. A bus service has a colour, a driver, a timetable, seats, weather and passengers.

    Learn this in the lesson โ†’
  2. 2Decomposition and pattern recognition

    Big problems are hard to hold in your head all at once.

    Learn this in the lesson โ†’
  3. 3What an algorithm is

    An algorithm is a solution to a problem, expressed as a sequence of defined steps.

    Learn this in the lesson โ†’
  4. 4Identifiers and the identifier table

    An algorithm works on data, and each piece of data is held in a named variable.

    Learn this in the lesson โ†’
  5. 5Input, process, output

    Most algorithms have the same three parts: Input: get the data (INPUT Minutes).

    Learn this in the lesson โ†’
  6. 6Sequence, selection and iteration

    Every algorithm, however large, is built from three constructs.

    Learn this in the lesson โ†’
  7. 7Flowcharts: symbols and drawing from pseudocode

    A flowchart shows the route through an algorithm as shapes joined by arrows.

    Learn this in the lesson โ†’
  8. 8Moving between structured English, flowchart and pseudocode

    The same algorithm, three ways.

    Learn this in the lesson โ†’
  9. Quick check: see what you remember

Algorithm Design and Problem-Solving: A Level Computer Science notes

Abstraction: keeping only what matters

Real problems are messy. A bus service has a colour, a driver, a timetable, seats, weather and passengers. To plan journeys, you need only some of that. Abstraction removes the unnecessary detail so that only the essential details remain. What you are left with is an abstract model.

The purpose of abstraction:

  • to make the problem easier to solve, because there is less to think about;
  • to make the solution reusable: the same route-planning algorithm works for any bus network, because it does not depend on colours or drivers;
  • to make the program smaller and faster, because it stores and processes only what it needs;
  • to let people work at the right level of detail: a passenger sees stops and times, an engineer sees engines.

To produce an abstract model, ask of every detail: does my solution need this to answer the question? If not, leave it out. The answer depends on the question: the driver's name is irrelevant to the route map and essential to the staff rota, so the same bus has two different models.

June 2024 Paper 21, Question 7(a)(i), asked for an advantage of applying abstraction to a fitness-club text-message module, and part (ii) asked for three items of information the module needs, with justification. The examiner report says many answers merely defined abstraction or were vague ("makes the problem easier") when the question wanted the advantage in this scenario ("makes the problem easier to solve, because only the member's phone number and interests are needed"). It also asks for items from the scenario: do not bring in new ones. For the text module, the useful items are the mobile number, the exercises the member is interested in and the stop-messages choice.

Key facts

  • Abstraction removes the unnecessary detail so that only the essential details remain.
  • Decomposition breaks a problem into smaller sub-problems, and those into smaller ones, until each is simple enough to solve on its own.
  • A structure chart shows the result.
  • Pattern recognition goes with it: while decomposing, look for sub-problems that follow the same pattern.
  • An algorithm is a solution to a problem, expressed as a sequence of defined steps.
  • Structured English: numbered plain-English steps using words like IF, REPEAT and UNTIL.

Algorithm Design and Problem-Solving MCQs with answers

Tap an answer to check it.

  1. What is abstraction?

    Answer: A. Removing unnecessary detail so that only what is needed to solve the problem is kept Abstraction hides unnecessary detail and keeps only the features needed to solve the problem.

  2. Which loop runs its body at least once, even if the condition is already true at the start?

    Answer: D. REPEAT ... UNTIL REPEAT ... UNTIL tests its condition after the body has run, so the body always executes at least once.

  3. A task is described as: input a name, check it is not empty, output a greeting. Which constructs does the pseudocode use?

    Answer: A. Sequence and selection The steps run in order (sequence) and the empty check is a decision (selection), with no repetition needed.

  4. An algorithm should find the average of marks and stop when -1 is entered. Which is the correct loop plan?

    Answer: D. Read a mark, WHILE it is not -1: add it, count it, read the next mark; then divide the total by the count Reading first, then looping while the mark is not -1, stops the sentinel being added or counted, so the average is correct.

More questions in the 5 quizzes below โ†“ ยท All A Level Computer Science MCQs with answers โ†’

Algorithm Design and Problem-Solving: common questions

What is meant by algorithm?

An algorithm is a solution to a problem, expressed as a sequence of defined steps. A cooking recipe is the everyday example: a fixed list of steps, in order, with exact amounts, that anyone can follow to get the same dish.

What is meant by identifier table?

An identifier table lists every identifier before the algorithm is written, with its data type and its purpose.

What is meant by Boolean expression?

Many steps in an algorithm are decisions, and a decision is a Boolean expression: a statement that is either TRUE or FALSE. Build it from comparisons (=, <>, <, >, <=, >=) joined by the logic operators AND, OR and NOT.

How can I practise Algorithm Design and Problem-Solving?

Try the questions on this page, then the 5 self-marking quizzes below, which explain every answer. The worksheet gives the same practice on paper, with an answer sheet.

Practise real quizzes on this topic: 5 quizzes

Each quiz marks itself the moment it is finished and explains every answer. Start easy and work up.

๐Ÿ–จ๏ธAlgorithm Design and Problem-solvingA printable A Level Computer Science 9618 worksheet on algorithm design: abstraction, decomposition, identifier tables, Cambridge 9618 pseudocode with sequence, selection and iteration, structured English, flowcharts, stepwise refinement, trace tables andโ€ฆSee the worksheet โ†’

โฌ‡ Download free PDFFree sample copy with a light QuizByt mark. A free account gives you more.