Question: Task 1.5: (Bonustask either presentation or written solution) Given are five algorithms for the same (unknown) problem that get an array of size n as

Task 1.5: (Bonustask either presentation or written solution) Given are five algorithms for the same (unknown) problem that get an array of size n as the input. The number of operations of the algorithms in dependence of n are log2 n, n, n log n, n2 and 2n, respectively. Give their running times using an adequate time unit (e.g. nanoseconds,..., years) in each case for different values of n. You can round the time values to integers and ignore running times above 10 years. (a) (1 point) Suppose your computer can do 10 operations per second. 2 log2 n n log n n? n=10 n=20 n=21 n=1000 n=1000 000 n=1000 000 000 (b) (1 point) Suppose your computer can do 1000 000 operations per second. log2 n n log n n2 n=10 n=20 n=21 n=1000 n=1000 000 n=1000 000 000 n 2n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
