Question: Q . Programs A and B are analyzed and found to have worst - case running times no greater than 1 5 0 ( nlogn

Q. Programs A and B are analyzed and found to have worst-case running times no greater than 150(nlogn) and n2, respectively.
Which of the following statements does the analysis imply?
(a) Program A will run faster on average for sufficiently large n.
(b) Program B will run faster on average for small n.
(c) Program A is probably simpler to code than program B.
(d) There exists some input for which program B takes longer than program A.
(e) none of the above
Q. An algorithm takes 10 seconds for an input size of 50.
If the algorithm is quadratic, approximately how long does it take to solve a problem of size 100?
(a)10 seconds
(b)20 seconds
(c)40 seconds
(d)100 seconds
(e) none of the above
Q13. An algorithm takes 30 seconds for an input of size 1000. If the algorithm is quadratic, how large a problem can be solved in two minutes?
(a)2000
(b)4000
(c)6000
(d)60000
(e) none of the above
Q. An algorithm takes 6 seconds to solve a problem of size 100 and ten minutes to solve a problem of size 1000.
What is the likely running time of the algorithm?
(a) constant
(b) linear
(c) quadratic
(d) cubic
(e) none of the above

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!