25.01.2015 Views

WUCT121 Discrete Mathematics Graphs Tutorial Exercises Solutions

WUCT121 Discrete Mathematics Graphs Tutorial Exercises Solutions

WUCT121 Discrete Mathematics Graphs Tutorial Exercises Solutions

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

(c) Use Kruskal’s algorithm to find the minimum spanning tree for the following<br />

weighted graph. Write down the number of steps you need to complete the<br />

algorithm<br />

1<br />

v 1<br />

2<br />

v 2<br />

2<br />

1<br />

3<br />

v 3<br />

3<br />

v 4<br />

Edge Weight Will adding<br />

edge make<br />

circuit<br />

1 ( v1,v2<br />

)<br />

2 ( v2,v4<br />

)<br />

3 ( v1,v3<br />

)<br />

4 ( v2,v3)<br />

5 ( v3,v4<br />

)<br />

6 ( v1,v4<br />

)<br />

Action taken<br />

Cumulative<br />

Weight of<br />

Subgraph<br />

e = 1 No Added 1<br />

e = 1 No Added 2<br />

e = 2 No Added 4<br />

e = 2 Yes Not added 4<br />

e = 3 Yes Not added 4<br />

e = 3 Yes Not added 4<br />

Minimum spanning tree is<br />

v 1<br />

v 2<br />

v 3<br />

v 4<br />

The algorithm can be completed in 3 steps.<br />

<strong>WUCT121</strong> <strong>Graphs</strong>: <strong>Tutorial</strong> Exercise <strong>Solutions</strong> 8

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!