r/algorithms • • 3h ago

Discussion Examples of galactic algorithms with large polynomial exponents

One of the common refrains here is that "P=NP might not have any practical effect if the algorithm found is galactic in terms of polynomial exponents I.e. O(n^1000)"

Do we have an example of a natural problem solvable in polynomial time, but with large exponents? More strongly, do we have any problem where the large exponent polynomial is proven optimal?

8 Upvotes

5 comments sorted by

5

u/tstanisl 3h ago

Actually, the matrix multiplication with recently proven complexity O(n2.25) or O(N1.125) where N is actual size of inputs is the first problem I know about that has polynomial superlinear lower bound.

1

u/United_Chocolate_826 21m ago

Two months ago, I would’ve given univariate polynomial identity testing as an example of something with n2 runtime under NSETH.

Nowadays “under NSETH” doesn’t mean much…

2

u/techy5000 1h ago

I think people are missing the point when it comes to galactic algorithms. It need not just be O(n^1000) or some insane exponent. An O(n) algorithm with a large constant that makes it slow on almost all feasible input sizes can also be considered galactic

An example of a galactic algorithm is Primality using the AKS primality test. Despite having an O((log n)^6) asymptotic complexity, the implicit constant factors are so large that it made it impractical to use for almost all testable integers. The deterministic Miller-Rabin algorithm (before GRH was proved last Friday) had exponential time complexity, but it still was the better algorithm to use for primality testing.

So, AKS primality is a classic example of a galactic algorithm that has a very appealing asymptotic time complexity (the exponent isn’t even that large) but is impractical compared to exponential-time algorithms for the same task (e.g., Miller-Rabin). It goes to show that, as complexity theorist Ryan Williams stated, we don’t understand polynomial time complexity well enough to even know what P=NP would signify without actually taking a look at the polytime reduction from 3SAT to the polynomial-time algorithm (there might be other ways to prove P=NP beyond this, but this is the method I know)

1

u/ConjectureProof 50m ago

Keep in mind that you can also have galactic constants of proportionality. You can multiply numbers in O(n ln(n)) but the big O notation obscures an absurdly large constant.

-1

u/AerosolHubris 2h ago

In complexity class problems we reduce from one decision problem to another in the same class. As long as that reduction is polynomial it counts, and sometimes those reductions have pretty big degree polynomials behind them. I can't think of a specific one right now but I've seen some larger ones.