in Algorithms
7,402 views
1 vote
1 vote

What does it mean when we say that an algorithm X is asymptotically more efficient than Y?
(A) X will be a better choice for all inputs
(B) X will be a better choice for all inputs except small inputs
(C) X will be a better choice for all inputs except large inputs
(D) Y will be a better choice for small inputs


Ans given is B, but is it always the case?? At some points it might be true but I do not think this is the case for each and every input..

in Algorithms
by
7.4k views

4 Comments

Then why B ( X will be a better choice for all inputs except small inputs ) is considered true?

we can show that some algorithms having lower time complexity even work best for small cases..!
0
0
see

X is better than Y for large values.

and for small values X may or may not be better. So you are correct.

but it does not matter like i said. In above example difference of 45 seconds is nothing as compared to difference of 10 hours. So thats why we see asymptotic notations for larger values only.
1
1
Thanks .. :)
0
0

Please log in or register to answer this question.

Related questions