Related Articles

# GATE | GATE CS 2010 | Question 11

• Last Updated : 20 Dec, 2017

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

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

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up