Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calculating total number of spanning trees containing a particular set of edges

I have tried the following approach:

First I do edge contraction for all the edges in the given set of edges to form a modified graph.

Then I calculate the total number of spanning trees, using the matrix tree theorem, from the modified graph.

I want to know if this method is correct and if there are some other better methods.

like image 604
amitkarmakar Avatar asked Jul 03 '10 20:07

amitkarmakar


People also ask

How many edges will be in a spanning tree of this graph?

Spanning tree has n-1 edges, where n is the number of nodes (vertices). From a complete graph, by removing maximum e - n + 1 edges, we can construct a spanning tree. A complete graph can have maximum nn-2 number of spanning trees.

How many spanning trees does 4 vertices have?

The answer is 16. Figure 2 gives all 16 spanning trees of the four-vertex complete graph in Figure 1. Each spanning tree is associated with a two-number sequence, called a Prüfer sequence, which will be explained later.

How many spanning trees are possible for a complete graph with 5 nodes?

A complete undirected graph can have nn-2 number of spanning trees where n is the number of vertices in the graph. Suppose, if n = 5, the number of maximum possible spanning trees would be 55-2 = 125.


2 Answers

Let G be a graph, let e be an edge, and let G/e be the same graph with e contracted. Then,

Proposition: There is a bijection between the spanning trees of G that contain e, and the spanning trees of G/e.

This proposition is not hard to prove; you're better off understanding the proof yourself instead of just asking other people whether it's true. Obviously if you have a spanning T tree of G that contains e, then T/e is a spanning tree of G/e. The thing to think through is that you can also go backwards.

And, as Adam points out, you have to be careful to properly handle graphs with parallel edges and graphs with edges from a vertex to itself.

like image 190
Greg Kuperberg Avatar answered Sep 26 '22 22:09

Greg Kuperberg


I don't know if it's correct or not, but you'll have to be careful of the fact that edge contraction can lead to parallel edges. You'll have to make sure that trees differing only by which parallel edge is used are counted as being distinct.

like image 21
Adam Crume Avatar answered Sep 26 '22 22:09

Adam Crume