For each function f(n) and time t in the following table, determine the largest
ID: 3549665 • Letter: F
Question
For each function f(n) and time t in the following table, determine the largest size n of a problem that can be solved in time t, assuming that the algorithm to solve the problem takes f(n) microseconds.
I believe that the 2 second answer for row "n" would be 2,000,000. Please help!
For each function f(n) and time t in the following table, determine the largest size n of a problem that can be solved in time t, assuming that the algorithm to solve the problem takes f(n) microseconds. (Hint: for the last row try out problem sizes starting at 1,2,3, ... and compare the time to the time available.)Explanation / Answer
yes u r right.
u just have to put a value n in the given f(n) and find the maximum value of 'n' that gives f(n) less than the given time.
If we consider 1st row log(n)[it will be generally to base 2] the ansers of 'n' will be as follows
2^(2*1000000); 2^(600*100000); 2^(12*60*60*1000000); 2^((8*365+2*366)*24*60*60*1000000)
If we consider 2nd row the answers of 'n' will be as follows
2*1000000; 10*60*1000000; 12*60*60*1000000; (8*365+2*366)*24*60*60*1000000
If we consider 3rd row we get[Note: n is always an integer if u get fraction take its floor (or step)value]
18;56;133;793
If we consider 4th row we get
9;12;13;16
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.