Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started