Question

In: Advanced Math

Consider the cities B,C,D,E,F,G The costs of the possible roads between cities are given below: c(B,F)...

Consider the cities B,C,D,E,F,G
The costs of the possible roads between cities are given below:

c(B,F) = 11
c(B,G) = 10
c(C,G) = 8
c(D,E) = 12
c(D,F) = 13
c(E,F) = 9
c(E,G ) = 7

What is the minimum cost to build a road system that connects all the cities?

Solutions

Expert Solution

To solve this problem we will use Kruskal's Algorithm (Graph Theory)

We will convert the problem of finding the minimum cost to build a road system that connects all the cities into graph theory and then using Kruskal's Algorithm we will find minimum spanning tree.

1) Spanning Subgraph:

A spanning subgraph of a graph G is H if vertex set of H is same as vertex set of G and edge set of H is subset of edge set of G.

i. e. and

2) Spanning Tree:

A spanning tree of G is a spanning subgraph of a connected graph G.

3) Minimum Spanning tree:

A weighted spanning tree with minimum weight is called minimum weighted spanning tree.

4) Kruskal's Algorithm:

Step 1: Choose e1 in graph G such that weight of an edge is as small as possible. where e1 is not a loop.

Step 2: If edges e1, e2, . . . ei have been choosen then choose edge ei+1 such that

a) G<e1, e2, . . . ei+1> is acyclic.

b) weight of ei+1 is the smallest where ei+1 is not a loop.

Step 3: If G has p vertices stop after p-1 edges have been choosen otherwise go to step 2

Thus here we will consider cities as vertices and road between two cities means edge between those two vertices and cost means the weight of that edge.

Thus following is the corresponding graph.

For this graph we will find the minimum weighted spanning tree by applying Kruskal's Algorithm as follows.

In the V step we haven't choosen edge BF though its weight is minimum(11) because it will create a cycle BFEGB in the graph.

Graph in the step V] is the final presentation of all the cities connected by roads.

and weight of the graph = weight of edges in the graph(step V)

= 7 + 8 + 9 + 10 + 12

= 46

Thus 46 is the minimum cost to build a road system that connects all the cities.


Related Solutions

Consider the relation R= {A, B, C, D, E, F, G, H} and the set of...
Consider the relation R= {A, B, C, D, E, F, G, H} and the set of functional dependencies: FD= {{B}—> {A}, {G}—> {D, H}, {C, H}—> {E}, {B, D}—> {F}, {D}—>{C}, {C}—> {G}} 1) Draw FD using the diagrammatic notation. 2) What are all candidate keys for R? 3) If delete {C}—>{G} and change {C, H}—> {E} to {C, H}—> {E, G}, what are all candidate keys for R
If there are 7 total notes C, D, E, F, G, A, and B and if...
If there are 7 total notes C, D, E, F, G, A, and B and if a five-note melody is selected at random (so that all melodies counted in part (a) are equally likely to be chosen), what is the probability that the melody will include exactly two “A” notes, but no other repeated notes? (A few allowable examples: AACEG, ACAEG, DFACA, EAABC, etc.)
Consider the cross: A/a; b/b; C/c; D/d; E/e x A/a; B/b; c/c; D/d; e/e a) what...
Consider the cross: A/a; b/b; C/c; D/d; E/e x A/a; B/b; c/c; D/d; e/e a) what proportion of the progeny will phenotypically resemble the first parent? b) what proportion of the progeny will genotypically resemble neither parent?
Use the table for the question(s) below. Combination A B C D E F G Vaccine...
Use the table for the question(s) below. Combination A B C D E F G Vaccine doses (millions) 6 5 4 3 2 1 0 Guns 0 10,000 19,000 24,000 28,000 30,000 31,000 In the table above, the opportunity cost of vaccines remains constant as more vaccines are produced. remains constant as more guns are produced. increases as more guns are produced. increases as more vaccines are produced. decreases as more vaccines are produced. If the economy is currently producing...
Seven people (A,B,C,D,E, F, and G) are seated in a row. Suppose A,B, and C are...
Seven people (A,B,C,D,E, F, and G) are seated in a row. Suppose A,B, and C are freshmen, D and E are sophomores and F and G are juniors. How many arrangements are possible if: (a) D and F must sit together? (b) A and C must not sit together? (c) All freshmen must sit together? (d) All freshmen must sit together, all sophomores must sit together, and all juniors must sit together? (e) Exactly two people sit between A and...
(a) (f ∘ g)(3) (b) g(f(2)) (c) g(f(5)) (d) (f ∘ g)(−3) (e) (g ∘ f)(−1) (f) f(g(−1))
(a)    (f ∘ g)(3) (b)    g(f(2)) (c)    g(f(5)) (d)    (f ∘ g)(−3) (e)    (g ∘ f)(−1) (f)    f(g(−1))  
Consider the following bivariate data. Point A B C D E F G H I J...
Consider the following bivariate data. Point A B C D E F G H I J x 0 1 1 2 3 4 5 6 6 7 y 5 5 6 5 4 3 2 0 1 1 (a) Construct a scatter diagram of the given bivariate data. (Do this on paper. Your instructor may ask you to turn in this work.) (b) Calculate the covariance. (Give your answer correct to two decimal places.) (c) Calculate sx and sy. (Give...
Consider the following demand curve: A B C D E F G H I J P...
Consider the following demand curve: A B C D E F G H I J P $0.50 $0.45 $0.40 $0.35 $0.30 $0.25 $0.20 $0.15 $0.10 $0.05 QD 1 2 4 6 9 12 16 20 25 30 Calculate elasticities for pairs of points to check statements that were made during class and in the text. When making the calculations, use average price and average quantity for the two points. The formula for this should be in your notes. It is...
A restaurant has dishes A, B, C, D, E, F and G The owners anticipate that...
A restaurant has dishes A, B, C, D, E, F and G The owners anticipate that dishes will be ordered in the following proportions: 30% (A), 15% (B), 20% (C), 5% (D), 8% (E), 12% (F) and 10% (G). The number of orders placed during the first two days of business was 75 (A), 60 (B), 50 (C), 14 (D), 20 (E), 40 (F), and 41 (G).    State and conduct the appropriate hypothesis test to determine whether there is...
Given 8 cards: A, B, C, D, E, F, G, H How many ways can all...
Given 8 cards: A, B, C, D, E, F, G, H How many ways can all the cards be arranged if you select with replacement? How many ways can four cards be arranged if you select with replacement? How many permutations are possible if you select 5 cards without replacement? How many combinations are possible if you select 6 cards without replacement? If the B and C cards are made into A cards, and the E, F, and G cards...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT