PA of Algorithms Q62

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

  • Option : C
  • Explanation :
    B must be preferred on A as
    0.0001 n2 < 10 n log10 n
    ⇒ 10-5 n < log10n
    ⇒ 10-5 < log10n1/n
    ⇒ n 10-5 < log10n
    We know log10n = k
    ⇒ 10k = t
    ⇒ k > 10-5 10k
    ⇒ k > 10k-5
    ⇒ k – 5 > 0
    ⇒ k > 5
    Then min k = 6
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *