Question: ou should find that the runtime behaves differently depending on the 3 possible relationships between a bd and 1 . Qualitatively explain the behavior in
ou should find that the runtime behaves differently depending on the possible relationships
between a
bd and Qualitatively explain the behavior in each case. Ill do one case as an example:
if a
bd that means that a tends to be small relative to b and d If b and d are large, that means
that recursive calls happen on inputs that are much smaller than the original input, and a lot of
timeoperations are spent not in recursive calls. If a is small, that means there are not a lot of
recursive calls. Putting these ideas together, we expect that in this case the runtime will not
be strongly dependent on the recursive calls. From our analysis in part j we see that when
a
bd the whole runtime of the algorithm is Ond However, note that the original function
call uses Ond time, excluding recursive calls! This means that all of the recursive calls in the
whole algorithm are basically not adding anything significant to the runtime, and the majority
of the runtime is spent at the top of the tree, at the root. This makes sense, given our qualitative
explanation that we expect the runtime to not be strongly affected by recursive calls. Now you
should do a similar analysis for the other two cases: a
bd and a
bd
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
