Question: Two algorithms, P and Q , have time complexities p ( n ) and q ( n ) , respectively, where p ( n )

Two algorithms, P and Q, have time complexities p(n) and q(n), respectively, where p(n)
is O(q(n)) and q(n) is not O(p(n)). Three computers C1, C2, C3 are used to execute these
programs. Computer C2 is 1.2 times faster that computer C1 and computer C3 is 10 times
faster than computer C2. Which of the following statements is true?
(A) When executed on the same computer P is always faster than Q.
(B) When P is executed on C1 and Q is executed on C2, Q is faster than P for large inputs.
(C) When P is executed on C3 and Q is executed on C1, P is always faster than Q.
(D) When P is executed on C1 and Q is executed on C3, Q is always faster than P .
(E) When P and Q are executed on C2, P is faster than Q for large inputs.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!