Reference no: EM13168070
Assume you have two algorithms, A and B, both of which perform the same function,
although their implementations differ. Assume that algorithm A has a running time of O(N3 + 2N2
+ 6N + 3) and algorithm B has a running time of O(6N2 + 4N + 10). Also assume that the value of
N is restricted to the set of Natural numbers, including 0; i.e., {0, 1, 2, 3, ...}. Answer the following
questions:
a. Assuming the test conditions are equal for both algorithms, which algorithm should be most
efficient when N is arbitrarily large (i.e., you can choose N to be as large as you want it to
be)?
b. Assuming the test conditions are equal for both algorithms, which algorithm should be most
efficient when N is arbitrarily small (i.e., you can choose N to be as small as you want it to
be)?
c. Assuming the test conditions are equal for both algorithms, at what value of N might both
algorithms be expected to operate with the same efficiency?