Lecture 3 - Dijkstra's Refinement Flashcards

1
Q

What needs to be added to dijkstra’s to find a minimum spanning tree?

A

Each vertex should have a bestTv attribute. This is a tree vertex for which wt (p->q) is minimised

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

What is the complexity of this algorithm?

A

O(n^2) overall

  • initialisation is O(n) like in Prim-Jarnik
  • outer while loop is executed n-1 times
  • O(n) to find minimum and adjoin to tree
  • updating tvs is O(n)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Will proof of correctness be part of the exam.

A

No, the proof will not be examined. This is video 3 of lecture 3.

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