# Which heuristics guarantee the optimality of A*?

The following is a statement and I am trying to figure out if it's True or False and why.

Given a non-admissible heuristic function, A* will always give a solution if one exists, but there is no guarantee it will be optimal.

I know that a nonadmissible function is $$h(n) > \text{real cost}(n)$$, but I do not know if there is a guarantee.

Which heuristics guarantee the optimality of A*? Is the admissibility of the heuristic always a necessary condition for A* to produce an optimal solution?

Admissibility is not a necessary condition. Take any admissible heuristic h1 and make a new function h(n) = h1(n)+5. This heuristic is not admissible, but if you run A* on it, it will still find optimal solutions.