Skip to content
GATEiit

GATE DA 2025 Q44: A* search: order of node expansion

Question

The state graph shows the action cost along the edges and the heuristic function h associated with each state.

State graph: S to A cost 4, S to E cost 1, A to B cost 2, B to C cost 2, E to C cost 2, C to D cost 3, D to G cost 3. Heuristics: h(A)=2, h(B)=2, h(C)=6, h(D)=2, h(E)=6, h(G)=0.
Tap the figure to enlarge

Suppose A∗A^* algorithm is applied on this state graph using priority queue to store the frontier. In what sequence are the nodes expanded?

Try it: multiple choice: exactly one correct option

Select one option
Wrong answer costs 2/3 mark in GATE.
Show answer and explanation

Answer: C (official GATE 2025 final answer key)

Concept used: A* expands the frontier node with the smallest f(n)=g(n)+h(n)f(n) = g(n) + h(n).

First step: After expanding S, the frontier has A with f=4+2=6f = 4 + 2 = 6 and E with f=1+6=7f = 1 + 6 = 7, so A is expanded next. Keep updating ff for each new node.

Full step-by-step solution

Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.

Share this question

WhatsAppDownload image

Source: official GATE 2025 DA question paper and final answer key, organised by IIT Roorkee. Question paper · Answer key