complexity-theory - A* 时间复杂度

标签 complexity-theory a-star

维基百科对 A* 的复杂性做了以下说明:

The time complexity of A* depends on the heuristic. In the worst case, the number of nodes expanded is exponential in the length of the solution (the shortest path), but it is polynomial when the search space is a tree...



我的问题是:“A* 的时间复杂度是指数级的吗?或者它不是时间复杂度,而是内存复杂度?”
如果是内存复杂度,A*的时间复杂度是多少?

最佳答案

在最坏的情况下,A* 时间复杂度是指数级的。

但是,请考虑 h(n)估计距离和 h*(n)剩余的确切距离。
如果条件| h(n) - h*(n) | < O(log *h(n) )成立,也就是说,如果错误
我们的估计函数的增长次指数,那么 A* 时间复杂度将是
多项式。

可悲的是,大多数时候估计误差是线性增长的,所以,在实践中,
更快的替代方案是首选,付出的代价是最优性
不再实现。

关于complexity-theory - A* 时间复杂度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11070248/

相关文章:

set - 为什么阿克曼函数与用于不相交集的并查找算法的摊余复杂度相关?

algorithm - 与有向边的最大加权二分匹配

伪代码的算法复杂度

python - 在 A* 搜索中选择/排序最佳节点的更有效方法是什么?

python - 为什么 A star 比 Dijkstra 更快,即使启发式在网络中设置为 Nonex

java - 输入对话框验证

unit-testing - 测量数据映射函数和闭包的圈复杂度

c# - A* 寻路算法并不总能找到最短路线 C# XNA

java - A* 如果无法到达某个点则捕获

java - 优秀、一般和不良案例的复杂性