OUR TASK CONCERNS A CITY WITH n ROADS
Answers
Answered by
0
There are n cities and there are roads in between some of the cities. Somehow all the roads are damaged simultaneously. We have to repair the roads to connect the cities again. There is a fixed cost to repair a particular road. Find out the minimum cost to connect all the cities by repairing roads. Input is in matrix(city) form, if city[i][j] = 0 then there is not any road between city i and city j, if city[i][j] = a > 0 then the cost to rebuild the path between city i and city j is a. Print out the minimum cost to connect all the cities.
It is sure that all the cities were connected before the roads were damaged.
Similar questions
Environmental Sciences,
4 days ago
English,
9 days ago
Social Sciences,
9 days ago
English,
9 months ago
English,
9 months ago
World Languages,
9 months ago