2.3.1 Shortest path algorithms info Flashcards

(f)

You may prefer our related Brainscape-certified flashcards:
1
Q

What is Dijkstra’s shortest path algorithm?

A

An algorithm to find the shortest path between a start and end nodes on a weighted graph

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what is the ‘least cost path’?

A

it is the best way to get from node to node

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what is the purpose of Dijkstra’s algorithm?

A

find the shortest path from the start node to all other nodes on the graph

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what is the output from Dijkstra’s algorithm?

A

a list which holds:
- the node label
- the cost of the shortest path to that node
- the label of the previous node in the path

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is the A* algorithm?

A

An algorithm to find the shortest path between a start and end node on a weighted graph.
it uses heuristics in order to speed up the process of finding a solution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what are the columns for the table for an A* algorithm?

A
  • node
  • distance travelled
  • heuristic
  • distance travelled + heuristic
  • previous node
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what is the difference between an A* algorithm and a Dijkstra’s shortest path algorithm?

A
  • Dijkstra’s - finds the shortest path between the start node and all other nodes
  • A* - uses heuristics, only finds the shortest path between the start and end node
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what is a heuristic/heuristic function?

A
  • a function which provides an estimate of the minimum distance/weight between a given node and the target node
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what are the advantages and disadvantages of Dijkstra’s algorithm?

A
  • will always find the shortest path between the start and end node
  • the algorithm can be inefficient as it evaluates routes that are unecessary
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what are the advantages and disadvantages of the A* algorithm?

A
  • more efficient so can make better choices about the next path to take
  • requires a good heuristic function
How well did you know this?
1
Not at all
2
3
4
5
Perfectly