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
Given the following knowledge base: a <- b^c. b <- d^e. b <- g^e. c <-...
Given the following knowledge base: a <- b^c. b <- d^e. b <- g^e. c <- e. d. e. ƒ <- a^g. Which of the following would be the trace of resolved atoms assuming a bottoms-up proof procedure? Select one: a. {a,b,c,e,g} b. {a,b,c,e,d} c. {g,e,b,e,c,a} d. None of these options Constraint Satisfaction Problem (CSP) is consists of a set of _________________. Select one: a. Variables, heuristics, and solutions b. Variables, domains, and backtracking c. Variables, domains, and constraints d....
Use the weighted digraph for problems below: V = {a, b, c, d, e, f, g,...
Use the weighted digraph for problems below: V = {a, b, c, d, e, f, g, h} E = {(a,b,6), (a,d,3), (b,c,2), (b,e,5), (c,f,4), (d,e,9), (d,g,1), (e,f,7), (e,g,8), (e,h,2), (f,h,4), (g,h,4)} (3 pts.) What is the length of the longest path from a to h? Show the path! (2 pts.) Does the graph contain a cycle? Justify your answer! (3 pts.) Give the adjacency matrix for the graph. (4 pts.) Provide the order in which nodes would be visited in...
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...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT