Google Answers Logo
View Question
 
Q: TREES AND GRAPHS ( No Answer,   4 Comments )
Question  
Subject: TREES AND GRAPHS
Category: Computers > Algorithms
Asked by: dan1976-ga
List Price: $3.00
Posted: 25 Apr 2005 22:07 PDT
Expires: 25 May 2005 22:07 PDT
Question ID: 514258
1) If a forest F consists of m trees and has n vertices, how many
edges does F have.?

Clarification of Question by dan1976-ga on 25 Apr 2005 22:08 PDT
F is simpe graph with no cycles
Answer  
There is no answer at this time.

Comments  
Subject: Re: TREES AND GRAPHS
From: quadraticresidue-ga on 26 Apr 2005 09:08 PDT
 
If you try a few examples, you should be able to see a pattern pretty easily.
Subject: Re: TREES AND GRAPHS
From: mathtalk-ga on 27 Apr 2005 06:53 PDT
 
What a great handle, "quadraticresidue-ga"!

Yes, start with a single tree.  If it had n vertices, it would have n-1 edges.

Now a forest is a collection of trees.  In each tree there is one
fewer edge than the number of vertices in that tree.

So, how many edges does a forest F require with m trees and n vertices (total)?

regards, mathtalk-ga
Subject: Re: TREES AND GRAPHS
From: dikun-ga on 02 May 2005 12:38 PDT
 
Sorry for my broken English!

> If a forest F consists of m trees and has n vertices, how many
edges does F have.?
> F is simpe graph with no cycles

For all trees Ti from the forest F (1 <= i <= m):

V(Ti) = Vi - a quantity of vertices, 1 <= i <= m.
E(Ti) = Ei - a quantity of edges, 1 <= i <= m.
Ei = Vi - 1 - this is a simple feature of tree.
E(F) = E1 + E2 + ... + Em = (V1 - 1) + (V2 - 1) + ... + (Vm - 1) = (V1
+ V2 + ... + Vm) - m.
But V1 + V2 + ... + Vm = V(F) = n.
Then E(F) = n - m.

Thanx.
Subject: Re: TREES AND GRAPHS
From: abdulmuqsith-ga on 26 Aug 2005 07:18 PDT
 
Forest if collection of disjoint trees.
Step 1: Start from a single tree with n vertices. This will have n-1 edges.
Step 2: Remove an edge from this tree. Now there are 2 trees and
number of edges = n-2.
Step 3: Recursively going the Step 2 m-1 times will leave us with m
trees and number of edges = n-m.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy