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 T is not a single leaf). Call its left
and right subtrees T1 and T2. Assume that l(T1)2*rank(T1) and
l(T2)2*rank(T2)
The proof breaks into 3 cases, depending on whether rank(T1)=rank(T2)rank(T1)>rank(T2)l(T)2*rank(T)rank(T1), and prove that l(T)
2*rank(T)rank(T1),
rank(T1)=rank(T2),or rank(T1)>rank(T2). Let's do the first case for
this question: assume that rank(T1), and prove that l(T)
2*rank(T) Now do the second case ). Again, you can assume
(T1)2*rank(T1) and (T2)2*rank(T2) and your goal is to prove
t(T)2*rank(T) The last case (rank(T1)>rank(T2)) is similar to the first, but with the
roles of T1 and T2 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.
(T)={0ifTisasingleleaf1+12((T1)+(T2))ifThassubtreesT1andT2
You can see that the definition is almost like size, except for that 12.(And it's
like the example from class, except the denominator is 2 instead of 4.)
Now recall from class the definition of rank of a tree:
rank(T)={0ifTisasingleleaf,elsemax{rank(T1),rank(T2)}ifrank(T1)rank(T2),else1+rank(T1)ifrank(T1)=rank(T2)
(Notice that in the last line, 1+rank(T1) could have just as well been expressed
as 1+rank(T2), 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 l(T)2.
rank(T) for any tree T, by induction. The base case is easy: if T is a single leaf,
then (T)=rank(T)=0, so (T)2*rank(T).
Problems start on the next page.
1. Lets prove the inductive step (where T is not a single leaf). Call its left
and right subtrees T1 and T2. Assume that \iota (T1)=2 rank(T1) and
\iota (T2)=2 rank(T2).
The proof breaks into 3 cases, depending on whether rank(T1) rank(T2),
rank(T1)= rank(T2), or rank(T1)> rank(T2). Lets do the first case for
this question: assume that rank(T1) rank(T2), and prove that \iota (T)=
2 rank(T).
2. Now do the second case (rank(T1)= rank(T2)). Again, you can assume
\iota (T1)=2 rank(T1) and \iota (T2)=2 rank(T2) and your goal is to prove
\iota (T)=2 rank(T).
3. The last case (rank(T1)> rank(T2)) is similar to the first, but with the
roles of T1 and T2 switched. Reproduce it here.
4. Finally, show that rank is not controlled by \iota . Provide an infinite list of
trees where rank is unbounded and \iota is bounded.
Let's prove the inductive step ( where T is not a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!