Question: If a (2^n) algorithm requires 10 seconds to execute on an input of 10 elements, calculate approximately how long should it take on an input

If a (2^n) algorithm requires 10 seconds to execute on an input of 10 elements, calculate approximately how long should it take on an input of 20 elements? If a (log_2 n) algorithm requires 20 seconds to execute on an input of one million elements, calculate approximately how long should it take on an input of two million elements? If a computer is capable of performing one billion operations per second, calculate approximately how long would it take to execute an algorithm that requires n^2 operations on an input of two million elements? Show all workings!

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!