Decision 1 Unit 4 Flashcards

0
Q

How are the boxes for Dijkstra’s Algorithm presented?

A

|____|____|.
|________|.
The first box is for the order that it is labelled. The second is the permanent amount that it is labelled as. The bottom is the working values from the start which change.

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

What is Dijkstra’s Algorithm used for?

A

To find the shortest route from one node to another.

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

How to use Dijkstra’s Algorithm?

A
  1. Label the staring node (S) 1 and a permanent value of 0.
  2. Give each node connected to S a working value which is its distance from S.
  3. Find the smallest working value and use this as a permanent value for that node and label it 2.
  4. Repeat by finding any new or smaller working values and selecting the smallest etc until a route is found.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How to find the shortest route from the permanent labels?

A

Starting at the end node, take away the permanent label of a connecting node from the end node’s. If the amount is the same as the arc then it could have came this way. Repeat until back to start.
Remember to check for more than one route.

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

What is the order of Dijkstra’s algorithm?

A

n^2

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