Q4 — SEARCH FOR OPTIMAL SOLUTION

With unit costs and an unknown-quality heuristic, only the heuristic-free algorithms — BFS, Dijkstra and Branch-and-Bound — carry optimality guarantees.

The Question

#QuestionOfficial answer
4Given a finite state space with unit edge costs, and a heuristic function whose properties are not known, which of the following algorithms are suitable for finding the optimal path?B, C, D

The Topic in 60 Seconds

An algorithm guarantees the optimal path only if its machinery cannot be spoiled by the inputs. With unit costs, "fewest edges" = "cheapest path". If hh's admissibility is unknown, every method that trusts hh inherits that uncertainty. Heuristic-free methods (BFS, Dijkstra, BnB) are immune.

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

Solutions

4 — Finite state space, unit edge costs, heuristic properties unknown. Which find the optimal path?

Options:

OptionVerdict
A — Depth First SearchNo: not optimal even with unit costs — it commits to one deep branch and can return a goal at depth 50 while a depth-3 goal waits elsewhere
B — Breadth First SearchYes: FIFO order dequeues goals in non-decreasing depth; with unit costs minimum depth = minimum cost
C — Dijkstra's algorithmYes: expands nodes in increasing gg; first dequeue of the goal has g=g∗g = g^* regardless of any heuristic
D — Branch and Bound SearchYes: orders OPEN by path cost gg alone (never consults hh); the first complete path popped is provably cheapest
E — A*No: A* is optimal only for admissible hh; properties unknown → an inflated hh can bait it into a suboptimal return
F — WA* for some wNo: any w>1w > 1 multiplies hh deliberately inadmissibly — speed bought with loss of the optimality guarantee
G — SMGSNo: Sparse Memory Graph Search bounds memory by pruning on f=g+hf = g+h; its optimality proof assumes an admissible hh, which we are not given

Answer: B, C, D

The pattern

The three correct answers share one property: they ignore hh entirely. Their correctness rests only on facts given in the question — finite space, unit costs:

  • BFS: shallowest goal first; unit costs make that cheapest.
  • Dijkstra: cheapest-first expansion; no assumptions beyond non-negative costs.
  • Branch-and-Bound: keeps the best complete solution and prunes partial paths with g≥g \ge best; exact for any finite space.

Every rejected option leans on hh: A* and SMGS need admissibility, WA* needs w=1w=1 to be optimal at all. "Properties not known" kills all three guarantees in one stroke.

Tricks & Tips

Answers: 4 B, C, D