CS 341, Spring 2019

Programming Project # 3

Due: midnightSunday 5/5/19

 

Pipelines:

 

Oil has been found – in great quantities by Our Hush-Hush Inc. Where and how much of oil is discovered is not to be divulged. But we need to bring the product to market – efficiently and using least cost network of pipes. The source locations (up to 50) are named slyly – again for secrecy. The distances between these locations are known. The cost of interconnecting two locations is directly proportional to the distance between them. We have to develop a plan to interconnect these locations with minimum cost.

 

The input file – “blackgold.txt” – contains locations and distances between them.

 

Your application will load, and setup the graph from the input file. It should output the network of connections to be built with minimum length.

 

Export your program in your folder before midnight – 5/5/19.

 

Example input file:

 

            Blue                 Gold                500

            Gold                Red                 300

            Magenta          Yellow             438

            Blue                 Yellow             531

            Magenta          Blue                 865

            Red                 Purple              765

            Blue                 Purple              387

            Brown             Magenta          1100

            Brown             Blue                 435

            Gold                Silver               654

            Gold                Purple              186