Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

One algorithm takes 1 sec to execute on your machine to process a dataset of siz

ID: 3748770 • Letter: O

Question

One algorithm takes 1 sec to execute on your machine to process a dataset of size N. You replace your machine with one that is 10 times faster. What will be the size of the dataset you can process in 1 sec, if the execution time for a dataset of size n is proportional to…

One algorithm takes 1 sec to execute on your machine to process a dataset of size N. You replace your machine with one that is 10 times faster. What will be the size of the dataset you can process in 1 sec, if the execution time for a dataset of size n is proportional to... a) n b) n2 c) kg n

Explanation / Answer

a) f(n)=O(n)

Old machine :

For O(n)

1 sec for size N data

New machine is ten time FASTER So

1 sec for size 10N data

b) f(n)=O(n2)

1 sec for size N data

New machine is ten time FASTER So

1 sec for size (10)0.5N data because if we put (10)0.5N in our function f(n)we get 10*f(n)

c) O(logn)

1 sec for size N data

New machine is ten time FASTER So

1 sec for size 1024N data because if we put 1024N in our function f(n)we get 10*f(n)

thumbs up if you are satisfied with answer otherwise reply with your concern  

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote