...
Question 13897 – Algorithms
November 27, 2023
Question 16812 – Algorithms
November 27, 2023
Question 13897 – Algorithms
November 27, 2023
Question 16812 – Algorithms
November 27, 2023

Question 13943 – Algorithms

If algorithm A and another algorithm B take log2(n) and √n microseconds, respectively, to solve a problem, then the largest size n of a problem these algorithms can solve, respectively, in one second are______ and ______.

Correct Answer: B

Question 551 Explanation: 
A microsecond is 10−6 seconds. Hence, one second = 106 microseconds, one hour = 3600000000 = 3.6 · 109 microseconds, one month (assume a month has 30 days) = 2592000000000 = 2.592 · 1012 microseconds, and one century = 3110400000000000 = 3.1104 · 1015 microseconds.
f(n) = log n In this case, we need to determine the largest n such that log n ≤ 1000000. To solve this inequality, we need to rewrite the inequality as 2logn ≤ 2 1000000 or n ≤ 2 1000000.
210 ≈ 103 , thus we have that 21000000 = 210·100000 = (210) 100000 ≈ (103 ) 100000 = 10300000
A
2106 and 106
B
2106 and 1012
C
2106 and 6 x 106
D
2106 and 6 x 1012
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!