4
$\begingroup$

I have a weird question.

I was just wondering if there were some problem with two solutions; one (A) being exponential time, the other one (B) being polynomial time. However the constants involved are such that, in "practice", the algorithm (A) performs better.

For instance, we could have something like $(1 + 10^{-100})^n$ versus $n^{10^{100}}$.

(I said exponential vs. polynomial, but any other distinction would do.)

$\endgroup$
2

1 Answer 1

5
$\begingroup$

I think the classic example of this is in Linear Programming.

The Simplex Algorithm is exponential time, but fast in practice. There is a polynomial time algorithm, but it's generally slower.

See the relevant Wikipedia entry.

$\endgroup$
1
  • $\begingroup$ You're right. But, the simplex seems to have polynomial time average complexity. I had in mind comparing complexities of the same type (worst-case, average, ...). Only the constants would change. Thanks anyway! $\endgroup$ Commented Feb 10, 2015 at 22:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.