Re: Formula for finding edges of graph



On Wed, 18 Feb 2009 15:19:03 -0800 (PST), erdos <account@xxxxxxxxx>
wrote:

For a complete graph, the formula for finding all edges is n(n-1)/2.
For a tree it is n-1. If I have something in between a complete
graph and tree, how do I go about finding the edges without manually
counting them? It is similar to a regular graph. In this case all
vertices have at least one edge.

If you know how the degrees are distributed (i.e. how many of the n
vertices have which degrees), then simply use the fact that the sum of
the degrees (one for each vertex) is equal to twice the number of
edges.

quasi
.



Relevant Pages

  • Re: Is There a Java Class for this Kind of Data Structure?
    ... I was looking into a tree because I thought that would be the easiest ... directed graph. ... and you iterate over the queue until it's empty (meaning ...
    (comp.lang.java.programmer)
  • Re: Two Steps Forward One Step Back Re: Newbie list traversal
    ... >> Why don't you build a graph from your list before generating the DOT ... In you case, it looks like you're considering LISTs to be the nodes, ... To take the example of your *linear* tree: ... you'll notice that the DOT file can be written ...
    (comp.lang.lisp)
  • Re: Relationship Tables...too many
    ... multiple pages, in my opinion, so you can isolate trees or tree groups ... any table to any other table in the relatinship graph. ... is to add even more table occurrences. ... The Contact anchor table might have related TOs of SalesOrder, ...
    (comp.databases.filemaker)
  • Re: Organizations with two or more Managers
    ... If your graph happens to be a tree, ... boyd would contrast that with the blitzkrieg and guderian's directive ... there are going to be mistakes. ...
    (microsoft.public.sqlserver.programming)
  • Re: Next Generation of Language
    ... |>> algorithms are graph based and have to search a tree. ... |>> graph algorithms are inherently unparallelizable. ... | over any number of cores (supposing one doesn't care about exact DFS ...
    (comp.lang.lisp)

Quantcast