AS Level · Further Decision Mathematics 1 WDM11

Algorithms

Revise Algorithms for Further Decision Mathematics 1 WDM11 (AS Level) — revision notes and instant AI marking.

📖 Revision notes · preview

Summary — What This Chapter Is Really About

  • An algorithm is a set of precise instructions that, if followed exactly, solves a problem. It can be written as text, pseudocode, or a flow chart.
  • "Robot mode" is the golden rule of this whole chapter: never take a shortcut just because you can "see" the answer. Follow every instruction, in order, exactly as a machine would.
  • Order (complexity) of an algorithm tells you how the number of steps grows as the amount of input data grows — linear, quadratic, cubic, and so on.
  • Bubble sort repeatedly compares neighbouring pairs and swaps them if they're the wrong way round, "bubbling" the largest value to the end of the list each pass.
  • Quick sort picks a middle "pivot" value and splits the list into a sub-list of smaller values and a sub-list of bigger values, then repeats on each sub-list.
  • Bin packing algorithms (first-fit, first-fit decreasing, full-bin) try to pack objects into as few equal-sized bins as possible — never guaranteed to be perfect, just "good enough."
  • The lower bound for bin packing tells you the theoretical minimum number of bins you could ever need — your algorithm's answer should be compared against it.

1. General Algorithms

What is an algorithm?

Think about a recipe for baking a cake. It doesn't say "make a cake" and leave you to figure it out — it tells you exactly what to do, in exactly what order: crack two eggs, add 200g of flour, mix for 3 minutes, bake at 180°C for 25 minutes. That's an algorithm. It's a set of precise instructions that, if you follow them strictly, will always lead to the solution to a problem.

Algorithms matter hugely for computers because computers can't "use their initiative" — they can only follow instructions exactly. A robot vacuum cleaner follows an algorithm to decide where to go next. A satnav follows an algorithm to find your route. Even you, cooking dinner or building flat-pack furniture, are following an algorithm.

How can an algorithm be presented?

  • Written instructions — a numbered list of steps in plain words.
  • Pseudocode — a mixture of everyday words and very basic code-like commands (Let, If, While, Input, Output). You don't need to know a real programming language to read it.
  • Flow charts — a diagram using shapes to show the order of steps, especially useful when there are decisions or repeated loops.
Flow chart shapes
ShapeMeaningAlternative name
OvalStart or EndTermination
RectangleAn instruction—
DiamondA question (yes/no branch)Decision box

Note: the word "print" is sometimes used instead of "output" for the final result.

Stay in "Robot Mode"
Exam questions usually use small lists, so it's tempting to just "see" the answer using common sense. Don't. You get marks for showing that you followed the algorithm's exact steps — not for getting the right final number. Write down every value the algorithm tells you to, and state the output separately at the end, even if it feels obvious.

Optimal vs. sufficient solutions

optimal good enough speed/efficiency accuracy

Worked Example — Following a Flow Chart

An algorithm (shown as a flow chart) inputs a number n, then repeatedly tests values of k and p = k² to check whether n is a square number.

For n = 23:

nkpIs p > n?Is p = n?
2311NONO
24NONO
39NONO
4 16 NO
5
🔓 Read the full Algorithms note → You're seeing the preview · sign in to read it all
Also in the full note
  • 2. Order (Complexity) of an Algorithm
  • 3. Sorting Algorithms
  • 4. Bin Packing Algorithms
  • What to Memorise
  • Concepts Checklist
  • Exam Tips & Common Mistakes
  • Using order to estimate completion time
  • 3.1 Bubble Sort
What's inside
📖 Revision notes 🎯 Learn mode ✦ AI flashcards ✓ Instant AI marking 🧊 3D explorers 🧪 Experiments & simulations 📈 Progress tracking
📄 Practise Algorithms with Further Decision Mathematics 1 WDM11 past papers Every paper with its mark scheme — answer online, marked instantly. Open →

Read the full Algorithms notes free

That's the preview — create a free account to read the rest, plus flashcards and practice questions with instant AI marking. No credit card.

Unlock the full notes free →

More Further Decision Mathematics 1 topics