0

Hello;

can any 1 explain to me how to find the miniumum spanning tree for a graph ?


see this graph as an example :

Attachments Image1.jpg 10.53 KB
4
Contributors
9
Replies
10
Views
10 Years
Discussion Span
Last Post by Dmitry74
0

There are several ways. Not to mention that graph algorithms tend not to be trivial, so you'd be better off studying existing solutions, like Prim or Kruskal's algorithms.

0

i do not know these algorithms
we just studying Chapter of graph quickly and with out coding.

but see this solved example :

Attachments Im21.jpg 16.17 KB Imag22e2.jpg 9 KB
1

> i do not know these algorithms
You would have to learn them to solve the problem at hand. Try the wikipedia. It should help you in getting started at least.

0

>i do not know these algorithms
Which is why I suggested that you study them. If you did know them, you wouldn't be asking how to find a minimum spanning tree. Really, is Google that difficult to use?

0

>i do not know these algorithms
Which is why I suggested that you study them. If you did know them, you wouldn't be asking how to find a minimum spanning tree. Really, is Google that difficult to use?

and it's so difficult to learn some one don't know !

what can i do if teachers don't explain it , and there is no time to search and search .

0

But the fact remains that you _do_ have to study them by hook or by crook. Otherwise how do you expect to clear the test?

Here is a site which would help you in learning them with those pretty visualizations.

0

>and it's so difficult to learn some one don't know !
I gave you the exact name of two algorithms that find a minimum spanning tree. What more do you want? Me to write up two super easy implementations and describe how every line works? I didn't feel the need to do that when just about every result from Google has sample code.

>what can i do if teachers don't explain it , and there is no time to search and search .
http://en.wikipedia.org/wiki/Prim's_algorithm
That's the first result from Google. It took me about 5 seconds to search and search. Stop being a weenie and show some effort.

0

ohh,

stop it plz

sorry sr for wasting your time in typing

and thanks for the algorithm's name

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.