We have five algorithms that run in O(log n), O(n), O(n), O(n), and O(2), respec
ID: 3748451 • Letter: W
Question
We have five algorithms that run in O(log n), O(n), O(n), O(n), and O(2), respectively. The running times of each algorithm, for n-100 are as follows: . O(log n) -1us .O(n) 1 ms .O(n)- 10 ms 2. O(n)-1 s 0(2)-3600 s How long would it take to run for each of the algorithms if n 10,000? 3. We have five algorithms that run in O(log n), O(n), O(m), O(n), and 0(2), respectively. We discovered that the largest problem (that is, the largest value of n) that each algorithm could finish in 10 ms was as follows: . O(log n) -n- 10,000 · 0(n)-n= 10,000 .O(n)-n-5,000 .O(n)-n-1,000 0(2) -n-30 Approximately, what is the largest problem that each of the algorithms can solve in 1 second?Explanation / Answer
for n=10,000
O(log n) - 2us , O(n) - 100ms , O(n^2)- 100s , O(n^3)- 1000000s , O(2n) - 360000s
part 2 for 1 second time , n is as follows for algos
O(n) - 1000000 , O(n^2)- 50000 , O(n^3)- 6666.66
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.