...
Asymptotic-Complexity
October 26, 2023
Asymptotic-Complexity
October 26, 2023
Asymptotic-Complexity
October 26, 2023
Asymptotic-Complexity
October 26, 2023

Asymptotic-Complexity

Question 19
Two alternative packages A and B are available for processing a database having 10k records. Package A requires 0.0001n​2​ time units and package B requires 10nlog​10​n time units​ ​ to process n records. What is the smallest value of k for which package B will be preferred over A?
A
12
B
10
C
6
D
5
Question 19 Explanation: 
As per given information Package B 10nlog​ 10​ n is lesser than or equals to Package A 0.0001n​ 2​ 0
because n​ 2​ is asymptotically larger than nlogn. Finally, 10nlog​ 10​ n ≤ 0.0001n​ 2
Let n = 10​ k​ records. Substitute into 10nlog​ 10​ n ≤ 0.0001n​ 2
10(10​ k​ )log​ 10​ 10​ k​ ≤ 0.0001(10​ k​ )​ 2
10​ k+1​ k ≤ 0.0001 × 10​ 2k
k ≤ 10​ 2k−k−1−4
k ≤ 10​ k−5
According to the problem value 6 is suitable for K.
Correct Answer: C
Question 19 Explanation: 
As per given information Package B 10nlog​ 10​ n is lesser than or equals to Package A 0.0001n​ 2​ 0
because n​ 2​ is asymptotically larger than nlogn. Finally, 10nlog​ 10​ n ≤ 0.0001n​ 2
Let n = 10​ k​ records. Substitute into 10nlog​ 10​ n ≤ 0.0001n​ 2
10(10​ k​ )log​ 10​ 10​ k​ ≤ 0.0001(10​ k​ )​ 2
10​ k+1​ k ≤ 0.0001 × 10​ 2k
k ≤ 10​ 2k−k−1−4
k ≤ 10​ k−5
According to the problem value 6 is suitable for K.
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!!