Dijkstra's Algorithm Problems
- 15Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
- spaceFlip card
- KI knew it
- DI didn't know it
- ←Previous card
- →Next card
What is a primary problem with Dijkstra's algorithm in pathfinding?
Dijkstra's algorithm prioritizes the currently shortest path without considering the direction towards the goal, potentially exploring irrelevant paths.
Or swipe the card
15 cards
What is a primary problem with Dijkstra's algorithm in pathfinding?
Dijkstra's algorithm prioritizes the currently shortest path without considering the direction towards the goal, potentially exploring irrelevant paths.
Describe a scenario where Dijkstra's algorithm is inefficient due to its lack of direction awareness.
If searching a map like the UK, Dijkstra might extensively explore fast motorways that are short distances from the start, even if the actual goal is on a country road in a different direction.
What is the 'flood-fill' problem associated with Dijkstra's algorithm on a uniform grid?
On a uniform grid where all edge weights are the same (e.g., 1), Dijkstra's algorithm will expand outwards in all directions from the start node, like a flood filling an area, even if the goal is directly in one direction.
How does A* algorithm fundamentally differ from Dijkstra's algorithm?
A* is an extension of Dijkstra that incorporates a heuristic, which estimates the distance remaining to the goal, in addition to the actual path cost from the start.
What is the purpose of the 'heuristic' in the A* algorithm?
The heuristic in A* provides an estimated measure of how far a node is from the goal, guiding the algorithm to prioritize paths that appear to be heading in the correct direction.
What is a common and reasonable heuristic to use for pathfinding on a map in A*?
Euclidean distance (straight-line distance) from the current node to the end goal is a commonly used heuristic.
What are the two cost measures tracked for each node in A* algorithm?
In A*, each node tracks the 'g-cost' (distance from the start to the current node) and the combined 'f-cost' (g−cost+heuristic), which is used for ordering in the priority queue.
How is the priority queue for A* different from Dijkstra's?
In A*, the priority queue is ordered by the combined cost (path distance + heuristic), whereas in Dijkstra, it is ordered only by the path distance from the start.
When evaluating a better path to an already visited node in A*, which cost is used to determine if the new path is shorter?
Only the actual path cost from the start (g-cost) is used to determine if a new path to an already visited node is shorter, not the combined heuristic cost.
What is the stopping criterion for both Dijkstra's and A* algorithms?
The algorithm stops when the goal node reaches the top of the priority queue and is expanded.
Why is it important for the goal node to be at the top of the priority queue before stopping, rather than just finding it?
Because a shorter, more optimal path to the goal might exist through other nodes that are still in the priority queue and have not yet been expanded.
What benefits does A* offer over Dijkstra in terms of computational resources?
A* often leads to fewer nodes being explored and fewer nodes being put into the priority queue, which reduces both computation time and memory footprint compared to Dijkstra.
What characteristics should a good heuristic possess for A* to work effectively?
A good heuristic must be consistent and should not overestimate the actual distance to the goal (admissible).
How might real-world satellite navigation systems optimize pathfinding over long distances?
Sat-nav systems might precompute and hardcode certain optimal paths for long distances (e.g., shortest way from Nottingham to London via a specific motorway) to avoid real-time computation for the entire route.
Besides Euclidean distance, what other factors might real-world GPS systems incorporate into their pathfinding algorithms?
Real-world GPS systems consider factors like traffic conditions, roundabout traversal times, and precise junction positions, using more sophisticated algorithms than basic A*.

Ask anything
We've read this whole study set, so questions about it get the best answers.