EXAM QUESTIONS · A LEVEL 9618
Artificial Intelligence (A2) Exam-Style Questions with Answers (A Level 9618)
Original exam-style questions on graphs, Dijkstra’s algorithm, the A* algorithm, machine learning categories, deep learning and artificial neural networks for Cambridge AS & A Level Computer Science 9618 (Paper 3). There are 21 marks in total. Try each question on paper first, then press Show answer to see the mark scheme. Answers that can be calculated mark themselves.
For Questions 1 and 2, use this weighted graph. The numbers are distances.
| Edge | A–B | A–C | B–C | B–D | C–D | C–E | D–E |
|---|---|---|---|---|---|---|---|
| Weight | 4 | 2 | 1 | 5 | 8 | 10 | 2 |
Use Dijkstra’s algorithm to find the shortest distance from A to E, and state the route.
Show answer
- Final distances from A: B = 3 (via C), C = 2, D = 8, E = 10 [2]
- Shortest distance A to E = 10 [1]
- Route: A → C → B → D → E [1] (A → C → E is 12, so it is longer)
Explain why the direct edge C–E is not on the shortest path, even though it reaches E in one step from C.
Show answer
- A → C → E costs 2 + 10 = 12. [1]
- A → C → B → D → E costs 2 + 1 + 5 + 2 = 10, which is shorter even though it uses more edges. [1]
Explain how the A* algorithm differs from Dijkstra’s algorithm.
Show answer
- A* uses a heuristic: an estimate of the distance from each node to the goal. [1]
- It chooses the next node using f = g + h (cost so far plus the estimated cost to the goal). [1]
- So it explores fewer nodes and usually reaches the goal faster, as it heads towards the goal. [1]
Describe supervised, unsupervised and reinforcement learning, giving an example of each.
Show answer
- Supervised: trained on labelled data, where the correct output is known [1], e.g. classifying emails as spam or not spam. [1]
- Unsupervised: finds patterns or groups in unlabelled data [1], e.g. grouping customers by shopping habits. [1]
- Reinforcement: learns by trial and error, receiving rewards or penalties for its actions [1], e.g. a program learning to play a game or a robot learning to walk. [1]
Describe the structure of an artificial neural network and how it is trained using back propagation.
Show answer
Any four from:
- Layers of nodes (neurons): an input layer, one or more hidden layers and an output layer.
- Nodes are connected, and each connection has a weight.
- Inputs are multiplied by the weights and passed through to give an output.
- The output is compared with the expected output to find the error.
- Back propagation sends the error backwards through the network.
- The weights are adjusted to reduce the error, and this is repeated many times.
Explain what is meant by deep learning.
Show answer
- Machine learning using artificial neural networks with many hidden layers. [1]
- It can learn complex patterns from very large amounts of data, e.g. for image or speech recognition. [1]
Frequently asked questions
What is the difference between Dijkstra’s algorithm and A*?
Both find the shortest path in a weighted graph. A* also uses a heuristic estimate of the distance to the goal, so it usually explores fewer nodes and finds the path faster.
Are these past paper questions?
No. These are original exam-style questions written by a Computer Science teacher in the Cambridge style.
Revise the topic: 9618 artificial intelligence notes · 9618 flashcards · All exam-style questions