How many edges are there in a tree with 21 verticies?

Also if that is not enough of an headache how about this. Can anyone help???

I am trying use the prism algorithm to find a minimal spanning tree for a weighted graph. The instuction are to (start at A) and give the weight of the minimal spanning tree found.

Recommended Answers

All 4 Replies

In a tree, every node has an edge 'pointing' to it, except for one root node.

You're trying to use Prim's Algorithm, not some "prism" algorithm. Read what Prim's Algorithm is, and follow the instructions the algorithm gives you.

Prim's algorithm is applied to a connected weighted graph with n vertices, it actually produced a minimal spanning tree. Let T be as in the algorithm - the is, T is a set to which we add edges one at a time until we get a spanning tree. I read but do not quite understand.

Read the algorithm's instructions itself and follow them. If you can't understand, ask yourself why you can't understand the written instructions, and fix the holes in your knowledge so that you do understand.

Read the algorithm's instructions itself and follow them. If you can't understand, ask yourself why you can't understand the written instructions, and fix the holes in your knowledge so that you do understand.

hahaha.. thats gotta be the most frank advice I've seen on daniweb..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.