weighted graphs an examplecable tv in the jungle suppose we want to install cable television line that connects six towns in the mythical country of magnaguena five links will connect the six citiesbut which five links should they bethe cost of connecting each pair of cities variesso we must pick the route carefully to minimize the overall cost figure shows weighted graph with six verticesrepresenting the towns ajobordocolinadanzaerizoand flor each edge has weightshown by number alongside the edge imagine that these numbers represent the costin millions of magnaguenian dollarsof installing cable link between two cities (notice that some links are impractical because of distance or terrainfor examplewe will assume that it' too far from ajo to colina or from danza to florso these links don' need to be considered and don' appear on the graph bordo colina ajo flor danza figure erizo weighted graph how can we pick route that minimizes the cost of installing the cable systemthe answer is to calculate minimum spanning tree it will have five links (one fewer than the number of towns)it will connect all six townsand it will minimize the total cost of building these links can you figure out this route by looking at the graph in figure if notyou can solve the problem with the graphw workshop applet the graphw workshop applet the graphw workshop applet is similar to graphn and graphdbut it creates weightedundirected graphs before you drag from vertex to vertex to create an edgeyou must type the weight of the edge into the text box in the upper-right corner this applet carries out only one algorithmwhen you repeatedly click the tree buttonit finds the minimum spanning tree for whatever graph you have created the new and view buttons work as in previous graph applets to erase an old graph and to view the adjacency matrix