Open In App

GATE | GATE CS 2010 | Question 11

Like Article
Like
Save
Share
Report

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


Last Updated : 20 Dec, 2017
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads