Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Example of an impractical algorithm known to be in P?

It's generally accepted that problems that can be solved in polynomial time are "tractable" while algorithms requiring more time than this are intractable. Of course, being solvable in polynomial time says nothing of absolute efficiency; for example, something that runs in time n1000 is completely impractical in practice.

Although I've seen a fair number of polynomial-time algorithms, I've never seen one for a practical problem that ran in more than O(n4), which was the original version of Edmonds' matching algorithm.

My question is: is there a well-known problem whose best polynomial-time algorithm is completely impractical for real inputs? Obviously we can construct simple contrived problems that are utterly useless, but I'm curious if there's a famous problem for which the best known solution is both polynomial-time and entirely infeasible.

EDIT: To clarify, I should probably say that I'm looking for an algorithm with an enormous exponent on the problem size, rather than a hard-to-implement algorithm or one with a huge constant factor. As Moron pointed out, there are many famous impractical algorithms with great asymptotic behavior.

like image 790
templatetypedef Avatar asked Feb 28 '11 09:02

templatetypedef


1 Answers

PRIMES is in P: AKS primality test, complexity O(n6), where n = log N is the number of bits used to encode a prime candidate.

While this is a beautiful theoretical result, testing for primality is usually performed with Miller-Rabin test, or with other randomized algorithms alike.

like image 82
macieksk Avatar answered Nov 27 '22 13:11

macieksk