Chapter 3 Flashcards

1
Q

Kruskal’s algorithm

A

1) Sort arcs by weight
2) Start with arc of lowest weight
3) Add arcs in order of ascending weight (unless forming a cycle)

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

Prim’s algorithm

A

1) Choose any vertex
2) Select an arc of least weight that joins a vertex that is in the tree to one that is not
3) stop when all vertices are connected

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

Prim’s algorithm on a distance matrix

A

1) Choose any vertex
2) Number the column of the chosen vertex and delete its row
3) Ring the lowest undeleted entry in the labeled columns, which becomes the next vertex
4) Repeat until all vertices are connected

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