Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
There is a squirrel named that lives in a tree with n branches, and she wants to find the lowest possible branch that when an
There is a squirrel named that lives in a tree with n branches, and she wants to find the lowest possible branch that when an acorn is dropped it will break open, however, once an acorn is broken it cannot be dropped again and the squirrel must use the remaining acorns given some number of drops, thus, given the constraints below, please help come up with solutions fitting these runtimes.
a) Suppose that the squirrel has two acorns. Give a procedure so that she can identify the correct branch using O(Vn) drops [We are expecting: Pseudocode AND a short English description of your algorithm, and a justification of the number of drops. If it helps you may assume that n is a perfect square.] b) Suppose that the squirrel has kO(1) acorns. Give a procedure so that she can identify the correct branch sing O(n1/k) drops [We are expecting: Pseudocode AND a short English description of your algorithm, and a justification of the number of drops. If it helps you Tnany assurne that n is of the form n = m for some integer m.] C) What happens to your algorithm in part (b) when k[log(n)1? Is it O(log(n), like in part (a)? Is it 0(n 1/k) when k = rlog(n)1+ 1, like in part (b We are expecting: A sentence of the form "the number of drops of my algorithm in part (b) when k-(n)1 + 1 is 0( )", along with justification. Also, two yeso answers to the two yeso questions (you should justify your answers but do not need to include a formal proofStep 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