levo

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.

Where it is assessed

Component 1

Programming and System Development.

Check the Eduqas specification ↗

The 7 subtopics

Each one has its own page.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

What does each of the linear and binary searches assume about order, and when is the linear search right?

Key term

Compare the linear and binary searches on memory use and on which duplicate they return.

Key term

What condition must the data meet before a binary search can be used?

Key term

What is a graph in computing terms?

Key term

What does Dijkstra's algorithm compute?

Key term

How is the tentative distance to a node updated during a trace?

Key term

Which search technique suits a small unsorted list?

Key term

Describe how a linear search works.

Key term

Describe how a binary search works.

Key term

State the key difference in how linear and binary searches narrow the data.

Key term

What is a weighted graph?

Key term

Describe the first step of Dijkstra's algorithm.

Key term

Describe the layout of a table used to trace Dijkstra's algorithm by hand.

Key term

Which search technique suits a large sorted array that is queried often?

Evaluation

What is the main advantage of a linear search?

Numbers

A binary search runs on 2, 5, 8, 12, 16, 23, 38 and looks for 23. How many comparisons are made?

Key term

Compare the time complexity of the two searches.

Key term

What does a shortest-path algorithm find?

Key term

Which node does Dijkstra's algorithm visit next at each step?

Key term

How do you read the route itself out of a completed trace table?

Key term

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. 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. 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. 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. 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. 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. 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.

1Closed book
2Open book
3Closed book

The 3-step method, run for you

Answer cold, learn it, then prove it stuck. Levo tracks the jump between your first attempt and your last.

Data Structures: Arrays, Records and Hash Tables
Stacks, Queues, Linked Lists and Trees
Boolean Logic and Simplification
Algorithms, Pseudo-Code and Programming Constructs

Cram a whole paper in one sitting

Sort every topic into what you know and what you do not, then drill only the weak ones.

KDW to HAT.
decryptsencryptscompresses

Blank Blitz makes facts automatic

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

AThe two are not the same.
BOpen source refers to the availability of the code.
CMuch open source software is free of charge.

Build It gets the exam shape right

Assemble a full-mark answer from its marking points, in the order an examiner wants them.

Backup means the copy of the data.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The traps are the mistakes students actually make.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

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.