Question

4. Let (G, w) be a connected graph with weights on edges so that all weights are distinct positive real numbers. Suppose we f

This problem is dealing with Discrete Math. Please answer fully and clearly, and show/explain all steps or proofs that you state in the answer.

1 0
Add a comment Improve this question Transcribed image text
Answer #1

Since Prims Algorithm always give Spanning trees., Every vertex of G must be in the output MST of Prims Algorithm.

Hence no matter what vertex we begin with, each step connect it to its nearest neighbor.

To prove that Prims algorithm gives MST, let P be a connected, weighted graph. At every iteration of Prim's algorithm, an edge must be found that connects a vertex in a subgraph to a vertex outside the subgraph. Since P is connected, there will always be a path to every vertex. The output Y of Prim's algorithm is a tree, because the edge and vertex added to tree Y are connected. Let Y1be a minimum spanning tree of graph P. If Y1=Y then Y is a minimum spanning tree. Otherwise, let e be the first edge added during the construction of tree Y that is not in tree Y1, and V be the set of vertices connected by the edges added before edge e. Then one endpoint of edge e is in set V and the other is not. Since tree Y1 is a spanning tree of graph P, there is a path in tree Y1 joining the two endpoints. As one travels along the path, one must encounter an edge f joining a vertex in set V to one that is not in set V. Now, at the iteration when edge e was added to tree Y, edge f could also have been added and it would be added instead of edge e if its weight was less than e, and since edge f was not added, we conclude that

w(f) greater than or equal to w(e).

Let tree Y2 be the graph obtained by removing edge f from and adding edge e to tree Y1. It is easy to show that tree Y2 is connected, has the same number of edges as tree Y1, and the total weights of its edges is not larger than that of tree Y1, therefore it is also a minimum spanning tree of graph P and it contains edge e and all the edges added before it during the construction of set V. Repeat the steps above and we will eventually obtain a minimum spanning tree of graph P that is identical to tree Y. This shows Y is a minimum spanning tree. The minimum spanning tree allows for the first subset of the sub-region to be expanded into a smaller subset X, which we assume to be the minimum.

Add a comment
Know the answer?
Add Answer to:
This problem is dealing with Discrete Math. Please answer fully and clearly, and show/explain all...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Let G=(V, E) be a connected graph with a weight w(e) associated with each edge e....

    Let G=(V, E) be a connected graph with a weight w(e) associated with each edge e. Suppose G has n vertices and m edges. Let E’ be a given subset of the edges of E such that the edges of E’ do not form a cycle. (E’ is given as part of input.) Design an O(mlogn) time algorithm for finding a minimum spanning tree of G induced by E’. Prove that your algorithm indeed runs in O(mlogn) time. A minimum...

  • Suppose we have a graph G = (V, E) with weights on the edges of E,...

    Suppose we have a graph G = (V, E) with weights on the edges of E, and we are interested in computing a Minimum Spanning Tree (MST) of G. Suppose we modify the DFS algorithm so that when at a vertex v, we next visit the unvisited neighbor u such that the weight of (u, v) is minimized. Does this produce a MST of G? prove that it does or provide a counter example.

  • 3. In this problem, you will show the execution of the minimum spanning tree algorithms that...

    3. In this problem, you will show the execution of the minimum spanning tree algorithms that you studied in class on the following graph: START 10 40 5 20 35 15 6 30 62 12 (a) (5 points) Trace the execution of Prim's algorithm to find the minimum spanning tree for this graph. At each step, you should show the vertex and the edge added to the tree and the resulting values of D after the relaxation operation. Use START...

  • Let G = (V. E) be an undirected, connected graph with weight function w : E → R

    Problem 4 Let G = (V. E) be an undirected, connected graph with weight function w : E → R. Furthermore, suppose that E 2 |V and that all edge weights are distinct. Prove that the MST of G is unique (that is, that there is only one minimum spanning tree of G).

  • Use Prim's algorithm (Algorithm 4.1) to find a minimum spanning tree for he following graph. Show...

    Please solve the problem in a clear word document not hand writing Use Prim's algorithm (Algorithm 4.1) to find a minimum spanning tree for he following graph. Show the actions step by step. 32 17 45 18 10 28 4 25 07 59 V10 4 12 4.1 MINIMUM SPANNING TREES 161 void prim (int n const number Wll set of.edges& F) index i, vnear; number min edge e; index nearest [2.. n]; number distance [2.. n]; for (i= 2; i...

  • Need the following answer: Select all the statements below which are TRUE To show that a...

    Need the following answer: Select all the statements below which are TRUE To show that a greedy algorithm always yields an optimal solution, we need to prove the greedy-choice property We do not need to prove the optimal substructure property TREE-INSERT(T.Z.) is the insert operation for Binary Search Trees (BST) TREE-INSERT(T.Z) has the worst -case running time (lgn). where n is the number of nodes in the tree Let G be an undirected graph In the adjacency- list representation of...

  • 2. Let G = (V, E) be an undirected connected graph with n vertices and with...

    2. Let G = (V, E) be an undirected connected graph with n vertices and with an edge-weight function w : E → Z. An edge (u, v) ∈ E is sparkling if it is contained in some minimum spanning tree (MST) of G. The computational problem is to return the set of all sparkling edges in E. Describe an efficient algorithm for this computational problem. You do not need to use pseudocode. What is the asymptotic time complexity of...

  • Problem 3's picture are given below. 5. (a) Let G = (V, E) be a weighted connected undirected simple graph. For n...

    Problem 3's picture are given below. 5. (a) Let G = (V, E) be a weighted connected undirected simple graph. For n 1, let cycles in G. Modify {e1, e2,.. . ,en} be a subset of edges (from E) that includes no Kruskal's algorithm in order to obtain a spanning tree of G that is minimal among all the spanning trees of G that include the edges e1, e2, . . . , Cn. (b) Apply your algorithm in (a)...

  • 3. Consider the the following graphs for each of the two subproblems. Each subproblem can be answ...

    3. Consider the the following graphs for each of the two subproblems. Each subproblem can be answered (or blank) independently of the other ( subject to the 4 total blank for partial credit rule). s MST algorithm on the graph below and left, starting with vertex all work done so far: al (40 points) You are runing Prim' a. You are about to take vertex g out of the min-ehave not done so yet. Show the order that vertices wer...

  • Problem E: For each of the following parts, state True or False. If true, give a short proof. If ...

    Problem E: For each of the following parts, state True or False. If true, give a short proof. If false, givera counterexample: (1). Using Kruskal's algorithm, edges are (always) inserted into the MST in the same order as using Prim's (2). If an edge e is part of a TSP tour found by the quick TSP method then it must also be part of the (3). If an edge e is part of a Shortest Path Tree rooted at A...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT