Question

Show that Prim's algorithm is correct using the Cut Theorem.

Show that Prim's algorithm is correct using the Cut Theorem.

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

To show that the Prim's Algorithm is Correct using the Cut Theorem we first need to prove the Cut Theorem.

The Cut Theorem :

For G(V,E) where V is vertices and E are the edges and the graph is weighted and connected.We assume the the cost of all the edges are different.

From the Graph,we have to pick a subset that is non-empty where the subset will contain some vertices but not all of them.

we have to assume an edge e that lies between 2 vertices where 1 vertex lies in the subset and the other vertex is not contained in the subset.

If e is the smallest weighted edge that connects the vertex in the subset with the vertex not in the subset, We have to show that the minimum Spanning Tree will contain e.

Proof of Cut Theorem: (By Contradiction)

Suppose we have a MST T which does not have any edge e :e is the edge linking the vertex in the subset and the vertex in the non subset part. This leads to a contradiction.

For that we have to find another edge e' in the tree T so that when we exchange e with e' it will create another tree T' where the cost of T' is less than that of T.

: When we add e to T it creates a cycle as T is a spanning tree .And when we follow this path we must find another edge that goes from the subset part to the non subset part which is considered as e'.

:exchanging e' with e gives another T' where the cost of T'<T

"finally we have to show that T' is a spanning tree that has the lowest cost.

Now Proof of Prim's Algorithm; ( by contradiction)

First we assume that Prim's Algorihthm will not give a Minimal Spanning Tree.

Then we take a M which is a MST for the Graph.

Prim will construct a sequence of Trees Ti where i contains the vertices and i-1 contains the edges.

At some point there will be a tree Tk where the edge is not contained inside the MST.

By Applying the Cut Theorem.

Let Tk be the subset part and V-Tk be the rest of the part of the graph.

The edge with the minimum cost that lies in both Tk and V-Tk must be in MST.

In prims algorithm the edges are selected by definition of the algorithm.

Thus, Tk must contain the same edge as in the MST.

This will contradict that Prim's Algorithm can not find a MST.

Add a comment
Know the answer?
Add Answer to:
Show that Prim's algorithm is correct using the Cut Theorem.
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
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