Get matched

Evidence-based graph search and learning

Start questions

AI-assisted English content review; independent teacher approval pending.

Practice scope and review

Original, AI-authored English practice with worked guidance. Selected topics only; independent teacher review is pending. This is not a complete syllabus, official past-paper collection or predicted exam score. Check your own exam-board specification: these concepts are not certified against a particular board or exam year.

151 original questions across 21 selected topic areas. No account or payment required to practise.

Cambridge International AS & A Level Computer Science (9618), examination year 2027: AI-assisted conceptual alignment to official sources, not teacher or exam-board certification. Syllabus mapping and remaining coverage.

5 questions in this topic

Exact English revisions checked in an AI-assisted academic review; independent teacher approval is still pending.

All topics

Original English exercises targeting selected 9618 2027-29 requirements. Conceptual alignment only; independent teacher approval, practical competence and complete teaching coverage are not established.

Subtopics in this topic (3)
  • A* cost and admissible heuristics
  • Supervised regression updates
  • Held-out evaluation limits

5 of 5 questions shown

Loading saved responses

Question 1A directed graph has edges S->A cost2,S->B cost1,A->G cost4,B->C cost2,C->G cost2. Heuristics to G are h(S)=4,h(A)=4,h(B)=3,h(C)=1,h(G)=0. Trace A* with f=g+h, expanding the lowest-f open node and stopping when G is removed for expansion. Record g/f for newly reached nodes, the final path/cost, and check admissibility using actual remaining path costs. Compare with Dijkstra's expansion order. Graph implementation code is not required.6 indicative marks

A directed graph has edges S->A cost2,S->B cost1,A->G cost4,B->C cost2,C->G cost2. Heuristics to G are h(S)=4,h(A)=4,h(B)=3,h(C)=1,h(G)=0. Trace A* with f=g+h, expanding the lowest-f open node and stopping when G is removed for expansion. Record g/f for newly reached nodes, the final path/cost, and check admissibility using actual remaining path costs. Compare with Dijkstra's expansion order. Graph implementation code is not required.

Show indicative guidance

Worked guidance

  1. The open set after S contains A(2,6),B(1,4), with each pair(g,f). Removing B adds C(3,4); removing C adds G(5,5). A remains open at f6, so G is next and the parent chain yields S-B-C-G. Its edge sum is1+2+2=5, less than S-A-G's6.
  2. The best costs still to reach G are5 from S,4 from A,4 from B,2 from C,0 from G. Heuristics4,4,3,1,0 never exceed those costs. These particular heuristics are also consistent across each edge, so no reopening issue arises in this example.
  3. Dijkstra ignores h: after S,B, it selects A at distance2 before C at3, then G at5. Both methods find5 here. A* is not universally faster for every heuristic, and an overestimate cannot be advertised as admissible.

Self-marking points

View marking points
  1. Start S with g0,f4; expanding S gives A(g2,f6),B(g1,f4).
  2. Expand B then C(g3,f4), then reach G(g5,f5).
  3. Expand G before A because5<6; path S-B-C-G costs5.
  4. True remaining costs S5,A4,B4,C2,G0 are not below their respective heuristics, so h is admissible.
  5. Dijkstra using g alone expands S,B,A,C,G and also finds cost5.
  6. A heuristic estimates remaining cost; adding it to g is not the accumulated actual path cost alone.

Examiner tip

Indicative distinct points, not an official Cambridge mark allocation. State bounds, assumptions and intermediate states; practical teacher review remains required.

Question 2A single linear prediction unit outputs yhat=w*x+b. For one labelled example x=2,y=5, initially w=1,b=0. Squared error is(yhat-y)^2. To illustrate error-based learning, use the supplied rules: gradient_w=2*x*(yhat-y), gradient_b=2*(yhat-y); update each parameter by subtracting0.1 times its gradient, using both old gradients. Calculate prediction, loss, gradients, new parameters and new prediction. Explain why this is supervised regression, contrast unsupervised grouping, and why a good result on this example does not establish generalisation or full neural-network competence.6 indicative marks

A single linear prediction unit outputs yhat=w*x+b. For one labelled example x=2,y=5, initially w=1,b=0. Squared error is(yhat-y)^2. To illustrate error-based learning, use the supplied rules: gradient_w=2*x*(yhat-y), gradient_b=2*(yhat-y); update each parameter by subtracting0.1 times its gradient, using both old gradients. Calculate prediction, loss, gradients, new parameters and new prediction. Explain why this is supervised regression, contrast unsupervised grouping, and why a good result on this example does not establish generalisation or full neural-network competence.

Show indicative guidance

Worked guidance

  1. Old yhat=1*2+0=2, so error2-5=-3 and loss9. The supplied derivatives give dw=2*2*(-3)=-12 and db=2*(-3)=-6. Use both before changing either parameter: w'=1-.1*(-12)=2.2 and b'=0-.1*(-6)=.6.
  2. The same input now predicts2.2*2+.6=5. These arithmetic results illustrate updating parameters using an output error; they do not make a one-unit linear model a demonstration of all deep-network backpropagation. In a multilayer network the error signal also guides adjustments through earlier layers.
  3. A numerical labelled target distinguishes this example from clustering unlabelled observations. Other inputs may still be predicted poorly, so test representative held-out examples and inspect errors, not just this one training point. The differentiation formulas are explicitly supplied teaching scaffolding, not a claim that Cambridge prescribes these exact numerical gradients.

Self-marking points

View marking points
  1. Initial prediction2, error-3 and squared loss9.
  2. Old gradients are-12 for w and-6 for b.
  3. Simultaneous update gives w=2.2,b=.6.
  4. New prediction2.2*2+.6=5, giving zero error on this example.
  5. Known numerical target makes this supervised regression; unsupervised grouping lacks these target labels.
  6. Training-error reduction is not held-out performance; multilayer backpropagation additionally propagates errors through internal connections and needs separate practice.

Examiner tip

Indicative distinct points, not an official Cambridge mark allocation. State bounds, assumptions and intermediate states; practical teacher review remains required.

Question 3Directed edges are S->A cost1,A->G cost8,S->B cost4,B->G cost2. A* selects the open node with least f=g+h and stops when G is selected. Use h(S)=0,h(A)=0,h(B)=10,h(G)=0. Trace expansions and returned route. Compare with the actual cheapest route and explain the effect of the heuristic atB. No graph-program code is required.4 indicative marks

Directed edges are S->A cost1,A->G cost8,S->B cost4,B->G cost2. A* selects the open node with least f=g+h and stops when G is selected. Use h(S)=0,h(A)=0,h(B)=10,h(G)=0. Trace expansions and returned route. Compare with the actual cheapest route and explain the effect of the heuristic atB. No graph-program code is required.

Cambridge 2027: Direct conceptual match

Enumerated both complete paths9/6 and open priorities1/14 then9/14; within9618 graph search with no required graph code.

AI-assisted placement. Independent teacher approval pending.

Show indicative guidance

Worked guidance

  1. Starting atS generates A withf1 and B withf14. ExpandingA generates G withg=1+8=9 andf9.
  2. G is selected beforeB because9<14, so the stated algorithm returnsS-A-G cost9 and stops. Direct route comparison givesS-B-G cost4+2=6.
  3. The heuristic atB overestimates its remaining cost2 by8, postponing the better branch. This counterexample shows failure for this heuristic and stopping rule, not that all heuristic search is non-optimal.

Self-marking points

View marking points
  1. AfterS, A hasg1/f1 and B g4/f14.
  2. ExpandsA, thenG atg9/f9; returnsS-A-G cost9.
  3. Actual best routeS-B-G costs6.
  4. h(B)=10 exceeds true remaining2, so the supplied heuristic can lose optimality under this stopping rule.

Examiner tip

Check the heuristic against remaining cost, not cost already travelled.

Question 4In a fictional learning demonstration an agent tries actions L,R,L and receives rewards0,2,-1. A supplied rule adds each reward to that action's running score, initially L=0,R=0, and next selects the action with larger score. Trace scores after each trial and the selected next action. Contrast reward feedback with a teacher-provided correct-action label; explain a limitation of treating this rule as a complete reinforcement-learning system.4 indicative marks

In a fictional learning demonstration an agent tries actions L,R,L and receives rewards0,2,-1. A supplied rule adds each reward to that action's running score, initially L=0,R=0, and next selects the action with larger score. Trace scores after each trial and the selected next action. Contrast reward feedback with a teacher-provided correct-action label; explain a limitation of treating this rule as a complete reinforcement-learning system.

Cambridge 2027: Direct conceptual match

Recomputed cumulative rewards L-1/R2 and nextR; mapped only to learning categories/reinforcement concepts, not invented required update formula.

AI-assisted placement. Independent teacher approval pending.

Show indicative guidance

Worked guidance

  1. The first L trial adds0, then R adds2. The last L adds-1, leaving L=-1 and R=2.
  2. The larger-score rule selectsR for the next action. Unlike a labelled correct action for every input, this feedback evaluates the consequences of actions taken.
  3. Only three supplied trials inform this demonstration. It ignores exploration strategy, differing trial counts and delayed rewards, so it illustrates a feedback distinction rather than establishing an optimal or complete learning algorithm.

Self-marking points

View marking points
  1. Scores progress(0,0),(0,2),(-1,2) in(L,R) order.
  2. Next action isR.
  3. Rewards evaluate outcomes; supervised labels would specify target answers/actions.
  4. A tiny cumulative-score rule omits exploration and longer-term consequences, so no general optimality follows.

Examiner tip

Do not present a supplied toy update as the standard algorithm for every agent.

Question 5Fictional labelled images include several photos of each object. ModelA correctly classifies98/100 training images and60/100 held-out images of new objects. ModelB gets90/100 and78/100 respectively. Explain which has better measured generalisation here, why training accuracy alone misleads, and why splitting photos of the SAME object across training/test can give an optimistic estimate. Give a safer split and one remaining limit.4 indicative marks

Fictional labelled images include several photos of each object. ModelA correctly classifies98/100 training images and60/100 held-out images of new objects. ModelB gets90/100 and78/100 respectively. Explain which has better measured generalisation here, why training accuracy alone misleads, and why splitting photos of the SAME object across training/test can give an optimistic estimate. Give a safer split and one remaining limit.

Cambridge 2027: Partial conceptual match

Checked98/60 versus90/78 denominators and object-level leakage logic; limited conceptual supervised-learning application, not a Cambridge-required split algorithm.

AI-assisted placement. Independent teacher approval pending.

Show indicative guidance

Worked guidance

  1. Because each denominator is100, the supplied held-out results are60% forA and78% forB; B performs better on this particular new-object test.
  2. A's98% training score may reflect fitting training-specific features. Testing on another photo of an already-seen object can reward memorised identity instead of transfer to unseen objects.
  3. Assign all photos of an object to one partition and do model development without consulting the final test labels. Even then,100 local held-out examples do not establish universal performance on other populations or capture conditions.

Self-marking points

View marking points
  1. ModelB has better measured held-out accuracy78% versus60%.
  2. A's higher training accuracy does not imply better new-object predictions.
  3. Object overlap can leak identity-specific information across the split.
  4. Split by object and retain untouched test data; finite/local samples still limit generalisation.

Examiner tip

Keep model selection and final evaluation distinct; never infer universal performance from one holdout.

All AS & A Level subjects