A nice question about the W_A* algorithm!
Given the weighted A* algorithm with f(v) = w*h(v) + (1-w)*g(v) and w in [0, 1), we want to find the tightest bound on the value of the solution cost C given an admissible heuristic h.
Admissibility of h means that h(v) ≤ c(v, t) for all vertices v and t, where c(v, t) is the true cost of reaching the target t from v. In other words, h never overestimates the true cost.
Let's analyze the f function:
f(v) = w*h(v) + (1-w)*g(v)
Since h is admissible, we know that h(v) ≤ c(v, t). Let's assume the optimal cost to reach the target t from the starting vertex s is C. Then, we can write:
h(s) ≤ C (admissibility of h)
Now, let's consider the f function at the starting vertex s:
f(s) = w*h(s) + (1-w)*g(s)
Since g(s) = 0 (the cost to reach the starting vertex is 0), we have:
f(s) = w*h(s)
As the algorithm progresses, the f values will be updated. Let's consider the f value at the target vertex t:
f(t) = w*h(t) + (1-w)*g(t)
Since h(t) = 0 (the heuristic value at the target is 0) and g(t) = C (the true cost to reach the target), we have:
f(t) = (1-w)*C
Now, we want to find the tightest bound on the value of the solution cost C. We can do this by analyzing the relationship between f(s) and f(t).
Since the algorithm is guaranteed to find the optimal solution, we know that f(s) ≤ f(t). Substituting the expressions for f(s) and f(t), we get:
w*h(s) ≤ (1-w)*C
Using the admissibility of h, we know that h(s) ≤ C. Substituting this into the previous inequality, we get:
w*C ≤ (1-w)*C
Simplifying, we get:
w ≤ 1-w
2w ≤ 1
w ≤ 1/2
So, the tightest bound on the value of the solution cost C is:
C ≤ 2*f(s)
when w ≤ 1/2.
Now, let's consider the case where f(v) = w*h(v) + g(v).
In this case, we can analyze the f function similarly:
f(s) = w*h(s) + g(s) = w*h(s)
f(t) = w*h(t) + g(t) = w*0 + C = C
Since f(s) ≤ f(t), we have:
w*h(s) ≤ C
Using the admissibility of h, we know that h(s) ≤ C. Substituting this into the previous inequality, we get:
w*C ≤ C
w ≤ 1
So, in this case, there is no specific bound on w, and the algorithm is guaranteed to find the optimal solution for any w.
However, if we want to find a bound on the solution cost C, we can use the fact that f(s) ≤ f(t):
w*h(s) ≤ C
w*h(s) ≤ C ≤ h(s) / w
So, the bound on the solution cost C is:
C ≤ h(s) / w
when w > 0.