Dijkstras n stuf

10 flashcardspar Sabs2023
Réviser ces flashcardsGratuit · répétition espacée · iPhone, Android, Mac et web

Toutes les cartes

1
Dijkstras algorithm?
Finds shortest path between one node and all other nodes on a weighted graph
Type of breadth first search
2
Uses of dikjstras?
GPS Navigation
Robots/Game Path finding
3
How to do dikjstras algorithm?
1)Create table with columns node,distance from start,visited,previous node.
2) Set initial distances from start (0 for A and infinite for rest) for all nodes
-For all nodes
3)Find node with shortest distance from start that hasnt been visited
4)For all connected nodes, calculate distance from start
4i) IF value is smaller than current one distance update it and set previous node to the current one(the one at 3rd step)
5)Mark that node(3rd step) as visited
4
Outputting shortest path?
1)Start at the node WE want to reach
2)Follow the previous nodes and add it to the start of list.
To this until you reach the start
5
Do this T TO S
Shortest path way to S is T->C->S
C =9
S =23
T=0
6
A* pathfinding algorithm?
Finds shortest path between 2 NODES on a weighted graph using heuristics
7
A* uses?
Network packet routing
Solving puzzles
Social networking analysis
8
how to do a* A TO L
1) Create table with columns node,visited,distance from start(g),heuristic(h), f (g+h) and previous node
2)Set inital distance and f to infinite(or leave blank)
-For all nodes
3)Find node with lowest f value not visited
4)FOR EACH CONNECTED NODE
4i) Calculate distance from start(g) by adding edge value and distant from start then add heuristic value for F value
4ii)IF f value calculated is lower than current one update it and set previous node to the current node(one at step 3)
DO THIS UNTIL GOAL NODE(L HERE) IS VISITED
9
Outputting shortest path a*?
Same as dijkstras
10
Heuristic?
Designed to solve a problem faster when classic methods are too slow and makes an educated guess
"Good enough"
Réviser les 10 cartes gratuitement

Plus de flashcards

Words with Luis47 cartesLangues · Anglais → EspagnolBrianWOP 737 cartesPsychologie et société · AnglaisM16 - Das Geld 230 cartesLangues · Français → AllemandQuentinPhonologie Belege25 cartesAllemandflynnpaulAdverbes et expressions de nuance20 cartesLangues · Français → AllemandKimap:<16 cartesHistoire et lettres · IndonésiengabbyynyEndocrine Drugs: Classes and Indications12 cartesLangues · Croate → AnglaisebradstreetGatsby 59 cartesHistoire et lettres · AnglaisEthanAP Calc AB273 cartesLangues · Anglais → GrecOceanPerfektformen der Verben101 cartesLangues · Néerlandais → AllemanddialogisIntroduction to Medical Terminology75 cartesMédecine et santé · AnglaisAndrewAnatomy Lab Exam One58 cartesSciences · AnglaisAureliaElianna

Révise ces decks dans l’app

Gratuit sur iPhone, Android, Mac et le web. Ajoute n’importe quel deck à ton compte en un tap.

Télécharger dans l’App StoreDisponible sur Google Play
Réviser les 10 cartes gratuitement