06.03.2017 Views

Mathematics for Computer Science

e9ck2Ar

e9ck2Ar

SHOW MORE
SHOW LESS

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

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

“mcs” — 2017/3/3 — 11:21 — page 511 — #519<br />

12.10. References 511<br />

(c) Suppose G is edge-weighted, the weight of e is larger than the weights of all<br />

the other edges, e is on a cycle in G, and e is an edge of T . Conclude that T is not<br />

a minimum weight spanning tree of G.<br />

Class Problems<br />

Problem 12.57.<br />

Procedure Mark starts with a connected, simple graph with all edges unmarked and<br />

then marks some edges. At any point in the procedure a path that includes only<br />

marked edges is called a fully marked path, and an edge that has no fully marked<br />

path between its endpoints is called eligible.<br />

Procedure Mark simply keeps marking eligible edges, and terminates when there<br />

are none.<br />

Prove that Mark terminates, and that when it does, the set of marked edges <strong>for</strong>ms<br />

a spanning tree of the original graph.<br />

Problem 12.58.<br />

A procedure <strong>for</strong> connecting up a (possibly disconnected) simple graph and creating<br />

a spanning tree can be modelled as a state machine whose states are finite simple<br />

graphs. A state is final when no further transitions are possible. The transitions are<br />

determined by the following rules:<br />

Procedure create-spanning-tree<br />

1. If there is an edge hu—vi on a cycle, then delete hu—vi.<br />

2. If vertices u and v are not connected, then add the edge hu—vi.<br />

(a) Draw all the possible final states reachable starting with the graph with vertices<br />

f1; 2; 3; 4g and edges<br />

fh1—2i ; h3—4ig:<br />

(b) Prove that if the machine reaches a final state, then the final state will be a tree<br />

on the vertices of the agraph on which it started.<br />

(c) For any graph G 0 , let e be the number of edges in G 0 , c be the number of connected<br />

components it has, and s be the number of cycles. For each of the quantities<br />

below, indicate the strongest of the properties that it is guaranteed to satisfy, no<br />

matter what the starting graph is.

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

Saved successfully!

Ooh no, something went wrong!