Eduqas A-Level Computer Science A500QS
Data Structures: Arrays, Records and Hash Tables
Stacks, Queues, Linked Lists and Trees
Boolean Logic and Simplification
Algorithms, Pseudo-Code and Programming Constructs
Variables, Scope, Parameters and Identifiers
Recursion and Modular Programming
Sorting Algorithms
Searching and Shortest-Path Algorithms
Big O Notation and Algorithm Efficiency
Validation, Verification and Testing
Data Compression
Programming Paradigms and Computer Languages
Systems Analysis, Maintenance and Documentation
System Design and Human-Computer Interaction
Software Engineering Tools and Translators
Computing, Society and the Law
Computer Architecture, the Processor and Assembly Language
Input, Output and Secondary Storage
Networks, Protocols and the Internet
Data Transmission and Network Performance
Number Systems and Binary Arithmetic
Data Types, Characters and Floating Point
Files, Records and File Organisation
Databases, Normalisation and Entity Modelling
SQL, Big Data and Distributed Systems
The Operating System and Its Modes
Interrupts, Memory Management and Scheduling
Types of Software System
Data Security, Cryptography and Attack
Searching and Shortest-Path Algorithms
- 7 subtopics
- 21 things to know
- Component 1
What Searching and Shortest-Path Algorithms covers
Searching and Shortest-Path Algorithms is examined in Component 1, Programming and System Development. It covers linear search, binary search, comparing linear and binary search, graphs, weights and the shortest-path problem, Dijkstra's shortest-path algorithm, tracing a shortest-path algorithm by hand and choosing the right searching technique.
The 7 subtopics
Each one has its own page.
- Linear searchHow a linear search works, main advantage of a linear search and time complexity of a linear search.Open →
- Binary searchHow a binary search works, time complexity of a binary search and three outcomes of one comparison in a binary search.Open →
- Comparing linear and binary searchThe two searches set against each other on how they narrow the data, on comparisons needed in the worst case, on memory, and on when the difference is worth anything.Open →
- Graphs, weights and the shortest-path problemGraph in computing terms, weighted graph and node and what is an edge.Open →
- Dijkstra's shortest-path algorithmSettling the nearest unvisited node, relaxing the distances to its neighbours, and repeating — the algorithm that finds the lowest-cost route rather than the fewest hops.Open →
- Tracing a shortest-path algorithm by handOne weighted graph carried through the whole algorithm, with the tentative distances after each step and the order in which the nodes settle.Open →
- Choosing the right searching techniqueMatching the technique to the data — a short unsorted list, a large sorted array queried constantly, a weighted network — and the cost of keeping data sorted in the first place.Open →
What you need to know
Answer each one before you reveal it.
Compare the linear and binary searches on memory use and on which duplicate they return.
What condition must the data meet before a binary search can be used?
What is a graph in computing terms?
What does Dijkstra's algorithm compute?
How is the tentative distance to a node updated during a trace?
Which search technique suits a small unsorted list?
Describe how a linear search works.
Describe how a binary search works.
State the key difference in how linear and binary searches narrow the data.
What is a weighted graph?
Describe the first step of Dijkstra's algorithm.
Describe the layout of a table used to trace Dijkstra's algorithm by hand.
Which search technique suits a large sorted array that is queried often?
What is the main advantage of a linear search?
A binary search runs on 2, 5, 8, 12, 16, 23, 38 and looks for 23. How many comparisons are made?
Compare the time complexity of the two searches.
What does a shortest-path algorithm find?
Which node does Dijkstra's algorithm visit next at each step?
How do you read the route itself out of a completed trace table?
Which technique is used to find the cheapest route through a network of nodes?
Take Searching and Shortest-Path Algorithms further
The same content, four other ways.
Commonly confused
Pairs that lose marks when they are blurred together.
Linear search vs Binary search
Linear search: working on any list and checking items one at a time. Binary search: needing sorted data and discarding half the list at each step.
Adjacency matrix vs Adjacency list
Adjacency matrix: a store holding every possible connection, suited to dense graphs. Adjacency list: a store holding only the connections that exist, suited to sparse graphs.
Tentative distance vs Settled distance
Tentative distance: a value that may still be lowered. Settled distance: a value that is final.
Questions from this topic
Each one with the model answer underneath.
- 1
Describe how a linear search works.
Model answer
A linear search examines each item in turn from the start of the list. The search stops when the target is found or the end of the list is reached.
- 2
What is the main advantage of a linear search?
Model answer
A linear search needs no ordering of the data, so it works on any list. The algorithm is also very simple to write and to check.
- 3
State the worst case number of comparisons a linear search makes on a list of n items.
Model answer
The worst case is n comparisons, which happens when the target is last or absent. A list of twice the length gives twice the worst case.
- 4
How many comparisons does a linear search make on average when the item is present?
Model answer
The average is about half the list, or (n + 1) ÷ 2 comparisons. The figure is roughly 100 for a list of 200 items.
- 5
A linear search looks for 23 in the list 8, 15, 4, 23, 42, 7. How many comparisons are made?
Model answer
Four comparisons are made because 23 sits in the fourth position. The search stops as soon as the item is found.
- 6
A linear search looks for 30 in the list 8, 15, 4, 23, 42, 7. How many comparisons are made?
Model answer
Six comparisons are made because every item must be checked. The search then reports that 30 is not in the list.
What is inside Levo
Six ways to work the same material.
Searching and Shortest-Path Algorithms revision questions
- What does Searching and Shortest-Path Algorithms cover in Eduqas A-Level Computer Science?
- 7 subtopics: linear search, binary search, comparing linear and binary search, graphs, weights and the shortest-path problem, dijkstra's shortest-path algorithm, tracing a shortest-path algorithm by hand and choosing the right searching technique. Each one has its own page with questions and model answers.
- How is Searching and Shortest-Path Algorithms organised?
- By the Eduqas A500QS specification, subtopic by subtopic, so it matches the order you are taught it in.
Every question in Searching and Shortest-Path Algorithms, on a schedule.
Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.