What you’ll work on
- Design, test and refine algorithms for routes, layouts and spatial constraints.
- Explain a method and check the reasonableness of a result.
Start with the idea
A spatial algorithm makes its inputs, permitted actions, constraints and goal explicit. For a route problem, record the vertices and available edges with their lengths or times, then compare valid routes. A shortest-distance solution may differ from a shortest-time solution.
Test a proposed rule on ordinary cases and on cases with blocked routes or equal alternatives. Digital tables, maps or geometry tools help test many candidates, but communicate the reason the chosen solution meets the constraints. A local rule such as choosing the nearest next point need not find the best complete route.
A worked example
An undirected network has edges AB=4, AC=2, CB=1, BD=3 and CD=7. Find a shortest route from A to D.
- A–B–D has length 7. A–C–D has length 9.
- A–C–B–D has length 2+1+3=6.
- With all edge lengths positive, a shortest route needs no repeated vertex; these and A–B–C–D exhaust the simple routes.
Answer: A–C–B–D, length 6
Try one question
An undirected network has AB=3, BC=4, AC=10. Find a shortest route from A to C and its length.
Show answer and explanation
A–B–C, length 7
The indirect route is shorter than the direct edge: 3+4<10.
Inside the collection
| Resource | Length | Practice | Answers |
|---|---|---|---|
| Learn and practise | 4 pages | 4 questions | Included |
| Apply and extend | 4 pages | 4 questions | Included |
| Topic checkpoint | 3 pages | 4 questions | Included |
Read on a device and work in an exercise book, or print the A4 PDFs. These files are not auto-marked digital quizzes.