Full Marks

A-level Further Maths Year 12 · Topic 8

Decision mathematics

Decision maths is about finding the best way to do something.

We will run algorithms, use graphs and networks, and find minimum spanning trees and shortest paths.

Then we solve route inspection, linear programming and critical path problems.

In this topic

  1. 8.1Algorithms: sorting, bin packing and order of an algorithmFree below · 15 questions
  2. 8.2Graphs and networks: minimum spanning trees with Kruskal's and Prim's algorithmsOpen in Full Marks · 15 questions
  3. 8.3Shortest paths with Dijkstra's algorithm and route inspectionOpen in Full Marks · 11 questions
  4. 8.4Linear programming: formulating problems and the graphical methodOpen in Full Marks · 15 questions
  5. 8.5Critical path analysis: activity networks, floats and Gantt chartsOpen in Full Marks · 18 questions

8.1 · Free notes

Algorithms: sorting, bin packing and order of an algorithm

Key points

In more detail

Practice

Algorithms: sorting, bin packing and order of an algorithm: 10 questions

Pick an answer to check it, or open the answer for the explanation.

1. After one pass of bubble sort (ascending), where is the largest number?

  1. At the end of the list
  2. At the start
  3. In the middle
  4. It has not moved
Show answer

A: At the end of the list. It bubbles to the end.

2. What does quick sort use to divide the list?

  1. A bin
  2. A spanning tree
  3. A pivot
  4. A critical path
Show answer

C: A pivot. Items are split around the pivot.

3. Items of size 4, 7, 3, 6, 5 are packed into bins of size 10. What is the lower bound for the number of bins?

  1. 2
  2. 3
  3. 4
  4. 5
Show answer

B: 3. 25/10 = 2.5, round up to 3.

4. Which bin packing algorithm sorts items into decreasing order first?

  1. First-fit
  2. Full-bin
  3. Bubble sort
  4. First-fit decreasing
Show answer

D: First-fit decreasing. Largest items first.

5. An algorithm is O(n²). If n goes from 100 to 300, how much longer does it take?

  1. About 9 times
  2. About 3 times
  3. About 6 times
  4. The same
Show answer

A: About 9 times. (300/100)² = 9.

6. Using first-fit on 4, 7, 3, 6, 5 (bins of 10), how many bins are used?

  1. 3
  2. 2
  3. 4
  4. 5
Show answer

C: 4. 4 → B1; 7 → B2; 3 → B1 (7); 6 → B3; 5 does not fit B1 (7), B2 (7) or B3 (6), so it needs B4.

7. What is the order of bubble sort?

  1. Linear, O(n)
  2. Quadratic, O(n²)
  3. Cubic, O(n³)
  4. Constant
Show answer

B: Quadratic, O(n²). About n²/2 comparisons.

8. What is a trace table used for?

  1. Drawing graphs
  2. Packing bins
  3. Finding critical paths
  4. Recording the values of variables at each step of an algorithm
Show answer

D: Recording the values of variables at each step of an algorithm. It shows how the algorithm runs.

9. Why is first-fit decreasing usually better than first-fit?

  1. Large items are placed first, leaving small ones to fill gaps
  2. It is faster
  3. It always gives the optimal answer
  4. It needs no sorting
Show answer

A: Large items are placed first, leaving small ones to fill gaps. Better packing, though not always optimal.

10. What makes an algorithm different from a vague set of instructions?

  1. It is written in English
  2. It is long
  3. It is finite and precise
  4. It uses numbers
Show answer

C: It is finite and precise. Each step is unambiguous.

Keep going in Full Marks

Full Marks has 15 questions on Algorithms: sorting, bin packing and order of an algorithm (5 more than here), set out in practice levels. You also get notes and 3D models for all 5 subtopics of Decision mathematics, plus games, timed exams and past papers.

On your exam board

Not in the Cambridge specification.

All A-level Further Maths Year 12 topics