Reputation: 11
What is the Formula to Find the minimum number of vertices required to make a binary tree (not a complete binary tree) of height 5 ?
Upvotes: 1
Views: 3990
Reputation: 325
the minimum number of vertices in a binary tree of height n (with no further constraints) is always n.
proof:
Upvotes: 1
Reputation: 136
A binary tree's height cannot be bigger than the number of nodes or vertices in the tree. So yes, the minimum number of vertices required for a binary tree of height 5 will be 5. Also, there must be n-1 edges between them. You can imagine a single series of connected nodes, and that is basically what you get.
Alternately, a full binary tree is a binary tree in which each internal vertex has exactly two children.This means a binary tree with n internal vertices has 2n + 1 vertices, 2n edges, and n + 1 leaves.
Upvotes: 1