Prev     Next
Minimum Cost Network

Minimum Cost Network Problem: Given some number of cities and, for each pair of cities, what it would cost to build a power line between those two cities. It is known that a power generating plant will be built in one of the given cities (but it does not matter where). Initially, no power lines have been built. The objective is to build a lowest-cost, complete network of power lines that connects all cities to the power plant. A city is connected to the power plant if, on a 2D map that shows a proposed network (such as the one above after the "Update" button is clicked), one can place a pencil on the city and trace a path to the city containing the power plant without lifting the pencil off the paper and without moving the pencil off a power line that is contained in the proposed solution.

Instructions: First click the "Update" button. You will try to determine how to find a minimum cost network while restricted to an environment that is not much different from what a computer program would operate in. A solution will be obtained iteratively: that is, there will always be a partial solution of power lines and you will choose a power line not already in the partial solution by clicking on the number associated with that power line and then make a test to see whether it is OK to add it to the partial solution. If it is OK, the line turns red. If not, the color of the line does not change and the reason the line is not added to the solution appears in a textfield at the bottom of the applet. Initially, there are no red lines. A complete network is achieved when every pair of cities is connected by a path using only red lines. The cost of the network is shown in a textfield labeled "Total:". The number of errors made appears in the textfield labeled "Errors:". New cities can be added by typing a city name in the textfield to the right of the button labeled "New City:" and then clicking on the "New City:" button. To have the computer find an optimal solution click on the "Solve" button. To start over, click on the "Clear" button.