Skip to content
Related Articles

Related Articles

G-Fact 20 (Cayley’s formula for Number of Labelled Trees)

Improve Article
Save Article
  • Difficulty Level : Easy
  • Last Updated : 13 Feb, 2018
Improve Article
Save Article

Consider below questions.

  1. How many spanning trees can be there in a complete graph with n vertices?
  2. How many labelled Trees (please note trees, not binary trees) can be there with n vertices?

The answer is same for both questions.

For n = 2, there is 1 tree.

For n = 3, there are 3 trees.

For n = 4, there are 16 trees


The formula states that for a positive integer n, the number of trees on n labeled vertices is nn-2


This article is contributed by Vaibhav Gupta. Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!