I was trying to prove that consistent heuristic implies the admissible condition
one of the proofs that I read was mentioned here:
let h(n) be the heuristic value at node n and c(n,n+1) the cost from node n to node n+1.
we are given the assumption that h(ng)=0; where ng is the goal node.
Informally, we want to backtrack from the goal node showing that if we start with admissible node which h(ng)=0, its parent nodes will be admissible through the rule of consistency, and the pattern continues.
Consider some node n and assume the heuristic value at n is admissible.
We want its parent nodes, say n-1, will also be admissible by the definition of consistency.
By consistency, we get that:
h(n-1)-h(n)<=c(n-1,n) so h(n-1)<= c(n-1,n)+h(n)
c(n-1,n) is the actual path cost from n-1 to n.
Since we know h(n) is admissible we know that h(n) has to be less than or equal to the path cost from n to ng.
Thus, h(n-1) <= the path cost from (n-1 to n) + h(n) .
Since h(n) is less than or equal to path cost from (n to ng), h(n-1) <= path cost from (n-1 to ng).
My question is: in the step 7: c(n-1,n) is the actual path cost from n-1 to n how do they sate that c(n-1,n) is the actual path? since from this assumption they mean by actual path the lowest cost path?
In the same reference they also gave formal proof:
Assume we have some consistent heuristic h. Also assume h(ng)=0, where ng is a goal node.
By definition of consistency, h(n)<=c(n,n+1)+h(n+1) for all nodes n in the graph.
we want to show that for all n, h(n)<= h*(n)
Base case: we begin considering the ng-1 the node in any path where ng denotes the goal state:
h(ng-1)<=c(ng-1,ng)+h(ng)
Because ng is the best goal state, by assumption, h(ng)=h*(ng)
Therefore we can re-write the above as:
h(ng-1)<= c(ng-1,ng)+h*(ng)
and given that
c(ng-1,ng)+h*(ng)=h*(ng-1) we can see h(ng-1)<=h*(ng-1)
Inductive Hypothesis: Assume that for some arbitrary node (which lies on a path from goal) ng-k than h(ng-k)<=h*(ng-k).
Inductive step: to see if this is always the case, we consider the ng-k-1th:
h(ng-k-1)<=c(ng-k-1,ng-k)+h(ng-k)
h(ng-k-1)<=c(ng-k-1,ng-k)+h(ng-k)<= c(ng-k-1,ng-k)+h*(ng-k)
h(ng-k-1)<=c(ng-k-1,ng-k)+h*(ng-k)
h(ng-k-1,ng-k)+h*(ng-k)=h*(ng-k-1)
so we can see :
h(ng-k-1)<=h*(ng-k-1)
again the same question for steps 8 and 12, why are we considering: c(the node, the next node) + h*( the next node ) = h*(the node)?
I was able to prove that:
c(ng-1,ng)+h*(ng)=h*(ng-1) we can say h(ng-1)<=h*(ng-1)
if c(ng-1,ng) was not the best path from ng-1 to the goal, let's suppose that there is another one from ng-1 to ng'-1 to g which is the optimal path so:
ng-1 --> ng'-1 --> g is the best path
since h is consistent:
h(ng'-1)<=c(ng'-1,g) + h(g) : h(g) =0 so h(ng'-1)<=c(ng'-1,g)
h(ng-1)<=c(ng-1,ng'-1) + h(ng'-1) so
h(ng-1)<=c(ng-1,ng'-1) +c(ng'-1,g) which is the optimal path
it is correct for also any optimal path with more number of nodes