Math, asked by happy3214singh, 11 days ago

Revisit Consider the set of cities as {P, Q, R, S, T} with path cost as given. What is the minimum cost, if start city is P?

Answers

Answered by madhuz2021
6

Answer:

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.

Examples:  

Input : {{0, 1, 2, 3, 4},

        {1, 0, 5, 0, 7},

        {2, 5, 0, 6, 0},

        {3, 0, 6, 0, 0},

        {4, 7, 0, 0, 0}};

Output : 10

min-cost

Input : {{0, 1, 1, 100, 0, 0},

        {1, 0, 1, 0, 0, 0},

        {1, 1, 0, 0, 0, 0},

        {100, 0, 0, 0, 2, 2},

        {0, 0, 0, 2, 0, 2},

        {0, 0, 0, 2, 2, 0}};

Step-by-step explanation:

Answered by chandujnv002
0

Answer:

If applicable, the term "Minimum Cost" refers to the least amount that must be paid by you for the Schedule of Subject Premium, Reimbursable Losses, Deductible Losses, Self-Insured Losses, and ALAE.

Step-by-step explanation:

What do you mean by minimum cost ?

The number of cities is n, and some of the cities are connected by highways. Somehow, damage to all of the roadways occurs at once. To reconnect the cities, the roads need to be fixed. Repairing a certain road has a set price. Find out how much it would cost to fix the highways that connect all the cities.

The input is in matrix(city) form; if city[i][j] = 0, then there is no road between cities I and j; if city[i][j] = a > 0, then it will cost a to rebuild the way between cities I and j. Print the lowest price necessary to connect all the cities. Prior to the destruction to the roadways, it is certain that all of the cities were connected.

To learn more about minimum cost refer to :

https://brainly.in/question/48280942

https://brainly.in/question/51223408

#SPJ2

Similar questions