Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the A* time complexity and how is it derived?

I was wondering if anyone could explain the A* time complexity. I am using a heuristic that uses euclidean distance for the estimate of the weight. There are no loops in the heuristic function. So i think that the time complexity of the heuristic is O(1).

Taking this into account, what would the A* complexity be and how is that derived?

like image 886
phedon rousou Avatar asked May 14 '12 18:05

phedon rousou


People also ask

How do you derive time complexity?

Let's use T(n) as the total time in function of the input size n , and t as the time complexity taken by a statement or group of statements. T(n) = t(statement1) + t(statement2) + ... + t(statementN); If each statement executes a basic operation, we can say it takes constant time O(1) .

Why is A * algorithm used?

What is an A* Algorithm? It is a searching algorithm that is used to find the shortest path between an initial and a final point. It is a handy algorithm that is often used for map traversal to find the shortest path to be taken.

What is a time complexity and explain it types?

Time complexity is defined as the amount of time taken by an algorithm to run, as a function of the length of the input. It measures the time taken to execute each statement of code in an algorithm. It is not going to examine the total execution time of an algorithm.

How do you derive time and space complexity?

Time complexity is the time taken by the algorithm to execute each set of instructions. It is always better to select the most efficient algorithm when a simple problem can solve with different methods. Space complexity is usually referred to as the amount of memory consumed by the algorithm.


1 Answers

you can have your answer here: Why is the complexity of A* exponential in memory?

time complexity is like memory complexity

like image 101
yossico Avatar answered Oct 10 '22 00:10

yossico