logoalt Hacker News

chuckadams • yesterday at 2:43 PM • 1 reply • view on HN

This is a total laymans perspective, but: I've never figured how we could get an algorithm that's O(n^1000) or whatever other constant exponent for general problems like NP. n^2 algorithms are a dime a dozen, n^3 isn't super uncommon either, but what magic trick would confine the exponent to anything constant for a class of algorithms where n is unbounded and there's otherwise no other number in it to derive that from?


Replies

tonyarkles • yesterday at 3:02 PM

I've been chewing on the same question and found this at least: https://arxiv.org/abs/2207.07613v1 with O(n^31) and O(n^23) for specific problems!

Edit: also, slightly more contrived, O(n^k) algorithms aren't all that unusual. For example, a naive algorithm for finding k-cliques in graphs. That looks exponential, but by the rules of big-O, if you fix k to a constant, then it just becomes a large constant exponent polynomial-time algorithm.

➕ show 1 reply