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 nExplanation / 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
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.