123k views
5 votes
A binary tree is full if all of its vertices have either zero or two children. Let Bn denote the number of full binary trees with n vertices.

(a) By drawing out all full binary trees with 3, 5, or 7 vertices, determine the exact values of B3, B5, and B7. Why have we left out even numbers of vertices, like B4?


(b) For general n, derive a recurrence relation for Bn.

(c) Show by induction that Bn is (2n). 2.14. You are given an array of n elements, and

User Tib
by
5.0k points

1 Answer

6 votes

Answer:

(a)
B_3 = 1\\B_5 = 2\\B_7 = 5

(b) See attached

(c)
B_n = 2^((n-3)/2)

Step-by-step explanation:

A binary tree is full if all of its vertices have either zero or two children. Let-example-1
A binary tree is full if all of its vertices have either zero or two children. Let-example-2
User Lacrymology
by
3.9k points