Question: I NEED SOLUTION PLEASE WITH EXPLANINIG Example 1: (Algorithms Analysis) For an O(24) algorithm, a friend tells you that it took 17 seconds to run

I NEED SOLUTION PLEASE WITH EXPLANINIGI NEED SOLUTION PLEASE WITH EXPLANINIG Example 1: (Algorithms Analysis) For an

Example 1: (Algorithms Analysis) For an O(24) algorithm, a friend tells you that it took 17 seconds to run on her data set on a (2") algorithm. You run the same program, on the same machine, and your data set with n= 7 takes 68 seconds. What size was her data set? Solution: Let running time of the algorithm on an input of size nbe T(n). Then T(n)=C(2") for some constant C For data set with n=7, it gives T(7)=C (27 68 = C (128) C = 68/128 = 17/32 Now, to find the size of data set for our friend, we again use the same formula

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!