how to prove a compatible heuristics can be a admissible heuristics in A* search algorithm

3k Views Asked by At

compatible heuristics (h) is the one that has below condition:

h(n) <= c(n,a,n') + h(n')

compatible heuristic

****************************************************

admissible heuristics (h) is the one that has below condition:

0 <= h(n) <= h*(n)

h*(n) is the real distance from node n to the goal

If a heuristic is compatible, how to prove it is admissible ?

Thanks a lot.

2

There are 2 best solutions below

2
On BEST ANSWER

Assume that h(n) is not admissible, so there exists some vertex n such that h(n) > h*(n).

But because of the compatibility of h(n), we know that for all n` it holds that h(n) <= c(n,a,n') + h(n').

Now combine these two predicates when n` is the vertex G to deduce a contradiction, thus proving the required lemma reduction ad absurdum.

3
On

If you add an additional condition on h (namely that h(goal) = 0), you can prove it by induction over the minimum cost path from n to the goal state.

For the base case, the minimum cost path is 0, when n = goal. Then h(goal) = 0 = h*(goal).

For the general case, let n be a node and let n' be the next node on a minimal path from n to goal. Then h*(n) = c(n, n') + h*(n') >= c(n, n') + h(n') >= h(n) using the induction hypothesis to get the first inequality and the definition of compatibility for the second.