greedy algorithm
The Island of Sodor is home to a large number of towns and villages, connected by an
extensive rail network. Recently, several cases of a deadly contagious disease (either
swine flu or zombies; reports are unclear) have been reported in the village of
Ffarquhar. The controller of the Sodor railway plans to close down certain railway
stations to prevent the disease from spreading to Tidmouth, his home town. No trains
can pass through a closed station. To minimize expense (and public notice), he wants to
close down as few stations as possible. However, he cannot close the Ffarquhar station,
because that would expose him to the disease, and he cannot close the Tidmouth
station, because then he couldn’t visit his favorite pub. Describe and analyze an
algorithm to find the minimum number of stations that must be closed to block all rail
travel from Ffarquhar to Tidmouth. The Sodor rail network is represented by an
undirected graph, with a vertex for each station and an edge for each rail connection
between two stations. Two special vertices f and t represent the stations in Ffarquhar
and Tidmouth. For example, given the following input graph, your algorithm should
return the number 2.

http://teach.glencora.org/images/2/28/HW5.pdf
greedy algorithm
===

The Island of Sodor is home to a large number of towns and villages, connected by an
extensive rail network. Recently, several cases of a deadly contagious disease (either
swine flu or zombies; reports are unclear) have been reported in the village of
Ffarquhar. The controller of the Sodor railway plans to close down certain railway
stations to prevent the disease from spreading to Tidmouth, his home town. No trains
can pass through a closed station. To minimize expense (and public notice), he wants to
close down as few stations as possible. However, he cannot close the Ffarquhar station,
because that would expose him to the disease, and he cannot close the Tidmouth
station, because then he couldn’t visit his favorite pub. Describe and analyze an
algorithm to find the minimum number of stations that must be closed to block all rail
travel from Ffarquhar to Tidmouth. The Sodor rail network is represented by an
undirected graph, with a vertex for each station and an edge for each rail connection
between two stations. Two special vertices f and t represent the stations in Ffarquhar
and Tidmouth. For example, given the following input graph, your algorithm should
return the number 2.

http://teach.glencora.org/images/2/28/HW5.pdf