Search code examples
algorithmdijkstraa-stargreedy

What kind of algorithm paradigm/algorithm design paradigm is A* (A star) pathfinding algorithm?


I'm not sure about what kind of design paradigm is A* (A star) pathfinding algorithm. According of the topics of the book "Introduction to the Design & Analysis of Algorithms" by Anany Levitin, I think the design paradigm is a greedy technique, because this algorithm is a combination of Dijktra's algorithm and greedy best first which are greedy techniques. But I'm not sure if that is a good reasoning.

Edit: According Emma comment, she gave me a link of Wikipedia where it says " Dijkstra and A* are special cases of dynamic programming. A* itself is a special case of a generalization of branch and bound." link. But in this other Wikipedia link says "Dijkstra's algorithm and the related A* search algorithm are verifiably optimal greedy algorithms for graph search and shortest path finding."


Solution

  • You have a good question!

    Greedy is setteld!!!

    I guess it would depend and I agree with "that's a bit of apples and oranges." in the question's comment.

    The answer to your specific question might be here or here.

    It is considered Greedy or Dynamic Programming (DP), according to some wikipedia pages.

    However, templatetypedef also has a good point in the comment: "I would have pegged it as greedy given that it’s making a locally optimal decision at each point."


    Greedy

    Dijkstra's algorithm and the related A* search algorithm are verifiably optimal greedy algorithms for graph search and shortest path finding.


    Dynamic Programming

    What sets A* apart from a greedy best-first search algorithm is that it takes the cost/distance already traveled, g(n), into account.

    Some common variants of Dijkstra's algorithm can be viewed as a special case of A* where the heuristic h(n) = 0 for all nodes; in turn, both Dijkstra and A* are special cases of dynamic programming. A* itself is a special case of a generalization of branch and bound.

    Reference