Dijkstras n stuf

10 Karteikartenvon Sabs2023
Diese Karteikarten lernenKostenlos · Spaced Repetition · iPhone, Android, Mac & Web

Alle Karten

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"
Alle 10 Karten kostenlos lernen

Mehr Karteikarten

Words with Luis47 KartenSprachen · Englisch → SpanischBrianWOP 737 KartenPsychologie und Gesellschaft · EnglischM16 - Das Geld 230 KartenSprachen · Französisch → DeutschQuentinPhonologie Belege25 KartenDeutschflynnpaulAdverbes et expressions de nuance20 KartenSprachen · Französisch → DeutschKimap:<16 KartenGeschichte und Geisteswissenschaften · IndonesischgabbyynyEndocrine Drugs: Classes and Indications12 KartenSprachen · Kroatisch → EnglischebradstreetGatsby 59 KartenGeschichte und Geisteswissenschaften · EnglischEthanAP Calc AB273 KartenSprachen · Englisch → GriechischOceanPerfektformen der Verben101 KartenSprachen · Niederländisch → DeutschdialogisIntroduction to Medical Terminology75 KartenMedizin und Gesundheit · EnglischAndrewAnatomy Lab Exam One58 KartenNaturwissenschaften · EnglischAureliaElianna

Lerne diese Decks in der App

Kostenlos auf iPhone, Android, Mac und im Web. Füge jedes Deck mit einem Tipp zu deinem Konto hinzu.

Laden im App StoreJetzt bei Google Play
Alle 10 Karten kostenlos lernen