Computer Science, asked by deepsahil1295, 11 months ago

Prove that in a binary tree n0

= n2 + 1, where, n0

is the number of nodes with no children and n2 is the

number of nodes with two children​

Answers

Answered by Deesahant1234
6

Answer:

let n, e be the total no. of nodes and edges of the binary tree respectively. let n0 = total no. of nodes with 0 children n1 = total n0. of nodes with 1 child n2 = total no. of nodes with 2 children therefore, n = n0 + n1 + n2......(1) again e= n-1.....................(2) also e = n1 + 2*n2...............(3) from (2) and (3) n-1=n1 + 2*n2 =>n=1 + n1 + 2*n2.............(4) from (1) and (4) n0 + n1 + n2 = 1 + n1 + 2*n2 =>n0=1 + n2... proved

Explanation:

please Mark me as brainlest answer

Similar questions