The classic transformation: instead of asking what to delete, we calculate what to keep.

We can use dijkstra to grow the tree, if the node is included via a railroad as part of expanding process, then we know we have to keep that railroad, otherwise, the shortest path to that node is increased. Conversely, if we reach that node without using the railroad, we can get rid of it.

Pseudo code

	1. add (0, (1, 0)) and all (yi, (node, 1)) to the PQ 

	2. take the top member from PQ, if the node has been discovered, ignore

	3. Otherwise, set top member as discovered, and add (curdist + xi, (v,0)) to the PQ

	4. if the top member is marked as type 1, i.e., uses railway, mark that railway is used 

	5. repeat 2-4 until PQ is empty

	6. scan through to get # of rail roads used, and return k- total