Mathematical Induction in binary trees

AI Thread Summary
Every 2-tree with n internal nodes has n+1 external nodes, as established by mathematical induction. The base case shows that with 1 internal node, there are 2 external nodes. The inductive hypothesis assumes that k internal nodes correspond to k+1 external nodes. When adding an internal node, it replaces one external node but creates two new external nodes, resulting in a net increase of one external node. The confusion lies in understanding the net change in external nodes when transitioning from k to k+1 internal nodes.
TheMathNoob
Messages
189
Reaction score
4

Homework Statement


Show that every 2-tree(Definition 3.2) with n internal nodes has n+1 external nodes

Homework Equations


A 2 tree is a tree which nodes have 2 children or no children.
Internal nodes are nodes which have two children
external nodes are leafs.

The Attempt at a Solution


Proof
base case
n=1
Internal nodes=1
external nodes=2

Inductive step

Inductive hypothesis: Let k internal nodes have k+1 external nodes
so k+1 internal nodes will have (k+1)+1 external nodes.
 
Physics news on Phys.org
TheMathNoob said:
so k+1 internal nodes will have (k+1)+1 external nodes.
What is your reason for thinking that that follows?
 
andrewkirk said:
What is your reason for thinking that that follows?
k internal nodes= k+1 external nodes. But I have been thinking and this doesn't make any sense.
1 internal node= 2 external nodes
so k+1 internal nodes= k+3 external nodes.

I know that when you add an internal node, you should eliminate one external node, but I don't know how to show that.
 
What happens to the internal and external node counts when you take an external node and give it two child nodes?
 
andrewkirk said:
What happens to the internal and external node counts when you take an external node and give it two child nodes?
+2 external nodes +1 internal nodes
 
Yes there are two new external nodes, but what is the net change in the number of external nodes?.
 
andrewkirk said:
Yes there are two new external nodes, but what is the net change in the number of external nodes?.
1?
 
Back
Top