Question: Consider a function sleep ( t ) that makes a computer processor sleep for a t miliseconds. Consider the function: function f ( n )

Consider a function sleep(t) that makes a computer processor sleep for a t miliseconds. Consider the function: function f(n){ sleep(log(n)/n)} Clearly, as n increases, the time length of execution of f decreases. Which of the following is correct (you may take for granted that lon(n)/n converges to zero when n grows): Question 2Answer a. Runtime of f is in Theta(1/n) b. Runtime of f is in Theta(0) c. Runtime of f is in Theta(1) d. It is impossible to define a Theta bound for this function, because the complexity of sleep function depends on its hardware implementation.

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 Databases Questions!