The A* algorithm is optimal when,
1
It always finds the solution with the lowest total cost if the heuristic 'h' is admissible.
2
Always finds the solution with the highest total cost if the heuristic 'h' is admissible.
3
Finds the solution with the lowest total cost if the heuristic 'h' is not admissible.
4
It always finds the solution with the highest total cost if the heuristic 'h' is not admissible.