You are in charge of the IT division for a company that has 1,048,576 customers. Your boss asks you to decide between buying a database system from Vendor A or Vendor B. Both systems are the same price but Vendor B’s computer (computers are included in each system) has hardware that is 1000 times faster than that provided by vendor A. However, Vendor A’s system is based on an algorithm that returns a response to a query in time proportional to 10nlog2n machine operations where n is the number of customers in the database while Vendor B’s system is based on an algorithm that returns a response to a query in time proportional to 10n2 machine operations. Vendor A’s computer has a speed of 1 nanosecond (=10-9 seconds) per operation.


How long (in seconds, rounded correctly to three decimal places to the right of the decimal) would Vendor A’s system take to return a response to a query based on your current number of customers? seconds


How long (in seconds, rounded correctly to three decimal places to the right of the decimal) would Vendor B’s system take to return a response to a query based on your current number of customers? seconds

Respuesta :

Answer:

See explaination for the details

Explanation:

Vendor A's total operation = 10 * (1048576) * (log2(1048576)) = 209715200

time taken for A's = 209715200 * 10-9 = 0.2097152 second = 0.210 second

Now Vendor B's total operation = 10 * (1048576)2 = 1.09951163 * 1013

time taken for B's = 1.09951163 * 1013 * 10-9 = 1099.51163 second = 1099.512 second