Why is the complexity of A* exponential in memory?

前端 未结 3 1431
无人共我
无人共我 2021-02-02 12:43

Wikipedia says on A* complexity the following (link here):

More problematic than its time complexity is A*’s memory usage. In the worst case, it must

3条回答
  •  感动是毒
    2021-02-02 13:13

    A* is just a guided version of breadth-first search, which is exponential in memory complexity with respect to the length of the solution.

    When using a constant heuristic, A* will become a normal breadth-first search; uniform cost search to be exact.

    When using the optimal heuristic, A* will be O(n) in both space and time complexity if we disregard the complexity of the heuristic calculation itself. Again n is the length of the solution path.

提交回复
热议问题