× Home

Spanning Trees & Maximum Number of Spanning Trees

Things to know

  • Subgraphs:
    • A subgraph of a graph G is a graph whose vertices and edges are subsets of the original graph G.
    • It means that if we consider the graph G illustrated below, then its subgraph could be the graph S.
    • S is a subgraph of graph G because nodes 0, 1 and 3 form the subset of the set of nodes in G, and the edges connecting 0 and 3 and 0 to 1 also from the subset of the set of edges in G
    • Another subgraph of graph G could be the one mentioned below.
    • This is a subgraph of graph G too, because node 3, 2 and form the subset of the set of nodes in G, and the edges connecting 3 to 4, 3 to 2, and 2 to 4 also form the subset of the set of edges in G.
  • Connected Graphs:
    • A connected graph, as the word connected suggests, is a graph that is connected in the sense of a topological space, i.e., that there is a path from any point to any other point in the graph. And the graph which is not connected is said to be disconnected
    • Consider the graph below:
    • We have marked two random points P1 and P2, and we'll see if there is a path P1 to P2.
    • There is a path from P1 to P2 via nodes 2 and 4.
    • There could be a number of other ways to reach point P2 from P1, but there should exist atleast one path from any point to another point for the graph to be called connected, otherwise disconnected.
  • Complete Graphs:
    • A complete graph is a simple undirected graph in which every pair of distinct vertices is connected by a unique edge. Below illustrated complete graphs with 3 and nodes respectively.
    • In any of the examples above, every pair of nodes is connected using a unique edge of their own. That is what makes a graph complele.
    • Note → every complete graph is connected graph, but all connected graph are not necessarily complete.

What are spanning trees?

Number of spanning trees for complete graphs.

  • A complete graph has nn-2 spanning trees where n represents the number of vertices in the graph.
  • Consider the complete graph below with 4 nodes
  • This complete graph has 4 vertices, hence the number of spanning trees it can have is, 4 raised to the power (4-2), i.e., 42 which is 16.