1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Mathematical Induction in binary trees

  1. Oct 24, 2015 #1
    1. The problem statement, all variables and given/known data
    Show that every 2-tree(Definition 3.2) with n internal nodes has n+1 external nodes

    2. Relevant 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.

    3. 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.
     
  2. jcsd
  3. Oct 25, 2015 #2

    andrewkirk

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    What is your reason for thinking that that follows?
     
  4. Oct 25, 2015 #3
    k internal nodes= k+1 external nodes. But I have been thinking and this doesnt 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 dont know how to show that.
     
  5. Oct 25, 2015 #4

    andrewkirk

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    What happens to the internal and external node counts when you take an external node and give it two child nodes?
     
  6. Oct 25, 2015 #5
    +2 external nodes +1 internal nodes
     
  7. Oct 25, 2015 #6

    andrewkirk

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Yes there are two new external nodes, but what is the net change in the number of external nodes?.
     
  8. Oct 25, 2015 #7
    1?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Mathematical Induction in binary trees
  1. Binary trees (Replies: 1)

  2. Binary Search tree (Replies: 5)

Loading...