snippetMinor
Example of exponential algorithm performing better than a polynomial one?
Viewed 0 times
performingpolynomialexampleexponentialthanbetteralgorithmone
Problem
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.)
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.)
Solution
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.
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.
Context
StackExchange Computer Science Q#38219, answer score: 5
Revisions (0)
No revisions yet.