Skip to content
Related Articles
Open in App
Not now

Related Articles

GATE | GATE CS 2010 | Question 11

Improve Article
Save Article
  • Last Updated : 20 Dec, 2017
Improve Article
Save Article

Two alternative packages A and B are available for processing a database having 10k records. Package A requires 0.0001n2 time units and package B requires 10nlog10n 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


Answer: (C)

Explanation:

Since, 10nlog10n ≤ 0.0001n2 

Given n = 10k records. 

Therefore, 

⟹10×(10k)log1010k ≤ 0.0001(10k)2

 âŸ¹10k+1k ≤ 0.0001 × 102k

 âŸ¹k ≤ 102k−k−1−4 

⟹k ≤ 10k−5

 Hence, value 5 does not satisfy but value 6 satisfies. 6 is the smallest value of k for which package B will be preferred over A. Option (C) is correct.


Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!