3 ms·
Well, a quadratic lower bound is better than an exponential lower bound, in the sense that the problem could still turn out to not be in EXPTIME but in PTIME.
by rix0r 16y ago
Well, a quadratic lower bound is better than an exponential lower bound, in the sense that the problem could still turn out to not be in EXPTIME but in PTIME.
It is worse in the sense that it tells us less about the actual complexity class the problem is in, so I guess it depends on what you interpret "better" to mean in this context.
- amichail 16y agoYou could always say the lower bound is zero or some very small function. That's pointless and is not better in any sense.
- cma 16y agoThere are two notions of lower bound: lower bound like you are talking about (the function always takes longer than this to run for an input of size n) lower bound across all inputs of size n (the function never runs faster than this, given any possible input of size n) The two are different
- sonoffett 16y agoI'm pretty sure your second definition is an upper bound (big-O) and the first definition is a lower bound (big-Omega). EDIT: adding a link to the wikipedia article defining Big-O and Big-Omega: http://en.wikipedia.org/wiki/Big_O_notation http://en.wikipedia.org/wiki/Big_O_notation
- cma 16y agoYeah I screwed that up, what I meant to refer to is this: >It is not contradictory however, to say that the worst-case >running time of insertion sort is [Big Omega](n^2), >since there exists an input that causes the algorithm >to take [Big Omega](n^2) time. >Introduction to Algorithms, 2nd Edition, p 46