See what we can offer to your school
"SimpleStudy just makes sense...โ
Get the best plan for your school
12 cards from this deck
Finding shortest path from source to target node
Dijkstra's algorithm
Cost from start node to current node
Heuristic estimate from current node to target
f(n)=g(n)+h(n)f(n) = g(n) + h(n)f(n)=g(n)+h(n)
Node with lowest f(n)f(n)f(n) value
h(n)=โฃx1โx2โฃ+โฃy1โy2โฃh(n) = |x_1 - x_2| + |y_1 - y_2|h(n)=โฃx1โโx2โโฃ+โฃy1โโy2โโฃ
Grids with horizontal & vertical movement only
h(n)=(x1โx2)2+(y1โy2)2h(n) = \sqrt{(x_1 - x_2)^2 + (y_1 - y_2)^2}h(n)=(x1โโx2โ)2+(y1โโy2โ)2โ
Never overestimates the actual cost
Algorithm may miss the shortest path
Dijkstra's & Greedy Best-First Search
Select your subjects, and get access to A+ resources today.