Question: Let's prove the inductive step ( where T is not a single leaf ) . Call its left and right subtrees T 1 and T
Let's prove the inductive step where is not a single leaf Call its left
and right subtrees and Assume that and
The proof breaks into cases, depending on whether rankrankrank and prove that
rankrank rankrank Let's the first case for
this question: assume that rank and prove that
Now do the second case Again, you can assume
and and your goal is to prove
The last case rank is similar to the first, but with the
roles of and switched. Reproduce it here.Finally, show that rank is not controlled by Provide an infinite list of
trees where rank is unbounded and is bounded.Consider the following recursive definition of a function from complete
binary trees to rational numbers.
You can see that the definition is almost like size, except for that And it's
like the example from class, except the denominator is instead of
Now recall from class the definition of rank of a tree:
rank
Notice that in the last line, rank could have just as well been expressed
as rank as this is the case where they are equal.
In this problem set, you will determine which of these quantities controls
the other. First we will show that rank controls specifically that
rank for any tree by induction. The base case is easy: if is a single leaf,
then rank so
Problems start on the next page.
Lets prove the inductive step where T is not a single leaf Call its left
and right subtrees T and T Assume that iota T rankT and
iota T rankT
The proof breaks into cases, depending on whether rankT rankT
rankT rankT or rankT rankT Lets do the first case for
this question: assume that rankT rankT and prove that iota T
rankT
Now do the second case rankT rankT Again, you can assume
iota T rankT and iota T rankT and your goal is to prove
iota T rankT
The last case rankT rankT is similar to the first, but with the
roles of T and T switched. Reproduce it here.
Finally, show that rank is not controlled by iota Provide an infinite list of
trees where rank is unbounded and iota is bounded.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
