D1 - Algorithms On Networks Flashcards

0
Q

Describe how to carry out kuskals algorithm.

A

Sort all the arcs into ascending order f weight.

Select the arc of least weight to start the tree.

If the next arc of least weight forms a cycle ignore it, if not add it.

Repeat until all vertices are connected.

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

What is a minimum spanning tree?

A

A spanning tree such that the total length f it arcs is as small as possible.

Can be called a minimum connector.

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

How do you use Prims algorithm?

A

Choose any vertex to start the tree.

Select an arc of least weight that joins a vertex that isn’t in the tree to one that is.
Choose randomly if equal weight.

Repeat until all vertices are connected.

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

What algorithm is best suited to a distance matrix?

A

Prim’s algorithm.

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

How are networks inputted into computers?

A

As a distance matrix

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

How do you use Prim’s algorithm on a distance matrix?

A

Choose any vertex to start the tree.

Delete that row in the matrix.

Number that column in the matrix.

Put a ring around the lowest undeleted entry in the numbered columns.

The ringed entry becomes the next arc to be added to the tree.

Repeat until all the rows are deleted.

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

How do you use dijkstra’s algorithm?

A

Page 51.

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

What is dijkstra’s algorithm used to find?

A

The shortest path between two vertices in a network.

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

What is a graph if all the valences are even?

A

Eulerian.

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

What is the graph is precisely two valencies are odd but the rest even?

A

Semi eularian.

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

What makes a traversable graph?

A

If it is possible to traverse/travel along every arc just once without taking your pen from the paper.

All valencies must be even.

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

What makes a semi travers able graph?

A

If it has two odd valencies, the start and end point will be the two odd valencies.

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

What makes a graph not traversable?

A

If it has more than two odd valencies.

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

What is the route inspection algorithm used for?

A

To find the shortest route that traverses every arc at least once and returns to the starting point.

Chinese postman.

If all vertices have an even valency then the length of the shortest route will equal the weight of the network.

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