Q5 — SEARCH FOR OPTIMAL SOLUTION

Euclidean edge costs retire BFS; the best admissible heuristic admits Dijkstra, BnB, A* and SMGS into the optimal club.

The Question

#QuestionOfficial answer
5Given a state space with Euclidean edge costs, and with the best admissible heuristics, which of the following algorithms will find the optimal path?C, D, E, G

The Topic in 60 Seconds

Two inputs changed from Q4: costs are now non-uniform (Euclidean distances), and hh is now guaranteed admissible (and "best" = most informed admissible hh, so h=h∗h = h^* is allowed). Non-uniformity disqualifies BFS; admissibility re-qualifies every f=g+hf = g + h method.

Deep-dive: browse the Concepts section for optimal search.

Solutions

5 — Euclidean edge costs, best admissible heuristics. Which find the optimal path?

Options:

OptionVerdict
A — Depth First SearchNo: still neither complete-on-the-nose nor optimal; cost structure is irrelevant to its flaw (it ignores costs altogether)
B — Breadth First SearchNo: BFS minimises the NUMBER of edges; with Euclidean weights one long edge can beat three short ones, so fewest-edge ≠ cheapest
C — Dijkstra's algorithmYes: cheapest-first expansion needs no heuristic at all; works for any non-negative costs including Euclidean
D — Branch and Bound SearchYes: ranks partial paths by true accumulated cost gg; first complete path popped is optimal, no heuristic involved
E — A*Yes: with an admissible hh, A* returns the optimal path; "best admissible" only makes it faster, never wrong
F — WA* for some wNo: weighted A* scales hh by w>1w > 1, intentionally breaking admissibility; solution quality bounded by w⋅C∗w \cdot C^*, not optimality
G — SMGSYes: Sparse Memory Graph Search preserves optimality under exactly the missing precondition of Q4 — a known-admissible hh — while fitting memory bounds

Answer: C, D, E, G

Why the answer set flipped from Q4

AlgorithmUnit costs, unknown h (Q4)Euclidean costs, admissible h (Q5)What changed
BFSinoutnon-uniform costs broke "depth = cost"
Dijkstra / BnBininnever depended on either input
A*outinadmissibility now supplied
SMGSoutinits pruning is safe only for admissible h
WA*outoutw>1w > 1 ruins optimality under any h

The moral: guarantees attach to assumptions, not algorithms. Swap the assumptions and the correct option set swaps with them.

Tricks & Tips

Answers: 5 C, D, E, G