Q3 — SEARCH FOR OPTIMAL SOLUTION

Every edge on the 10 x 10 tile grid costs more than ten rupees per Manhattan tile, so Manhattan distance can never overestimate.

The Question

#QuestionOfficial answer
3In the map, nodes are placed on a grid where each tile is 10×1010 \times 10 in size, is the Manhattan distance heuristic admissible?A

The map (edge costs shown):

The Topic in 60 Seconds

h(n)h(n) is admissible iff it never overestimates the true cheapest cost: h(n)≤h∗(n)h(n) \le h^*(n) for every nn. Manhattan distance between grid points is a lower bound on any path that moves along the grid, because every unit step of travel can shrink ∣Δx∣+∣Δy∣|\Delta x| + |\Delta y| by at most 11.

Deep-dive: browse the Concepts section for admissible heuristics.

Solutions

3 — Is the Manhattan-distance heuristic (scaled by tile size 10) admissible on this map?

Options:

OptionVerdict
A — YesCorrect — see proof below
B — NoFails: no node exists whose hh beats its true cost
C — Cannot be determinedFails: admissibility follows from geometry alone, no coordinates needed

Answer: A

Why A is right

Take any edge (u,v)(u,v) of the map. Whatever the true layout, travelling from uu to vv must cover at least MD(u,v)\text{MD}(u,v) tiles horizontally-plus-vertically, and each tile costs at least its side length in traversal, so:

c(u,v)  ≥  10⋅MD(u,v)c(u,v) \;\ge\; 10 \cdot \text{MD}(u,v)

The given weights confirm the slack: every edge costs 12 or 24 — strictly more than the 10,20,…10, 20, \dots a straight grid walk of 1, 2, ... tiles would need. Summing along any path P=S→n1→⋯→GP = S \to n_1 \to \dots \to G and applying the triangle inequality for Manhattan distance (∑MD(ni,ni+1)≥MD(S,G)\sum \text{MD}(n_i, n_{i+1}) \ge \text{MD}(S,G)):

cost(P)  ≥  10⋅MD(S,G)  =  h(S)\text{cost}(P) \;\ge\; 10 \cdot \text{MD}(S,G) \;=\; h(S)

So even the cheapest path never drops below hh. Concretely, the best routes to G here all cost 12+12+12=3612+12+12 = 36 (e.g. S,A,C,G), while h(S)=10⋅MD(S,G)≤36h(S) = 10\cdot\text{MD}(S,G) \le 36 holds for any placement with at most ~3 tiles of separation — which this 3-hop graph guarantees. Since no path can beat the heuristic estimate, h(n)≤h∗(n)h(n) \le h^*(n) everywhere → admissible.

Why the distractors fail

  • B (No) would require some node whose scaled Manhattan distance exceeds its true cheapest escape. The edge-cost slack (12>1012 > 10, 24>2024 > 20) makes that impossible.
  • C (Cannot be determined) tempts you because coordinates are not printed. But the bound above never uses exact coordinates — only the fact that movement happens on a 10×1010\times10 grid with edges priced above the straight-line walk.

Tricks & Tips

Answers: 3 A